Creating your own games can be a lot of fun, but it's important to get things right from the beginning.
Here's what I've learned the hard way:
Here's what I've learned the hard way:
- Use an Asset Manager, it's a bliss compared to initializing and disposing everything manually!
- Hardcode for performance, use variables and a scene loader for flexibility. Ex: AM.Load("player.png") vs. AM.Load(playerTexture).
- Multiple LGScreens will keep everything tidy and it will help you manage the memory more efficiently.
- Avoid at all costs using a CallSubUI() in the Render event.
- Prefer the LibGDX sound engine instead to the default Audio lib.
- Writing your own collision detection/solver will bring you down to your knees. Unless you're a masochist like me, use Box2D.
- Maximum texture size: 2048x2048. No, 4096x1024 doesn't work.
- Less than 60 FPS (engine) nowadays isn't acceptable.
- Less than 24 FPS (sprite animation) isn't acceptable.
- Coding the AI is the funnest part!
- Play games! Play your favorite games! Play Mario, Sonic and Megaman. Play Street Fighter and Mortal Kombat. Play Warcraft and Command & Conquer. Play Civilization and SimCity. Play Tetris, Angry Birds and Candy Crush. Try to understand what makes a game fun to play and gives the player a pure sense of joy, take notes if necessary.
- Read, re-read and read again Informatix's Games Tutorial. It's one of the best pieces of advice, not only on this forum, but on the entire web!
Last edited: