New Video
Well I finished kind of cleaning up my code, and made a 10 minute long video... with my own audio commentary =D.
Well I finished kind of cleaning up my code, and made a 10 minute long video... with my own audio commentary =D.
Yeah that's right!
Well Finals are over =D. I got As on all my finals, and have a 4.3 GPA for the semester, so I'm in good shape. Anyways, back to the actual development stuff.
void LoadImage(std::string filename){if(m_pSurface != NULL){delete m_pSurface;m_pSurface = NULL;}SDL_Surface* loadedImage;SDL_Surface* optimizedImage;//I don't feel like typing the rest, but basically//I load the image into loaded image, and if it isn't NULL, then I format the image,//Then I assign the value of optimizedImage (which is now loaded and formatted)//To m_pSurface(which is the abstracted surface).
Well today I didn't get a lot done in terms of productivity, but I did test some features with small little demos.
Just wanted to say that I finally took care of all those errors, and the project now compiles fine, with just a single warning (just a little tidbit about losing data, because I convert from a double to an int) =D. Anyways, the event handling works well.
Will after I completed my Event Manager class, and a state machine, I attempted to compile the project, to make sure everything worked right. Well, I come to find out, that there are 446 errors and 30 warnings in the project, I think that's a new record of some sort =D!
So I finished my event handling scheme. Works just how I like it. Towards the end, I decided to screw Joystick/Controller support, so I have the methods commented out, so I can easily finish adding support later, should I so choose.
Well I apologize for the lack of updates. School work tends to take over my life, whether I choose to do it or not 0.o. But anyways, I think my last post should be completely disregarded... As I started using that 'template' I found it was real dirty, and had a lot of bugs =/. So I've been working on a new framework... One that is so much better. As I'm typing this, it seems I've said this a lot, but I'm making sure everything works and everything is clean as I go along. I've spent a lot of time planning it out, and studying various methods to get things to work. But anyways, I guess I'll share a little bit to how it works/will work.
int main(int argc, char* argv[]){AppMgr->OnInit();return AppMgr->OnLoop();}
Well, thought I'd just write up a quick post, since I haven't had a post in a while. So Charge is still in no working condition, sadly, but I am finding more time to work on it. I've made a software engineering club at school, so I'm helping out a lot of new programmers work with C++, although we might be 'converting' to C#, since their ambitions seem to be within XBox games.
So I have been dabbling around in C#, and I have to admit, it's a great language. So far I've only made simple console apps, but I've made some pretty cool stuff. I created a simple local server/client chat app... Can't really be used to chat with others, just with the computer. But the cool thing about it, is that it converts the strings you type in, into packets (byte arrays) and then encrypts the packet, and decrypts it when it gets to the other side. So it's a little interesting =p.
So let's get back to the actual game development going on. I'm getting cleaner code =D. I updated the SDL_Template I made some time ago, so now it has a GameHandler class which holds the game's statemachine. I've also made a base state class, and have made all states singletons. The State Machine holds 3 states: Current, Previous, and Global. This way I can revert back to the previous state at any time. It will also help with in-game menus, so that I can make the actual game the previous state, and the menu as the current state. I also created an ImageHandler class, which has all my methods for loading/applying images, and also counts how many images are loaded and puts it into a Debug file.
Going on from the Debug file, I have finally set up two different binaries. I have Debug and Release, but now they aren't exactly the same. I have a function called Debug, which takes in a char array, and outputs it to a Debug.txt file. But it's only created if the binary is in Debug mode. This way I can make Debug specific code, so when there's problems, I won't have to put in code to take out later =D.
So as of now, Charge has a nasty segfault, and I think I've found the problem, but worst comes to worst and I will have another recode, but this recode shouldn't take longer than 5 days. The only thing Charge has, at the moment, that my SDL_Template does not have, is: Telegram struct, Message Dispatcher, Entity Manager, Base Game Entity, Derived Classes from Base Game Entity (Game Entity, NPC, PlayerControlled), and the Ship class. So by the end of this recode, Charge should be up and running, and I should be able to take off running with it. The way I've redesigned it, makes it incredibly easy and flexible to program AI, thanks to Programming AI by Example anyways. A lot of the new stuff I'm using is my own revised version of some stuff from that book. I don't find much time to read, so haven't read much from Code Complete, but I'm really stoked to read both that, and finish up Programming Game AI by Example.
Well that was my post to prove I'm not dead, so hopefully I'll make another post later =D.
Well, I added in the last two enemies. Problem is, I can't do what I want to do with their AI strictly because of design. I've tried to make little ways around it, but I'll have to recode from the ground up to add in what I need. So for now Charge is on Hiatus, for the time being, I'll be reading Code Complete 2nd Ed, and Programming Game AI by Example. Hopefully I'll get some Charge REDESIGN done. I'm hoping to just do alot of design in my freetime, start making some UML flow charts and stuff so then everything is easy to translate to code.