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

I haven't forgotten!

Well, I've been terribly busy this week, and I probably will be all of next week, but even if I don't have time to code, I do still think about how I'm going to implement different things all the time.


So as I think I have said I want to implement the EnemySystem next. But to implement the EnemySystem, I need to implement an Enemy base class. But the Enemy base class needs to have a StateMachine, and the StateMachine needs to have a base state.

So For now, I'm reviewing Programming Game AI by Example to get ideas for a 'universal' base state class and state machine. Once I implement these, I need to think more about how AI will work before I implement the enemy base class. I'm thinking that I'll just have States made specifically for each type of enemy, so that lower leveled enemies can't use them, OR make universal states for each type of enemy, and then have a specified AI level for each enemy.

But that's what's going on now... Life's real hectic with the band, Prom, SATs, standardized tests, and everything else I have going on... But I'll definitely be putting a lot of thought into it, so that when I DO go to program, I get a lot done =D

Coding Has Commenced!




So, I've gotten through tons of design and now I'm ready to start coding.

Instead of creating my ApplicationSystem inside my main function, I have now made it global. This way each Entity can easily get the dimensions of the window, so that they can check for themselves, if they are outside or not.

So I have an ActorSystem, which holds the PlayableSystem. The PlayableSystem updates and renders playable characters. The Playable class holds an array of 5 SDLKeys, so it's easy to define another player =D!

As of now, the WeaponSystem allows 10 bullets (I haven't programmed anything besides normal bullets).

My next task that awaits is to create the enemy base class, and create some type of enemy. Then I will code the EnemySystem and make sure everything works with some sync.

After that, I will need to make a CollisionSystem, which will take a reference to the PlayableSystem, and EnemySystem (both contained in the ActorSystem), and check for collisions between them.

I'm thinking I'll check collisions in this order:

-Playables vs. Enemies
-Playable Bullets vs. Enemies
-Playables vs Enemy Bullets
-Playable Bullets vs Enemy Bullets

After that, I'll probably shape the LevelSystem which will be real simple. I plan for it to have a background, and scroll that background, to give a nice little effect. I also want it to load in levels from files, which will contain the background, and information regarding enemies.

I definitely want to start extending the Playable Class after I make the LevelSystem. I'll make health and/or lives, not sure which yet.

Then I'll start creating different types of weapons, and make sure it's all compatible with the WeaponSystem.


So that's the only update I have for now! Until Next Time!



A Post Where I Ramble On About Ideas...

So maybe you noticed, I changed the blog template. I got sick of the dark theme of the last one, so I chose one that was a bit lighter.

Anyways, the current ideas rambling around in my head are regarding Players and Weapons.

First of all, I'm now using a position vector + width/height variables instead of a rect, which makes a few things a bit simpler.

Also, I've removed the IDs from Entities. Seeing as I'm using a list (No random iteration) to hold the entities, the ID would become virtually useless, and would serve no purpose.



Anyways, so onto the rambling thoughts. So I'm at a friend's house right now, and don't have access to any IDE, and I don't feel like downloading one on his computer. He's playing Call of Duty MW2 at the moment, and I'm rambling on =D.

So with players, I definitely want to make it at least two player co-op, but I may add more. To do this, I wanted to make it quite easy to create player control schemes. In my other games, I simply hard coded the different controls in, and it wasn't the slightest bit graceful.

To accomplish this, I'm going to have the player hold 5 SDLKeys, 4 for the standard directions, and the 5th for shooting.

I'll of course have some keys blocked such as ESC and 'p' (which will be used for exiting and pausing). So with that I'll be sitting pretty.

The other thing I've really been thinking about is the WeaponSystem, and how it will work. I've decided that all Entities will be registered into the EntitySystem. The EntitySystem will Update and Render everything. Alongside the EntitySystem will be the PlayerSystem, which will handle input for any players. The WeaponSystem will be invoked via the PlayerSystem or AI. When invoked (e.g. when player or enemy decides to shoot), the WeaponSystem will initialize the bullets, based on a flag. This flag will dictate what type of weapon that Actor currently holds, and will create the correct bullets/weapon accordingly. Then the bullets themselves will be updated/rendered via the EntitySystem.


So I'm really excited for this, since everything seems to be falling into place nicely =D!

The "Revival" of Charge

As I said, here's the post where I'm going to talk about my second attempt at a shooter (quite the same one, really).


I'm still in the planning stages, and I have spent quite some time there, but I also want to invest a lot more time into it still.

What I really want to focus a lot of time into is System access. Since I've quite literally depleted my use of Singletons/globals, I have to make sure each System has access to any other Systems it needs to use. The biggest problem I'm finding with this is with the ApplicationSystem. For playing audio or rendering a class needs access to the ApplicationSystem. But I don't want every single object that needs to be rendered, have a pointer to the ApplicationSystem.

Really I'm trying to find an elegant way to handle rendering. Because as of now, here's what I have been thinking:

-Render method from current state is called
-Current state calls render method from ActorSystem (Actors can be NPCs or Players)
-ActorSystem iterates through it's list of Actors, and grabs it's surface, then renders it


Now this is all fine and dandy, but the kink I'm hitting is the ActorSystem itself. So what about rendering the bullets? Then I thought, hey, I can make it an EntitySystem instead (Entities are anything that moves). But then I would be updating/rendering from the EntitySystem, and the Actor would have little control over it.

I could just make a 'WeaponSystem' and call an accessor to it from the ActorSystem. But what if the Actor doesn't have a WeaponSystem?

So through this, I'm finding that in many places where I would 'just do it' I'm starting to think ahead at the consequences, to find the best method of implementation.

As I'm typing this, I'm actually starting to like this idea:

-Create a weapon system
-WeaponSystem would dictate what weapon the holder has currently
-Through this, the WeaponSystem would set up the children bullets, which would then be
registered into the EntitySystem.
-Everything is actually Updated + Rendered through the EntitySystem


So through this, anything that is NOT player controlled is all nice and set up. So for Player controlled, I will need to create a PlayableSystem or something of the sort.

Lately, around the ElysianShadows forum, many people have been posting about developing an Engine, and I'm so happy for all the great information I've gotten from them (Notably GroundUpEngine and GyroVorbis - I'll have links to their Youtube Channels below!)

But this whole idea of Systems came from something GyroVorbis said. He was talking about how everything is handled, like a CollisionSystem handles collisions, and needs access to an EntitySystem and TerrainSystem which control Entities and Terrain, respectively. That's when it really hit me, I need to stop being such a dip, and actually get something like that going. Albeit, I probably followed the same form in a MUCH LESS elegant way.


So, that's just what happens to be rambling around in my head regarding Charge at the moment. As for now, I'm going to get back to studying, and maybe some more design tonight.

Hopefully I'll remember to update again next week!

As I said: GyroVorbis and GroundUpEngine

Be sure to check both of them out if you haven't already, they are both AWESOME projects =D

Terribly Sorry for Lack of Posts

Well, school really picked up again, I'm trying to maintain that 4.5 GPA, and I just have a lot to do. But I keep coming back, because I want to maintain this blog in some way.


I know I probably have a lot of downtime, and then make a lot of posts quite frequently, but I'm going to try to at least post something each week, even if it isn't programming related - Starting with this post.



So I have been working lately, on many different things, so I'll try to cover everything I've done since the last post.

So since the last post, I cleaned up my framework real nice, and started making a few small demos to test every piece of it. Then I created a breakout game. I left it unfinished purposely, because I have a Software Engineering club that wants to get into game development. So In this breakout game, I've tried to implement a little bit of everything, and I'm going to run them through it after they make a couple simple games/demos and then have them finish it (really the base of it is done, only thing left is polishing really).

I thought it had some cool effects, like the blocks decrease in color intensity every time they are hit, and burst into particles when they are destroyed.

But as I was making this game, there were two things I noticed. Firstly, I found that I need to start planning things out more, and start using Systems (or 'Managers') to control everything, and have all those systems access each other.

The second thing I noticed, was that my framework actually had some inconsistencies that really really bugged me. There were also some excessive singleton use that just didn't need to be there, so I removed it. The only singleton in the framework now, is the debugger, but I have plans to make States singletons, just because it makes it much easier.

So after fixing all that framework stuff, the structure of it starts with the ApplicationSystem, which holds a pointer to a VideoSystem, AudioSystem, InputSystem, and StateMachine.

I'm quite digging the new structure of it, so I'm excited to continue. So I am now *officially?* reviving the Charge project, but I have now planned it out so much more.

The problem I faced with my first attempt, was that I had some very specific ideas, that, in my mind, made Charge what it was. I came across problems because my design was very hasty, so when something wouldn't work well, I'd try to recode portions. Then after that failed a few times, I'd try to make some horrible code to just force it to work. After a while, this quickly fell apart, and that's when I realized I need something like a framework.

As of now, I would definitely not say the framework is done. I have completely scrapped the idea for a GUI portion, but I still want some text stuff (I removed it because it was crap). I like the idea of having a Bitmap Font Engine along with TTF Fonts, but we'll see what happens.

So I'm going to make another post tonight talking about what I want to do with Charge, and how it's all going, but for now I want to talk about another small project I created.

I made a level editor and it works quite well I must say. There's just one problem - It has no GUI. So I'll have to find a simple GUI lib to use; I was thinking wxWidgets, or perhaps just recode it in C#, because it'd be simple... but then I'd lose cross platforming =(. Anyways, all of the features are done, it just needs a GUI lib to access them.

So the only other thing I can say, that I'm not sure that I've said, is that I want to start moving into OpenGL ASAP. I have a book that I've had for 2 years, and it is great I must say, but apparently my integrated graphics doesn't support OpenGL. So if I want to get that hardware acceleration, I need to either A) Buy a new computer, B) Use DirectX, or C) Wait for SDL 1.3 and hope it's Windows implementation uses DirectX over OpenGL. I also bought a DirectX book thinking I would like it, but I must say... I hate it. I dabbled in it, and made some small base code, and even made a small game, but I felt like it was too much work to be giving up on cross platforming.

Anyways, because I've chosen option A, I've been saving up some money. I don't get too much money, but I have saved up $300 so far, and I'll probably have $400 - $500 at the end of the year. I'm thinking I'll probably need $600 because I have to buy a monitor as well, but we'll see. Maybe I can get a job over the summer =D? I doubt it =/.

Well that's what has been going on, I'll make a post in a few hours about Charge, and talk about the 'extension' of my framework I'm itching to create!