(I cross-posted this from StackOverflow as this seems to be a more appropriate f̶o̶r̶u̶m̶ community. I've looked around a little here and I did not find an answer, so I hope this is not a recurring question.)
This is a question dealing with 2D world design.
I am playing around by creating a 2D bird's eye view shooter game, and I am looking to make the game sleek and advanced. I hope to be able to write physics so projectiles have momentum and knock-down properties.
I am immediately running into the problem of world design.
I need a way to have level files that store everything there is about a game. This is easiest by just having a grid of objects. But there are thin-walls and other objects that don't seem to fit into a traditional cell of a grid. I want to be able to fit all these together so I can streamline level design; so I don't have to put in the exact pixel-specific start and end of a wall.
There doesn't seem to be an obvious translation from level file to game without forcing myself into a pacman-life scenario, meaning a scenario where the game feels boxy and discrete. There is a contrast between the smoothly (relatively) moving characters and finite jumps in a grid.
I would appreciate an answer that would describe implementation options or point me to resources that do. I would also appreciate references to sites that teach game design.
The language I am using is Java (although I would love to use C or C++, but I can never find convenient resources in those languages).
Thank you for any answers. Please leave any questions in the space below; I will be able to answer them later tonight (28th Nov).
Answering Questions:
I will definitely consider using a game engine; I wanted to write a lot of it myself, but I am rethinking gradually.
Perhaps there is no answer to this question that I will "like", and the process is just inherently a bit tedious.
I meant to find a way to easily specify things like "wall goes here" without saying "add wall at 293, 195 with width 123 and height 5". This of course, is easy by dividing the game world into a grid. But dividing a gameworld into a grid is not ideal, because it has to deal with things like objects taking up more than one grid, objects being irregularly shaped and taking up only part of the grid, etc..
I've had more time to think about this, and I think that there is no way to "gridify" my world without losing some major functionality, and so I think I will have to create a world editor, where I can more easily create levels.
I still foresee problems though, specifically with AI. I need to have pathfinding capabilities, and so the algorithms naturally have some sort of search-space reduction, which is essentially making a grid. I will have to read more about this.
Until then I would still appreciate answers and suggestions on this design choice. I hope this clarifies my question - if it does not, please direct a question and I can try to answer it.
(Storing object locations is the only practical way to do any of this, I now realize).