View Full Version : Trying to make a turn-based isometric space game...
Chen Baiwan
November 30th, 2004, 11:03 PM
How should I set up the map? There will be many blank spaces but also spaces occupied by planets and ships...
However...I'm kinda stumped on how I should set this up... My actionscript experience is decent (see my current project at http://baiwanfuong.notix.net/omq.htm and http://baiwanfuong.notix.net/tienzsiyusi.htm ) ... So I do know a thing or two about it... however... I'm new to this particular setup...
So... can anyone help me?
Dr Warm
November 30th, 2004, 11:25 PM
I don't know what a turn based isometric space game is? You fly around in turns?
Or is it like a board game?
Chen Baiwan
November 30th, 2004, 11:56 PM
I don't know what a turn based isometric space game is? You fly around in turns?
Or is it like a board game?
More or less... it's like a board game... that's played along an isometric grid...
Here is a link to what an Isometric grid looks like... (http://www.flashkit.com/movies/Basics/Drawing/Isometri-Brett_Ta-3009/index.php)
Dr Warm
December 1st, 2004, 02:23 AM
Yeah i know what isometric grid is! Have you read tonypas tutes?
smoothhabitat
December 1st, 2004, 02:54 PM
let's see... some suggestions after you read those isometric tutes:
1. use AS2, it'll just be easier.
2. store the levels (before you load them) in an xml file with a point based system. so you'd go: <ship x="3" y="15" /> or something, instead of a long xml file detailing each x and y coordinate. this will save load and parse time do to the sparseness of space.
3. store your in game levels in a 2 dimensional array.... this will make it faster and easier to access and see what's at each point.
Chen Baiwan
December 1st, 2004, 10:45 PM
let's see... some suggestions after you read those isometric tutes:
I've looked at some of them... but they don't offer all of what I need to know... the ones I understand anyway...
1. use AS2, it'll just be easier.
I don't understand...
2. store the levels (before you load them) in an xml file with a point based system. so you'd go: <ship x="3" y="15" /> or something, instead of a long xml file detailing each x and y coordinate. this will save load and parse time do to the sparseness of space.
I don't understand this very well... I haven't gone into using cookies or text files to save data as much as I probably should have...
3. store your in game levels in a 2 dimensional array.... this will make it faster and easier to access and see what's at each point.
I don't know how to convert the 2 dimentional array into an isometric grid... I don't even know how to make arrays... not well anyway...
smoothhabitat
December 2nd, 2004, 01:53 AM
Okay, so you need some starting points?
1. AS2= ActionScript 2.0.... It jumps actionscript into a fairly solid OOP (object oriented programming) world, which is great for game programming (or any programming for that matter). Read Moock's book "Essential ActionScript 2.0" or the tutorials on this site.
2. Read the tutorials about isometric game making here: http://www.gotoandplay.it/_articles/2004/02/tonypa.php
Dr Warm
December 2nd, 2004, 02:49 AM
If you use tonypas tutes you don't really need to know the isometric bits, you need to look at all of them. The difference between isometric and normal is very small in his way of coding.
Chen Baiwan
December 2nd, 2004, 04:52 PM
Ah... thanks for the help, you guys...
Chen Baiwan
December 3rd, 2004, 11:43 PM
Ah man...I've encountered more problems...
I don't have AS2... so I can't use it...
And my main problem now is that I don't know how to genreate Isometric maps. I'm not trying to use the 3 dimentional aspect of it... I just want a map that looks 3D... the ships have no real altitude nor do they have changes in altitude and the game will play out like a board game where you can move anywhere on the map... but only once a turn...
Also note... that oftentimes the tiles will be occupied by more than 1 object at once...
I want to make it so the map starts off only with one tile known and all other occupied tiles (by a destroyed planet, an enemy planet or ship) to be unknown...
Can anyone help me with the actionscript on this or at least point me in the direction of more tutorials?
Dr Warm
December 4th, 2004, 02:36 AM
God, that sounds complicated! Seriously forgot about the 3D/isometrics for the moment, and try and do it in 2D. You don't need AS 2.0 as this sort of game won't be that CPU intensive.
I can see if i can make a fla for you, but it might take me some time!
smoothhabitat
December 4th, 2004, 03:43 AM
Right. First of all, everything "3d" about it is visual and only pseudo-3d. So what you want to start with is a 2d array (an array of arrays) for the map. And that array will contain info on each square on the grid (if you wanna get more complicated we could talk about hexagons! :) )
Anyway, the first couple sections of that tute talk about making a map.... play with that. Then make a separate function that draws it on the screen the way you want it.
btw, AS2 would help organize things. but it's still do-able in AS1.
Chen Baiwan
December 4th, 2004, 12:16 PM
No worrites... I know that everything "3D" about it is only pseudo 3D... but I really don't want to use the aspect of it where it looks like you're going through all three dimentions (not that Tonypa's tutorials show you how to do THAT but some of the ones I've read on flashkit and here do... but for the purposes of this game... that's unnessesary...)... Also... how do I make it so I can put an "objects on the tile" array in a map array?...
As for hexagons... well... that's unnesesary because I'm trying to make this game a flash version of an online game that my friend's friend made... (just to advertise it)... While his game doesn't use an isometric map... for the sake of the game looking good in Flash... I want to use one... my hope is to someday interweave that online game with Flash... but that's going to take a lot of study and a lot of PHP tutorials among other things...
I tried playing with the map generator with new tiles... adjusted the sizes and everything and I tried to adjust some of the math in the actionscript... but the map didn't turn out the way I wanted... I tried again and again... but failed each time to produce an isometric (looking) map...
Dr Warm
December 4th, 2004, 10:10 PM
Also... how do I make it so I can put an "objects on the tile" array in a map array?... You don't want to put objects in the map array, mainly because objects will be added/removed, so we add them differently. If you look at his items tutes it has how to do this.
Moopers
December 4th, 2004, 10:13 PM
Well...I read Tonypa's tutorials, but it just didn't work too well for me. So, I got Macromedia Flash MX 2004 Game Design Demystified. It rocks!:D Half the book is on how to make tile based and isometric games.
Chen Baiwan
December 4th, 2004, 10:50 PM
You don't want to put objects in the map array, mainly because objects will be added/removed, so we add them differently. If you look at his items tutes it has how to do this.
But how do I generate an Iso map? I tried using Tonapa's FLA for genreating one but the depths were messed up... What code would I use to go about all this? I mean randomly place 1 home planet (with a starting ship on the same tile), 10 unknown areas (1 of which an enemy planet accompanied by an enemy ship again on the same tile and 9 of which destroyed planets)... Only the your ships will move... but (unlike the player pieces in Tonypa's tutes...) they only move when the turn ends (I was thinking of giving each ship a "ghost" that will appear on the tile the ship is going to move to and make the ship move to that space when "end turn" is triggered... unless you guys know an easier way)... Planets (yours, the enemies and the destroyed ones)and enemy ships don't move... although your planet will be randomly raided by the enemy (Artificial Artificial Intelligence)...
Here is my game thus far (as pathetic as it is interactively... I still think I did well with the graphics... I made the rotating planet myself using only a JPEG and a few non-actionscripted special effects in flash)
http://img44.exs.cx/my.php?loc=img44&image=g9qraecedemo.swf
Chen Baiwan
December 5th, 2004, 01:52 AM
Errr... can anyone else help me?
SeiferTim
December 5th, 2004, 02:09 AM
Lemme step in for a moment :D
First, let me say that the concept seems pretty interesting.
Next, I saw the swf, and it looks just like I was thinking of it.
Have you read any of the Isometric programing tutorials on Kirupa's site? I think senocular wrote them...
Okay. Let me start simple. First, it seems to me that you simply have a 2-dimensional board, that is drawn sort of isometric so that it looks cool. there won't be any height to it at all. So, you only need to create a matrix which will contain all your map data. Now, I don't really know any of the details, but it sounds like you might be making it sort of an exploration type game, and want everything hidden. So first off, you'll want to make up a map. Lets say that 0 is empty space, 1 is player one's starting point, 2 is player two's, and 3, and 4 are two different planets. You're matrix (depending on the size of the board) might look like this:
map1 = [[0,0,0,0,0,0,0,0,1],
[0,0,0,0,0,0,0,0,0],
[0,0,0,3,3,0,0,0,0],
[0,0,0,3,3,0,0,0,0],
[4,4,0,0,0,0,0,0,0],
[4,4,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0],
[2,0,0,0,0,0,0,0,0]];
Now, when you draw your map (and the other tutorials would know way more than I do on that), just draw a blank grid, except for where you put the players at. As they move around, check their x,y position with the map, and if they land on a space with a 3, or 4, then display the planet, or whatever.
After that, simply code the other parts of the game in. Again, I wish I knew more about the concept, so that I might be able to give more help. My tutorial on RPGs just went live on the main site, which covers tiles a little more simply than tonypa - put it doesn't have anything to do with Isometrics.
Chen Baiwan
December 5th, 2004, 02:15 AM
Ah man... I was hoping you would go more into the actual generation of the map... (where the tiles are automatically placed... and how the players are placed... on different tiles..) ... thanks anyway...
EDIT: BTW... how's Worlds coming along?
SeiferTim
December 5th, 2004, 03:30 AM
Like I said, I think sen's tutorial on that would be a lot more helpful... basically, though, it wouldn't be much more than what I did in my RPG tutorial, which is move to the place where the tile would go, and based on what number is in your matrix, draw it there. The problem is that in isometrics, you have to move in both the x,y directions to draw it...
And Worlds is coming along.... very slowly... :( I've been trying to add to the Design Doc as much as possible, but with everything that's been going on, its been hard. I just landed myself a new job - starting Monday, the 13th of December I will be the Lead VisualBasic Programer for a company called MedTech. One of these days the DD will be finished, and I can start seriously trying to find people to help me get it coded, and finished. Unfortunately, I fear that Kitiara has given up on my ability to finish the thing, and has moved on to other projects :( Oh well, I plan to finish it before I die :D
Let me peruse a little more of sen's tutorial to see if I can come up with anything for you, unfortunately, I'm on a Flash-less computer, so I can't try anything out at this time...
If you'll be on for awhile tonight, I should come up with something usefull....
SeiferTim
December 5th, 2004, 03:54 AM
What are the dimensions of your "tiles"? Reading the tutorials, I see that it is best to make them a diamond wich is twice as wide as it is tall. The code for generating the map would be not-much-more than 2 nested for loops. Like this:
//Of course, first, you would define a few isotileX prototypes, and a map, and have a tileset MC, which holds all the different tiles in seperate frames.
for(yT=0,yT++,y=10){
for(xT=0,Xt++,X=10){
var name = "tile" + xT + "_"+yT
_root[name] = new _root["isotile" + map[xT][yT]]
_root.mapClip.attachMovieClip("tiles_mc",name,this.getNextHighestDepth());
_root.mapClip[name]._x = tileSpacing * (xT + yT);
_root.mapClip[name]._y = tileSpace / 2 * (xT - yT);
_root.mapClip[name].gotoAndStop(_root.[name].tileFrame);
}
}
Now, as it looks as if some of your tiles would have planets "hovering" above them, I really don't think this will be a problem, just put your planet on in the tile's image, and hopefully, due to the order that flash will draw everything on the screen, it should look fine. I wish I had a way to work on this a bit myself, but, as I said, I don't have Flash on this computer. Try it out, and let me know how it works.
Chen Baiwan
December 5th, 2004, 10:44 AM
Ah man.... it'snot working... this is what I have right now...
//Of course, first, you would define a few isotileX prototypes, and a map, and have a tileset MC, which holds all the different tiles in seperate frames.
for(yT=0;yT++;y=10){
for(xT=0;Xt++;X=10){
var name = "tile" + xT + "_"+yT
_root.map[name] = new _root.map["isotile" + map[xT][yT]]
_root.map.mapClip.attachMovieClip("tiles_mc",name,this.getNextHighestDepth());
_root.map.mapClip[name]._x = tileSpacing * (xT + yT);
_root.map.mapClip[name]._y = tileSpacing / 2 * (xT - yT);
_root.map.mapClip[name].gotoAndStop(_root.map[name].tileFrame);
}
}
I had changed the linkage to the set of tiles to "tiles_mc"... but it still didn't do anything...
Also...I am trying to make this all generated into a movieclip... is that alright? I did change the directories and such to direct all the script to this movieclip... (_root becomes _root.map)... I tried making a few more corrections...but to no avail...
sorry... :puzzled:
Edit: Also... the tiles are 80x40
Edit: Oh... and good luck with the job...
Chen Baiwan
December 5th, 2004, 01:55 PM
I played around with it... and ended up with this (on the root layer instead of inside a map movieclip... but it still didn't work...
map = [[0,0,0,0,0,0,0,0,1],
[0,0,0,0,0,0,0,0,0],
[0,0,0,3,3,0,0,0,0],
[0,0,0,3,3,0,0,0,0],
[4,4,0,0,0,0,0,0,0],
[4,4,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0],
[2,0,0,0,0,0,0,0,0]];
tileSpacing=80
for(yT=0;yT++;yT=10){
for(xT=0;xT++;xT=10){
var name = "tile" + xT + "_"+yT
_root[name] = new _root["isotile" + map[xT][yT]]
_root.mapClip.attachMovieClip("tiles_mc",name,this.getDepth());
_root.mapClip[name]._x = tileSpacing * (xT + yT);
_root.mapClip[name]._y = tileSpacing / 2 * (xT - yT);
_root.mapClip[name].gotoAndStop(_root[name].tileFrame);
}
}
SeiferTim
December 5th, 2004, 09:16 PM
You have to make some tile prototypes... look at my tut... I can explain later tonight when I have more time...
SeiferTim
December 6th, 2004, 02:08 AM
Okay, sorry, I guess I didn't really explain very well...
map = [[0,0,0,0,0,0,0,0,1],
[0,0,0,0,0,0,0,0,0],
[0,0,0,3,3,0,0,0,0],
[0,0,0,3,3,0,0,0,0],
[4,4,0,0,0,0,0,0,0],
[4,4,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0],
[2,0,0,0,0,0,0,0,0]];
tileSpacing=80
isotile0 = function() {};
isotile0.prototype.tileFrame = 0;
isotile1 = function() {};
isotile1.prototype.tileFrame = 1;
isotile2 = function() {};
isotile2.prototype.tileFrame = 2;
isotile3 = function() {};
isotile3.prototype.tileFrame = 3;
isotile4 = function() {};
isotile4.prototype.tileFrame = 4;
//You have to create your "isotileX" prototypes.
for(yT=0;yT++;yT=10){
for(xT=0;xT++;xT=10){
var name = "tile" + xT + "_"+yT
_root.attachMovieClip("blank","mapClip",this.getNextHighestDepth());
//"blank" is the name of an MC which is just that - blank.
_root[name] = new _root["isotile" + map[xT][yT]]
_root.mapClip.attachMovieClip("tiles_mc",name,this.getDepth());
_root.mapClip[name]._x = tileSpacing * (xT + yT);
_root.mapClip[name]._y = tileSpacing / 2 * (xT - yT);
_root.mapClip[name].gotoAndStop(_root[name].tileFrame);
}
}
//tiles_mc would be a MC which has a different tile image for each frame, and
//"stop();" in the AS for that frame. this may not be perfect, but its a start.
SeiferTim
December 6th, 2004, 02:13 AM
PS: you may want to make your planets only take up one space... I think it would be better that way...
SeiferTim
December 6th, 2004, 04:13 AM
You'll need to get back with me to see if it works... I won't be able to test it for myself until sometime tomarrow...
What else are you planning? What kind of game is it going to be?
Just seeing the small sample you showed makes me a bit curious...
I'm imagining something like a multi-player, turn-based game, where you start with a basically blank screen, and have 2 - 4 players at opposite corners.
Each player takes turns moving their ship based on the type of ship's engine it has, and perhaps a die-roll, then, after they move, they can perform one of the following actions:
Attack - if an enemy is in range
Defend - if they think an enemy might get them in range soon
Scan - search the sector (tile) they are in for any salvageable material to replenish feul/ammo, or upgrade something
Explore - if they are on a planet, they can search the planet for weapons, or other things. Also, they can secretly lay traps for enemy ships who may try to explore.
Also, I think it would be neat if the player could choose a race, and a ship, which would give them different abilties, skills, and weaknesses.
Anyway, you probably have something completely different in mind, but, once I get some time, I may try to code what I just came up with... ;)
Chen Baiwan
December 6th, 2004, 04:24 PM
You'll need to get back with me to see if it works... I won't be able to test it for myself until sometime tomarrow...
Hold on... I'll test it soon...
What else are you planning? What kind of game is it going to be?
Just seeing the small sample you showed makes me a bit curious...
I'm imagining something like a multi-player, turn-based game, where you start with a basically blank screen, and have 2 - 4 players at opposite corners.
Well... it's based off of a player vs. player online game called RAECE (http://hanibal.stiusa.com/main//)... but for this one it's going to be player vs. Computer... and the AI will be artificial (that's right... AAI)... The enemy ships will not move (Unless you can also help me program REAL artificial intelligence as well) but your planet will be randomly attacked by them... Ships can move ANYWHERE on the board... but only once a turn and every space occupied by something (be it space rubble or the enemy planet itself) will be marked with a question mark...
Each player takes turns moving their ship based on the type of ship's engine it has, and perhaps a die-roll, then, after they move, they can perform one of the following actions:
Attack - if an enemy is in range
Defend - if they think an enemy might get them in range soon
Scan - search the sector (tile) they are in for any salvageable material to replenish feul/ammo, or upgrade something
Explore - if they are on a planet, they can search the planet for weapons, or other things. Also, they can secretly lay traps for enemy ships who may try to explore.
Hmmm... sounds good... but that's not what I'm planning... All ships have pretty much the same capabilities in terms of movement... but not in battle... you only move your ships when the turn ends (you decide where to move during the turn) and fuel is deducted from the ship whether or not it moves (If it's out in space... it's lost... if it's at a planet... then it stays... but can't fight untill you load fuel onto the ship from the planet...)
Also, I think it would be neat if the player could choose a race, and a ship, which would give them different abilties, skills, and weaknesses.
Maybe in a later version... but for this one... you can only be a human... fighting one enemy... with no allies...
However... in the actual online game this is supposed to emulate... you can do all of that... there's even alliances and luxury trading in the actual game...
Anyway, you probably have something completely different in mind, but, once I get some time, I may try to code what I just came up with... ;)
Not too too different... though for me it will be VERY difficult to code... are you willing to help me code the rest of the game? If you do... you WILL be credited with a link to your site in the game credits (and if you have a Newgrounds.com account... I'll definitely make you a co-author)...
Thank you for your help...
Update: Ah man... I've tried everything... I've even played with the linkage... then I read your tutorial and tried to find what I was doing wrong but I couldn't find it... What movieclips do I need on the stage? Is it ok if this is on frame 4? I created a blank movie clip and had linkage on that but it still didn't work... Ah man... I wish I knew what I was doing wrong...
Dr Warm
December 7th, 2004, 04:49 AM
Yeah i couldn't get you're fla to work for me either, rather than trouble shoot that, i just used tonypa's fla, to show you isometric with items.
Chen Baiwan
December 7th, 2004, 06:20 AM
Alright... thanks for the help you guys... looks like a good start... but now I have a problem with depths... some of the tiles are appearing on top of the items (planets) that are supposed to rest on top of them...
Dr Warm
December 7th, 2004, 07:39 AM
just make the items have depth like 100000 or something!
just noticed you ripped of my title, Adequate Flasher, tsk tsk. I was trying to make it funny, by having the word flasher in it, but obviously you interpreted it differently. oh well
SeiferTim
December 7th, 2004, 12:55 PM
I had the same problem. But I found a way which seems to fix it:
map=[
[2,1,0,1,0,1,0,1],
[1,0,1,0,1,0,1,0],
[0,1,0,1,0,1,0,1],
[1,0,1,0,2,0,1,0],
[0,1,0,1,0,1,0,1],
[1,0,2,0,1,0,1,0],
[0,1,0,1,0,2,0,1],
[1,0,1,0,1,0,1,2]];
spacing = 40;
isotile0 = function () {};
isotile0.prototype.pframe = 1;
isotile1 = function () {};
isotile1.prototype.pframe = 2;
isotile2 = function () {};
isotile2.prototype.pframe = 3;
function drawMap() {
_root.attachMovie("blank","board",this.getNextHighestDepth());
depthA=5;
depthB=800;
for(xT = 0; xT < 8; xT++){
for(yT = 0; yT < 8; yT++){
var name = "tile" + xT + "_" + yT;
_root[name] = new _root["isotile" + map[xT][yT]];
depthA++;
depthB++;
if (xT > yT) {
newDepth = depthA*(map[xT][yT]+1);
} else {
newDepth =( depthB/2)*(map[xT][yT]+1);
}
trace(newDepth);
_root.board.attachMovie("tile_mc",name,newDepth);
_root.board[name]._x = spacing * (xT + yT)
_root.board[name]._y = (spacing / 2) *(yT - xT);
_root.board[name].gotoAndStop(_root[name].pframe);
}
}
}
drawMap();
And here's the movie:
<embed src="http://seifertim.no-ip.com/iso_demo.swf" height="400" width="800">
...and the FLA:
Chen Baiwan
December 7th, 2004, 08:59 PM
Alright... I'll see what I can do when I get home (I'm at my brother's computer right now...
Chen Baiwan
December 8th, 2004, 04:42 PM
I can't open the FLA... Try exporting it in Flash MX...
Nevermind! I just got your method to work, SeiferTim! Thank you... here's the game so far...
http://img33.exs.cx/my.php?loc=img33&image=raecedemo1mw.swf
...
Now... How do I generate planets with random positions (that don't generate on top of each other and ships that can move to any tile as soon as the turn ends... I also want to make it so that when you click on your planet... There will be (changable) stats for that planet... while at the moment there's only one inhabitble planet... I want to make it so you can have multiple planets in the future expansions of this Flash version of an online game (and yes... the creator did give me permission to make it... I want his site to display it when its finished)... For this version... trade and alliances have been taken out...
SeiferTim
December 8th, 2004, 05:05 PM
Better?
SeiferTim
December 8th, 2004, 05:07 PM
Doing some testing, I found that my attempt to make the depths work, well, it didn't work... If someone can play with it, and try to find a better method...
Chen Baiwan
December 8th, 2004, 05:18 PM
I played with it and got it to work... no worries... I use swapDepths() and made it so the interface and arrows appeared over the map rather than under it... thanks again...
Edit: Note that I edited my last post...
Edit: Ohh! (after testing the code) THAT depth problem... whoops... nevermind... I thought you meant the depth of the map itself...
SeiferTim
December 8th, 2004, 06:14 PM
Yeah. :D
Danko
December 9th, 2004, 07:54 AM
Chen,
First of all, your linked game (street fighter) is awsome! One could see that you have a talent for game programming. I've had a huge laugh on the graphics :) but the work is fantastic!
Assuming that "turn-based isometric game" means "a filmation isometric game" (a genre that was very popular back in the eighties), I suggest that you get an Amstrad emulator (http://winape.emuunlim.com/) and check out the following games:
- Knight Lore
- Alien 8
- Batman
- Head OVer Heels
... to get more ideas.
You should also check out a game called "ZAXXON" - it's a very old isometric shooter game (there is a version for a MAME (http://www.mame.net/) emulator).
Programming this kind of game is very complex. I started creating one by myself (check it out >here< (http://dkozar.com/flash/izometrija.html)) and it took me a few months to get to that stage.
Now I'm writing tutorials for a Flash isometric right here on Kirupa.com:
- Isometric Transformations (http://kirupa.com/developer/actionscript/isometric_transforms.htm)
- Isometric Hit Testing (http://kirupa.com/developer/actionscript/isometric_hittest.htm)
Since I haven't explained isometric maps already, I'll simply paste some of my XML data here:
<?xml version="1.0"?>
<MAP author="Danko Kozar, Zagreb, Croatia, dkozar.com" starting_ROOM="2" buffer="5">
<ROOM room_number="1" x_size="600" y_size="600" z_size="400" floor_color="0x000077" floor_edge_color="0x0000FF" z_offset="100" audio="audio/firstRoom.mp3" volume="75">
<WALL clip="WALL2" x="550" y="0" z="400"></WALL>
<WALL clip="WALL2" x="500" y="0" z="400"></WALL>
<WALL clip="WALL2" x="450" y="0" z="400"></WALL>
<WALL clip="WALL2" x="400" y="0" z="400"></WALL>
<WALL clip="WALL2" x="350" y="0" z="400"></WALL>
<WALL clip="WALL2" x="300" y="0" z="400"></WALL>
<WALL clip="WALL2" x="250" y="0" z="400"></WALL>
<WALL clip="WALL2" x="200" y="0" z="400"></WALL>
<WALL clip="WALL2" x="150" y="0" z="400"></WALL>
<WALL clip="WALL2" x="100" y="0" z="400"></WALL>
<WALL clip="WALL2" x="50" y="0" z="400"></WALL>
<WALL clip="WALL2" x="0" y="0" z="400"></WALL>
<WALL clip="WALL1" x="600" y="0" z="350" flip="1"></WALL>
<WALL clip="WALL1" x="600" y="0" z="300" flip="1"></WALL>
<DOOR type ="4" clip="DOOR3" y="0" z="200" a="50" b="100" c="100" orientation="z" ROOM="13" xnew="0" ynew="35" znew="135"></DOOR>
<WALL clip="WALL1" x="600" y="0" z="150" flip="1"></WALL>
<WALL clip="WALL1" x="600" y="0" z="100" flip="1"></WALL>
<WALL clip="WALL1" x="600" y="0" z="50" flip="1"></WALL>
<WALL clip="WALL1" x="600" y="0" z="0" flip="1"></WALL>
<WALL clip="film1" x="260" y="5" z="400" flip="1" media="media/movie.swf"></WALL>
<DOOR type ="1" clip="DOOR1" y="0" z="200" a="50" b="100" c="100" orientation="z" ROOM="2" xnew="170" znew="235"></DOOR>
<DOOR type ="8" clip="DOOR1" x="400" y="0" a="100" b="100" c="50" orientation="x" ROOM="12" xnew="135" znew="270"></DOOR>
<OBJECT clip="hero" x="100" z="50" a="30" b="70"c="30" poss="63"></OBJECT>
<OBJECT clip="image10" x="550" z="350" a="50" b="35" c="50" poss="15" lthl="1" movement="17" move="8" turn="2"></OBJECT>
<OBJECT clip="fridge" x="500" z="350" a="50" b="100" c="50" poss="15" extra="2" param="3" param1="0" param3="0" param3="50"></OBJECT>
<OBJECT clip="image6" x="350" z="300" a="50" b="35" c="50" poss="15"></OBJECT>
<OBJECT clip="image2" x="350" z="200" a="50" b="35" c="50" poss="15" slide="15"></OBJECT>
<OBJECT clip="image6" x="350" z="100" a="50" b="35" c="50" poss="15"></OBJECT>
<OBJECT clip="image5" x="350" z="0" a="50" b="35" c="50" poss="15" extra="1"></OBJECT>
<OBJECT clip="image9" x="200" z="350" a="50" b="35" c="50" poss="0" pushon="8"></OBJECT>
<OBJECT clip="image9" x="200" z="250" a="50" b="35" c="50" poss="0" pushon="8"></OBJECT>
<OBJECT clip="image9" x="200" z="150" a="50" b="35" c="50" poss="0" pushon="2"></OBJECT>
<OBJECT clip="image9" x="200" z="50" a="50" b="35" c="50" poss="0" pushon="2"></OBJECT>
<OBJECT clip="image6" x="200" z="0" a="50" b="35" c="50" poss="15"></OBJECT>
<OBJECT clip="image5" x="100" z="350" a="50" b="35" c="50" poss="15" extra="1"></OBJECT>
<OBJECT clip="fridge" x="100" z="0" a="50" b="100" c="50" poss="63" extra="2" param="3" param1="0" param3="50"></OBJECT>
</ROOM>
<ROOM room_number="2" x_size="200" y_size="600" z_size="600" floor_color="0x000077" floor_edge_color="0x0000FF" x_offset="200" z_offset="0" audio="audio/SecondRoom.mp3" volume="60">
<WALL clip="WALL10" x="150" y="0" z="600"></WALL>
<DOOR type="2" clip="DOOR2" x="50" y="0" a="100" b="100" c="50" orientation="x" ROOM="3" xnew="85" znew="0"></DOOR>
<WALL clip="WALL10" x="0" y="0" z="600"></WALL>
<WALL clip="WALL10" x="200" y="0" z="550" flip="1"></WALL>
<WALL clip="WALL10" x="200" y="0" z="500" flip="1"></WALL>
<WALL clip="WALL10" x="200" y="0" z="450" flip="1"></WALL>
<WALL clip="WALL10" x="200" y="0" z="400" flip="1"></WALL>
<WALL clip="WALL10" x="200" y="0" z="350" flip="1"></WALL>
<WALL clip="WALL10" x="200" y="0" z="300" flip="1"></WALL>
<DOOR type ="4" clip="DOOR1" y="0" z="200" a="50" b="100" c="100" orientation="z" ROOM="1" xnew="0" znew="235"></DOOR>
<WALL clip="WALL10" x="200" y="0" z="150" flip="1"></WALL>
<WALL clip="WALL10" x="200" y="0" z="100" flip="1"></WALL>
<WALL clip="WALL10" x="200" y="0" z="50" flip="1"></WALL>
<WALL clip="WALL10" x="200" y="0" z="0" flip="1"></WALL>
<DOOR type ="1" clip="DOOR1" y="0" z="300" a="50" b="100" c="100" orientation="z" ROOM="9" xnew="170" znew="385"></DOOR>
<DOOR type ="8" x="0" y="0" a="200" b="600" c="50" orientation="x" ROOM="6" xnew="-100" ynew="-100" znew="570"></DOOR>
<OBJECT clip="hero" x="75" z="250" a="30" b="70"c="30" poss="63"></OBJECT>
<OBJECT clip="image10" x="100" z="300" y = "35" a="50" b="35" c="50" poss="15" lthl="1" movement="12" move="1" turn="1" speed="2.5"></OBJECT>
<OBJECT clip="image6" x="100" z="300" a="50" b="35" c="50" poss="15"></OBJECT>
<OBJECT clip="fridge" x="0" z="450" a="50" b="100" c="50" poss="15"></OBJECT>
<OBJECT clip="fridge" x="150" z="50" a="50" b="100" c="50" poss="63" extra="2" param="6" param1="100" param3="100"></OBJECT>
<OBJECT clip="image6" x="50" z="150" a="50" b="35" c="50" poss="15"></OBJECT>
<OBJECT clip="image6" x="50" y = "35" z="150" a="50" b="35" c="50" poss="63"></OBJECT>
</ROOM>
</MAP>
This is a data for two rooms only.
Hope that it will be inspiring to you...
Cheers!
Chen Baiwan
December 9th, 2004, 05:16 PM
Chen,
First of all, your linked game (street fighter) is awsome! One could see that you have a talent for game programming.
Thanks! :)
I've had a huge laugh on the graphics :) but the work is fantastic!
Why? Were the graphics not very good or were they just funny?
Assuming that "turn-based isometric game" means "a filmation isometric game" (a genre that was very popular back in the eighties), I suggest that you get an Amstrad emulator (http://winape.emuunlim.com/) and check out the following games:
- Knight Lore
- Alien 8
- Batman
- Head OVer Heels
... to get more ideas.
I have an idea of the game concepts... only thing is... I don't know how to carry them out...
You should also check out a game called "ZAXXON" - it's a very old isometric shooter game (there is a version for a MAME (http://www.mame.net/) emulator).
ok.
Programming this kind of game is very complex. I started creating one by myself (check it out >here< (http://dkozar.com/flash/izometrija.html)) and it took me a few months to get to that stage.
Yes! I've seen that game before! I think I stumbled upon it while reading through tutorials and going to your site... It's very nice... but I'm not trying to use all of the concepts used in the game...
Now I'm writing tutorials for a Flash isometric right here on Kirupa.com:
yep... I think I read your tutorial on Isometrics... but didn't really get it...
- Isometric Transformations (http://kirupa.com/developer/actionscript/isometric_transforms.htm)
- Isometric Hit Testing (http://kirupa.com/developer/actionscript/isometric_hittest.htm)
I'm not really planning to use IsohitTesting in this game...
Since I haven't explained isometric maps already, I'll simply paste some of my XML data here:
[posts XML data]
AAAAAAAAAAGGGGGGGGGGGGGHHHHHHHHH!
This is a data for two rooms only.
Hope that it will be inspiring to you...
Cheers!
Ah man... That's some scary amount of coding... I hope I won't have to do that much coding in my game just for a good map...
Edit: Here's what I've do so far with the help of the people at Kirupa!
The game thus far! (http://img53.exs.cx/my.php?loc=img53&image=raecedemo6pp.swf)
SeiferTim
December 9th, 2004, 07:20 PM
Looks good, but I see you haven't tackled the depth problem yet... ;)
Yeah, I think that's going to be a problem, that I don't have any idea how to fix yet...
Danko
December 10th, 2004, 05:40 PM
Chen,
I understand that you are in hurry.. So I've just copy-pasted a few emails which I received from isometric guru Jon Ritman (creator of "Head over Heels" game) when I asked him for some advices two years ago. The depth sorting is mentioned here.
Here is the link. Hope it will help: Jon Ritman's Isometric Tutorial.pdf (http://dkozar.com/documents/Jon_Ritmans_Isometric_Tutorial.pdf)
Special thanks to Jon, creator of the most inovative games of the eighties!!!
:block:
Chen Baiwan
December 11th, 2004, 12:23 AM
Well... I'm not in that much of a hurry... but thanks...
Edit: It won't open well for me... it opens in photoshop but is barely readable... Is it possible if you could export in in word or text?
SeiferTim
December 11th, 2004, 03:30 AM
Its a PDF, do you have Adobe Acrobat? Its free from http://www.adobe.com if you don't...
Danko
December 11th, 2004, 05:26 AM
Chen,
I played your "fighter" game one more time. The graphics is ok - only the moves are little funny.. and the fact that you have only one punch :-)
But one could see the great effort made...
Anyway, I think you are a game programming guru! :thumb: Keep on...
About PDF: it's Adobe Reader format (Portable Document Format) - the most common format for documents on net - you should know that because tons of knowlege is around in that format! Get A.R. immediately and search the web fot PDF electronic books (PDF tutorials)!
The another common format is .chm (compiled help file).
About XML map:
You shouuld realize that the best way to keep data isn't in Flash, but in outside:
a) database (reached with some script language as PHP, ASP.net, Coldfusion) or
b) XML file. XML is a data container (it's more stuctured than simple txt file with variables in it). XML is a "tree", or "folder" view. It's based on a parent-child relationship.
You should reach for a Flash-XML manuals and learn how it works! Flash has an excellent XML parser (a little bit hard to learn, but..)
As you see in XML I attached, you have a map divided into rooms as it's children and then the objects as room's children. You load an external XML file from Flash (the same way you load graphics or external movieClips)(yes - it can have a preloader too), parse it and then initialize the objects of the particular screen.
XML is the answer for storing your data!
SeiferTim
December 11th, 2004, 05:41 AM
I may need to learn more about Flash & XML for my RPG.... but... that'll be aways off..
Chen Baiwan
December 11th, 2004, 03:11 PM
Chen,
I played your "fighter" game one more time. The graphics is ok - only the moves are little funny.. and the fact that you have only one punch :-)
No you don't... if you press the S button twice you'll do a double punch and thrice will make you kick them...
But one could see the great effort made...
Thanks!
Anyway, I think you are a game programming guru! :thumb: Keep on...
Thanks!
About PDF: it's Adobe Reader format (Portable Document Format) - the most common format for documents on net - you should know that because tons of knowlege is around in that format! Get A.R. immediately and search the web fot PDF electronic books (PDF tutorials)!
The another common format is .chm (compiled help file).
This comp doesn't have reader... but I'll try to get it ASAP...
About XML map:
You shouuld realize that the best way to keep data isn't in Flash, but in outside:
a) database (reached with some script language as PHP, ASP.net, Coldfusion) or
b) XML file. XML is a data container (it's more stuctured than simple txt file with variables in it). XML is a "tree", or "folder" view. It's based on a parent-child relationship.
You should reach for a Flash-XML manuals and learn how it works! Flash has an excellent XML parser (a little bit hard to learn, but..)
As you see in XML I attached, you have a map divided into rooms as it's children and then the objects as room's children. You load an external XML file from Flash (the same way you load graphics or external movieClips)(yes - it can have a preloader too), parse it and then initialize the objects of the particular screen.
XML is the answer for storing your data!
The only thing is... won't this be a greater load on a certain server? Is there anyway to save and store XML files on a PC for everyone playing the game? This is why I want to use Flash Cookies instead. Plus... if I submit it to a ceratin Flash portal... the game won't work unless server the XML data is being stored on is up...
Danko
December 11th, 2004, 09:36 PM
The only thing is... won't this be a greater load on a certain server? Is there anyway to save and store XML files on a PC for everyone playing the game? This is why I want to use Flash Cookies instead. Plus... if I submit it to a ceratin Flash portal... the game won't work unless server the XML data is being stored on is up...
1) XML loads only once. You can find it in your Temporary Internet Files (cache) and then it is on your computer.
2) XML is simple text file that lays in the same folder as your .swf file. You need only FTP rights to set this up.
RyxiaN
December 18th, 2004, 12:48 PM
w00t
what do you mean
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.