SRL Archive - Suggestions

2D physics engine in Simba?


EvilChicken!

2010-07-31 13:55:48

Got an idea today; wouldn't it be pretty neat if Simba had a built-in 2D physics engine to use in Simba games or even certain (physics simulation?) applications?
Such an addition would have tremendous potential, rendering Simba to become not only a tool for scripting, but also a viable 2D game development suite.

Having discovered box2d some time ago, I'm thinking that it would be awesome if the library could be converted into Pascal, just as it has been converted to AS3. (Seriously, check that site out, demonstrates pretty well what one could do with such an engine.)

I'm making this thread, knowing that we as a community most likely would be able to convert the engine and incorporate it into Simba in no time at all, using our strength in numbers. I simply wish to hear opinions and thoughts regarding this.

Discuss.

marpis

2010-07-31 15:17:18

That'd be a cool add, but only when Simba can turn scripts into standalone .exes

Frement

2010-07-31 15:18:21

From: marpis
That'd be a cool add, but only when Simba can turn scripts into standalone .exes


Exactly my thoughts. I just thought posting about it wouldn't help much about discussing about the actual engine conversion.

EvilChicken!

2010-07-31 15:36:27

You know that you can simply include Simba alongside the script? It wouldn't be ~standalone~ in the true meaning of the word, but would that really be such a huge obstacle?

Dan Cardin

2010-07-31 19:02:45

box2d is kinda silly. I wonder though, i know of 2d engines that are for python, would one be able to use Wizzup's implementation of python, bindings i think it was, in Simba to do the same thing without the work of having of having to port it? Or at least find one written in python and your port is really really simple.

Nava2

2010-08-01 00:48:21

Why would you want to use PS to do stuff like this? :)

the easiest way to do this though would be to use the C++ libraries, and merely add PS bindings to their functions. C++ can be used to extend Simba (see SMART)

Wizzup?

2010-08-01 05:36:27

From: Nava2
Why would you want to use PS to do stuff like this? :)

the easiest way to do this though would be to use the C++ libraries, and merely add PS bindings to their functions. C++ can be used to extend Simba (see SMART)


Who talked about porting it to PS?
Anyway you want to write cpp bindings? So first write non oop bindings around it, and then oop bindings again?

Nava2

2010-08-01 11:48:52

From: Wizzup?
Who talked about porting it to PS?
Anyway you want to write cpp bindings? So first write non oop bindings around it, and then oop bindings again?


Using the merely keyword may not have been completely correct :p

EvilChicken!

2010-08-01 11:50:59

It's just 2d phyics.. Even PS could handle that, lol.

Nava2

2010-08-01 12:12:53

From: EvilChicken!
It's just 2d phyics.. Even PS could handle that, lol.


Kinda doubting it's capabilities here :p

EvilChicken!

2010-08-01 13:18:04

But, writing two sets of bindings seems a bit over-the-top for me..
Is that really the most preferable way to do it?


Besides, people haven't even said what they think about even having it in Simba :p
Any thoughts on that, please?

Wizzup?

2010-08-01 15:15:43

From: EvilChicken!
But, writing two sets of bindings seems a bit over-the-top for me..
Is that really the most preferable way to do it?


Besides, people haven't even said what they think about even having it in Simba :p
Any thoughts on that, please?


Perhaps as a plugin, or enabled only when some setting is set. I think some other things have priority. :)

g0tp0t

2010-11-06 12:37:23

i really dont think simba could handle a physics engine, being single threaded. it seems like it would be extremely slow since it can only think of one thing at a time

BTW, i know multithreading is only an illusion for single proccesor comps, so how does multithreading help?

Wizzup?

2010-11-06 15:08:06

From: g0tp0t
i really dont think simba could handle a physics engine, being single threaded. it seems like it would be extremely slow since it can only think of one thing at a time

BTW, i know multithreading is only an illusion for single proccesor comps, so how does multithreading help?


Most processors have more than one core these days. ;)

g0tp0t

2010-11-06 18:03:51

old pcs dont :shifty:

lol, ur right :P.i dint think of that :P

isnt multithreading faster with more threads than you have proccesers?

i mean that if u have a dual core, then would running three or four threads be faster than running just two? im pretty sure it is faster, i just am not sure why

Gu3st...

2010-11-06 18:18:13

define "faster" :p

g0tp0t

2010-11-06 22:30:10

like if you have a scipt working with 2 threads it would finish its jobs in x amount of time

if you have three threads, then the jobs will be finished in less time than x.

basicly the meaning of faster:P

three threads seems to get more things done in less time than two threads.

Dan Cardin

2010-11-06 23:06:06

From: g0tp0t
like if you have a scipt working with 2 threads it would finish its jobs in x amount of time

if you have three threads, then the jobs will be finished in less time than x.

basicly the meaning of faster:P

three threads seems to get more things done in less time than two threads.


what are you even talking about? Ofc simba could handle it. Fricken javascript can handle it easily enough. The threadedness of it doesnt really matter so this whole thing of yours is pointless.

g0tp0t

2010-11-07 08:04:55

lol. i dont know ow physics engines work, but it seems like they would have to calculate manythings at once so i figured it would probably need multiple threads.

Dan Cardin

2010-11-07 11:17:16

It's not as if you're running a 3d game with lots of logic stuff and calculations. It's 2d and you only need to really check stuff that's moving, which generally only needs to be stuff that's on screen, which really limits the amount of things that you're doing. Especially if it's either circle collisions or tile based maps.

i luffs yeww

2010-11-07 12:47:26

Would this be any different (of course it's different, but I don't think it'd be too different) from doing a 2D platformer like old Mario games for GameBoy? Because I'm pretty sure most computers could run something like that just fine. :p

Dan Cardin

2010-11-07 14:11:11

what do you mean? Gameboy advanced apparently had a 16MHz processor. So anything a gameboy can run a computer for definates can.

i luffs yeww

2010-11-07 15:07:47

Just pointing out to gotpot that any computer would be able to handle this. :p