C Board  

Go Back   C Board > General Programming Boards > Game Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 10-19-2001, 11:31 AM   #1
TheGr8one
Guest
 
Posts: n/a
Problem with a game im making

Im making a top view roleplaying type game that uses a matrix for the world, in which each number in the matrix represents a square in the world for now i got a 80x80 matrix and if the number is 0 its red, 1 its green, 2 its blue. Also everytime the user presses up, down, left, or right the world moves with the player one square at time and it re-renders where the user is currenty looking, the player is always in the center of the screen and world moves with the player, what im trying to do is make the player move more smoothly and track where the player is currently at in the matrix instead of the player moving on square at a time which looks bad. The player views the world 20x20 at a time. Any Ideas?

Thanks
Chris
  Reply With Quote
Old 10-19-2001, 11:44 AM   #2
TheGr8one
Guest
 
Posts: n/a
im using OpenGL to make this game
  Reply With Quote
Old 10-19-2001, 07:38 PM   #3
Registered User
 
Join Date: Aug 2001
Posts: 411
Change your player position variables to floats, and add a second set of variables that are the destination of the player, then move the player a little closer to that spot each time the scene is drawn, If you want cross system support you will have to do a time based movement.

Now your player will never get exactly on the spot, so you will just have to use an if statement to check if the player is close enough to stop moveing.
__________________
www.EberKain.com
Eber Kain is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with game code. ajdspud C++ Programming 5 02-14-2006 06:39 PM
Problem with drafts game InvertedSaint C Programming 6 12-21-2005 10:55 PM
problem with my opegl game... revelation437 Game Programming 6 11-25-2004 11:32 AM
Making a game KneeGrow Game Programming 1 04-16-2004 12:40 PM
Random Number problem in number guessing game... -leech- Windows Programming 8 01-15-2002 05:00 PM


All times are GMT -6. The time now is 10:58 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22