ISOMAP GENERATOR v4.6 With A* Pathfinding (Check it out!)

Post here your demos and examples with the source files.
Forum rules
Always post the games with a screenshot.
The file must have the ged and data files (complete game source)
Use the forum attachment to post the files.
It is always better to use the first post to put the game files

ISOMAP GENERATOR v4.6 With A* Pathfinding (Check it out!)

Postby EvanBlack » Tue Oct 04, 2011 6:04 am

This is Version 4.6 of my Isometric map generator. I will be updating it as I get more done. Including better AI path finding, and more.

Soon to come:

    Better A* Pathfinding
    Wall Tile Placer (with auto-transparency if player behind wall)
    Stairs Tile Placer
    Level Start Node
    Teleport/Level Change Node
    Level Load Activation Regions
    Read Map From File
    Screen Nodes (for menus)
    AND MORE

Explanation of Nodes:
The map is a 2 dimensional array which is stored as map[][]. A for loop runs through the map placing nodes (map positions) at specific Game Coordinates. Then saves the game coordinates into arrays. The map nodes are just stored numbers which can be iterated through by looping functions and used for simpler movements and easier finding of points on the level. The node coordinates then become "World Coordinates" (coordinates of the entire level used for movement). So we end up with 3 types of coordinates.

GAME COORDINATES: These are the coordinates of Game Editor. 0,0 starts at the + in the game editor.

WORLD COORDINATES: Also can be called Node Coordinates, these are the x,y of each node in relation to the first node (0,0).

SCREEN COORDINATES: Are not used yet in this demo. These are the Coordinates of the View. Later I will make screen nodes to place menus.

Movement in the game is done by three functions (for now). These functions do different things. One uses the node number and goes to node number. The second uses the node's x,y and goes to the node. The third is the MoveTo() function, which takes: the actor to move, the node's X game coordinate, and the node's Y game coordinate, then moves the actor. The last thing these functions do is set the Actor's node x,y variables to match the node's x,y that it was move to in World Coordinates. This way we just have to increase the Actors' node X and Actors' node Y to find the next node to move to.

That's all for now.

NOTE: Unwalkable/Unused nodes are given NODE COORDINATES -1,-1. Later this will change and nodes will be given a score, score -1 will be unreachable.


Explanations of Tile Placement and Setting up maps:
To start, the map is stored in a 2D array of integers. This array holds the data of: Where to place the tile and Which animation to use.

The tiles start at ANY number you want them to start at. The unwalkable tiles start at 255. (This can be changed in CreateMapIso() function, just look for the number 255 and change it to any number you wish, but make sure that its not 0 or there will be no nodes placed and all tiles will be unwalkable.)

For sake of simplicity and use with this demo, all tile animations start at 0 and unwalkable tiles start at 255.

When making your map, you just change the number in the position you want to set your tile from 0-9999 (not actual limit). That's it.

Tiles:
When making your game tiles, the only actor you need is ISOTILE. Then name your animations "tile#" without quotes and where "#" = the tile number. For an example look at the tile actor in the demo. Check animations.

Then any tiles from 0-254 will be considered walkable and will have nodes created for those tiles. Any tiles 255+ will be considered unwalkable and no node will be created.



The tile I used was from Isometric Experiment created by GrimmDingo. His tile made it very easy for me to make this. Thank you.

ISOMETRIC MAP GENERATOR v2:
Simple Follow AI
Automatic Isometric Tile Placer
Isometric movement
Map from Array
Tile Sorting (Just name your tile animations tile0,tile1,tile2,tile3, ect...) Tile255+ is unwalkable.
Renamed some functions and variables

UPDATE 2.1
Removed Ghost Node number 99

UPDATE 2.2
Unwalkable tiles start at 255

UPDATE 2.4
Lava Tile
Mouse Click Movement
Better Commenting
Cleaned up script

UPDATE 4.3
Moved all the script into a single section, added heavy commenting
:arrow: Semi-Functional A* Pathfinding (It works...)
AI STATES
Larger map to show cripplingly stupid AI
New screenshot

UPDATE 4.5
BETTER A* Pathfinding
New Movement Function (Still working on getting it smooth)
New Functions
Does not use MoveTo()
Orphaned view
BOTH AI's Move
New AI Sprite
More function text
Updated node placement so that it doesn't change when view is moved
More that I can't remember.


UPDATE 4.6
Smooth Movement :D
New Map
New Screenshot
Attachments
screenshot.jpg
ISOMAP.rar
Old Version without A*
(254.97 KiB) Downloaded 196 times
Version2.rar
Version 4.6
(215.71 KiB) Downloaded 283 times
Last edited by EvanBlack on Fri Oct 07, 2011 10:52 am, edited 19 times in total.
(\__/) ( Soon... The world)
(O.o )< will be mine!____)
(> < )
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bunny Overlord 2012!
EvanBlack
 
Posts: 202
Joined: Fri Sep 30, 2011 10:17 am
Score: 19 Give a positive score

Re: ISOMETRIC MAP GENERATOR

Postby lcl » Tue Oct 04, 2011 4:54 pm

Sounds interesting!
I will try this soon. :)
User avatar
lcl
 
Posts: 1928
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 203 Give a positive score

Re: ISOMETRIC MAP GENERATOR v2.4

Postby lcl » Wed Oct 05, 2011 1:29 pm

Pretty nice!
Good work! :)

I give you 1+ for this!
User avatar
lcl
 
Posts: 1928
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 203 Give a positive score

Re: ISOMETRIC MAP GENERATOR v2.4

Postby EvanBlack » Wed Oct 05, 2011 7:16 pm

Thanks. I am working on the pathfinding. But its not working for me XD.

I know what I have to do kinda. I think I am going to prepare some psuedocode before I try again. I can't get it to move along the tiles. It just goes straight to the end because there is no flow control, so it skips to the end and moves to that tile.
(\__/) ( Soon... The world)
(O.o )< will be mine!____)
(> < )
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bunny Overlord 2012!
EvanBlack
 
Posts: 202
Joined: Fri Sep 30, 2011 10:17 am
Score: 19 Give a positive score

Re: ISOMETRIC MAP GENERATOR v2.4

Postby SuperSonic » Wed Oct 05, 2011 9:06 pm

Very cool. I like this a lot. +1 :wink:
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1444
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score

Re: ISOMAP GENERATOR v4.3 With A* Pathfinding

Postby EvanBlack » Thu Oct 06, 2011 8:45 am

Thanks. I am trying to develop a RPG Game Maker. The pathfinding was killing me. I couldn't figure out why, (and still can't) I was getting so many errors. But I finally worked (most of) the bugs out. The crippling ones anyway. Now its just has as much intelligence as a door knob that can go around corners.
(\__/) ( Soon... The world)
(O.o )< will be mine!____)
(> < )
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bunny Overlord 2012!
EvanBlack
 
Posts: 202
Joined: Fri Sep 30, 2011 10:17 am
Score: 19 Give a positive score

Re: ISOMAP GENERATOR v4.3 With A* Pathfinding

Postby akr » Thu Oct 06, 2011 10:07 am

I am a big fan of isometric. Thanks for doing this. Will check out in detail soon!
Co-Developer of GE engine

If u are interrested in new features of apple or android ge engines check the engine support website game-editor.net regulary.
akr
 
Posts: 453
Joined: Thu Feb 25, 2010 7:56 pm
Location: Germany, Ulm
Score: 40 Give a positive score

Re: ISOMAP GENERATOR v4.3 With A* Pathfinding

Postby Hblade » Thu Oct 06, 2011 4:23 pm

Amazing!
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4370
Joined: Fri Dec 08, 2006 11:14 pm
Score: 169 Give a positive score

Re: ISOMAP GENERATOR v4.3 With A* Pathfinding

Postby EvanBlack » Thu Oct 06, 2011 7:19 pm

Thanks everyone! :D It would be a HUGE!!!! help (if you want) if you can try to work out some of the bugs or even add your own elements to the thing. Like I said I am trying to make an Isometric Game Maker. To be used to make thousands of types of isometric games. Right now, I am going through my list of required items for my game and throwing in all the needed pieces for the open source creator. (my game content will not be released open source due to copyrights to the artist and myself)

But I need to add still many, many things. And work out the bugs of these. The generator will keep evolving and advancing each day that I can work on it. New bugs worked out, new features added. But if you have anything you would like to add yourself, or if you can fix any glitches that you find and can explain to me in detail how you did it. It would be great. This is a learning process for me because I have only been using Game Editor for a week and it is more fussy than a two year old.

Right now there is a major problem with the pathfinding... it is stupid. The pathfinding follows a normal 2D array of nodes. Practically a square grid of center points. Then uses the node points to find the game coordinates to move too. But for some reason.... it doesn't always make it to the end, or it doesn't even find a correct path.

Sometimes it gets stuck in loops and returns to its original starting point.

One of the bugs comes from when you click the mouse, it has to plot a new path from the LAST starting point it was given if you don't let it finish the path. So I need to fix that. I am going to try to use states to do it.

Another problem I have is that I don't have a way to read in maps from a file. This has become necessary! The maps become large and its too hard to edit them by hand. So I need to make a map generator that lets you decide a mapsize, generate the map of normal tiles, then as you click tiles they change through tiles you have, or if you set the tile number in a text box it changes it, or using buttons to change tiles. Then a save button to save the map as a 2D array to be used by the game.
(\__/) ( Soon... The world)
(O.o )< will be mine!____)
(> < )
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bunny Overlord 2012!
EvanBlack
 
Posts: 202
Joined: Fri Sep 30, 2011 10:17 am
Score: 19 Give a positive score

Re: ISOMAP GENERATOR v4.6 With A* Pathfinding (Check it out!

Postby MrJolteon » Sun Nov 13, 2011 12:11 pm

[EDIT]
Never mind, found it out.
Owner of the #GameEditor IRC channel at esper.net
User avatar
MrJolteon
 
Posts: 1913
Joined: Sat Aug 09, 2008 3:25 pm
Location: Fifth Layer
Score: 75 Give a positive score

Re: ISOMAP GENERATOR v4.6 With A* Pathfinding (Check it out!

Postby MrJolteon » Sun Nov 13, 2011 12:40 pm

When adding tiles taller than the grid size, they will be off the grid. The tiles behind it will sometimes be above it.
Is there any way to fix this?
Attachments
tile.png
Owner of the #GameEditor IRC channel at esper.net
User avatar
MrJolteon
 
Posts: 1913
Joined: Sat Aug 09, 2008 3:25 pm
Location: Fifth Layer
Score: 75 Give a positive score

Re: ISOMAP GENERATOR v4.6 With A* Pathfinding (Check it out!

Postby EvanAgain » Wed Jan 16, 2013 10:45 pm

I had that fixed in an updated version. The problem was based on the z-axis, each tile or object has to have a certain setting for the z-axis which can be tweeked until it is set. Then once set will no longer be an issue because the tile it is set on controls the z-axis modifier.


Objects give it a sort of 3-D iso feel rather than being completely 2-D. I, also, have to work on getting a lot of things done with this so that it can work for a ISO game engine as I originally wanted it to be. The path finding is buggy because I am a novice at it.

Honestly, everything I am doing here is my first attempt and I am just learning as I go. I actually have to try to get the newer copy I had if I can still get it, but my internet connection is being slow and ridiculous. I am not sure what the problem is.

You don't need to use floating tiles, or objects, and you can just use normal tiles to make "fake" walls and "fake" obstruction. Just make the tile impassible and design it to perspective.

I just got back into working with GE. So I should have time to work on this project again. I am also looking for anyone who is interested to help me with this code.

Anywho, so much to do, I know this was like over a year ago. But I am back.
EvanAgain
 
Posts: 51
Joined: Thu Jan 10, 2013 5:40 pm
Score: 4 Give a positive score

Re: ISOMAP GENERATOR v4.6 With A* Pathfinding (Check it out!

Postby MrJolteon » Thu Jan 17, 2013 1:18 pm

...That took you a while. It was for a project I cancelled a LONG time ago.
Owner of the #GameEditor IRC channel at esper.net
User avatar
MrJolteon
 
Posts: 1913
Joined: Sat Aug 09, 2008 3:25 pm
Location: Fifth Layer
Score: 75 Give a positive score


Return to Game Demos

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest