Help with a battle system
Displaying 1-9 of 9 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
P-ville

Here I am again, betrayed by my overactive ambition and completely stuck. Well, not completely, but there aren't that many things I can think of to help myself.

I need to create a battle system similar to the one used in Final Fantasy VII, but simpler (no Limit Breaks, no status conditions). I have the series of funtions needed to determine if the attack hits, how much damage it does, and so on, but I need help with displaying graphics.

What would be the best way to display the attack animations? I can figure out the timers and such, but I need help with the actual functions needed to display the sprites (well, I use the term "sprite" but I've heard that Verge's sprite system has some problems)

Posted on 2006-12-17 16:37:29

choris

You're probably talking about basically the same type of battle system I was working on a few months ago.

The simplest thing to do is probably just use entities for the whole thing. You can use your normal map entities and all you have to worry about calling to display their animations is:

void BlitEntityFrame(int x, int y, int ent, int frame, int dest)

For enemies image files will probably due, unless you want to animate them (other than fading out for death animations or something).

Other than that.. can you be more specific?

Posted on 2006-12-18 01:09:08

P-ville

I was planning on eventually animating the enemies, but that can wait untill I have the basics worked out. The problem I had with entities was that I couldn't figure out how to put them in a position relative to the screen, I only knew the functions for putting them on a map.
What did you do in yours? What I have currently in mine is a background (similar to what would be used in a menu), with options for fight, item, ect. I'll try what you suggested for the entities.

Posted on 2006-12-18 16:52:05

choris

Well if you want to move around the ACTUAL entities (instead of just blitting their frames) you'll have to fuck with entity variables, like entity.x and entity.y. I think what you're wondering about is how to set an entity's position to somewhere in the visible 320x240 screen rather than the x/y of the map. To do that you need to use the xwin/ywin variables.

For example, to set an entity's x pos to say, the x of the screen plus 32, you'd do: entity.x = xwin+32. To center an entity in about the middle of the map, you'd set entity.x = xwin+160 and entity.y = ywin+120. That what you were wondering about?

I wouldn't use this method for displaying entities though, I'd stick with blitting images of their frames. Much simpler.

Posted on 2006-12-18 17:32:40

P-ville

thank you. I probably would have ended up in some sort of horrible mess. Of course, I know that I will end up in a horrible mess anyway, but at least I will know that I messed up trying the right thing rather than some random idea.

Posted on 2006-12-18 22:47:16

P-ville

what do I use to call the entity file?

Posted on 2006-12-20 17:24:20

choris

To make one to begin with?

int tracker;
tracker = entityspawn(mapX, mapY, "filename.chr");

Or to blit the frame?

BlitEntityFrame(screenX, screenY, tracker, frame#, screen);

Posted on 2006-12-20 18:43:07

P-ville

thanks, it was the first one I needed.

Posted on 2006-12-20 18:44:47

choris

The Verge Manual is invaluable if you hadn't noticed the link to the left.

Posted on 2006-12-20 20:20:54


Displaying 1-9 of 9 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.