Jump to content


Photo

Extremephysics - 2d Physics Engine For Game Maker


  • Please log in to reply
1144 replies to this topic

#21 theludicrous

theludicrous

    GMC Member

  • New Member
  • 241 posts

Posted 07 October 2009 - 09:07 PM

wow, it looks a lot better when its gray, here you go:
Posted Image

thanks for the complement :D
  • 0

#22 Maarten Baert

Maarten Baert

    GMC Member

  • GMC Member
  • 715 posts
  • Version:GM8.1

Posted 07 October 2009 - 10:01 PM

Great! And with alpha channel :D!

Unfortunately I haven't had that much time to work on the code because I had to study. It will take a bit longer than I expected to finish v2.0.
  • 0

#23 theludicrous

theludicrous

    GMC Member

  • New Member
  • 241 posts

Posted 07 October 2009 - 11:15 PM

Great! And with alpha channel :D!

Unfortunately I haven't had that much time to work on the code because I had to study. It will take a bit longer than I expected to finish v2.0.


I cant wait (literally) but take your time, its better to release a quality engine slowly than a sketchy engine quickly :D
  • 0

#24 Maarten Baert

Maarten Baert

    GMC Member

  • GMC Member
  • 715 posts
  • Version:GM8.1

Posted 08 October 2009 - 06:17 PM

During the rewrite I got stuck all the time because I was trying to add too many new features at the same time. So I have decided to finish the rewrite first without these features and release it (v2.0) and add the features later (v2.1). That way I will be able to release it faster, and it will probably be more stable as I am only reusing features I have tested already.
  • 0

#25 theludicrous

theludicrous

    GMC Member

  • New Member
  • 241 posts

Posted 08 October 2009 - 08:26 PM

During the rewrite I got stuck all the time because I was trying to add too many new features at the same time. So I have decided to finish the rewrite first without these features and release it (v2.0) and add the features later (v2.1). That way I will be able to release it faster, and it will probably be more stable as I am only reusing features I have tested already.


What are these features you talk about? B)
  • 0

#26 wargasm

wargasm

    GMC Member

  • GMC Member
  • 189 posts

Posted 09 October 2009 - 11:17 AM

/*

I used this program to test if all functions of the DLL worked. This is NOT a good example for using ExtremePhysics
in a game. All tests use debugdraw for graphics because this is easier, but you should NOT do this in a real game!
If you need an empty engine, use empty_engine.gmk

*/


Where is this empty_engine.gmk file? It's not packaged with the zip and I've searched the forum to see if there's a download but can't find one.

Edited by wargasm, 09 October 2009 - 11:18 AM.

  • 0

#27 wargasm

wargasm

    GMC Member

  • GMC Member
  • 189 posts

Posted 09 October 2009 - 01:00 PM

I'm playing around (while learning GML) and here is what I have so far. I'm simply attempting to create a box with gravity. The comments are what I assume i'm doing.....

// Initiate the dll? Not sure how this works yet.
ExtremePhysics_init();

// Initiate the GML functions?
ep_gmfunctions_init();

// Create a world for the physics objects. I'm assuming the function returns the world id which I am setting to the arena variable. No parameters to set the world position and dimensions? Default = room size?
arena = ep_world_create();

// Create a box (is this just a collision box or should it be visible?) for my player object which atm is just a 64x64 box sprite. I'm assuming the last 2 parameters are a boolean and float. (rotation 0/1, density 0-X.....X being whatever the maximum density is).
ep_object_component_create_box( arena, ob_Player, 64, 64, 320, 320 ,1, 1 );

// Set the gravity of the player object. Assuming last 2 parameters (x, y) to be floats.
ep_object_set_gravity( arena, ob_Player, 0.5, 0 );

// Set the mass of the player object. Assuming the last parameter (mass) to be a float.
ep_object_set_mass( arena, ob_Player, 0.5 );

When running this im given the error "ep_object_set_gravity: Can not set gravity of ground object in world 1".

Where am I going wrong and can someone please clarify on the questions in the comments? Thanks.

Edited by wargasm, 09 October 2009 - 01:08 PM.

  • 0

#28 theludicrous

theludicrous

    GMC Member

  • New Member
  • 241 posts

Posted 10 October 2009 - 06:44 PM

/*

I used this program to test if all functions of the DLL worked. This is NOT a good example for using ExtremePhysics
in a game. All tests use debugdraw for graphics because this is easier, but you should NOT do this in a real game!
If you need an empty engine, use empty_engine.gmk

*/


Where is this empty_engine.gmk file? It's not packaged with the zip and I've searched the forum to see if there's a download but can't find one.


yeah, where is it?
  • 0

#29 Maarten Baert

Maarten Baert

    GMC Member

  • GMC Member
  • 715 posts
  • Version:GM8.1

Posted 11 October 2009 - 08:46 PM

It's not finished yet and I had forgotten I had mentioned it. This is just an alpha version, not the final engine (I still have to make a .gex and a help file).
  • 0

#30 theludicrous

theludicrous

    GMC Member

  • New Member
  • 241 posts

Posted 13 October 2009 - 08:33 PM

So, hows the engine going?
  • 0

#31 Maarten Baert

Maarten Baert

    GMC Member

  • GMC Member
  • 715 posts
  • Version:GM8.1

Posted 14 October 2009 - 08:00 PM

Better, I finally managed to install Visual C++ on this computer, so I can compile the DLL in VC++ now. VC++ seems to generate faster code so this will make the DLL even faster :lol:. But there is still a lot of work to do, though.

I was wondering, what would be the best way to use the engine in C++?
  • adding all source files to the project and compiling it yourself:
    + no external files
    + works with all compilers
  • using one header file and a library:
    + no external files
    + easy to switch to a newer version
  • using one header file and a dll:
    + generates the same code for all compilers
    + easy to switch to a newer version
    + possible use the same DLL for both C++ and GM
What do you think?
  • 0

#32 PsichiX

PsichiX

    GMC Member

  • GMC Member
  • 358 posts

Posted 14 October 2009 - 08:53 PM

IMO

using one header file and a dll:

good idea

possible use the same DLL for both C++ and GM

bad idea. some data types for c++ version will be better than double. So make LIB for c++ version, and wrap it to GM version.
  • 0

#33 Maarten Baert

Maarten Baert

    GMC Member

  • GMC Member
  • 715 posts
  • Version:GM8.1

Posted 14 October 2009 - 09:01 PM

No, I meant putting all functions in one DLL: C++ classes and c-style (GM) functions. GM will just ignore the classes and C++ can use them.

So make LIB for c++ version, and wrap it to GM version.

I don't want to recompile two projects every time I make a change to the code, just to test it :lol:.
  • 0

#34 theludicrous

theludicrous

    GMC Member

  • New Member
  • 241 posts

Posted 15 October 2009 - 01:47 AM

I wish I could help you on this Maarten but I know little to nothing in C++ :)
  • 0

#35 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 15 October 2009 - 02:24 AM

I don't want to recompile two projects every time I make a change to the code, just to test it :).


In that case, I would suggest a dll that is usable by both C++ and GM. The file size would be slightly increased, but would be easier for you to maintain. Basically one would create the functions optimized for C++ and then create wrapper functions for GM that recast value types as needed. There's my 2 cents.

-hanson
  • 0

#36 Maarten Baert

Maarten Baert

    GMC Member

  • GMC Member
  • 715 posts
  • Version:GM8.1

Posted 16 October 2009 - 07:16 PM

Never mind, I found the solution:

Using project dependencies
Project dependencies are a simple way to tell Code::Blocks that a given project "depends" on another (in the same workspace, always).
Thus imagine in your workspace you have a library project and an executable project which depends on the library. Then you could (and should) tell Code::Blocks about this dependency. To do this, you select "Project->Properties" and click the "Project's dependencies.." button.


I will just create a GCC library and a DLL for GM using that library, and I will create libraries for other compilers later.
  • 0

#37 posva

posva

    GMC Member

  • New Member
  • 610 posts
  • Version:GM8

Posted 20 October 2009 - 09:01 PM

i hope you realease a beta version soon, and of course qith a simple example for introducing your DLL :)
  • 0

#38 ash47

ash47

    O_o

  • GMC Member
  • 1326 posts

Posted 21 October 2009 - 06:30 AM

Please put 2D or something similar into the topic title, :) thanks ;) P.S. That is pretty awesome, i get like 23-28 FPS though, lol...
  • 0

#39 theludicrous

theludicrous

    GMC Member

  • New Member
  • 241 posts

Posted 23 October 2009 - 07:17 PM

any progress?
  • 0

#40 Maarten Baert

Maarten Baert

    GMC Member

  • GMC Member
  • 715 posts
  • Version:GM8.1

Posted 25 October 2009 - 06:35 PM

I have finished the structure of the engine, but there's still a lot of code that has to be rewritten.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users