Or did I miss it, how can one actually see in a game? It has become clearer to me what game development is all about. It has taken me only a week and I’m knee deep in the swamp of questions about game development fundamentals. And I’m loving it.
Every problem that arise while further designing my game seems to be much harder than the previous one. I read some articles about game development which anticipated the importance of scope. However it has really struck me how big of a challenge it is actually to decide and focus what to do next. As I’m a one man game studio I get to do all the neat stuff by myself!
I decided not to build graphics yet as the game is lacking so many fundamental things. Even though making some nice graphics would be really fun but that would only mess up the code. I currently have no ways to separate layout and functionality. Okay, so I decided to continue building some more core elements to make the game worth playing. I somehow managed to build a simple AI for an offensive melee unit in a grid based movement.
Next challenge: Ranged attack
Next challenge is to build a ranged attack. This is a point where math at the latest kicks in. I’m trying to figure out Bresenham’s line algorithm.
Here’s a modified and maybe a more useful adaptation of it called “Bresenham-based supercover line algorithm”:
Bresenham’s algorithm explained:
Here’s an implementation in PHP:
Here’s another link about the implementation of Bresenham’s algorithm in other programming languages:
Now if you’ll excuse me, I have some studying to do.