ENIGMA Forums

General fluff => General ENIGMA => Topic started by: Justme on January 09, 2011, 05:42:52 pm

Title: String Physics
Post by: Justme on January 09, 2011, 05:42:52 pm
Today i compiled ENIGMA R4 (Dev Trunk Settings) to test a speed comparison between ENIGMA and Game Maker 8. I used a cloth physics example by ekgame (original topic: http://gmc.yoyogames.com/index.php?showtopic=469256 (http://gmc.yoyogames.com/index.php?showtopic=469256)) to test. The speeds of the two different compiled .exe are very different, ENIGMA being the faster. Here are the two compiled .exe in a .rar file if you want to test them on your machine (http://www.mediafire.com/?n43mbye72cscws2 (http://www.mediafire.com/?n43mbye72cscws2))


Side Note: I couldn't get ENIGMA to compile and save the example but i could get it to compile and run. To save it i ran the example in ENIGMA and went to windows temp folder and copied the .tmp file and changed the extension to .exe
Title: Re: String Physics
Post by: TheExDeus on January 09, 2011, 06:53:14 pm
Cool. I would actually want to see full blown physics engine in Enigma. I guess it should be a module just like the collision system thou.
And I don't think that is in any way a surprise that Enigma is faster. :)

Quote
I couldn't get ENIGMA to compile and save the example but i could get it to compile and run. To save it i ran the example in ENIGMA and went to windows temp folder and copied the .tmp file and changed the extension to .exe
That's normal. Compile button doesn't actually do anything (as far as I know), so copying from temp directory is how we all do it right now.
Title: Re: String Physics
Post by: r9k on January 09, 2011, 08:50:56 pm
The game can probably be optimised more if you use c++ types and pointers.  (Y)
Title: Re: String Physics
Post by: freezway on January 09, 2011, 11:17:02 pm
Cool, I'm gunna work on a 2d raytracing shadow engine. Could do it better if enigma had surfaces but w/e
Title: Re: String Physics
Post by: TheExDeus on January 10, 2011, 06:31:17 am
Quote
Cool, I'm gunna work on a 2d raytracing shadow engine. Could do it better if enigma had surfaces but w/e
Yeah I am waiting for surfaces for quite some time too. I am trying to implement them myself but I hate C++ and its header files. Just useless piece of shit design that language has. I am doing everything properly as far as I know, but I just can't get it work. I have:
Code: (C++) [Select]
#include <GL/glext.h>Inside of OpenGLHeaders.h and that file glext.h which is in MinGW/Include/GL directory has declarations for glGenFramebuffersEXT, GL_FRAMEBUFFER_BINDING_EXT etc., but when I try to compile I always get:
Quote
GSsurface.cpp:98:30: error: 'glGenFramebuffersEXT' was not declared in this scope
GSsurface.cpp:106:16: error: 'GL_FRAMEBUFFER_BINDING_EXT' was not declared in this scope
GSsurface.cpp:107:23: error: 'GL_FRAMEBUFFER_EXT' was not declared in this scope
And so forth. Josh said that I need to run the makefile .sh but I can't do that on win. And I actually don't get why I would need to do that, as that would just generate Makefile inside the Graphics_Systems\OpenGL directory and that file has this:
Quote
.eobjs_$(MODE)/GSsurface.o: GSsurface.cpp OpenGLHeaders.h ../../API_Switchboard.h
   $(CXX) -c GSsurface.cpp      -o .eobjs_$(MODE)/GSsurface.o $(FLAGS)
Which seems all I need.... I always had problems with this in C++ and so I always made my small projects in one .cpp file.  :raise:
Title: Re: String Physics
Post by: Josh @ Dreamland on January 10, 2011, 06:39:32 am
HaRRi:
I didn't mean to imply that including a GL extensions library was all you had to do. You actually have to declare the function yourself and fetch a pointer to it.

Code: (C++) [Select]
void glGenFramebuffersEXT(GLsizei n, GLuint* ids) { show_error("Surfaces not supported by card."); }
void (*glGenFramebuffersEXT)(GLsizei n, GLuint* ids) = &error_function_glsize_gluint;

//...

if (WHATEVER_YOURE_USING_SUPPORTS("GL_FRAMEBUFFER_EXT"))
    glGenFramebuffersEXT = WHATEVER_YOURE_USING_LOAD("GL_FRAMEBUFFER_EXT", "GL_GEN_FRAMEBUFFERS_EXT");

Or something like that.