How to attach libgdx actor to box2d body - libgdx

I'm a newby, and I just started learning Libgdx and Box2d and creating game like hill climb racing. I created my car with the help of shapes and joints but I don't know how to attach graphics to it i used actors and sprites before for the sake of learning, but I don't know how to use it with Box2d boies. Any help is apprecieted!!

Related

How classes in Adobe Flash Professional works?

I start before 1 year to use CS6 and I found some tutorials that explain how to make pltaformer games, I try a lot of tutorials they work great but for the code they use the timeline.
So, I make a game using the timeline but when I published it and running to my android device I have a lot of lag issues.
After a research I realized that coding in the timeline is a bad idea, also it's better to use Starling for making apps for mobile devices.
So I want to start again to learn how classes working.
I make a new project and I have 5 classes (Main, Level1, Hero, Ground and Enemy). I want the hero to interact with Ground (for gravity) and with Enemy (for hitTest), also Enemy have gravity so they must interact with the Ground.
The concerns are :
In which class I must write the hitTest function?
I have to write in Ground class the hitTest for Hero and the Enemy and in the Hero class to write the collision between the Hero and the Enemy
Or all of this functions must be write in Main class?

Tutorials for cs5.5 + starling

I buy some 2d vectors , backgrounds , enemies , heroes and platforms.
i make already a game for android with adobe cs5.5 but i have some lag and gravity issues.
So, i decide to make it again from the start using starling.
The way i draw my game is simple.I like to have my enemies , coins etc to the stage and not dynamically add them.
So , is there a good tutorial for me to explain gravity , hit collision with ground and enemies?
Also i would like to know if writing a code in timeline or in classes is better or its not a big deal if the code is good written.
Thanks!

infinite world creation with libgdx

I am a newbie and a little lost. Which classes or tools do you recommend to create an infinite libgdx game world with collision detected available, so that the player can walk on it? The concept is shown in the images below. The camera (phone screen) moves around the world in a non-linear fashion(on a boundary between green and white in this image), tracking the character. All I need is some place to start, I will be good from there on.
EDIT: Basically the problem is to create an infinite world, perhaps self generating is a better world, with collision detection enabled. I have tried nothing because I don't even know where to start. I only need to be directed in the right direction on this.
Just to give you a few keywords to search for:
Infinite world: Procedural generation
libGDX collision detection:
Box2D or bullet (physics engines inside libGDX)
libGDX provides also Circle or Rectangle to check for overlapping
Camera tracking: ViewPort, Culling

Cocos2D: Recognize multiple tiles next to each other

I'm currently building a platformer in cocos2d-x and therefore i'm using a tmxtiledmap and chipmunk physics. My problem is that in the moment EACH tile of the map gets its own physics body which obviously isnt really memory saving:D
Is there any method to "recognize" that multiple tiles are next to each other and therefore only need one physics body?
Greets FreezZl
How are you creating the physics bodies?I dont use chipmunk, but had used box2d with Tiled and created a single Physics body for each platform by assigning an object to the whole platform in tiled and using that to create the physics body.

Coding 2d physics with rotation

I want to start with 2d games with physics, but not using BOX2D or other physics engines.
I want to make a game like Trial Bike or Hill Climb Racing, with a 2d bike and 2d terrain.
Where can I start? Are there any good tutorials online?
Is hard to make a basic 2d physics engine?
I'm using libGDX.