Welcome!

Hey, I'm Skylar, a kid aspiring to become a competent programmer. This blog is here to detail my dabbles in development.

My dream is to one day become a professional programmer and do some game development in my spare time.

Thanks for visiting my blog, and I hope you'll come back!

Pages

CollisionSystem + EnemySystem Done!





Well, I told myself on Thursday, that I would finish programming an enemy, and then make a post. But then I realized, I might as well make the EnemySystem real quick as well. Making the EnemySystem carried on into Friday, and I thought to myself: "I want some collisions before I make a post!"

So I started creating a collision system. I had a few issues with iteration. I was removing elements in a iteration, making the iterator invalid.

So I finally fixed it all up and now it works wonderfully!

To make the enemy, I also made a StateMachine, and base state template.

So as of now, there are two simple states for testing purposes: MoveLeft and MoveRight.

Oh yeah, you can also press 'e' to add new enemies, which helps testing some =D.

So my next task is to make a LevelSystem. The LevelSystem will be able to Load levels from a file. I'm generally thinking the format will be something like:

Background filepath

Count 5

Enemy 4 100 20
Enemy 3 100 40
Enemy 2 200 60
Enemy 5 300 50
Enemy 1 120 50

So I'll be able to retrieve the background, the number of enemies in the level, and each enemy will be created based on the information in this. The different TYPES of enemies will be hard coded in, and so I imagine that there will only be 3 pieces of data needed: AI level (which determines the type), x and y coordinate to determine it's position. The LevelSystem will render levels, and scroll the background image =D

So after the LevelSystem is finished, I'm going to adjust the WeaponSystem to make it easier to create different weapon types. Then I'll create a Powerup System to work with the WeaponSystem to adjust it to different weapons.

I imagine I'll create some sort of life system for playables. I'll also have to sync that with the CollisionSystem to create Life, and Lives. Then I'll probably sync it with the power up system to add health power ups.

The last thing (programming wise) that I want to worry about, is the AI. I just want to get everything framed up, so I can go in, and not focus on so much speculation, and just worry solely about the AI. Because of how I want the game to play, I'm thinking of implementing some type of "Shared Memory".

So for those of you who don't want to go back and find out how I want the game to play, here's a little explanation.

There will be 5 enemy types:
-Grunt
-Drone
-Revenant
-Protector
-Mother Ship

So basically, the Grunt will have incredibly low AI. Most of what it does will be entirely random, but it will be so random that it can actually be slightly dangerous. The Revenant will have the highest overall AI, with bullet dodging, shooting, path execution, etc. The Drones will have AI in-between Grunts and Revenants. Basically some things it will 'intentionally' do and some things will just be random.

The Protectors and Mother Ships will have a sort of 'team playing' together, so I'll have to implement a way for them to work together. But basically, each Mother Ship will hold a timer, and when that timer goes off, it will create an enemy. It will be able to create any enemy type excluding itself. The Mother ship will NOT be able to shoot, but it will be able to dodge bullets like no other.

For the Protectors, my idea is to have them sense a player's bullet through shared memory, and then calculate who's closest, and calculate a velocity that will get the Protector to take a bullet. Aside from taking bullets, I suspect Protectors will be somewhat like Revenants.

So the object of each level will be to get rid of all enemies, so you must take out the Mother Ships. As the levels progress, more Mother Ships will be there, and they will create enemies faster.


So I think with all this, it will provide for some interesting game play... But for now, I've done what I need to for the day... Time to get ready for Prom tonight =D

0 Response to "CollisionSystem + EnemySystem Done!"

Post a Comment