V3 Docs: HookRetrace
Displaying 1-4 of 4 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Omni

Where is it? I can't find it under General Utility, Map, Window, Graphics, or Sprites categories. I was going to leave a comment.

Posted on 2004-06-12 03:00:30

Zip

Leave the comment here: Someone will add 'em soon enough I imagine.

Zip

Posted on 2004-06-12 04:30:15

mcgrue

I think I left out a few hooks. Dammit.

Posted on 2004-06-12 06:45:29

Omni

Omni's notes on HookRetrace:

HookRetrace is sweet action. If the Verge Map Engine is a giant while() loop that calls your code for you, then HookRetrace lets you insert your own code into that loop.

HookRetrace isn't just for rendering. Essentially whatever you put in there is called every loop of the Verge Map engine. Which means you can customize the Verge engine all you want, and still be able to use Verge's maps and entity system. Which is a lot better than designing everything yourself from the ground up (believe me, if you can help it, you don't want to make your own map and sprite systems from scratch).

In fact, I'd consider it good practice to always HookRetrace a function which serves as a container for all the code you want executed during each iteration of the map engine loop:


void OnRetrace()
{
custom game stuff here
}


Even if you're only going to use HookRetrace to draw a box or a health meter, the possibilities are nearly endless. You can create ANY type of game you want this way, and yet still be able to control Verge's map system. Want a Zelda style battle engine for your main character, but want Verge to handle entities? No problem. Toss your game loop code in a HookRetrace function, and your code will work together with Verge.

Oh, and don't forget that "R" :)

Posted on 2004-06-12 17:46:39


Displaying 1-4 of 4 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.