I didn’t a search in the forum about level, but many answers where 4 o more years old and I am not sure if it exactly what I want.I recently did a very simple test with cocos2d-x in c++ following some tutorials. Just a square jumping above spawing objects and getting scores. Very simple but a nice little introduction to start to get familiar with the api.
The thing is that I want to "handcraf"t a level, using photoshop for instance (or any other tool, I don’t mind). I don’t want to proceduraly generate levels. In the tutorial I did, obstacles where generated and assigned a movement from right to left. How would I do that with a whole level? This is my guess:
1-I create a huge image in photoshop where the width is the lenght of the level.
2-I cut the level in sprites that will have set a physical body, so the square hero can jump around ( so it is just a constant plain floor)
3-I create individual layers for each enemySprites and position them around the level
4-I attach everything to a null pointer so the whole thing moves from right to left (kind of like the geometry dash).
Am I on the right track?
I am trying to avoid any editors. That’s why I chose cocos2d-x, because I love to code: I don’t enjoy creating a game with editors that’s why I didn’t use unreal, unity, ore even cocos creator.
So is that correct? In summary: Create the map in photoshop, cut it out in sprite and position them one next to the other by coding their coordinates, attach all to a null and make it move from left to right.
By the way, how do you create a collision mask for a more complex sprite, for instance with diagonal edges, or curved surface? Is it also with PhysicsBody?