Map Maker WIP Update10

Talk about making games.

Map Maker WIP Update10

Postby EvanBlack » Sat Oct 08, 2011 8:10 am

Omk!

I added the object layer, Its actually really fun to use. XD

The Trees are in a stack of actors that exist off the map and are placed when you click on a tile.
Attachments
screenshot3.png
MapEditorv3.rar
(588.32 KiB) Downloaded 126 times
Last edited by EvanBlack on Wed Oct 19, 2011 8:10 pm, edited 18 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: Map Maker WIP

Postby skydereign » Sat Oct 08, 2011 9:40 am

Well, most map makers in gE end up being pretty similar. And, using 2d array versions is essentially the same as a 3d version. The only difference is you use 3 sets of square brackets instead of 2. Saving and loading is really the same thing from 2d to 3d as well. The last sub is what distinguishes if it stores a tile or an object, but as long as you make sure to save and load two integers per xy, then they act exactly the same. Will you be dynamically allocating the array? Or have a max sized array that smaller maps can be filled into?
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Map Maker WIP

Postby EvanBlack » Sat Oct 08, 2011 8:00 pm

Well, I think using a range MAXSIZE's would be best, that way I can limit errors on map generation. I don't want someone trying to generate a map that is larger that the resources on their computer. But I may just use both, that way if the user creates a small map, I can allocate resources and save hard drive space. I don't want to have a map 10x10 stored in a array sized for 100,000,000 tiles.

Using a range of MAXSIZE constants would be best, then I can check the size of there map in a case/switch statement and allocate space accordingly.
I could, also, have a beginning menu that lets you choose the size of the storage array that you want to use, then attempt to allocate that space in memory.
But also have a dynamic allocation system on hand if say, the user chooses Array of 100 Million Tiles, but only uses 500 Thousand. I could then free the extra allocated space in the array that was originally chosen then attempt to store the map. On error, I just tell the user that space could not be allocated. IF error on map save, tell user map was not saved with reason.


For now I have a map generation limit of 10,000 tiles. But that is just because I am going to try to create a tile handler that creates and destroys tiles within range of the new. So that way I don't have to use activation regions and I don't get a heavy map load and can generate larger maps. (practically unlimited scale)

Then I am going to have the game load part of each map as sections of a larger map. So I can use like 30 map editor files to load 1 game map. When the game will be released as an EXE. I will combined all the map editor files into a single world map file (maybe, I'd rather store the maps outside the exe for later editing, and user generated maps.), then the game will load portions of each file as needed.

Map Linking will be done based on nodes. If I have the exit of one map at node x,y, then the next map will begin at x,y and the entrance will be linked perfectly.

The reason I want to use 3D array is for storage and easier access. But I may just use several 2D arrays, depending on which has a faster access time. Or which is better for the game. Or both.

For the 3D array design:

Map[x][y][1] = Map Tiles
Map[x][y][2] = Objects (such as trees, chests, waypoints, ect.)
Map[x][y][3] = Creatures (such as critters, enemies, Bosses)

Possible 2D arrays design:

Map[x][y] = Map Tiles


int Objects[NumberOfVariables][NumberOfObjects];
Objects[1][ObjectID] = Object Type (such as: 0:Tree, 1:Chest, 2:Waypoint, ect..)
Objects[2][ObjectID] = Object X position
Objects[3][ObjectID] = Object Y position
Objects[#][ObjectID] = Objects Other Variables (such as: isDestructable, Health, Hardness, ect.

int Creatures[NumberOfVariables][NumberOfCreatures];
Creatures[1][CreatureID] = Creature's Type (such as: 0:Wolf, 1:Man Eater, 2:Acid Jelly, ect)
Creatures[2][CreatureID] = Creature's X position
Creatures[3][CreatureID] = Creature's Y position
Creatures[#][CreatureID] = Creature's Other Variables (such as: isDestructable, Health, Hardness, ect.[/code]

Then the game will break the 3D array into the 2D arrays above. Unless, I don't use the 3D array Idea.

The one issue I have with using the 3D array is that it wastes space. While my 2D arrays use minimum space and allow more variables. I might just scrap the 3D idea and only use 2D arrays. Just multiple like this.


My idea for creatings tiles within range, is pushing and poping tiles on a stack. As some tiles come within range and other tiles leave range, remove old tiles from stack and put the new tiles onto the stack, and sort them by range of player. Each tile has its own ID so knowing which tile to create and destroy will be easy. The stack will be a 2D array like map, but will be limited to range which will be a constant of value depending on settings chosen before game starts.
(\__/) ( 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: Map Maker WIP Update3

Postby EvanBlack » Wed Oct 12, 2011 6:48 am

New updates:

Tile pallet and other features.
Can Place tiles

Its coming along nicely but still needs a lot more work. Can't save maps yet but getting closer.


Next things to add..

Saving Map
Object Array
Variable Brushes
Object pallet
Tabbed menu
More.


Screenshot shows wall placeholders. There will be two layers for wall tiles, the floor layer and the floating layer. The floating layer will be used to make the walls disappear when you step behind them, also used for secret pathways.
(\__/) ( 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: Map Maker WIP Update5

Postby Hblade » Wed Oct 12, 2011 7:04 pm

Good lucki with the level saving ^^ I always had problems with that D:
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Map Maker WIP Update8

Postby EvanBlack » Mon Oct 17, 2011 10:09 pm

New Update:

A step back to make a leap foward!

I change the whole system to instead of going through arrays, it uses Linked List Structures.

It took me awhile to figure out some of the bugs but I got them out and it was only that I was forgetting to link the tiles together after I moved them. Next step is object placement and that is going to be an interesting adventure...
(\__/) ( 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: Map Maker WIP Update10

Postby EvanBlack » Wed Oct 19, 2011 12:24 am

New advancements made the object layer has been added, the functions of the object layer are working properly. If anyone is interested in the progress of this the next steps are to add the creature layer and the floating tile layer.

Then I believe the last step in this would be to figure out how to save and store it all...

If anyone has any ideas on how I could save the map I would appreciate the input.

The data is saved on 2 layers:

The WorldNode structs and the g_Map array.

g_Map is a 2D array of ints.
(\__/) ( 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: Map Maker WIP Update10

Postby skydereign » Wed Oct 19, 2011 12:33 am

Saving it would be pretty simple. Just run through the lists, writing all of the contents of the structs. As long as you have a set format (just write functions for writing them out and loading them [as if it were a class]) then it should be just a matter of file io.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Map Maker WIP Update10

Postby EvanBlack » Wed Oct 19, 2011 8:09 pm

New Screenshot with different wall tiles to show isometric
(\__/) ( 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: Map Maker WIP Update10

Postby Hblade » Wed Oct 19, 2011 9:13 pm

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

Re: Map Maker WIP Update10

Postby EvanBlack » Wed Oct 19, 2011 9:20 pm

I need better tiles :(

I am trying to figure out what I should do when this is done. What should be the first project. I was thinking an Iso pacman just to get some basic problems out of the way such as pathfinding AI and zDepth functions for transparent walls. Plus because my artist isn't doing his job, I can make these tiles myself and even the 3D iso characters won't be that hard.

It will be the first time I ever made a pacman 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: Map Maker WIP Update10

Postby lcl » Sat Oct 22, 2011 10:57 pm

This is great! :D

It could do with a bit more instructions, though..
It's quite difficult to understand it.

But still very nice job!
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Map Maker WIP Update10

Postby EvanBlack » Sun Oct 23, 2011 5:56 am

Its not finished yet, I am still working on getting it working exactly how it should. But I should have it all finished soon. I am currently working on the floating tile layer so that I can get a transparent layer to be viewable over the floor layer, but its not really working as I hoped, but then again it works exactly as I designed it to work. So I guess the problem is simple with my forethought on the design. I haven't uploaded it because I want to get the saving to file done before I upload it and I think my last upload will be having a manual for the program as well as all the function specifics.


Eventually it will be all finished but for now I am working on it slowly because of issues with my personal life.
(\__/) ( 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


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest