Mirage Source

Free ORPG making software.
It is currently Sat Apr 20, 2024 3:30 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Thu Oct 08, 2009 7:07 pm 
Offline
Regular
User avatar

Joined: Sat Sep 13, 2008 8:25 pm
Posts: 69
Location: Slovenia
Hello everyone!

I'm working on 2D tile based game (C++ & DX9). I want character to move smoothly from tile to tile, but I have problems here.

On first check, everything looks smooth but when you look closer, you can see that it's "spiky" movement. It looks like it jumps for few pixels even if it's only one. I'm wondering if there is a way to make everything smoother.

ALGORITHM:

Everytime you move, player moves for 32 pixels (1pixel / 6ms)
In the same time, I have MapXOffSet that starts with 0 and resets at 32
I render map like this:
RENDER IN LOOP:
map[i][j].Tile, 32*i - MapXOffSet, 32*j - MapYOffSet;


Please, download my project and see it by yourself (FullScreen and Windowed exe files)
-----------------------
Download Project
---------------------

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group