Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Isometric tile engine

Author
Message
zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 12th Apr 2003 20:46
I am working on an Isometric tile engine / tutorial. More specifically I am porting the code from the book "Isometric Game Programming with DirectX 7.0", by ernest Pazera , which was originally written in C++, to DarkBasic.

I am curious to find out if anybody (especially newbies) is interested in this. I know that I had a hard time moving from straight down tile maps to Isometric maps. If you are curious to see a basic example you can copy the following code snippet to see what I am talking about. You will just need to create 4 simple isometric tiles which are explained in the beginning of the code. This is just a sample demo. The actual engine will be seperated into functions, and come with an actual mapmaker, and other features such as fringes, height maps, scrolling, tilewalker, pathing AI etc...

please let me know if you are interested.

Armeggadon
20
Years of Service
User Offline
Joined: 10th Apr 2003
Location: United States
Posted: 13th Apr 2003 02:54
i am extemely interested. lol. it looks pretty cool

Just got DBPro. After a lots of small things to learn, i plan on creating an Isometric RPG
I consider myself: ABSOLUTE NEWB!!!!!!!!!!
zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 13th Apr 2003 05:28
Thanks Armeggadon! I will keep you updated on the progress of the engine. I plan to release with a full tutorial and demo game (real time strategy/tactics). I am also going to include a standard top-down tile-engine.

If I like the response, I will add a hexagon tile-engine as well.

Armeggadon
20
Years of Service
User Offline
Joined: 10th Apr 2003
Location: United States
Posted: 13th Apr 2003 16:00
thats cool. im having fun just kind of playing around ith it. cant wait to see more progress.

Just got DBPro. After a lots of small things to learn, i plan on creating an Isometric RPG
I consider myself: ABSOLUTE NEWB!!!!!!!!!!
Angeleyes
20
Years of Service
User Offline
Joined: 17th Mar 2003
Location:
Posted: 13th Apr 2003 17:01 Edited at: 13th Apr 2003 17:01
Wow, this takes me back a bit. ^_~

Many years ago I helped on a project called "Castles & Kings" which was an Iso-game for Amiga Format.

Here is a picture for you to see how it looked...


The idea was to build armies, cast magic and take over all 5 kingdoms from the computer AI characters.

I was a great game, and I have always wanted to try and convert it to Darkbasic....But that will not be going on yet as our WIP is MUCH more important than any personal projects.

Still..... I see your using something similar in the way of routines, to how we did our Iso-map.

It looks good so far.

Ta ta for now
Mary

Angeleyes
20
Years of Service
User Offline
Joined: 17th Mar 2003
Location:
Posted: 19th Apr 2003 23:57
Zenassem, how is it going then?
Any updates??

zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 20th Apr 2003 00:17
Yes, i added mouse scroling ala "command and conquer" as well as code to omly draw what is in a worldview rectangle. i will post the source at 9:30pm eastern standard time, as I have to go to work right now.

zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 20th Apr 2003 19:17
Here is the updated code. Note": I removed the text on how to create the iso tiles, also you need to have a cursor.bmp file in this version.


zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 20th Apr 2003 19:27 Edited at: 24th Apr 2003 03:49
Here is a sample screenshot.

Note: these are not the final graphics, I am currently working on the fringeing layer, and building graphics.


And here is the beginning of a building...


http://www.geocities.com/ejomisko/mypage

Armeggadon
20
Years of Service
User Offline
Joined: 10th Apr 2003
Location: United States
Posted: 20th Apr 2003 19:29 Edited at: 20th Apr 2003 19:32
wow haven't been here in a while. anywayz looks good so far. making good progress. itll be really kewl when its completly finished.

[edit} even though im a newb ill try to help with it if i can but right now im still trying to learn

Current Status: Learning DBPro

I consider myself: ULTRA NEWB!!!!!!!!!!!
TeePee
20
Years of Service
User Offline
Joined: 18th Apr 2003
Location: Australia
Posted: 22nd Apr 2003 15:26
zenassem!
When i saw the thread i just had to look because i have done some tile-based coding outside of DB. I had started to create an isometric, hexagonal game that involves detailed interaction with the surroundings. However as soon as i discovered the delights of DarkBasic I quickly forgot about the game. I would be intensely interested to see a hexagonal version of this game to help me so that i could pick up my game again. On top of that the game looks pretty good and I would like to see how it progresses.

zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 22nd Apr 2003 17:45
teepee,

Hey thanks for encouragement. btw, the final engine will contain the code to handle hexagonal and Isometric tiles. It will also have the capability to render slide, staggered, and diamond maps.

Also, anyone who can draw 2-d modern buildings and would like to see them in the game you can e-mail me at zenassem@hotmail.com. The buildings need to be drawn so that they can be broken up into isometric tiles and follow the pattern outlined in the 1st code snippet in this thread. the tile size is 64x32. Of course, all artists will receive credit if their design or image is used.

Armeggadon
20
Years of Service
User Offline
Joined: 10th Apr 2003
Location: United States
Posted: 25th Apr 2003 03:06 Edited at: 25th Apr 2003 03:14
just a couple things that could be fixed

1)set up borders on the side so when you scroll it stops
2)lower the scroll speed(i set it to 10 and its manageable)

[edit} oh and im also gonna work on some buildings in spare time. what kind do you need.(i.e. skyscrapers, farm houses, barns, landmarks, etc..)

Current Status: small FPS project for a friend(if it looks good in the end may become a demo)
I consider myself: newb
zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 25th Apr 2003 06:58 Edited at: 25th Apr 2003 07:03
Armeggadon,
Thanks for your comments.
I am in the process of working on the scrolling limits. It's tied in with with the tilewalker, and mousemap functions.

I am looking for modern to (semi-futuristic like 2050) buildings/skyscrapers, labs, powerplants, landmarks, houses.
Also Super cities, like the Tokyo Sky City, that was part of "Extreme Engineering" on the Discovery Channel. I'll try to find the direct link, offhand I know it can be reached from...

http://www.discovery.com

here is Sky city
http://dsc.discovery.com/convergence/engineering/skycity/interactive/interactive.html

here is city in a pyra,id
http://dsc.discovery.com/convergence/engineering/pyramidcity/interactive/interactive.html


P.S. Even building sections or primatives that can be used to create complete buildings are welcome.

I am staring to wonder whether this thread should be moved to project announcemnts... given the direction it has taken.

Armeggadon
20
Years of Service
User Offline
Joined: 10th Apr 2003
Location: United States
Posted: 25th Apr 2003 23:06
it might need to. ok ill try to help on the buildings(dont expect anythign super-d-duper amazing(im ok at drawing but not that good) oh well ill try my best

Current Status: small FPS project for a friend(if it looks good in the end may become a demo)
I consider myself: newb
iac249
20
Years of Service
User Offline
Joined: 26th Mar 2003
Location: USA
Posted: 26th Apr 2003 10:05
zenassem,

Good job! I own Isometric Game Programming with DirectX 7.0, but haven't gotten around to really checking it out. I'm happy to find someone taking this avenue!

Keep up the good work!
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 28th Apr 2003 09:39
I have a free snippet on my site to render 3d models as 2d images with any rotation you would require.

this snippet would compliment a game shell like this

http://www.lunarpixel.com/code.htm

the 3ds to x snippet which is a little different isnt properly uploaded so just ask if u need the correct one for that different snippet.

I better fix that mistake

Armeggadon
20
Years of Service
User Offline
Joined: 10th Apr 2003
Location: United States
Posted: 30th Apr 2003 03:25
well i've been working on buildings(i have a basic home, skyscraper, and bridge concepts. ill put them up on my website in a downloadable zip but for now im still working on them. oh and im kinda fixing it up a little. i have no clue what the book says but i'll put some screenshots on my site of what i've done so far(its nothing fancy). ill load them up y the end of this week(i hope)

Current Status: learning MORE about dbpro
I consider myself: newb
SpecTre1
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: United Kingdom
Posted: 30th Apr 2003 03:59
Very cool, keep up the good work m8!!

Lookin forward to new updates!



New to DBPro comin from AMOS on the Amiga!
Dostej
21
Years of Service
User Offline
Joined: 21st Jan 2003
Location: Switzerland
Posted: 2nd May 2003 15:59
Looks great

I like that

Armeggadon
20
Years of Service
User Offline
Joined: 10th Apr 2003
Location: United States
Posted: 3rd May 2003 05:42 Edited at: 3rd May 2003 06:21
wow ok the sky scraper is taking a little longer then i originally thought.(my first concept was more of a mall than a skyscraper) so i'll put up some pics of what have so far. ill edit this post once i upload the pics

[edit} http://www.geocities.com/treetopsite/screenshots.html for some reason the first screenshot doesn't work for me. it starts to load then stop. the third screen works for me and its pretty much the same spot as the first so you can see it. if the screens don't load then tell me and ill try to do something

Current Status: learning MORE about dbpro
I consider myself: newb
zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 6th May 2003 00:45
Hey, Good work. Sorry I haven't been around the last week. I've been pretty busy working out some issues with the mousemap and tilewalker code. Deciphering C++ & DirectX code get's ugly for me sometimes. It has really made me appreciate DB so much more. I'll be post the code sometime later this week hopefully.

~Zen

Armeggadon
20
Years of Service
User Offline
Joined: 10th Apr 2003
Location: United States
Posted: 6th May 2003 01:23 Edited at: 6th May 2003 01:33
yah i know what you mean(well kinda th main thing i know is the difference in making it a windowed program or not. in C++ you have to make the handles and variables and stuff in db its a few commands or click a button. im not good at translating so i wont evev bother till i learn both languages(which im sure i will eventually) oh well. cant wait to see the progress. this is the source i have so far(i changed some of the images and also the screen so it fits in a 800x600 at the edges. im pretty sure the only images i changed were the rightpanel and cursor. i changed arounf the map a bit but thats it other than adding some images, oh and i aslo added code so that when you press the spacebar rightpanel.bmp comes up and if you press it agin it closes(you may need to change the coordinates of wher it comes up becasue yours probably isn't the same size as mine)

[edit} here are all my images for reference(i just zipped my whole tiles folder so this includes tiles not yet complete)
http://www.geocities.com/treetopsite/Tiles.zip
if it doesn't work try here
http://www.geocities.com/treetopsite/screenshots.html
in the downloads section

Current Status: learning MORE about dbpro
I consider myself: newb
Loic_sephiroth
20
Years of Service
User Offline
Joined: 24th May 2003
Location:
Posted: 24th May 2003 16:10
Hi there, i'm a newcomer to Dark Basic (non pro), and i have some problems with programming an iso "engine" map of my own for my civ-type game.
I'm trying to do it by myself, and so far i've done what is in the code snippet.

As i have conceived it, it should print the images loaded, but...it doesn't. It just gives me a black screen and the mouse cursor. Could someone point me what am i doing wrong?

Cash Curtis III
20
Years of Service
User Offline
Joined: 12th May 2003
Location: Toronto, Canada
Posted: 24th May 2003 16:55
well I don't really know what kind of buildings you need, cause the .png files i donloaded from ur link didn't work. If u want u can check out this site

http://www.sc3000.com/sc2000/scurk/fulltils2.cfm

It has lots of sprites and tile sets. Hope it helps.
p.s cool engine by the way

Loic_sephiroth
20
Years of Service
User Offline
Joined: 24th May 2003
Location:
Posted: 26th May 2003 03:21
zenassem , i have used your code to make an iso map maker (saving the maps in arrays, instead of the "read" and "data" style you used), but i'm stuck trying to make the program recognize what tile i'm putting the mouse in. I've tried various things but i just don't get it. Could you help me, please? I'll post the code i've done so far.



As you may have noticed, parts of the code are not in english but in spanish, if you have any doubt please ask away, but i think what the code does is understadable, aside of the spanish named variables.

thank you for your time, it does realley help newbies like myself to have some people making that kind of services.

SelethD
20
Years of Service
User Offline
Joined: 1st Jun 2003
Location:
Posted: 1st Jun 2003 20:29
I just ran into this discussion by accident, while trying to find some good resources for createing a RPG using isometric graphics with DirectX and VC++.
However I always enjoy hearing about the projects of fellow coders and it sounds your you are having fun with it.

Back when X-com was all the rage, I made a map editor for customizing mission maps, the editor uses isometric tiles, and contains lots of math routines for correctly rendering tiles and getting the tile under the mouse.

So if anyone would like the source(its about 8 years old and in Borland Turbo C++). Just send me an email SelethD@hotmail.com



happy coding.

Wiggett
20
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 13th Jun 2003 19:40
doh, i tried running the code after i made the tiles etc, but it says cant understand global, and then i realize its dbpro not classic im not very savvy with this kind of coding, so any chance that maybe there is a db classic version around??

i need a copy of the 1.03 exe or i cant work on my game anymore
Armeggadon
20
Years of Service
User Offline
Joined: 10th Apr 2003
Location: United States
Posted: 18th Jun 2003 04:18
well considering that he is porting this code i think that you will have to wait or make your own dbc version. sry

remember things can always be worse.
see for yourself
zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 5th Jul 2003 06:19
SelethD,

Sorry I have been away form this thread for a while. I am looking over your code and will post back shortly. I had gotten busy with work and have just recently been able to get back to coding and such. I am still working on this project, and I have begun research on a Network Information Sytems simulation.

zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 5th Jul 2003 06:23
SelethD,
I am thinking that you have do not have the actual image tiles saved in your project. You need to draw these in a Bitmap editor. If you look at my first code snippet in this thread, you will see the instructions for drawing ISO graphic tiles. If you are still working on this project, and need the tiles, I will e-mail them to you.

Sorry for my absence.

BTW It feels good to be back again...

zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 5th Jul 2003 06:33
robx,

I don't think it would be too much for me to get the code working under DB Classic, as I own both. I will try to port it this week.

Loic*,

Thanks for taking time to improve the code. I will look through it over the weekend.

Megaton,

Thanks for the link. I will check out your site this weekend as well, and post back on Monday.

Wiggett
20
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 6th Jul 2003 08:45
groovy zen tnx. been tryin to get my head around teh iso system but my noob skills fizzle i got some good graphics ready though though they pretty much all stolen. but i can draw

yay i got db going again, now i can work on all these isometric games
zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 6th Jul 2003 17:15
Robx,

I should have the DBC code done by Monday night.

Iso can be very confusing. And it's difficulty depends on how you plot your tiles, eg. (staggered,Diamond)

I will try to give you those two methods so that you can choose for yourself. sometimes Diamond doesn't work for rts games.

For your reference an example of a diamond map is SimCity, RollerCoaster tycoon. An example of a staggered map StarCraft, Command & Conquer : Red Alert2.

I'll post the code A.S.A.P.
Thanks for hanging in there robx

Wiggett
20
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 6th Jul 2003 17:46
lol thats cool tnx man, and im makin an iso rpg not rts is about thsi messed up dream i had where i was with my gf walking the dog thru a shopping center after hours, and it was where all these kids hung out throwing firecrackers around, then we snuk behind some barrels and they kids turn cult like and executed this guy, then we ran and told the cops but they didnt believe us and a few days later they took us prisoner (the kids) then i rescued my gf from teh prison cells cause i hid a knife in my underwear, and then me and the other prisoners got swords from out of no where and fought the cult medieval style and well thats pretty much gonna be my game. as i sai dit was a messed up dream but yeah im more so looking for the diamond map as there will only be four diagonal angles for my character sprites.

yay i got db going again, now i can work on all these isometric games
zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 6th Jul 2003 19:01 Edited at: 6th Jul 2003 19:03
robx,
Sound like mischevious fun!!!

BTW- I thought some of the same things about diamond maps and staggered. But the truth is that they both have the same amount of directions, and are actually made from the same exact tiles. Another fact is that you can't tell the difference as a player until you get to the edges of a map. I'll try to give you an example



in a diamond map any time you ge close to a corner you can tell you are heading to a point. The player can see the edge of the world.

In staggered you never diplay the jagged edge rows. The world always takes up the entire screeen no matter where you are on the map. Usually you pad the edges with boundary tiles such as ocean, Forest, Mountain etc. The player never sees the edge of your world

Both maps when in the middle of a world look exactly the same to a player. The only difference is apparent near the edges of a world.

Wiggett
20
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 6th Jul 2003 19:49
yeah i've researched iso games a bit, fallout uses the staggered approach but i wanna use the diamond, make sit feel more classic liek ultima 8.

yay i got db going again, now i can work on all these isometric games
zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 6th Jul 2003 20:16
Cool! I understand what you mean. That's why I decided on Diamond as well. Infact I wanted to give it that old Populous feel.

Diamond maps are a bit harder to work with when it comes to [mousemap] and [tilewalker] routines, and generally they are harder to conceptualize. With a little effort though it won't be too hard to get use to them.

zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 8th Jul 2003 03:09
I am working on the code for DBC right now.

Wiggett
20
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 8th Jul 2003 15:50
w00t cool. yell when its done i wanna play with an iso engine badly if only i could code my own :S

yay i got db going again, now i can work on all these isometric games
Wiggett
20
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 9th Jul 2003 15:22
hows it comin along?

yay i got db going again, now i can work on all these isometric games
zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 9th Jul 2003 17:12
I have ported all the code to the point that I have no compile errors and it runs displaying the GUI. The tiles are however not displaying. I am trying a few things.

I think it may have to do with the way DBC handles globals and access to them within functions. I should be able to get it to work today.

Wiggett
20
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 9th Jul 2003 17:21
yeah all u get is a black screen an dthe mouse pointer that does nothing i screwed around with some bits in it a few days ago but couldnt get it much further than that good luck with it (my fingers crossed )

working on the game undead nazi pirates of the kungfoorabean. this game is random to the max.
zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 9th Jul 2003 18:28
I was able to get it to work. I am going to post the code in about 5-10 minutes. I went through and commented every line to let you know exactly what it does. I am also adding back in the instructions for how to create the ISOtiles.

It is very important that you draw create these tiles exactly as shown. Use a paint program. You will also need to save the bitmaps to the same directory that the db code is in. You will also need to make sure that you use the same file name as the "load image "<filename>" statements. either change your filename to match mine, or change the code to the name of your file. If you cannot create these tiles let me know. I will email you two generic isotiles so that you can run the program.

If you want a gui (right panel) you will need to draw this as well and take out the "rem" statements that load and diaplay the panel. I have clearly marked each line with instructions on what to do.

zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 9th Jul 2003 18:29
here is the source code for DBC



Wiggett
20
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 10th Jul 2003 06:55
excellent dude, i just ried it out and it works fine! i managed to get acool looking mouse cursor in, but it wont go over the right panel, instead it goes under, I'll have to work on that, also my tiles were 70*36, and when i changed ur code to set that up it made all the tiles overlap and look like poo, do i have to change the offsets? And to add a character sprite to it do i have to make a new system, or can i load it as a world tile, i dont think the latter will work cause id have to change the tiles to fit its height. anyway tnx so very much for the engine it roxorz, i will put up a screen shot for my beta v0.2 in my thread in the beta forums.

working on the game undead nazi pirates of the kungfoorabean. this game is random to the max.
Wiggett
20
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 10th Jul 2003 07:59
ok i figured out howq to get tiles that were raised above other tiles (eg walls) i just modified my tiles so that they were 64 by 64, and the reaised ones had a base and a roof. btu i still need to know how to put a movable sprite ontop of them.

working on the game undead nazi pirates of the kungfoorabean. this game is random to the max.
zenassem
20
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 10th Jul 2003 21:12
Robx,
If you would like I can post some code to handle the sprite (character) movement on top of the tiles later tonight. For now I can give you some info that may be useful.


The way the code stands right now, the world array is 2 dimensionsl Ar_world(x,y). What you will need to do is make it a 3 dimensional array. The 3rd dimension will be layers. You can think of this as tranparencies laying on top of eachother. I would suggest using 5 layers. The basic idea is this. The layer that the character is on would be layer 3. Any tile that the character walks over will be on a lower layer # eg. 0,1,2. (by the way, I usually use layer 0 for regions and encounter, trigger, info). Anything that the charcter should bump into is on the same layer as the character; layer 3. Tiles that the character should walk under are on layers higher than the charcter eg. 4,5. Layer 5 is a good layer to use for weather effects and clouds.

So with that said the world array should be dimensioned as
Ar_World(worldsizex,worldsizey,numoflayers)
numoflayers being = to 5
you will also need to the arraysize in the read tile code, and in the plot tile code. You should also create 4 more data layers set to 0 which will be a transparent or null tile.

Now if this were a straight down rectangular tile world this is all that would need to be done. And the character could just be a sequence of changing tiles. But with an Isohex world tiles overlap and disrupting one tile, the other tiles around it need to be redrawn in the proper order. Also in Iso worlds your character is anchored to the center of one of the Iso tiles and usually the top of the character will move into the tile above it. So there is more handling that needs to be done. You can try to play around with it.

I will try to port the code to DBC, at home tonight.

Wiggett
20
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 12th Jul 2003 14:43
cool thanks, sory i havent replied sooner but i been away, if you could supply some code work to help me get round that layers deal, cause reading your post i kinda get it and also kinda not have a clue how to set the third array :S tnx again for the help. and i will try and add some more screens

working on the game undead nazi pirates of the kungfoorabean. this game is random to the max.
Wiggett
20
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 13th Jul 2003 15:55
hows it coming along?

working on the game undead nazi pirates of the kungfoorabean. this game is random to the max.

Login to post a reply

Server time is: 2024-03-03 02:34:22
Your offset time is: 2024-03-03 02:34:22