Sponsors

Go Back   Zune Boards > Zune Discussions > Zune Games > Development Discussions

New Member?


Register Zunecentive FAQ Members List Calendar Search Today's Posts Mark Forums Read

Development Discussions All developers who are coding games may stop by here for any help, suggestions, and everything development related.

Reply
 
LinkBack Thread Tools
Old 06-21-2008, 04:51 PM   #1 (permalink)
Zuner
 
yeloshu's Avatar
 
Join Date: Nov 2007
Posts: 56
Reputation: 11
$zB: 51
Donate
Default Problem in smoothing tile moving logic

To help to emulate the movement from Pokemon as accurately as I can, I recorded a video of the trainer walking in a circle in Pokemon Red and watched frame-by-frame to see what the trainer did each frame. Here is the pattern I noticed:

Frame 01: Move 2 pixels
Frame 02: Change to Standing Frame
Frame 03: Move 2 pixels
Frame 04: Move 2 pixels
Frame 05: Move 2 pixels
Frame 06: Change to Walking Frame 1
Frame 07: Move 2 pixels
Frame 08: Move 2 pixels
Frame 09: Move 2 pixels
Frame 10: Move 2 pixels

On Frame 11 he'll change to the Standing Frame and stop.

If you keep holding the button, the sequence becomes:

Frame 01: Change to Standing Frame
Frame 02: Move 2 pixels
Frame 03: Move 2 pixels
Frame 04: Move 2 pixels
Frame 05: Move 2 pixels
Frame 06: Change to Walking Frame 2
Frame 07: Move 2 pixels
Frame 08: Move 2 pixels
Frame 09: Move 2 pixels
Frame 10: Move 2 pixels

and then alternates between that and:

Frame 01: Change to Standing Frame
Frame 02: Move 2 pixels
Frame 03: Move 2 pixels
Frame 04: Move 2 pixels
Frame 05: Move 2 pixels
Frame 06: Change to Walking Frame 1
Frame 07: Move 2 pixels
Frame 08: Move 2 pixels
Frame 09: Move 2 pixels
Frame 10: Move 2 pixels

I wrote my code so that it would set you into a moving state when you tap a direction, it increments the frame by one, then it does one of the above actions based on what frame it is. Somewhere though, there must be a problem. Sometimes, when you are moving around, the trainer's position will somehow be offsetted a little bit and he will be halfway in between tiles. I'm not sure what the problem is, or even where it is, but it's a big problem and I need to get this fixed pretty bad as it is kinda vital to working on the rest of the game. Also, I can't really consistently reproduce it with the same set of movements, but if you just move around randomly, it'll probably happen more than once. Any help would be much appreciated, thanks.

Project: http://cid-168f84f535deaf6d.skydrive...20Test%201.rar
Pasteall Link: http://pasteall.org/1202/csharp



yeloshu is offline   Reply With Quote
Remove Advertisements Sponsored Links
Advertisement
 
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -8. The time now is 12:38 AM.

 
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 RC8
vB Ad Management by =RedTyger=
(C) ZuneBoards 2006-2007