eduard-permyakov / permafrost-engine Goto Github PK
View Code? Open in Web Editor NEWAn OpenGL RTS game engine written in C
License: GNU General Public License v3.0
An OpenGL RTS game engine written in C
License: GNU General Public License v3.0
I get the following error when running
Could not load settings from file: .//pf.conf [status: 3]
I was able to solve this simply by creating a pf.conf file on the main directory, but since this was a blank file my guess is that no configuration is being loaded or that default values are being used, also I wasn't able to find any pf.conf file on the code
flock.gif and pathfinding.gif stutter heavily as committed in c494267. This appears to be a capture error, not a playback issue: there are lots of blank frames in the GIFS (e.g., in flock.gif, frames 26-47, 49, 51, 54, 58...).
I was going to capture some replacements myself (and still might), but I'm having some trouble building the project (segfault compiling the Python dependency), so I thought I'd just create an issue for now.
Engine internals exposed to Python 2.7 for scripting
Python 2 is not supported anymore, a lot of Linux distributions provided without Python2 by default - Ubuntu 20.04 for example.
We needed to sunset Python 2 so we can help Python users by improving Python faster.
https://www.python.org/doc/sunset-python-2
Maybe it's time to move to Python 3 ?
Please add support for Python 3. 😎
The in-source SDL2 dependency can't be built on latest arch linux due to an undefined reference to some wayland methods. Hopefully, this has been fixed here libsdl-org/SDL@068c13b
static bool scene_load_faction(SDL_RWops *stream)
{
char line[256];
but the macro define #define MAX_LINE_LEN 320
Awesome project! I have always liked playing Age of Empires and I admire your work by having a similar game.
I am currently interested in training agents to play the game. After looking into the project source code, I have noticed that the project uses python but it doesn't have a python wrapper like https://github.com/google-research/football where you can interact with the engine.
I think having a python wrapper will enable researchers to use the game to train agents to play the game and this will be a great environment to experiment on!
Are you planning to have a python wrapper implemented? Can the community try to tackle this? Thanks!
i got
Vertex info
-----------
(0) : error C6020: Constant register limit exceeded at curr_res; more than 1024
registers needed to compile program
then i reduce #define MAX_HBS (512) to 500
but if there exsit any beter solution
when a unit dies the area it was on stays permanently visible on the fog of war
I'd love to try this out on my Mac. I think the code should run fine on a mac, but there doesn't seem to be any OSX support included in the makefile.
[CC] obj/game/fog_of_war.o
[CC] obj/game/clearpath.o
src/game/clearpath.c: In function ‘G_ClearPath_NewVelocity’:
src/game/clearpath.c:618:29: error: ‘ret.raw[1]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
618 | s_debug_saved.v_new = ret;
| ~~~~~~~~~~~~~~~~~~~~^~~~~
src/game/clearpath.c:343:12: note: ‘ret.raw[1]’ was declared here
343 | vec2_t ret;
| ^~~
src/game/clearpath.c:618:29: error: ‘ret.raw[0]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
618 | s_debug_saved.v_new = ret;
| ~~~~~~~~~~~~~~~~~~~~^~~~~
src/game/clearpath.c:343:12: note: ‘ret.raw[0]’ was declared here
343 | vec2_t ret;
| ^~~
cc1: all warnings being treated as errors
make: *** [Makefile:163: obj/game/clearpath.o] Error 1
Fedora, GCC 10.2.1
static bool g_init_cameras(void)
{
for(int i = 0; i < NUM_CAMERAS; i++) {
s_gs.cameras[i] = Camera_New();
if(!s_gs.cameras[i]) {
return false;
}
Camera_SetSpeed(s_gs.cameras[i], CAM_SPEED);
Camera_SetSens (s_gs.cameras[i], 0.05f);
g_reset_camera(s_gs.cameras[i]);
}
}
Any plans for supporting this in WASM like maybe emscripten?
Platform
Latest arch linux
Steps to reproduce
rm -r deps/SDL2
git clone --depth 1 https://github.com/libsdl-org/SDL/ deps/SDL2
(related to #29)
make deps -j16
make pf -j16
make run
Expected behavior
Game should run correctly
Actual behavior
Splash image with some armed dudes shows up, then the game crashes with
pf: src/render/gl_shader.c:670: _Bool R_GL_Shader_InitAll(const char *): Assertion `SDL_ThreadID() == g_render_thread_id' failed.
Some investigation
At gl_shader.c:670, g_render_thread_id
equals 0 and SDL_ThreadID()
equals 139936868296256.
kh_update_str_keys will lead kh_resize krealloc h->vals release h->keys(i test it on vs2015-win32 scene.c)
Attempting to build on windows, here's me trying to make deps:
C:\Dev\permafrost-engine>make deps PLAT=WINDOWS
mkdir -p ./lib
make -C ./deps/GLEW extensions
make[1]: Entering directory `C:/Dev/permafrost-engine/deps/GLEW'
make -C auto
make[2]: Entering directory `C:/Dev/permafrost-engine/deps/GLEW/auto'
--------------------------------------------------------------------
OpenGL descriptors
--------------------------------------------------------------------
rm -rf extensions/gl
cp -r glfixes/gl/specs/ANGLE OpenGL-Registry/extensions
cp -r glfixes/gl/specs/REGAL OpenGL-Registry/extensions
bin/update_ext.sh extensions/gl OpenGL-Registry/extensions blacklist
FIND: Parameter format not correct
--------------------------------------------------------------------
WGL descriptors
--------------------------------------------------------------------
rm -f extensions/gl/WGL_*
python bin/parse_xml.py OpenGL-Registry/xml/wgl.xml --api wgl --extensions extensions/gl
Found 298 enums, 146 commands, 1 features and 57 extensions.
--------------------------------------------------------------------
GLX descriptors
--------------------------------------------------------------------
rm -f extensions/gl/GLX_*
python bin/parse_xml.py OpenGL-Registry/xml/glx.xml --api glx --extensions extensions/gl
Found 294 enums, 134 commands, 5 features and 67 extensions.
--------------------------------------------------------------------
EGL descriptors
--------------------------------------------------------------------
python bin/parse_xml.py EGL-Registry/api/egl.xml --api egl --extensions extensions/gl
Found 655 enums, 154 commands, 6 features and 150 extensions.
--------------------------------------------------------------------
filter descriptors
--------------------------------------------------------------------
bin/filter_gl_ext.sh extensions/gl
grep: extensions/gl/GL_NV_texture_compression_vtc: No such file or directory
make[2]: *** [extensions/gl/.dummy] Error 2
make[2]: Leaving directory `C:/Dev/permafrost-engine/deps/GLEW/auto'
make[1]: *** [extensions] Error 2
make[1]: Leaving directory `C:/Dev/permafrost-engine/deps/GLEW'
make: *** [lib/glew32.dll] Error 2
In the demo, if I select more than one unit and attempt to move them by right-clicking, the process dies with an assertion failure:
pf: src/navigation//nav.c:1000: N_DesiredVelocity: Assertion `ret == id' failed.
I have no problems moving single units, and I think this problem occurs with any two or more units regardless of type.
Hi,
i compiled with code with gmake but have issues in Makefile
Target system is FreeBSD
lol@ ~/D/permafrost-engine (master)> gmake deps PLAT=LINUX
mkdir -p ./lib
make -C ./deps/GLEW extensions
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 37: Missing dependency operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 38: Could not find config/Makefile.
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 39: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 40: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 41: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 50: Missing dependency operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 52: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 78: Missing dependency operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 80: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 82: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 113: Missing dependency operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 115: Missing dependency operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 116: warning: duplicate script for target "ifneq" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 114: warning: using previous script for "ifneq" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 117: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 118: Missing dependency operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 119: warning: duplicate script for target "ifneq" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 114: warning: using previous script for "ifneq" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 120: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 124: Missing dependency operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 125: warning: duplicate script for target "ifneq" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 114: warning: using previous script for "ifneq" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 126: warning: duplicate script for target "ifneq" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 114: warning: using previous script for "ifneq" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 127: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 128: Missing dependency operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 129: warning: duplicate script for target "ifneq" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 114: warning: using previous script for "ifneq" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 129: warning: duplicate script for target "(strip,)" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 119: warning: using previous script for "(strip,)" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 130: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 173: Missing dependency operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 175: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 177: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 184: Missing dependency operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 185: warning: duplicate script for target "ifneq" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 114: warning: using previous script for "ifneq" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 185: warning: duplicate script for target "(strip,)" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 119: warning: using previous script for "(strip,)" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 186: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 190: Missing dependency operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 191: warning: duplicate script for target "ifneq" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 114: warning: using previous script for "ifneq" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 191: warning: duplicate script for target "(strip,)" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 119: warning: using previous script for "(strip,)" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 192: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 211: Missing dependency operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 212: warning: duplicate script for target "(,)" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 116: warning: using previous script for "(,)" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 213: warning: duplicate script for target "(,)" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 116: warning: using previous script for "(,)" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 214: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 216: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 217: Missing dependency operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 218: warning: duplicate script for target "ifneq" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 114: warning: using previous script for "ifneq" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 218: warning: duplicate script for target "(ln)" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 126: warning: using previous script for "(ln)" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 218: warning: duplicate script for target "(-sf,)" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 126: warning: using previous script for "(-sf,)" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 219: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 222: Missing dependency operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 223: warning: duplicate script for target "ifeq" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 213: warning: using previous script for "ifeq" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 223: warning: duplicate script for target "(,)" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 116: warning: using previous script for "(,)" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 224: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 225: Missing dependency operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 226: warning: duplicate script for target "ifneq" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 114: warning: using previous script for "ifneq" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 226: warning: duplicate script for target "(ln)" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 126: warning: using previous script for "(ln)" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 226: warning: duplicate script for target "(-sf,)" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 126: warning: using previous script for "(-sf,)" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 227: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 250: Missing dependency operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 251: warning: duplicate script for target "ifeq" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 213: warning: using previous script for "ifeq" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 251: warning: duplicate script for target "(,)" ignored
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 116: warning: using previous script for "(,)" defined here
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 252: Need an operator
make[1]: "/permafrost-engine/deps/GLEW/Makefile" line 255: Need an operator
make[1]: Fatal errors encountered -- cannot continue
make[1]: stopped in /permafrost-engine/deps/GLEW
gmake: *** [Makefile:133: lib/libGLEW.so.2.2] Error 1
I get the following errors when trying to execute
make run
or make run_editor
Failed to initialize GLEW Makefile:186: recipe for target 'run' failed make: *** [run] Segment violation
I have already compiled the dependencies and the pf engine
when i modfiy
char texnames[header->num_materials][256];
to char (*texnames)[256] = (char(*)[256])malloc(header->num_materials * 256);
there‘re appear some confusing exception in stb,
then i use just a static arraychar texnames[64][256];
things become okay;
CVE-2021-33657 is a security vulnerability in SDL2, which is used in this project. The root cause of this CVE is that map
which is allocated in Map1toN()
or Map1to1
isn't always created as a full 256-entry map. A bmp image can cause heap buffer overflow in Blit1to3()
, when the pixel value in pixel array src
is equal or larger than the number of colors stored in map
.
you can easily fix this vulnerability by applying this patch.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.