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

New Great Book =D

Well I'm now reading a book called Game Coding Complete. It's about 900 pages or so, and I love it. Lately I haven't really gotten anything tangible done, so I haven't been posting =/. I have been writing down a lot of different ideas to implement AI in Charge, but theres a few kinks I can't seem to get around. There's a chapter on AI on Game Coding Complete, and I still have about half of Programming Game AI By Example to read, so I'm hoping between those, I'll find some intelligent solutions.


I've also been talking with my partner about our framework, and once we finish all the cores, we're going to extend it to make it more of an engine to power the games we create. We're going to follow the engine structure set forth in Game Coding Complete. I must say it seems to be a very flexible way to set up an engine.

Well that's it for now, I'm out.

Forgot to Post About Some Stuff!

Well I'm pretty sure there's some stuff I forgot to mention in my last post!


So I made two new videos, but here's the problem: They are too long! Your probably thinking, "Well trim them?" but I can't find any (free) software to edit a video that doesn't ruin the quality when it's rendered. One of them is the next SDL Video Tutorial, so I just need to get a chance to trim it, and it will be up (I've had this done for quite some time now!). The other video shows off the new stuff in Charge.

So I've implemented a skeleton of each enemy, so now I just need to program some specific AI. Right now, I'm still planning groups out. I started implementing them, but the implementation was getting real ugly, so I wiped it out.

So onto what I HAVE done. I made a Health System, so now the player has a health box, and lives system is in place (but has no effect for testing purposes). Also, I have a power up system. Currently there is only health and weapon powerups, but the system actually works well.


So now I need to put a lot of work into this AI. Really this is going to be the hardest part of the programming.


Honestly though, I can't wait to finish it. I'm excited to get some experience with AI =D.

Well that's it for now =D.

AI Design

Well I've been thinking a lot about Charge, and I think I'm finally starting to get to a good point with the AI.


So my StateMachine holds 3 states: Current, Previous, and Global. The global state is going to handle shooting and a few state changes. The global state is where the shared memory will be mostly utilized, but shared memory will definitely be utilized in some current states as well.

Another thing I've been planning out is Enemy Groups. So an Enemy Group will hold a few Enemies (let's say 5 for example), and will control the behavior of the Enemies within the group. In this way, the Group can examine the shared memory, and act upon it.

I also plan to have a SetFormation function. This function will most likely take an enum as it's parameter that describes the type of formation. As of now, I'm thinking horizontal, vertical, V, forward slash, and back slash. I may create more as I go along, but I think this is a good starting point.

I've added a 'destination' for each enemy, and this will make it super easy to set formations. So when the formation is set, it will use the first enemy as a reference point. Then it will make a few calculations to find what the destination of all the other enemies should be. If any points are offscreen, each destination point will be offset to make sure they stay on screen. After the destination point is set, the state will be changed to a "MoveToDestination" State, which will handle moving to the destination.

At the moment, I'm unsure of whether I should then go to an Idle state, or Revert to the previous State. I'm leaning towards the former, because the previous state may be a state that was only meant to be temporary, and shouldn't be reverted back to. It's an easy change between them (only a single line of code), so if I decide to switch, there won't be any problem =D.


The only thing I really need to work into my systems, is the Groups. When planning for AI, I never really thought about groups. It will be easy to insert, I'm just unsure as to whether I should make a separate system/handler for the groups, or just make it a part of the EnemySystem. I'm leaning towards the former on that as well, because, I think it will provide more flexibility.


So now that my AI stuff is out in the open, I guess I should talk about my other project(s).

So I'm like 99% sure I've mentioned the cross platform framework a friend and I are working on. We've just come out of the design phase, and I'm just basically making the virtual classes. Since there are no implementations with this, and all functions are pure virtual, it's really pointless to make any actual code files (.cpp extension). After I finish all these headers, I'll review them with my partner, and then he'll start fleshing out the iPhone implementation, while I work on the Windows/Mac/Linux implementation.

Right now, I want to propose a new 'core' to be added to the framework. I haven't talked to him about it yet, because I just thought of it last night (which is going to lead me into my next 'project'). I want to make a sort of Resource Core... I hesitate to call it a Core... In fact, I'm just going to refer to it as Resource Management System (RMS for short). The reason I think this is a very important addition to the framework itself, rather than just something that is separated from the framework, is because we're geared towards embedded systems. Just last night, I purchased a new DS Flash Card (the Super Card DS Two). For systems such as the DS, I'm not too certain if it's plausible to add them to the framework. One way to help this along though is an RMS. Many embedded systems such as this have much less RAM and VRAM, so it becomes very important to manage resources differently. For example: On a PC, you can probably load hundreds, perhaps even thousands, of different images. The DS, works very differently though. It supports up to 128 sprites, not including backgrounds. For backgrounds you can have 4 (one to be used for text). So it would be beneficial, and probably necessary, to free resources at different times on different embedded systems.


So for those of you who don't know, my coding started with PAlib and NDS development. I never really got far in it, and before long, I lost my flash card. A relative gave me a 50$ card, that can't be combined with any other source of money, nor reloaded. I was going to buy 2 programming books, but the total came to like $51, and I wasn't just going to buy one, so a friend told me to buy a flash card, so I did, and was also able to get a 4GB micro SD... now I have exactly $2.22 left on the card. But I figure I should use it, so I'll probably pick up NDS coding on the side.

Well that's it for now, ciao!

More Charge Development

So I worked again on Charge today, and I finished something =D.


Looking back at a few previous posts, I noticed I wanted to make a Level System, I had already made a level class, but no load function. So I shaped out a Load function, and then made a Level System.

I had to tweak my Enemy System to keep count of how many Enemies it had. I couldn't just get the size of the list, because some of the enemies were likely to be NULL. The reason some could be NULL is for two reasons:

1) If I remove an element while iterating, there's a high chance that I will have some access violations.

2) In terms of efficiency, it's better.

So I now have a variable to keep track of how many enemies exist. Each frame, after updating everything, I check to see how many enemies exist. If it's 0, then I load the next level.

Levels will go in an order like:

Level1.map
Level2.map
Level3.map

...

So I don't even have to specify each map, it will just continue to load them. I also have a max levels number hard coded in.

The level files are simple, a format like this:

Background: space
ECount: 2
Enemy 1 30 30 End
Enemy 1 50 70 End

The only thing I really need to do is switch to a 'transition' state, then revert. This way, it won't seem choppy.


But that's what I accomplished for today. Not too sure of what I have planned for tomorrow, but hopefully I'll get something done =D