This is my post taken directly out of another thread, i am guessing its a snap and during my time away my vb skills have suffered quite badly, and considering they were never great to begin with, hrhr ^^
---------------------------------
hmm, i dont understand how the movement works to be fair. the movement for each direction has 3 sprites, lets name them 1,2, and 3 (in that order).
Would it be hard to change the walking animation to this cycle
standing still = 2.
when you walk, it cycles like this:
(standing)2
1
3
(standing on next tile)2
also if possible the attack being a 4th frame of each direction, so instead of it being
1,2,3,1,2,3,1,2,3,1,2,3
in the bmp image, it would be
1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4
teehee
aka, the middle frame (2) is a standing still frame, 1 is the left foot 3 is the right foot.
feel getting this right is quite important as it heavily influences the basic look of your game, i would try if i could gain a better understanding; but to put it simply i would probably spend twice as long as some of you here and it more than likely wouldnt be perfect Wink.
using 2 as a standing frame then switching from 1 to 3 then back to 2 when you are on the next tile would look neat, especially with a 4th frame for an attack sprite :]
Posts: 2,742
Threads: 115
Joined: Jun 2006
Reputation:
0
It may look complicated, but all you have to do is edit BltPlayer.
I'm pretty new to programming, and I don't spend too much time running through Mirage's code, but when I got the source one of the first things I did was add in 4 walking animations, and an "idle" animation.
I also changed the way Sprites.bmp is set out. I changed the layout to that of the RPG Maker's (because I have bigger sprites)
Now, the first thing you need to do is find the bit at the top (below the redundant code) the one with the Anim=0 above it.
That tells the game, that when the player is half-way over a tile, it changes the animation.
What you want to do (I think :S) is have it like this:
Code: If YOffset > PIC_Y / 4 then
anim = 0
elseif YOffset > PIC_Y / 8 then
anim = 2
else
anim = 1
end if
Again, I'm not sure. I don't have any mirage source on my computer, only Naruto Realm, and I don't have time to download it either.
As for attack, find the code at the bottom, below the "else" and change the 2 to 3.
Further down still you will find the code which find's the left of the sprite you are blting.
At the moment, it time's you direction by 2 and times by 32, to get pass the other direction's sprites. You need to change that 2 to a 3.
And I'm pretty sure that's all.
I have decided that when I get home to a PC with both Mirage and VB6.0, I will write up a few tutorial's for editing the BltPlayer sub.
I hope this helped
~Kite
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
hehe well it 'sort of work's ^^, for the up direction it works but looks very messy , for the other directions the character simply slides about. Its as if there is not enough time as the character slides from one square to another to fit in the animation so it rushes and looks messy (basing this on the north facing walking, as i said the rest simply slide ;])
Edit: It seems to me like there is a neat solution, if somehow you could get the client to check if you were walking still on each square then it would miss out the standing frame and just alternate between feet i think that would smoothen it out, this is what tibia has i believe.
Edit 2: The sliding on the other directions was because i forgot to edit the bmp file hehe, the basics work, it just looks quite messy. Refere to my initial reply above these edits to my suggestion of a solution :]
Edit 3: Ok with the bmp file sorted out correctly, the north facing sprite is still the only one that works properly unfortunately :[
Ok it seems the movement system at the moment can seem pretty smooth, only one error i can find which is really annoying me, why when you attack north or west does it show the attack sprite, then the other sprite, then go back to your standing? It does not do this with south or east, and south and east look alot smoother because of this...
Any solutions ;O
Posts: 2,742
Threads: 115
Joined: Jun 2006
Reputation:
0
For you problem with the standing sprite.
You want it so that when you stand still, you appear standing still, but only if you are standing still for a while, without moving.
Otherwise you want alternating animations of the other two.
I started work on this a while ago, for Naruto Realm.
I couldn't get it working at all.
My idea was to add a new Timer in PlayerRec, and if you stand still (in check movement) it saves the tick count.
Then, in bltPlayer, if the timer + w/e > Gettickcount then animation = standing animation.
I could never get it to work though.
Oh, and I couldn't find out a way to do the 3 animations themselves.
Initially, I was going to get some code out of my source, but I have edited bltPlayer so much I couldn't really find anything that would work in a Vanilla Mirage.
Sorry,
~Kite
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Hmm... Try this and see if this works...
*REMOVED - If you really need help working it out, ask Fox he's pro*
*NOTE: Make a backup copy before trying this.. :wink: Goodluck..
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
I can simply give you my walking system, which is just as that. Although I removed one frame when the character walks east and west. Becuase it just looked wierd for my char. So just tell me if you want it.
With some little modifications that worked perfectly, thanks! Smoothest walking and attacking i have ever seen in an ms game. Can i request you take that code down? I am really happy with what has turned out and wouldnt like everyone else on the planet (apart from shan, dave, and a few others) to have access to that code; with a few modifications it really does turn out nice and it would be a shame to see every game with it like this :wink:.
Thanks everyone for your help -dance dance- xD
Edit: If anyone does pinch this hrhr, i am having to create all my own sprites to use it else it looks messy - leave it up if you want only the more determined of people will be able to use it anyway due to the amount of work needed on your graphics in order to make this look nice.
Loving it, am enjoying making my first 8 bit sprite haha!
In the old forum i remember someone demanding someone else to take their scrolling maps code down hrhr ^___^
Meh, just wanted some help with something i wanted to keep to my game, but there is nowhere else to ask for help but here and i have already asked dave for help with some other things -shy-
If anyone really wanted it i am sure if they asked i / dark~ would give it to them... Its just nice to have something which everyone else hasnt thought of, however un-complicated or whatever its still a little part of what makes it that little bit nicer to play on 'your server'.. you know?
Didnt mean to offend anyone for asking it to be taken down,, i just wouldnt like it if it was turned into a tutorial and widely available for every script kiddie and his grandson to grab and absent mindedly throw into their game, not even pausing a second to realise how nice it is or who thought it up...
From your other thread i am sure you know what i mean when i say sometimes its nice to have things the 'wannabe programming fucks' cant get their hands on... :lol:
Going to stop rambling...
Moo
LOL, i didnt have scrolling till about 3 months after everyone else; and that was when GSD programmed it in for me.. o.o
Are you sure it was me? I was probably one of the people whining for it to be released hrhr!
Cheers for the stupid comment Dave.. Lol.. But yeah, i dont mind.. I gave this code to Fox, so he can do what he wants with it.. :wink:
Shouldn't be too hard to convert.
http://www.splamm.com/elysium/forums/vi ... php?t=1578
In my tut, I have a standing frame (0), two walking frames (left (1) and right (2) foot), and an attack frame (3).
The player is standing when still and uses an alternate foot when walking. Both in the same movement looks terrible, by the way. When he attacks, a new frame is used. If you really want it, I can also tell you how to add another attack frame so it's smooth.
Edited: posted in wrong topic =P
Try and run in mirage with this code
|