Fox Survivors! banner

Fox Survivors!

10 devlogs
19h 40m 41s

Heya!
Fox Survivors is a small rougelike I decided to make, in order to learn the workings of Godot for future game development. With this project, I'll have more experience for future games (which hopefully won't have code as messy as this).
C…

Heya!
Fox Survivors is a small rougelike I decided to make, in order to learn the workings of Godot for future game development. With this project, I’ll have more experience for future games (which hopefully won’t have code as messy as this).
Currently it is the very barebones version of a rougelike, featuring a few enemies, a few weapons, and a few items to use, to improve your killing spree!
I aim to maybe return this concept in the future to see how my code has improved, and how I can better design the game to become more engaging.
But for now, it’s a project to have fun and learn!
Check out the demo!

This project uses AI

Using Gemini to debug a few times and sometimes to understand the Godot engine

Demo Repository

Loading README...

Olo the Fox

Shipped this project!

I made rougelike in Godot!
It was very difficult learning the engine. If I made it from scratch with the knowledge I have now, it would be a lot cleaner than it is.
The weapon system in particular is very messy and gave me trouble. I had to rewrite it when writing the shop system. However, now it’s scalable for future updates! It was a pain but worth it.
I’m overall very proud of this project. It gave me a learning experience, that I can apply for future games in Godot :3

Olo the Fox

Devlog 10
Implemented the chest system.
Chests, if the player is close enough, will show an interaction prompt to the player. By interacting, a item is shown, and added into the player’s itemHandler. Pretty simple system, but took debugging to make sure it didn’t interact multiple times with the player. Fortunately, you can set the input process for the item as false once it happens, so it only detects it the first time and it won’t detect inputs after that.
I also added the three items added today. One for healing, one for damage, and one for speed. They all modify the global variables corresponding, so I didn’t have to modify any code, since they already connect to the player.
I’m kinda burnt out for now, but I’m proud of the project.
Cya!

0
Olo the Fox

Devlog 9!
I’ve implemented a few things since the last devlog.
Firstly, is a hit-flash system. When you, or an enemy is hit, the hit entity briefly flashes white. I added this because it’s what a lot of other games do, and it’s personally satisfying to have a visual confirmation of hitting an enemy. I followed a pretty short tutorial by DashNothing on youtube to learn how to do this. It essentially uses a shader that changes the sprite’s color to white upon getting hit, with this color change being executed via an animation. Personally, didn’t know much about shaders, and still don’t, but I can see where I can use it in the future with color palette changes.
The next major change, I believe is the inventory system. In the pause menu, now the player is able to view all their items and weapons. By hovering their mouse over, descriptions are displayed. It scales with the number of items, by instantiating a new scene with each having the data of the weapon / item saved to it. From there, it grabs the icon and descriptions from the global weapon list and global item list to personalize each scene. These scenes are all put under a grid container, under a scroll container, so it easily fits if there were a massive amount of items.
Third change, which I kinda already spoiled, was items. I made items, now all I have to do, is make the chests that give them. They exist, but now I need to add the option to open chests, which give a random item.
Almost there to ship! Just need to get the chests in, and then I think I’ll be done. I’m kinda burnt out, and want to move on to another project. I’ll probably add a few more random stuff knowing myself, but I’ll try to get the chests done first
Cya!

0
Olo the Fox

Devlog 8!
Today I went insane making a randomly generated tilemap! But it was worth it!
A tilemap, is basically the background, which is composed of a grid of which tiles can be drawn on. I wanted to make a randomly generated grid, that can be changed with a random assortment of seeds, that can scale to my needs. I didn’t want to draw one out, which would take time, and may fail in the long run if I wanted to expand/shrink the map.
So I made a randomly generated one!
After lots of research I found a great tutorial by Jackie Codes about procedural tilemap generation in Godot. Essentially all the tiles will be made grass by default. But by using a 2DNoiseMap, we’re able to get a random assortment of values based off of equations, making blobs or paths depending on the Noise type we use (each type is a different algorithm generating noise). By translating x-y pairs from the map to cells, we’re able to get a list of where we want the path tiles, and put them on top of the grass tiles. Godot automatically gets the tiles that are both grass and path, and puts them between the grass and path.
Pretty neat, and seems easy after learning about it. Only took me probably 2 hours of research and 2 hours of implementation though sooooooo it wasn’t that easy learning it. I had many issues along the way, one of which basically left out the tiles that were both grass and path. Not cool Godot. Took more research, and found out thats why I put grass down first, then the path.
Also made the map limited, so it doesn’t lag the game when first loading in. May have crashed Godot making a giant map… but now the player has bounds too! Enemies can still spawn outside, but ignore the barrier. If they happen to die outside, coins are clamped to inside the barrier, and automatically move.
Anyways I also started work on miscellaneous spawning objects. I’m starting with a chest. All I’ve done, is the code to spawn them in, but no functions yet. I’ll figure it out when I have time.
Coming close to shipping! I just want to implement items, two more enemies, and like two more weapon types! Also a inventory system to see what the character is holding! Then also, the player should have weapons limited to 5 or 6 maybe. A bit of a list, but the rest of this shouldn’t be too bad to implement. Maybe only the inventory…
Welp,
Cya!

0
Olo the Fox

Devlog 7
I’m probably going to try to cram in a few more things before I ship. I want to move on to another project, but I want to make this a bit more playable before I do.
The past few days have been really busy, but I got some time in.
Don’t remember the exact order I’ve done things, but :
Rounds become longer as you progress, by 2 seconds each round. There is a current mob limit cap, that increases by 1.5 each round to moderate the number of enemies at one time. Additionally, spawnrate slightly increases each round to make it more difficult later on.
I need to adjust prices, as its too easy to get the best sword early on. Otherwise adjust damage values and attack speed values. Swords would do less damage and attack faster compared to an axe for say. I want to add an axe maybe as another weapon.
What else? I added a heal option in the shop.
New enemy type. Just another melee enemy. A turtle. Has twice the hp as the red foxes, slower, more damage. Just essentially a reskin, but they work the same. It spawns from wave three onward with a 10% chance.
I really can’t remember anything else.
But heres a list of what I plan to do before I ship :
Tilemap. I want the map to vary rather than being a plain green background.
Chests. I want items that can increase attack speed / damage / heal / increase coins
Weapons. I want another melee weapon varying from the sword. An axe or stick or something. They have to vary in some way. Attack faster, slower? More/less damage?
Inventory. Gotta have a way to check items and weapons
An additional enemy or two would be nice too.
Cya!

0
Olo the Fox

Devlog 6!
Today I implemented the rounds and shop system!
Currently rounds are 30 seconds long, and the timer isn’t shown on screen, but I’ll do that tomorrow. I have the base functions done; Which is ending a round, transitioning to the shop, then starting a new round after that.
At the moment all it does is really eliminates all the remaining enemies and transitions to shop. I’d like it to probably have the player immobilized and player a sound, which I’ll do another day. It didn’t take that long to implement and wasn’t that hard.
The shop system took the majority of my time today. I had to figure out how to get weapons with already made stats in the shop and added onto the player character…
As I said in a prior devlog, if I restarted this from scratch with the knowledge I had now, it’d be in a lot better shape. I once again praise that statement again.
I found out dictionaries were a thing; It’s basically a variable that stores different variables. And an array of those, made up the base of my weapon pool! I believe I have 4 or 5 different swords at the moment, in which then I needed to transfer stats from my player scene (which interpreted a weapon’s number for it’s damage and speed) to a global dictionary array which held all the weapons’ different stats together. While it was annoying, it made it less difficult for the future, and made it easy to call the “weapon pool” to the shop to find and randomize weapons in each slot. I could call the name of the weapon, the cost, and the icon to display in shop! (I should probably display damage in the future too).
Writing a global weapon pool also made it so I can instantiate weapons and call values easier; In which I rewrote the add weapon system so I could properly make buying add the write values from the dictionary instead of keeping the system I already had in the player beforehand.
I’m really tired from coding today and going out the past few days, so I may have not covered everything I did, but that was the main stuff
Cya!

1

Comments

aryanjain9818
aryanjain9818 10 days ago

DANG!! looks really good

Olo the Fox

Devlog 5!
Been quite busy the past few days, but got time to work on my project today!
What did I do today? I don’t remember that much!
I finished making weapon states for the sword, wasn’t that hard to implement. Right now I have an equation calculating sword damage which multiplies (base damage) times (sword state number) times (2), but I’ll have to plug in values to a graphing calculator to get an equation I want. Currently it may be a bit overpowered but not sure as of now.
Next, I basically did some backend stuff to prepare the code for moving to a round based system rather than a survive as long as you can, as the original Godot tutorial was about. I’ll likely implement rounds tomorrow. Amount of mobs that spawn each round, and length of round. I’ll need more enemies, but that will be after I either make chests or a shop between rounds.
After that little detour, I made enemies drop coins! A way to get money now! It will be to buy weapons or items to benefit the character. It wasn’t that hard to program. I just made a new scene for coins, and instantiate them when a enemy dies. Collide with the player, they are added to the global money variable. If the game ends, and a new game starts, all the old coins will be deleted (on the ground, and the collected). Not sure if I will make them stick between rounds. Probably, makes it more convenient for the player.

My code is a mess, especially since I originally edited it off a Godot tutorial which I learnt off of, because I felt like it would be easier. I feel like I could make a cleaner system from scratch, but I’ll do that another time. I’m learning, and the more I learn now, the less mistakes I can make in the future.

Next steps - Rounds & Shop/Chests.
Not sure if I want the player to get weapons through a shop or chest. Shop will be harder to code and a randomized chest would be easier. Otherwise I can have items grabbed from the shop, weapons for chest, or vice-versa.
A shop between rounds will likely just be a round themselves rather than a pause. Those rounds will just have no enemies spawn, and have a HUD pop up. Or maybe I have a shop sprite that the player can interact with, in which they can choose to buy or go to the next round.
Making progress!
Cya!

0
Olo the Fox

Devlog 4
Today was a really really painful day! Lots of horror
So since yesterday, I made it so the character isn’t clamped to the screen, and the camera can travel with the player now using a really cool node : a 2D camera
I was working on a tilemap for the background, but I realized at this moment, it’s not really the focus and I wasted 20 minutes on it for the time being because it didn’t work, so I transitioned to the weapons system.
Making a sword was a somewhat easy part. Just make it collide with another object’s collision box, check if is an enemy, and if it is, then activate that enemy’s damage function. Simple enough.
The hard part? Making it actually follow the player, rotate so they aren’t in the same place, then stab out at the closest enemy without overlapping on the same enemy.
So each weapon is instantied and added to the player, under a new node called weaponHandler to just make it easy to grab them. Anything under the “player” node travels with the player. Then the weapon is rotated by 360 divided by the number of weapons, multipled by index. However, there is now an issue. They’re all at the center of the character. I attempted positioning each separately, but now they all centered 60 pixels to the right at different angles.
When looking up how to position instantiated items at different positions and angles around an existing node, I couldn’t really find anything helpful. Eventually I used Google Gemini to figure it out. The answer lied within the weapon node.
So the sprite and collision box have to be each individually changed in position rather than the whole sword; The weapon is rotated a number of degrees, however changing it’s x-axis position will do it relative to the player, which is unangled. Positioning the sprite and collision box is relative to the sword, with a angled x axis, will give different positions, since each sprite/collision would have a different position relative to their angled sword. Its kinda hard to explain, but I understand it now.

Moving on, tweening was also somewhat difficult. I wanted the sword to move smoothly and stab the closest enemy. All the actual function itself does is move between the normal position and new position (towards enemy). There’s a look_at function which rotates the sword. All I needed was the tween. Now I did not understand how it worked in junction with the rotation. I looked to Gemini, which added a 2DVector; It gets the rotation of the sword and has it move out 60 pixels from it. I don’t understand vectors entirely, never studied them, which I should probably do. Then I needed to get the closest enemy (rather than just towards any enemy)
Getting the closest enemy wasn’t hard to make thankfully.
All I have to do is search through the enemy group, and find the closest distance enemy. I realized every sword would angle towards the same enemy at first, so I made a list which appended the targeted for one to prevent other swords from taking the same one by comparing each enemy to the list.
Honestly was a very hard day; But I got the hard part done. Making new sword variants won’t be hard. In my weapon function I already added a “weapon state” which for my sword, I can add more damage or attack speed just for each state, with a new sprite.
I may add a few new enemies and make a round system. I’ll try to get this game in a working state, then I might move on for a bit, because man that weapon system and tweening burnt me out.
Cya tomorrow!

0
Olo the Fox

Third Devlog!
Today I got a few things done.
Firstly, I added to the HUD. In the main menu, now there is a quit option that will force close the game. Then I also added a pause menu (which doesn’t have anything much except a continue button as of now).
Second, I added HP to both the player and enemy units. Players won’t die in one hit. Enemies will now die (but there is no way as of now).
Enemies also follow the player! Now it’s like Brotato where the enemy will follow you until either you or they die. In this, it would be you because I have no attacks yet.
I really need to put a weapon system in here! Otherwise, how will the player defend themselves?
Today was good for laying down groundwork. I fixed enemy movement, and now everyone has hp. Once I add weapons, items, and stats for both enemies and player, it should just be scalable from there. Add more weapons, items, enemies, ect.
I need a shop / level up system. That’s really why I made the pause menu; So the game can literally stall between rounds before moving on.
Anyways I’ll see progress tomorrow.

1

Comments

Cyber Ninja
Cyber Ninja 15 days ago

nice consider styling

Olo the Fox

Second Devlog!
I finished Godot’s 2D game tutorial, and I understand the basics of the engines and have an idea for how I’ll build the rougelike.
Today I finished the enemy script (which is just simple movement and spawning) and collisions which gives me insight for my project. During my actual project, I’d likely have melee enemies who will pathfind straight towards the player, and ranged who are a distance away but still follow somewhat.

Its a bit difficult understanding how scenes work together, but I’m getting an understanding. The main scene is just initializing objects basically (other scenes), which is a comparison I’m using from java. I had some issues with it due to unclear wording in the tutorial, but a video helped me out.

Signals make it easy to link and call functions, I just have to make sure to follow the trail when I code and write the links down (between collisions and a hurt function for example) so I don’t get confused and make redundant connections.
Additionally, I added music. I used Emerald Spacesuits by Googolplexian, I found on a royalty free music site.

Anyways this all just serves as a base function for my greater project; I’ll likely add a weapon system, or rework players and the enemies first when I continue tomorrow.

0
Olo the Fox

First devlog!
So I’m working on a Godot game, which will be a roguelike called Fox Survivors!
I’m starting off the project by following Godot’s 2D game tutorial to get a feel for the engine and understand how everything works.
Every object to my understanding, such as players, enemies, coins, etc. are made in different scenes which are eventually brought together under a main scene.
So following the tutorial, I made a player scene, and I’m currently working on an enemy scene.
The player uses the fox animations I’ve already written, and the animation manager is pretty easy to make calls to and change animations without using extra lines of code.
The player additionally has simple movement with those animations handled by a vector, so I don’t really need to write complex or extra code behind it.
The engine is pretty easy to use, and I’ll likely get a good amount of work in later today.

0