Programming Project, day 19
|
Wall of text incoming. Today I found a small memory leak and fixed it. I think that I have a couple more in each menu state. I’ll look into that in the future. Right now I’m doing some other interesting stuff. Me and a classmate Anton Larsson Auna checked some code when sitting beside each other in the “game-room”. He has done some interesting stuff and is a baows at programming. His blog: http://space1nvder.wordpress.com/ I’ve made the code so that it now finally supports four players (I didn’t need this before because two players is plenty for the keyboard to handle). It was surprisingly easy to make the changes. I thought that the hard coding to two players was all over the place. Although I’ve probably missed adding the four player support somewhere. I started messing around with Artificial Intelligence. Tommi (our programming teacher) said that using finite state machines for AI is a must because it’s used very much in game programming, so I’ve devised a plan as to how this will be done in the game. I don’t think this is the best of plans, but It’ll get the job done =). I did some really stupid AI without using finite state machines just to try the movement for the new computer controlled players and it works! They move! And place bombs! And kill themselves repeatedly… To the AI plan. I will create a AI-statemanager that will exist in the GamePlayState. It will have four AI’s and three different states. Hmm, now that I write this down it seems like a really bad idea. The plan is bad! Shit, I will have to change it. I’ll post the new plan here tomorrow. Okay, sooo.. instead, the players will have the AI-statemanagers within them (only the computer players). And I’ll send in the GameObjectManager into it… I guess… I’ll think more on it tomorrow. Well, this is a picture of how I thought to do it. The manager will probably look something like this when It’s done. And a picture of four players in action. The red and blue ones are computer controlled. Changes to two of the bomberman sprites were made by a graphic student and a good friend of mine, Ludwig Lindstål. Thanks brother <3. |

