I've been passionate about gaming for a while now and want to dive into game development, but I often find myself confused about the 'right' way to program. I've done some Java development, but it feels like I'm missing something. People often say there's no one correct way to program, but I think there must be some standards, especially when it comes to creating game mechanics and smooth user interfaces. For instance, if a game mechanic doesn't work as intended or feels off to the player, doesn't that indicate a programming issue? How do I identify the right approaches and resources for learning? How can I strike a balance between the technical aspects of coding and the creative elements of game design?
1 Answer
It sounds like you're mixing up game design and programming a bit. A game mechanic can be built in numerous ways, all getting to the same result. That’s why programmers say there’s no single correct way to code it. If a mechanic isn't performing as expected, that’s more about the game design than the programming itself. The key is to communicate with designers and fix issues collaboratively. When they stick to their ideas stubbornly, it can mess things up for everyone.
I get what you mean! For example, if you're designing a mechanic where a player pushes a box, isn’t there a better way to do that? Like, using the Rectangle class in Java for collision detection? Both can work, but one might feel better in terms of user experience.