Sprites
Author |
Message |
Mr. T
|
Posted: Mon Jun 27, 2005 7:08 pm Post subject: Sprites |
|
|
Can someone help solve a couple of issues with my sprites...
1. The transition between moving from one direction to the other is very slow
2. You cannot jump while moving.
3. The jumping physics are not realistic.
4. The movement of the sprite is in a for loop. If you wish to switch directions, the for loop still must finish before you can get to the next set of movements.
-----
Here's what I have done as of yet.
Description: |
|
Download |
Filename: |
Movement.zip |
Filesize: |
24.49 KB |
Downloaded: |
120 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Delos
|
Posted: Mon Jun 27, 2005 8:12 pm Post subject: (No subject) |
|
|
1.
You really need to look into records and types, it will make your life so much easier.
2.
I don't like the idea at all of having both Input.KeyDown() and getch() used for the same purpose. Methinks that's the source of your 'slow movement'. If you're looking for the ol' school style of of pressing a direction then moving a set distance in that direction (as opposed to 'free' movement where you move as many or as few pixels as you want while holding the key down), then you've got a good start. Really, with as few frames as you have for your animation, I wouldn't suggest any other type - unless you're willing to put some time into smoothing out the animation that would result.
3.
F2, please.
4.
If you're going to use View.Update(), you need to use offscreenonly as well.
5.
Your jumping/gravity will come once you've introduced records and types. Simply work using a vector concept - there's bound to be a couple examples floating around here somewhere.
6.
Nice sprites!
|
|
|
|
|
|
Mr. T
|
Posted: Mon Jun 27, 2005 8:32 pm Post subject: Alex's Opinion |
|
|
i think maybe I'll test out bacchus sprites or dan sprites, because up until now i have just been manipulating pictures
|
|
|
|
|
|
Mr. T
|
Posted: Tue Jun 28, 2005 3:44 pm Post subject: Alex's Opinion |
|
|
Delos wrote: 'free' movement where you move as many or as few pixels as you want while holdng the key down
how does that work?
|
|
|
|
|
|
Delos
|
Posted: Tue Jun 28, 2005 9:36 pm Post subject: (No subject) |
|
|
Set, grid like movement:
pseudo: |
if left_key pressed then
moveCharacter (mainChar, -20x)
elsif right_key pressed then
moveCharacter (mainChar, 20x)
...
|
'Free':
pseudo: |
if left_key pressed then
moveCharacter (mainChar, -1x)
...
|
Examples:
In the old SNES (or even GBA) style games (e.g. FF) one would press a key and a character would move one 'block' or 'grid space' in that direction.
Now, take something new (say FF7 for continuities sake), you press a direction and that character moves a little bit in that direction, but differing lenghts of movement can be achieved by holding down the direction. (Also, movement is not restricted to 4/8 directions.) Hence, 'free'.
|
|
|
|
|
|
Mr. T
|
Posted: Tue Jun 28, 2005 11:36 pm Post subject: Alex's Opinion |
|
|
Can you use whatdotcolour collision detection for sprites...and if so, how?
|
|
|
|
|
|
Delos
|
Posted: Wed Jun 29, 2005 10:13 am Post subject: (No subject) |
|
|
Of course you can, but I wouldn't recomment it. The problem with Sprites is that they tend to be *very* colourful. For the avid user, it would be best to use maths to figure out which areas of the screen are traversable, painful, etc.
I do, however, have an incling of a method that does revolve around wtc, but I am yet to attempt it. See what you can do with what you have, check out the Tutorials.
|
|
|
|
|
|
|
|