I moved to a new URL! Check it out!

Dev Log: Boring Stuff

Dev Log: Boring Stuff
My work with C# and SFML pushes on. I'm also trying out a new thing which is working remotely! I need to break free of the shackles of my bedroom and be more comfortable with working at over locations, so right now I'm making this blog post from a local cafe with my laptop as I work on C# stuff and rant about how Nintendo sucks.

Every time I travel my work schedule get's totally screwed up and it takes me days to get back into a groove, so in an attempt to try and correct this I'm getting used to working in different locations. Anyway...

Image


Yesterday I added a bunch of structure code to Gaiaden (tentative title!) for combat. My dream right now is to have a bunch of different damage types, armor, shields, and all that kinda crap, but we'll see how much of that makes it into the final game code. Usually that kind of stuff gets cut in the end because it ends up being way too much work that doesn't add a whole lot to the game, but right now I'm letting myself dream big!

I'm also getting used to using a more component based approach when it comes to coding. I want a bunch of different objects in the game to be able to receive damage and react to the damage. At first I tried making a big base class that would be all of the "Living" things in the game, but this turned out to be a bad idea and felt like it would be the wrong way to do it.

Now I have a component named "Heart" which has all of the stuff for health, armor, damage, stun, etc, and I add that component to things that can take damage. For my framework I have a basic system where I can have Entities that have any number of components that are all automatically updated and what not.

Image


On my basic "Bullet" class I check for collisions with certain "Tags" whenever the bullet moves. When the bullet hits a tag, it checks to see if the Entity that it hit has a "Heart" component. If it does have a heart, it will do damage to it. The heart also knows things like if its dead (health is below or equal to 0) or stunned, and the Entity with the heart component is responsible for dealing with those states, since some enemies will just pop and explode when they die, but a structure or island might have a more dramatic death that's drawn out.

Image


I just have a couple more things to figure out for my framework before I release the first public version of it! It will be hosted on BitBucket and will be available for anyone to use and contribute to if they want. One of my goals with the framework is to completely internalize SFML, so that you only need to use the framework itself and you won't have to worry about calling any SFML code -- sort of like how Flashpunk subverts any native flash code.
new comment!

Post your comment!

Name
Email
Comment