Not quite sure why I wrote this program.

Everything else that doesn't fall into one of the other PB categories.
SMartin
User
User
Posts: 19
Joined: Thu Aug 16, 2007 6:08 am
Location: Las Vegas

Not quite sure why I wrote this program.

Post by SMartin »

I decided one day to write a program that creates isometric tile landscapes (for no good reason, really) in the vain of games like Transport Tycoon.

The idea was to have it create and save a bitmap of an iso-tile landscape to be used for....well....I guess I should have thought that one out a little bit first.

Anyway, I thought I'd share it here. Maybe someone (with a little free time to spare) might spark me with an idea of what the heck to do with it.

Here's a screenshot:
Image

Here's a link to the zip:
http://members.cox.net/smartin1803/Pure ... pMaker.zip

Insert/Delete will rotate the map
Mousewheel will zoom in and out
Left Click on a cell corner will raise the corner
Right Click on a cell corner will lower the corner
Click in the middle of the cell to raise the whole cell (or lower it if right clicked)
Steve Martin

He who waits too long to hesitate…hesitates last.
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Post by Rook Zimbabwe »

This is great... I plan to see if I can make a map editor out of it to use with the HGE Lib. Possibly with the Chipmunk as well!
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

what is the base of your algorithm?
on the screenshot it looks a bit squary, like the mountains in "lokomotion", not that fine like in "sim city 3000"...
oh... and have a nice day.
#NULL
Addict
Addict
Posts: 1498
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Post by #NULL »

that's cool. i like such stuff :D ..especially isometric engines.
thanks for sharing.
Derek
Addict
Addict
Posts: 2354
Joined: Wed Apr 07, 2004 12:51 am
Location: England

Post by Derek »

That looks good, just need someone to base a game on it now.
SMartin
User
User
Posts: 19
Joined: Thu Aug 16, 2007 6:08 am
Location: Las Vegas

Post by SMartin »

Kaeru Gaman wrote:what is the base of your algorithm?
on the screenshot it looks a bit squary, like the mountains in "lokomotion", not that fine like in "sim city 3000"...
Yeah, you're right. They are squares. I think Transport Tycoon/Locomotion uses something other than a 1 to 1 ratio, but I'm not sure...also I just used Pure's 2D drawing commands and solid color flood fill for the tiles so that makes it look even more blocky.

Using textures instead of flood fills would help smooth it out...maybe I'll look into that.

Rook: Thanks for the complement. I'm glad to hear someone might find this usefull :)
Steve Martin

He who waits too long to hesitate…hesitates last.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

you used drawing commands for creating the landscape?
...or did I misunderstand you....

if so, really interesting approach.

and additionally: it really looks useful, good work, squarish or not.
oh... and have a nice day.
SMartin
User
User
Posts: 19
Joined: Thu Aug 16, 2007 6:08 am
Location: Las Vegas

Post by SMartin »

Kaeru,

I used 2D line and fill commands on four sprites to draw every possible configuration of the tiles (79 of them if I remember right) The four sprites were for the four different colored tiles. They get redrawn when the zoom (cell size) changes.

Then I just clipped those four 'template' sprites to the correct cell to composite yet another sprite that is the total landscape.

After that I just moved the landscape sprite around to make it look like the map is scrolling and slapped that rusty metal/bubble graphic on top.
Steve Martin

He who waits too long to hesitate…hesitates last.
SMartin
User
User
Posts: 19
Joined: Thu Aug 16, 2007 6:08 am
Location: Las Vegas

More Pointless-ness

Post by SMartin »

Well, I have continued working on my 'project without a cause'
So, for those of you that have time to waste...here's what's new.

Added heightmap import. 256 grayscale works the best, but any jpeg or bmp will load. It resizes the image (200x200 right now) and averages the RGB values and divides by 16 (pretty low height resolution)

Added a pair of recursive procedures to pull up or push down cell corners so that surrounding cells will react without breaking the psudo-mesh. Still breaks every now and then (I haven't chased that bug down yet).

Program now saves the cell templates (all sizes) to png files so that it doesn't have to recreate them if they already exist.

Added a fake wireframe view.

Added cell border blending to smooth out the look a little bit.

Added a few 'screen windows' to implement cell and terrain editing and such. They're movable and close-able.

Added loading and saving of maps.

Added a few (poorly drawn) graphics, trees mostly, to experiment with cell overlays and to set myself up for the cell editor 'screen window' that's coming next.

Divided out and organized the folders that the graphics files are saved in.

Added compass letter overlay so you know which way is north after you rotate the map.

Probably some other pointless junk also...I don't remember...

The links at the topic head will take you to the new version, if you're interested.
Steve Martin

He who waits too long to hesitate…hesitates last.
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Post by Rook Zimbabwe »

SMartin, I wrote my first game WaHoo!!! because I was learning how to solve a multiDIM array in Blitz3D. Thats the only reaon the game came in to being. I had a different game and idea in mind.

Relax and let serendipity lead you.

Have you tried to integrate a layer for animated tiles? A layer for collisions? 8)

If so you nearly have a map editor for 2D and isometric games...
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
SMartin
User
User
Posts: 19
Joined: Thu Aug 16, 2007 6:08 am
Location: Las Vegas

animated tiles

Post by SMartin »

Rook,

I haven't even thought about animated tiles and collision detection yet. I've been knee deep in drawing cell overylays for roads and rails. The problem is, I'm half color-blind, and a lousy artist...and the work is really slow...all of this because I want to code a window that allows you to set up cell properties and add trees or houses or roads and I need graphics to do that with.

I guess that's the problem with Isometric tile programs...you have to have this huge commitment in little diamond shaped drawings of all kinds of stuff.
Steve Martin

He who waits too long to hesitate…hesitates last.
byo
Enthusiast
Enthusiast
Posts: 635
Joined: Mon Apr 02, 2007 1:43 am
Location: Brazil

Post by byo »

Very interesting. It must have taken you a whole lotta time.

Rook: we should meet on MSN or something and get something done about our little project. Especially on weekends. :)
Proud registered Purebasic user.
Because programming should be fun.
User avatar
Rook Zimbabwe
Addict
Addict
Posts: 4322
Joined: Tue Jan 02, 2007 8:16 pm
Location: Cypress TX
Contact:

Post by Rook Zimbabwe »

Steve... I ave a source mate!
http://reinerstileset.4players.de/englisch.html

byo... I got AIM but not MSN...
Binarily speaking... it takes 10 to Tango!!!

Image
http://www.bluemesapc.com/
SMartin
User
User
Posts: 19
Joined: Thu Aug 16, 2007 6:08 am
Location: Las Vegas

Wow

Post by SMartin »

Rook,

Thanks for the link. There's lots of great little diamond shaped pictures of stuff there, as I'm sure you know.
If I had one tenth the talent of that guy, I'd be doing good.
He also had a few links to freeware programs that draw trees and bushes and such.
The first thing I'm going to do is replace my sad little trees with some nice ones, especially now that I think I've figured out how to select all the pixels of a certain color in Paint Shop Pro and replace them with my transparent sprite color.
Steve Martin

He who waits too long to hesitate…hesitates last.
Post Reply