Go Back   FileForums > Games > Game Coders
Register FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 20-04-2009, 23:50
jaypaul's Avatar
jaypaul jaypaul is offline
Registered User
 
Join Date: Apr 2009
Location: US
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
jaypaul is on a distinguished road
Help About Tower Defense type Game?

Hi Friends,

I am working on a tower defense type game. A while ago I posted asking about maze logic and was kindly directed towards A-star pathfinding. It is perfect. I understand the concept and it makes sense. Now the problem I am having is how to do the tile-based map? I'm having a hard time wrapping my head around it. I just want to do a straight square map comprised of squares. I realize a 2D Array would probably be the best way just such as:

int[][] map = new int[100][100]

where there would be 100 x 100 tiles. I can then populate the array with numbers ie 0 = walkable, 1 = unwalkable. I can have my A* algorithm return the set of tiles to move to.

My problem is that I don't want my game to be in pixels and I'm having a hard time understanding how to make the game appear tile based and large enough to be playable? ie. 1 tile = 30x30 pixels. If we are looking at it in terms of model and view, I understand the model part, but I am having a hard time translating to the view?

How do I create a tile based view so that the user can only place towers on a tile(the mouse click location could be any point inside the tile)?

Also, how would I keep the enemy units moving smoothly between tiles and not just jumping to the center of each tile?

Thanks
Paul
Reply With Quote
Sponsored Links
 


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Game backup size question (newbie type) Beleidat XBox Games 10 04-01-2005 13:37
I've got this from the net brainrecords PS2 Games 4 29-01-2004 14:19
Factoids: PS2 Boot Procedures For All Mod Chips! (Updated 22-Jan-03) BG PS2 Games 9 05-03-2003 18:40



All times are GMT -7. The time now is 16:17.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com