Game Development Community

Mini Tbs

by Gavin Beard · in Torque Game Builder · 03/19/2005 (2:57 am) · 30 replies

Hi all, i started work on a simple turn based strat. game, initially it will give the option to play the computer, then move onto hot seating against another person then eventually network/internet (maybe).

here is a screenshot of where i am so far:

3dcg.serveftp.com/screen.gif
At the moment u can select a unit, right clicking while a unit brings up an empty menu, (u can see it floating around in the image) and click n e where in the image creates a new unit. all sprites align nicely to the tile grid i am working on movement atm, as each unit gets a set number of moves per turn and differnt types of terrain require more moves to go a shorter distance such as water and mountains.

i know the terrain tiles look quiet poor but that'll be easy to change once the game runs as i hoped

more updates i hope later today or tomorrow
Page«First 1 2 Next»
#21
03/23/2005 (9:23 am)
Not necessarily... you don't have to implement an A* algorithm, you can just take the concepts of it and create your own hybrid for your game, it definately can be done in script :)
#22
03/23/2005 (9:25 am)
All it really is, is just putting values to terrain types (like water, land, rocks,etc - just like you said) and creating some clever loops to assign those values, then the visual display of that will be a bit tricky, but not too bad really
#23
03/23/2005 (9:30 am)
I may just go witht he txt file way and read it i when the lvl is and map is created and assign the values to the map as custom data.... then just have a loop that checks thru the diff. variations of movement a unit can make when u select the move option
#24
03/23/2005 (9:31 am)
Sounds like a good plan :)
#25
03/23/2005 (9:38 am)
Well, i'll go home and try it me thinks thanks for ya help 'king'
#26
03/23/2005 (11:49 am)
Custom tile-data is broken in the initial release (it doesn't get saved) so that's is a pain at the moment, sorry about that.

This will be the way to go though for the future, especially as it' is painted alongside other tile info.

- Melv.
#27
03/23/2005 (4:14 pm)
Well the way i was thinking was not using the custom data option in the tile editor but rather set it at the point the map was loaded from disk. i.e as the user starts the game a txt file is loaded read i tot the tile map as custom data. and then close off the file i/o stream, then the data is there in the tile map until the game is closed or a new map is loaded, i have tested the custom tile data (setting and retrieving) from directly with my game and it goes ok, as long as i dont set it in the tile editor :D
#28
03/24/2005 (12:42 am)
Okey pokey :S

whilst i'm reworking code i'm having a go at movement, the first thing i'm doing is creating a blank tile layer, and just to test it setting up 1 tile in that layer here is the code:

$lvlMap = new fxTileMap2D() { scenegraph = t2dSceneGraph; };
$lvlMap.loadTileMap("~/client/maps/lvl" @ %levelNum @ ".map");

//Empty layer
$moveMap = $lvlMap.createTileLayer("21 18 4 4");
$movemap.Setposition("-8 0");
$movemap.setStaticTile("5 5",highlight);

now for all the other layers lvlMap works fine, this new layer is created just fine in as much as i can do a dump and get all the commands and i can call the functions of it and they seem to execute ok. i know the datablocki 'highlight' is ok as i can draw it as a sprtie, but for the life of me it will not display in the layer i have made, i can turn all other sprites/tile layers off and it still does not work......n e ideas what is wrong with that code?

*edit - dunno if it helps but if i do echo($movemap.setStaticTile("5 5",highlight)); it returns 1 to the console
#29
03/24/2005 (5:54 am)
Does it pop up if you specifically set the layer? As in $moveMap.setLayer(0)?
#30
03/24/2005 (5:55 am)
Havent tried, but melv also suggested setting the layer size
Page«First 1 2 Next»