Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Tiles Game
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Diablo117




PostPosted: Thu Jul 10, 2008 10:51 pm   Post subject: Tiles Game

Hi, I just made this tile game thanks to codemonkey's tutorial and metachief convincing me that the easiest way for collision detection in Turing is tile-based games.

Controls are Arrow Keys, goal is to fill the screen with red blocks, no lose or win screen yet turing is kind of slow at drawing so it will usually be a square behind while moving. (when u lose/win and a square behind u is still black turing didnt have enough time to draw it yet, and View.Update didnt help it)



Tiles Game.rar
 Description:

Download
 Filename:  Tiles Game.rar
 Filesize:  226.86 KB
 Downloaded:  278 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Zren




PostPosted: Fri Jul 11, 2008 2:43 pm   Post subject: Re: Tiles Game

Are you drawing the red tile that you just moved from AFTER draw.update?

Draw Player
View.Update
Draw.Following Square

and are you redrawing the entire map each time? or just the player's current and previous squares? If your not doing the latter and your redrawing the entire screen after clearing it, then your doing like 1000x more work in your program then needed which might also be why it's running slow.
Diablo117




PostPosted: Fri Jul 11, 2008 3:58 pm   Post subject: Re: Tiles Game

I only draw the back screen once but I dont think I can change when to draw the square because its in the if key, Arrow then part of code. so it draws the red square after clicking the button, I think. Seeing as how I just try to move around pieces of my code to make it work better in different locations which I dont 100% understand lol.
Zren




PostPosted: Fri Jul 11, 2008 4:38 pm   Post subject: Re: Tiles Game

Actually, now that I think of it: your drawing the previous square in black. What I'm saying is that when you press a directional key, your drawing the new position in blue, but your drawing the previous square (which was blue) with black. Then in the next frame, your overdrawing it red. for some reason.

If Turing was lagging, both your previous and current player tiles would be blue.

Try looking into the Draw.FillBox() that draws over the players previous position and see if the colour is red or black.
Diablo117




PostPosted: Sun Jul 13, 2008 12:20 pm   Post subject: Re: Tiles Game

Here we go, I modified a few things about the game to make it look better, included a GUI, Instructions and Points which are atm bugged, I'm working on fixing it but not goin well, might have to call one of my friends to help lol.

Editing the map: You can edit the map in this game to whatever you want, remember 1s are walls 0s are empty blocks.

I Appreciate any Suggestions/Comments as I will be advancing this game until I learn enough to move on to something a little more complicated.

For Future Update I will fix the point problem and might add an enemy or 2 to attack you.



Tile Game 1.1.rar
 Description:

Download
 Filename:  Tile Game 1.1.rar
 Filesize:  13.09 MB
 Downloaded:  211 Time(s)

Tyr_God_Of_War




PostPosted: Mon Nov 10, 2008 7:14 pm   Post subject: RE:Tiles Game

Perhaps you could add a way to only move one tile at a time (shift arrow keys?) as I have killed myself many times by moving one square too far.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: