![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi all.
I try using sprite library move, but its seems wrong. I do... Code:
Sub GameForm_KeyPress(specialKey) Select specialKey Case cRightKey, 80 Move(0, 22) Case cLeftKey, 79 Move(180, 22) End Select End Sub Sub Move(d, v) CellSprite.Direction = d CellSprite.Velocity = v GameGameWindow.Tick End Sub Another question is if I don't like to do any move (move some sprites and not others), i have to put velocity to 0 or I can put direction, to -1 for example? Thanks in advance! Best Regards, fjsantos. |
|
||||
|
The Sprite library which is based on this project: Pocket PC and SpriteHand components first draws the sprites to an off-screen buffer and then draws this buffer to the screen.
This method makes the animation more smooth. As it is implemented, on every tick the offscreen bitmap is drawn and then it is updated with the new positions. Changing this logic is more complicated than it might seem. The solution is to handle the position yourself. Set the velocity to 0 and just update CellSprite.X and CellSprite.Y. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sprite move to stylus)) | Byak@ | Questions & Help Needed | 4 | 08-19-2008 08:58 AM |
| move to the last row at a table | Georg | Questions & Help Needed | 2 | 05-20-2008 09:43 PM |
| MouseDown/Move/Up either in all Controls or not hiding from Form | Woinowski | Basic4ppc Wishlist | 3 | 11-05-2007 12:36 PM |
| Measuring distance on move | Agrartec | Code Samples & Tips | 15 | 08-28-2007 02:43 AM |
| Move an image inside an image control | Cableguy | Questions & Help Needed | 5 | 05-14-2007 08:40 PM |