Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Micboy

Pages: 1 [2]
16
Game Programming / Box2d Code questions
« on: November 13, 2012, 02:45:22 pm »
Dear All,

I have a few questions regarding Box2d code.

Could someone please give me a quick overview as to what the following different lines of code means:
groundBodyDef.position.Set(0.0f, -10.0f); --> would it make any difference if I didnt not have a float value i.e. would I lose accuracy or would it reduce memory
--> in DFSDK, my ground will be 480pixels by 120pixels at bottom of screen (located at (0,240)). Converting this to metres using my 1/32 scale, would I simply then add these coords to groundBodyDef.position.Set?
*******
rectangle.position.Set(0.0f, 20.0f); --> This will be my sprite. --> would it matter if i didnt have 'f'?
--> in dfsdk, it should be located at (200pixels,180pixels). Therefore, would this be (6.25m, 5.625m) in box2d???
*******
How would I set ground graphics as ground in Box2d?
***
My world height is unlimited, is this automatically done when initialising a world in Box2d?
********
Thank you for taking your time reading this!!!
I would be very grateful if you could provide some answers!
Thank you ever so uch
Michael

17
Game Programming / Box 2D vs DFSDK coordinates
« on: November 13, 2012, 02:26:20 pm »
Dear All,

I am having a bit of trouble programming my game. Currently, I am using Box2d for a more 'realistic' model of the world.

However, I am wondering whether when I initiate the world, is the origin automatically centred in the middle of the screen (http://www.box2d.org/forum/viewtopic.php?f=3&t=8198), or can I set it to be in the top left hand corner?

Thank you very much for taking your time to read this post.

Micboy

18
Game Programming / Making a sprite 'jump'
« on: August 02, 2012, 08:37:55 am »
Hi everyone, I'm new to dfsdk so i need some help.
As i am not too familiar with box2d, I will therefore make a sprite jump by changing the Y coordinates in OnTimer().
However, moving the sprite is easy, but how do I move it when the screen is touched?
Any help would be appreciated!

Pages: 1 [2]