Rag Doll physics

kanaida

Active Member
Licensed User
Longtime User
Hey guys, I was playing around with trying to make a game. Sort of tried the ABC physics library with little success. I'm basically trying to do some ragdoll physics in 2d. I'm trying to make a little guy and a little vehicle for him to go into so I can make one of those type of games where they go over terrain and what not. I figured that's probably a good way to start experimenting with game development. If anyone can help it would be appreciated.

The idea is to draw a sky in the background, let some clouds pass by, then draw the ground as one or a few png's and let some sort of physics library figure out what to do with objects colliding with it. Then add some controls to increase the spin of the wheels on the car. Perhaps in a shared effort we could make some sort of generic physics based game engine for b4a that we can all use. The other thing I've been kind of seeing how to make is the menu's for it. I was thinking something like a basic menu system and then a bunch of little level files that get read with filenames like level_1_1 that could be read by reading the dir contents so we don't have to update the menu itself, just make more chapters and levels as little files. Perhaps even make some sort of random level/terrain generator

I'm kind of new to that whole concept, I sort of get the basics. I just keep getting kind of stumped when I try to write it out. For example when thinking keeping cpu use down.

a) Tick()
b) check for collisions, update objects
c) process movement presses
d) draw all visible objects using a gamecanvas or opengl, perhaps in layers to make it easier to work with foreground/background stuff.

I've seen a few little useful examples here and there, but nothing really putting it all together in a fast performing simple engine.

On another note too, they don't have to be totally accurate. It could be an approximation of physics or some small formula to *look* like physics
 
Last edited:

adshead

New Member
Licensed User
Longtime User
Basic4Android is not really suitable for games in my opinion. Whilst it has a few things that support games thats not what it was primarily built for and so performance isn't great.

You would be far better going for an SDK that focuses on games in particular and one that has a built in physics engine.

The Gideros SDK is very good. It uses LUA as its scripting language (as do many game sdks) and it's performance is very fast.

You can fully evaluate the product for free and even publish apps without paying anything (so long as you don't mind a splash screen).

Gideros Mobile
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
a) Tick()
b) check for collisions, update objects
c) process movement presses
d) draw all visible objects using a gamecanvas or opengl, perhaps in layers to make it easier to work with foreground/background stuff.
Check the asteroids example. It does all of these tasks.
GameView - Create 2D Android games - Part II
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…