Hi. I've been a beginning game devloper for about 5 years..
I've played around with OpenGL a bunch, using C/C++, creating small quick demos here and there. I've never actually made a playable game.
I'm going to try to make a hybrid soccer game as a simple game to get some game dev. experience with.
Here is a shrunken down version of a simple map:
There's two goals, one for each team, represented by blue rectangles. There's one soccerball (red) and two players (green). So it's basically going to be a 2D game with 2D physics (keeping it simple for my first project).
I made the image small for simplicity, but let's say the map was much larger (it might take the player 2-3 minutes to go from one side to the other). In addition, there can be walls in the middle of the arena. All walls in the map are solid -- the players cannot pass through them, and the soccer ball will bounce off of them. The game may be expanded to allow multiple soccer balls on the map at once.
1) How should I store the world data?
This is probably a complete newbie question, but if you can point me to an article that is more than adequate.
I guess I can simply store the map as a 2D array:
- [y]. Would this be sufficient for my small game?
2) I made a breakout/arkanoid type demo, and one issue I ran across was collision detection. Every frame step, I was testing the collission of the ball with every block in the game. While this did not hurt performance because of the small number of blocks all on one screen, the new game I'm making will have a much larger map. Are there common techniques to dealing with this issue?
Eventually, I'm going to turn this into a networked multiplayer game. I'm not sure if that will effect your answers.