Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(+1)

Day 3

I ended up establishing a simple checklist in evernote for all of my features and plans. 


This is how I decided to manage my project. So, today I decided to work on the stats system. Possibly the items system as well If I have time. 

Stats

I began with a new stats scene and set up the UI- which was easy peasy. Whenever players hit the play button it will instantly take them to this scene where they will pick where they want their stat points to go. They can level up to 5 and there are 4 points to allocate. Next is the coding setting the variables were easy. The point system was... something else. The points incrementally changed based on the value. If I added 3 to strength then it would subtract 3 from points. Good enough right? However, it caused a bug where it would go into insane negative numbers.


this is not what I want.

Since the spinboxes caused more problems than they were worth I found an alternative solution. I made plus and minus texture buttons (not the best but hey, they work!).  If there were no more points [+] was disabled. If there were 4 points [-] was disabled. Plus adds minus subtracts. Pretty straightforward



All that's left to do now is move those variables out into the game so they are actually worth something. I decided to auto load the script. The game can pick up and identify the variables but when it comes time to showing results its always printing out 0 for all of my stats even though I set Strength to 4 in the Stats scene. I promised myself that I would get my items set up today as well so this is no big deal right now. I'll jump on this new stats problem when I need to.

Items

I have already conceptualized items. For ease and just saving space: Items wont be thier own node with a script attached. Its too messy. I also wont make a bunch of item variables or dictionaries and pop them into the main Game script. Even though its easier to access and program there is already allot going on in there and it will be tedious to keep going back and forth looking for the item in my code. Especially when I want to change something about the item. Because I would have to go:

 dictionary.itemx.var=new number. 

This is even more complicated given that I do not know every object that will be in the game yet. So I need flexibility.How do I solve these problems? Godot has this cool functionality where you can create resources. They are universal and can be accessed within any code in the game after its created.

For example this is the Object/Item resource I have created:


lots of Booleans involved. Not sure If I'll use the texture bit. It depends if I want to make icons or not.

And when I create a new one: here are the settings.


I'm pretty happy with todays progress. But there is barely any story to initiate gameplay... which is something I've been putting off.