Well, this is the longest I've gone without posting...o_O 10 days. New record I would say. Although there really hasn't been anything to update on. I've been doing homework, being stressed about crap, and trying not to go crazy. :-P Life's been good at least, no nasty surprises, and finances have been kinda washy, but not bad. Got to see one of my old buddies from Round Table today, we hung out for a few hours, was really nice. Didn't get to show him my program, but we were talking the whole damn time, so we were pretty busy, hehehe.
Anyway, with concern to the program, I've been mostly working on internal stuff. I set up the options state to have a previous state to go back to, which currently is either the game state, or the main menu state. So you basically return to the old state, reload the GUI, and be done. I found that if you just go back to the previous state, the old GUI stays, so...that's a bit of a problem. :-P But, I also found the amazing "is" function in C# as well. The function checks to see if a specific expression can be cast into the given class. I.E. it acts like instanceof in java.
One basic idea I used it for was with the options state. The previous state it's given is a BaseState class. You don't know what kind of class it is, just BaseState, so you use the "is" function to find out if it's a specific state or not. So...you have a statement like if (prevState is GameState), or if (prevState is MainMenuState). And then you do stuff based off of that. :-D
I really liked the instanceof function in java, it's absolutely amazing, and once I found this I really just had to share it. ^_^
And of course, since you can use an expression on the left side of is, that opens up opportunities for other things. Many many other things...bwahahaha!
Also, I'll be posting some images from the game soon. No real ETA on that though, cause I'm starting to get into the player mechanics of the program, and that's going to be a bit of a long drawn out process. Eventually collision checking and handling once I get the player moving, and functioning when it needs to. Once that's all done, I can start on creating levels, but it's going to be a while before that happens. I would say a few more weeks right now. @_@ And of course, I have to re-do my PiP algorithm for this, and find a way to make it function a bit differently.
After I get collisions working, I need to start adding mobs. Mobs will need behaviors, and each mob will be unique. I will also need spawners, and the appropriate algorithms for working with the spawners, like if the spawner is on screen you can't spawn mobs, otherwise you can work, but only every so often, and such...
Once the mobs work, I can start working with the player some more, adding an inventory, equipment, and items. After the items are created, I'll need to add the droppable items, which are actually completely different objects than the items themselves. Once the droppable items are made, I think I can work on creation. This would be like...when you go to your shop, you can load up the GUI for creating crap. :-P
I can also create the item dropping system on mobs, and how to identify what items they drop. That last part's going to be a biggy, cause it's a bit of a pain in the neck to do. Loot tables ought to be interesting to work with. :-D
I still have so much to do, and a rather short period of time to do it in. I'm going to use this program as my final project.
So yeah, that's my life right now, onward to more coding! *grabs pen, pencil, and paper and runs around with scissors in hand* >:-D
No comments:
Post a Comment