Custom Movement
Displaying 1-11 of 11 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
mystictrunks

Well I dunno if this is possible, but would I be able to script my characters movement instead of using the defaults? Yes I understand that it's pixel based movement and it has 8 directional movement( only does it to the sides) not up/down.

If I were to script a custom based movement would I have to use individual sprites?

Thanks, hope you can answer this question and helping me get it started.

Posted on 2008-02-09 23:05:46

Kildorf

This depends -- Verge offers a little bit of customizability in how things works but it is somewhat limited. What sort of custom movement are you looking for?

Posted on 2008-02-10 09:12:20

mystictrunks

Well verge offers pixel movement and diagonal movement right? well the movement that I'm trying to do is this.

Pixel-Movement + Diagonal Movement
Yes verge offers that but I'm trying to replicate the zelda movement, you can go diagonal on all directions I.o.w. North,South,East,West and you can go diagonal.

So how would this be set up?

Also another question, is this battle system possible with Verge?...
http://youtube.com/watch?v=rEoCavwsob4
Watch the whole video

Posted on 2008-02-10 20:45:28

mystictrunks

Bump

Posted on 2008-02-15 01:27:32

Swordsman

Is it that you want diagonal animations, as opposed to just using left/right animations for diagonal movement? If so, then yes, you most likely could do that. Though you might have to implement your own frame animation system. (or you could nag the dev team)

Also, yeah, I suppose you could make a battle system like that. It'd might be a bit of work, though. If that's what you're aiming for, I'd recommend you start with the simple parts first, and expand upon it once you have those working, instead of trying to do it all in one go.

Posted on 2008-02-15 08:17:44 (last edited on 2008-02-15 08:45:26)

rpgking

MysticTrunks, by default Verge3's movement system is exactly like you describe. It uses free movement, which is very similar to that seen in Zelda and Chrono Trigger for the SNES. I wouldn't call it diagonal movement, because you are not limited to moving diagonally. You could move anywhere you want at the pixel level, and this requires no special configuration. That is how Verge3 naturally handles movement.

Also, any 2D battle system is possible in Verge3. Whether you clone an existing one, or think of your own, there is no limit to the types of 2D battle systems which can be made with Verge3.

Posted on 2008-02-15 11:52:28 (last edited on 2008-02-15 11:55:51)

Swordsman

Well, I wrote it out for you. Is this is what you wanted? Hopefully you can use this and learn from it and everything.

http://rafb.net/p/0InsVo20.html

(I'd recommend grabbing it quickly, it'll be gone in 24 hours)

Posted on 2008-02-15 17:23:34

mcgrue


// use it for whatever - Swordsman (2/15/08)



#define ANIM_LEN 80



int last_walk_adj_hook_time = systemtime;
int player = 0; // set this to the player entity index, I can't figure it out right now
int last_dir_key = 0;
int frame_pos = 0;
int up_anim[80];
int down_anim[80];



void SetAnims()
{
/* The middle part (i-j<10) sets the frame wait for each frame
the numbers on the far right are the actual frames.
I prolly could've done this with a dict...
That way the global arrays wouldn't have to be a fixed and
calculated length (which is currently required to be the sum
of all the waits in the animation) */
int i, j;
// Up animation!
i=0; // I know verge initializes to 0, but it's nice to be safe
for(j=i; i-j<10; i++) up_anim[i] = 5;
for(j=i; i-j<10; i++) up_anim[i] = 6;
for(j=i; i-j<10; i++) up_anim[i] = 7;
for(j=i; i-j<10; i++) up_anim[i] = 6;
for(j=i; i-j<10; i++) up_anim[i] = 5;
for(j=i; i-j<10; i++) up_anim[i] = 8;
for(j=i; i-j<10; i++) up_anim[i] = 9;
for(j=i; i-j<10; i++) up_anim[i] = 8;
// Down animation!
i=0;
for(j=i; i-j<10; i++) down_anim[i] = 0+1;// haha, I just realized, you can't use frame 0
for(j=i; i-j<10; i++) down_anim[i] = 1; // at all here. well, don't use frame 0 in your
for(j=i; i-j<10; i++) down_anim[i] = 2; // up or down scripts. in fact, you should probably
for(j=i; i-j<10; i++) down_anim[i] = 1; // just reserve it for code like this.
for(j=i; i-j<10; i++) down_anim[i] = 0+1;
for(j=i; i-j<10; i++) down_anim[i] = 3;
for(j=i; i-j<10; i++) down_anim[i] = 4;
for(j=i; i-j<10; i++) down_anim[i] = 3;
}



void WalkAdjust()
{
int total_pressed = 0;
total_pressed += (key[SCAN_UP] != 0);
total_pressed += (key[SCAN_DOWN] != 0);
total_pressed += (key[SCAN_LEFT] != 0);
total_pressed += (key[SCAN_RIGHT] != 0);
// if two directional keys are pressed simultaneously...
if(total_pressed >= 2)
{
if(last_dir_key == SCAN_UP)
{
entity.specframe[player] = up_anim[frame_pos];
frame_pos++;
frame_pos = frame_pos % ANIM_LEN;
}
else if(last_dir_key == SCAN_DOWN)
{
entity.specframe[player] = down_anim[frame_pos];
frame_pos++;
frame_pos = frame_pos % ANIM_LEN;
}
else
{
entity.specframe[player] = 0;
frame_pos = 0;
}
// There's no reason to avoid left/right, if that was the last
// key pressed. The engine defaults to those.
}
// or, if just one directional key is pressed, store it
else
{
entity.specframe[player] = 0;
frame_pos = 0;
if(total_pressed != 0)
{
if(key[SCAN_UP]) last_dir_key = SCAN_UP;
else if(key[SCAN_DOWN]) last_dir_key = SCAN_DOWN;
else if(key[SCAN_LEFT]) last_dir_key = SCAN_LEFT;
else last_dir_key = SCAN_RIGHT; // must be the right key (or am I wrong? ;)
}
else // or, don't.
{
last_dir_key = 0;
}
}
}



void WalkAdjustHook()
{
int frameskip = 10;
if(last_walk_adj_hook_time < systemtime)
{
while(last_walk_adj_hook_time < systemtime and frameskip > 0)
{
WalkAdjust();
last_walk_adj_hook_time++;
frameskip--;
}
}
}



void SyncWalkAdjustHook()
{
last_walk_adj_hook_time = systemtime;
}



void AutoExec()
{
SetAnims();
HookRetrace("WalkAdjustHook");
//map("test.map");
}



// 10,000 hours in notepad

Posted on 2008-02-16 02:26:45

mcgrue

(why waste something on the temporary internets?)

Posted on 2008-02-16 02:29:31

Swordsman

Sorry, I didn't know if it'd be cool or not to post something that long on the boards. ^_^

Posted on 2008-02-16 04:39:20

mystictrunks

I understood quite a bit of it and I understand no VC at all... Anyways looks good. Thanks man!

Posted on 2008-02-16 22:24:58


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