🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Friday! and the beast is unleashed!

posted in A Keyboard and the Truth for project 96 Mill
Published February 04, 2005
Advertisement
Greetings all,

So yesterday I was pretty wiped out,(work was tough) so I didin't get as much done as I would have liked, so what did I get done you ask?

Wellllll....

I finished the modeling and texturing of the new gravestones, however I haven't uploaded them yet, suffice it to say they are better than the existing ones. Tonight I will render them, alpha them, and shove them into the map editor. Then I will apply them to the graveyard again, but this time I'll mix things up, since in the existing shot, things are very ordered. So there should be a final screen shot of that floating around tonight.

And what of this weekend you ask?

well, given that I finished all of what I needed to ahead of time (for the green deadline) I will be starting on the blue deadline, namely, I will finish all of the AI delegates required for THE GREAT BATTLE!!!!

For those of you that don't know our system, a Delegate is a C++ function, that can be bound to a game object to provide Feedback, it is a key part of our event system, and looks somthing like this.

void* ADelegate(FC_2DSprite* object,Event event)
{
EventSwitch(event)
EventCase(FC_2DSprite::EventMouseClick)
{
//Some Code
}
EventCase(FC_2DSprite::EventAfterMove)
{
//Some Code
}
return NULL;
}

Note, the usage of the special Macros, EventSwitch, EventCase,

given that we wanted an extensable system, Event id's are generated at runtime through DeclareEvent and ImplementEvent Macros, which are used in classes, when an event is declared and implemented it can be accessed staticly, like is seen through FC_2DSprite. Given that true switch statements can only evaluate constants, we would have had to use a if/else if serries to do the handling of different events, however with some crafty macro action, we can structure it somewhat like a switch statement and have it come out as an if/else if serries when it compiles.



Now, delegates are used for basic game logic, The engine provides deletes with information about what is going on, and then the delegate takes appropriate action, somtimes doing some logic itself, and somtimes handing it off to a script.


In the case of battle AI, there are different delegates coresponding to different AI Models, for instance.

AshidianFootSoldierDelegate, any character using this delegate will fight like a foot soldier, attacking any friendly characters.

AshidianWarMageDelegate, this will make the character fight like an ashidian war mage, keeping distance and lobbing spells at friendlies.

the list goes on and on, and now I will finish all of the needed AI models, so that we can start the final battle.

Hope you enjoyed that =D

Wish me luck this weekend!
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement