Posts: 333
Threads: 36
Joined: Nov 2023
Reputation:
3
I cannot recall if I have raised this question before... forgive if I have... What is involved in creating a simple physics engine / library? Say something like Box2D or Box2D-lite? The big question(s)... Can N7 do it... and how?
J
Logic is the beginning of wisdom.
Posts: 69
Threads: 4
Joined: Dec 2023
Reputation:
4
(03-04-2024, 05:50 AM)johnno56 Wrote: I cannot recall if I have raised this question before... forgive if I have... What is involved in creating a simple physics engine / library? Say something like Box2D or Box2D-lite? The big question(s)... Can N7 do it... and how?
J
Hi Johnno, that would be awesome, although pretty difficult I would imagine.
However, I seem to remember that in either N5 or N6 there was (I think) a wrapper for Box2D that allowed it's use - I'm sure I wrote a couple of games using it. I'll try to look them up a little later today - I know a lot of my older stuff got lost a couple of years ago though.
Posts: 69
Threads: 4
Joined: Dec 2023
Reputation:
4
(03-04-2024, 07:37 AM)kevin Wrote: (03-04-2024, 05:50 AM)johnno56 Wrote: I cannot recall if I have raised this question before... forgive if I have... What is involved in creating a simple physics engine / library? Say something like Box2D or Box2D-lite? The big question(s)... Can N7 do it... and how?
J
Hi Johnno, that would be awesome, although pretty difficult I would imagine.
However, I seem to remember that in either N5 or N6 there was (I think) a wrapper for Box2D that allowed it's use - I'm sure I wrote a couple of games using it. I'll try to look them up a little later today - I know a lot of my older stuff got lost a couple of years ago though.
OK, N6 had a library for Box2D - attached below:
Box2D_Next_1_0_0.zip (Size: 359.46 KB / Downloads: 5)
However, I have no idea how hard it would be to port it to N7, or whether it is even possible, I'm afraid.
Posts: 344
Threads: 41
Joined: Nov 2023
Reputation:
3
A physics library would be fun. But I don't want to add something like box2d support to the language itself. I want as few dependencies as possible. And currently there's no way to write "extensions" for n7 (write a library in n7 that calls functions in a DLL file). N6 had that. I will probably implement such an extension system later on, but it's not that high up on my priority list.
On the other hand, writing a physics engine directly in n7 would be quite fun and something I'd love to try. Would it be possible? I ... think so. Not as advanced as box2d but probably "good enough".
Physics games (like Angry Birds), ofcourse, require drawing transformed images. I'm working on that now, and it's going very well. I was thinking about going 3d after that (software rendered 3d, as in the good old days). But maybe I'll try physics instead, I'm not sure - I'd probably have to buy a book ...
Posts: 333
Threads: 36
Joined: Nov 2023
Reputation:
3
03-04-2024, 07:09 PM
(This post was last modified: 03-04-2024, 07:10 PM by johnno56.)
oh... books on physics... good luck with 'that' potential rabbit hole... lol I watched a Youtube clip on this guy that was making his own physics engine... the number of different "laws" that govern this or that is mind blowing... then trying to translate those into code... my brain hurts just thinking about it... lol
Whether the "engine" is included into N7 or N7 is used to make the "engine" are both great ideas... I was just curious as to whether or not it was possible and how to go about doing it...
Speaking of rabbits... You pulled out the 3D rabbit from the hat... "as in the good old days"... Can I assume that you may be referring to a "Raycaster", just like N6's? or are you thinking of pulling out all the stops and going for a "Doom-like" engine? Either one would be cool....
Just remember 'priorities'. First things first... As soon as you have created a Warp Drive then you can work on your "engines"... lol
There maybe very little I can do to help, but if I can, just let me know... (the "engines" NOT the Warp Drive)... lol
Logic is the beginning of wisdom.
Posts: 90
Threads: 17
Joined: Nov 2023
Reputation:
2
I don't like realistic physics engines like box 2d, unfortunately nowadays all games use these types of engines and they are extremely boring games.
I prefer the unrealistic physics that were used in Megadrive and Super Nintendo games, all with a much more arcade approach and above all very fun games.
Posts: 344
Threads: 41
Joined: Nov 2023
Reputation:
3
(03-04-2024, 07:19 PM)aliensoldier Wrote: I don't like realistic physics engines like box 2d, unfortunately nowadays all games use these types of engines and they are extremely boring games.
I prefer the unrealistic physics that were used in Megadrive and Super Nintendo games, all with a much more arcade approach and above all very fun games.
I fully agree with you I can't stand platform games that use box2d, because they all feel exactly the same.
But for some types of games realistic physics makes sense
Posts: 333
Threads: 36
Joined: Nov 2023
Reputation:
3
I was never a fan of Megadrive and never used a SNES... (I know. Shock. Horror!) Can you cite an example of "unrealistic" physics for the aforementioned machines? Just curious. Not judging...
Logic is the beginning of wisdom.
Posts: 90
Threads: 17
Joined: Nov 2023
Reputation:
2
(03-05-2024, 03:24 AM)johnno56 Wrote: I was never a fan of Megadrive and never used a SNES... (I know. Shock. Horror!) Can you cite an example of "unrealistic" physics for the aforementioned machines? Just curious. Not judging...
You can also look at the master system, nes, pc engine or micro computers like spectrum, amstrad, commodore friend, atari st etc...
The 8 and 16 bit generations use unrealistic physics and also the arcade games that you can try on the mame. I would say that 99 percent or more of those games do not use realistic physics but if you want an example then on the megadrive to go Trying you can watch golden ax, the shinobi saga, the sonic, comix zone, contra, castlenavia, sparkster, Teenage Mutant Hero Turtles, the street of rage saga and for me the best action game of all time "Alien Soldier", they are Only a few examples but as I say, most use unrealistic physics with some exceptions.
Posts: 333
Threads: 36
Joined: Nov 2023
Reputation:
3
03-05-2024, 07:00 PM
(This post was last modified: 03-05-2024, 07:32 PM by johnno56.)
Now that you mention those games, there are some in there, that I have actually played on my old Amstrad... Unrealistic? Got it...
Even with the simplest physics engine, do you think that the old Amstrad or Commadore, with a CPU running at about 4mhz, could handle the necessary number crunching and screen handling? I wonder.... lol
Logic is the beginning of wisdom.
|