City Defenders TD
- 16 Devlogs
- 108 Total hours
Tower Defense Game
Tower Defense Game
I’ve been working on 2 major things that look small but are actually pretty big:
I’ve started work on a tower shop. I spent several hours drawing the background, but I think it came out looking really good. It only took so much time, which is why I’m making the log now. I also used a template human model for the merchant. I am going to show the different upgrades on the menu. I haven’t added the buy functionality yet, but that will probably be pretty easy. I got some chill guitar music from opengameart.
A little bit faster progress now.
Progress has been (very) slow but there’s some more new content:
I am very glad stardance got extended! This definitely eases the pressure A LOT
. Bit of a shorter devlog so as to not accidentally pass the 10h deadline. Here are the updates:
Ok, so a lot of progress, though it has been slow because the school year has genuinely driven a train through my productivity:
I did this devlog mostly because I wanted to get a screenshot of (hopefully) six seven hours
, but there has been some progress, even if it’s slow because now I have other things to do
.
I’ve kind of gotten into a slump, mostly because of school, but I think I’m back on track to finish this by the 30th of this month. Though I gotta say, it’s genuinely been slog to work on this now. I think I’m burning out 
Anyway, for the updates:
)Quite a bit of progress!
Lots of progress again! This one was slightly more in the background, as I started a little bit of housekeeping:
It took a while, but there have been some pretty big improvements.
self.scene.game.screen.width which isn’t very pretty. It’ll do, though. I track a variable storing the turret to be placed (None if it’s not in that state) and a variable that stores whether it can be placed. I check for collisions between the path tiles (I knew it would be useful!) and the sprite to check if it can be placed. I also modified the draw function of the turret to make it red or green depending on it.Overall, some very good progress, even if it’s not 100% visible!
I decided to just write the GUI from scratch. This is kind of uncharted territory for me. I tried using pygame_gui but it felt really restrictive and the use of a json file for customization is absurd to me. I made a basic element abstract class so that all elements must have an update and draw method. I then made a button class and a container class. All elements have an ID, and when a button is clicked it sends out a pygame event, which is a feature I did like from pygame_gui. I think I will end up eventually making an UI manager class, as handling the state within the scene is getting clunky and weird.
I’ve probably progressed more in these ~6.25 hours than the rest of the project combined.
r key will toggle between drawing the areas and not.Quite a lot of progress!
I decided to give up on the isometry because I wasn’t really getting anything done. I have gone back to using a 2d map instead.|
I know this was kind of a setback, but real progress can be made now!
Turns out, rendering isometric grids is pretty hard! I followed a tutorial by DaFluffyPotato on isometric rendering which let me understand the drawing part, but there are going to be some issues with the grid system in the future. I had an issue in which the grid wouldn’t draw half of itself, and it was because it was drawing everything to the right of the top tile outside it. I got it to work by multiplying the grid width by 2 and then adding an offset, but it’s kind of a band-aid and I want to research more into how to actually solve it. I did actually draw the sprites myself, though, and I have a grass block that looks really nice but that’ll be for later.
I’ve been working for a while, mostly on backwards-facing stuff about the general project structure:
The next thing to work on is to allow the turret to rotate as if it was on top of the ship, and to handle ship movement, having it rotate to face where it is moving.
The following image is actually 2 different sprites: the turret (green) and the ship (below). It draws them by blitting the turret on top of the ship sprite.