Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

DevLiquidKnight

A few questions...

This topic is 5758 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

A few questions I have... 1) Ok, first question is im trying to figure out this bug in this one game of mine that is a tile based game. It loads the tiles from a map file and then displays them accross the screen using 10x10 tiles (I know small). Anyways it displays them on a 640x480 size screen. In the screen I have a surface that is like 1024 by 1024 pixels that is used as the basic map. I the upper left hand corner is the the coordinate that is like used to scroll across the map so that it has a parallax scrolling basically. And the user moves with the map the problem im having on this is when the user gets so far to the end of the bottom of the screen I have collsion detection to keep the user from going into "Null" space witch is preset to black. And occasionally it seems like if I go so far down the screen doesn't want to scroll anymore and it creates quite a lot of problems in terms of actually having the game work. I was wondering where you might suggest I look for this problem because its quite annoying. 2) In that same game as above im trying to figure how exactly how to create the collision detection ability. I tried making it so when the map is loaded a array of RECT's are filled with top, left, right, and bottom values then I increment a integer variable to use as the max amount of collisions to check for. ONLY when the tile is a block or a tile that the user cannot move on. The problem I thought would be like wouldn't the game lag in a since? There are some games I have seen that have really big maps and it seems as this is not the only way to check for collision. Plus, this way doesn't seem to work very well. I was wondering what other ways are there to check for collision in tile based games to improve the performance. As well as the overall game speed. 3) Ever since I have started making games I have only used the function GetAsyncKeyState() for movement. I was wondering what would be some of the advantages of using DirectInput to capture keystrokes on the keyboard or mouse clicks vs using the windows functions. Also, if it is indeed better to use DirectInput where exactly is a good site for a tutorial I can find on the web to make a simple keyboard DirectInput functionality (if possible separate tutorials). Killer Eagle Software [edited by - DevLiquidKnight on September 15, 2002 8:08:56 PM]

Share this post


Link to post
Share on other sites
Advertisement
as for question number 3.

for games di would be your best bet, because like all teh components of directX it interacts directctly with the hardware, which makes things much faster.

and besides directInput is very easy to learn. probably the easiest of the bunch....unless you want to go for action mapping which is quite complicates.

another thing is that while d3d is difficult to learn for the sdk docs...directInput isnt. you can easily learn it straight from the docs.



Al
"For us it''s a natural disaster....For him/she it''s a damn memory leak..."
[Triple Buffer]|[SCRIPTaGAME]|[My Old Site]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!