pingpoli.de



GameDev 2019 Week 1: Getting started

Setting up the projects, creating important classes, loading a map and rendering it

06.01.2019 - 14:22
All in the spirit of New Years Resolutions: In 2019 I finally want to try and actually finish a game and to keep me motivated I want to write a weekly development update blog post. I am going for a Tower Defense game inspired by the old WarCraft III custom maps, because I always enjoyed playing them and it's one of the projects I have started multiple times, but never made it past the proof of concept part. Even though it makes some things more complicated and annoying to develop and test, the game will support multiplayer, because multiplayer is a lot more fun to play. The game will feature a low poly art style, because I really like the aesthetics of it and I can create low poly models in a reasonable amount of time. I am using C++ and OpenGL with my own engine and libs. I will also use my map editor, which I have been working on on and off for the last year, and it'll help me to create maps a lot more easily.

Tuesday 01.01

I created the projects, one for the game and one for the dedicated server, in the end of 2018, because setting up projects, fixing all the build paths, linking the correct libs and stuff ain't fun and who wants to start the new year with something that isn't fun ;). So on the first day I created a bunch of classes which I know I will need, like the main game class, the window class, the main menu class and the client and server classes. For the multiplayer part I am using UDP with my own networking lib which supports "reliable" UDP packets ( if it didn't recieve an ack within a certain time it will resend the message ). At the end of the day connecting to a multiplayer game with a multiplayer lobby and starting the game worked, even though all you could graphically see was a beautiful red cube :)



Wednesday 02.01

To properly split the game related data from the graphical data I had to refactor the map editor to seperate them properly into their own classes and allow the server to load a map file without the graphical information - the server only needs to run the actual game and doesn't care about any graphics. Important for the game are the map dimensions, the tile dimensions and the tile heights, as well as the obstruction layer and the nav mesh for path finding. After refactoring the game was able to load the map data, so I could start to work on writing an importer for the graphical map data and display a map with its texture but without anything else at this point.

Thursday 03.01

Spend the day finishing the importer for most features of the map editor and render a small map. Unfortunately this was probably the day with the most graphical change for the rest of the development - going from a red cube to this:



Friday 04.01

A lot of development, most notably the game finally supports singleplayer. So far I had to start the dedicated multiplayer server, then start the client and connect to the server and start the game from the command line - not very convenient. To avoid having to develop things differently or twice for single and multiplayer, a singleplayer game opens a local server and connects to it, so it is effectively just a multiplayer game with one player.
I also changed the exporter of my map editor: it will now copy all files needed for the map - textures and models - into a folder next to the exported map and use relative paths to the files, so all the game cares about is the path to the map and the map handles the rest. This will make release builds a lot easier. Finally, I added an export and import to numeric map layers, basically just layers with a number for each tile, which could be used to define which player a tile belongs to, add spawn points, etc.

Next week I am going to work on building towers.




by Christian - 06.01.2019 - 14:22


Comments

Social Media:  © pingpoli.de 2020 All rights reservedCookiesImpressum generated in 9 ms