Omnimaga

General Discussion => Technology and Development => Computer Projects and Ideas => Topic started by: Scipi on June 22, 2011, 08:50:39 pm

Title: Tile-Cat Map Editor
Post by: Scipi on June 22, 2011, 08:50:39 pm
TileCat is a computer based tile mapper. My inspiration for this project was a utility for Daemons but I've made it its own project.

At the moment I have a usable release which supports creating tilemaps for visual, collision, and transitional data (or whatever you specify for each)

It produces a file with a simple format ([MapWidth],[MapHeight],[data])
(Each tile is a single byte)

Eventually I want it to export the data into an AppVar or a String for use in calculator games. I even want it to send it directly to the calculator from the program.

Here's a screenshot:

(http://dl.dropbox.com/u/10573921/Tilemapeditorscreenshot.png)

You can download here: http://dl.dropbox.com/u/10573921/Tile%20Map%20Editor.zip (http://dl.dropbox.com/u/10573921/Tile%20Map%20Editor.zip)

Edit: Here: http://sourceforge.net/projects/tilecat/ (http://sourceforge.net/projects/tilecat/)

Note the README is pretty bad but I suggest reading it nonetheless.

Future updates:

-Non-Visual modes will have background visual data updated in real time
-Better README
-Ctrl+N will start a new window in Collision or Transitional modes (right now you have to run the program and set it to those modes, in the next release it will start in visual mode by default)

NOTE:
Every Collision and Transitional map MUST have an accompanying  visual map of the same name or the program might crash.
Title: Re: A small, multi-purpose tile map editor utility for the computer
Post by: Scipi on June 23, 2011, 11:31:44 am
Sorry for the double post but I finished a new version of the program.

Changes: You can now have as many images as you want as long as they are stored in the "data/" folder and are numbered png's. ie: "0.png", "1.png", "2.png", etc. Note that they must start from 0 and increment by one.
Title: Re: A small, multi-purpose tile map editor utility for the computer
Post by: Munchor on June 24, 2011, 08:02:40 am
Does it use any Windows-Only Library? I'd like to know so I can try and make a Linux Build.

Either way, this is a nice project!
Title: Re: A small, multi-purpose tile map editor utility for the computer
Post by: Scipi on June 24, 2011, 08:23:09 am
SFML is available for Linux, in fact, the first few builds were Linux builds.

I tried to get my friend who has Linux to compile it for Linux but he was getting errors. It might have been his setup though, I don't use any Windows-only stuff. :)
Title: Re: A small, multi-purpose tile map editor utility for the computer
Post by: calcfreak89 on June 24, 2011, 12:18:45 pm
Some improvements that should be done:


I will do this later, and I will try to get it working on Linux. I have never had this issue before for building my other games/SFML programs for Linux.
Title: Re: A small, multi-purpose tile map editor utility for the computer
Post by: Munchor on June 24, 2011, 12:32:05 pm
SFML is available for Linux, in fact, the first few builds were Linux builds.

I tried to get my friend who has Linux to compile it for Linux but he was getting errors. It might have been his setup though, I don't use any Windows-only stuff. :)

"||=== Tile Map Editor, Release ===|
/home/david/Documents/Calculators/Random Calculator Stuff/Tile Map Editor/main.cpp|2|fatal error: SFML/Graphics.hpp: No such file or directory|
||=== Build finished: 1 errors, 0 warnings ===|"

It seems like I have to install SFML on Linux.
Title: Re: A small, multi-purpose tile map editor utility for the computer
Post by: calcfreak89 on June 24, 2011, 12:35:00 pm
SFML is available for Linux, in fact, the first few builds were Linux builds.

I tried to get my friend who has Linux to compile it for Linux but he was getting errors. It might have been his setup though, I don't use any Windows-only stuff. :)

"||=== Tile Map Editor, Release ===|
/home/david/Documents/Calculators/Random Calculator Stuff/Tile Map Editor/main.cpp|2|fatal error: SFML/Graphics.hpp: No such file or directory|
||=== Build finished: 1 errors, 0 warnings ===|"

It seems like I have to install SFML on Linux.

Yes. Install libsfml-dev (it also depends on about 5 other packages) if your using Ubuntu or an Ubuntu based distro, and then it should automatically work with your IDE. I use Code::Blocks and it works perfectly with it without configuring anything.
Title: Re: A small, multi-purpose tile map editor utility for the computer
Post by: Munchor on June 24, 2011, 12:38:14 pm
"How big do you want", what is that? Also after installing libsfml-dev and it's dependencies, it compiled and then when I tried running it sort of crashed, but I need to try different values in the terminal.

EDIT: It always crashes
Title: Re: A small, multi-purpose tile map editor utility for the computer
Post by: Scipi on June 24, 2011, 12:41:02 pm
Quote
"How big do you want"

How large you want the tile map to be. Two values X then Y.

Is it crashing after you input the values to use? Try loading the map.
Title: Re: A small, multi-purpose tile map editor utility for the computer
Post by: calcfreak89 on June 24, 2011, 12:41:05 pm
"How big do you want", what is that? Also after installing libsfml-dev and it's dependencies, it compiled and then when I tried running it sort of crashed, but I need to try different values in the terminal.

EDIT: It always crashes

That is the size of the map in tiles, just type in "20 30" without quotes if you want a 20 by 30 map.

Edit: HOMER-16 ninja'd me by 3 seconds :'(
Title: Re: A small, multi-purpose tile map editor utility for the computer
Post by: Munchor on June 24, 2011, 12:43:34 pm
Well this is looking good, but it seems like we can't replace the already drawn tiles, that's important.
Title: Re: A small, multi-purpose tile map editor utility for the computer
Post by: calcfreak89 on June 24, 2011, 12:44:58 pm
Well this is looking good, but it seems like we can't replace the already drawn tiles, that's important.

Yes you can; try changing the selected tiles by using the number pad (for left click) and ctrl + number pad (for right click).
Title: Re: A small, multi-purpose tile map editor utility for the computer
Post by: Scipi on June 24, 2011, 12:45:22 pm
You should be able to. Num keys change the tile you are using. There should be another window that shows you your tiles. For all the controls there's a readme included.


Edit:

Quote
It should draw a thin huge rectangle that isn't black around the entire map, so you can see the boundaries.

I can add that easily. In fact.. there, it's already done.  ;D
Title: Re: A small, multi-purpose tile map editor utility for the computer
Post by: Scipi on July 13, 2011, 06:24:14 pm
New update: There is now support for multiple types of tile maps be they, collision, transitional, or visual. Just make sure there is a visual of the same name for Collision and transitional modes.

http://dl.dropbox.com/u/10573921/Tile%20Map%20Editor.zip (http://dl.dropbox.com/u/10573921/Tile%20Map%20Editor.zip)
Title: Re: Tile-Cat Map Editor
Post by: Scipi on July 15, 2011, 10:57:25 am
New Update: I gave this project a name. I felt that, since now I'm driven to improve this project until it becomes one of the best, it should have an actual title.

Edit: A screenshot of the project

(http://dl.dropbox.com/u/10573921/Tilemapeditorscreenshot.png)
Title: Re: Tile-Cat Map Editor
Post by: merthsoft on July 15, 2011, 11:06:54 am
Oooh, this looks very nice. I especially like how the file is called "shaun.shaun" :D
Title: Re: Tile-Cat Map Editor
Post by: Scipi on July 15, 2011, 11:07:53 am
Yes, you can choose whatever to call it, including extensions. It reads it all the same. ;D

Edit: Fixed a major drawing bug.

http://dl.dropbox.com/u/10573921/Tile%20Map%20Editor.zip (http://dl.dropbox.com/u/10573921/Tile%20Map%20Editor.zip)
Title: Re: Tile-Cat Map Editor
Post by: Scipi on July 17, 2011, 11:08:14 pm
Ok, so I just got a few great ideas to make this program better for calc games.

1. Importing/Exporting to an AppVar.

2. Sending files through the Graphic Link Port. (Hopefully x.x)

This would make integrating the maps, that much simpler. :)
Title: Re: Tile-Cat Map Editor
Post by: Scipi on July 21, 2011, 10:16:24 pm
I updated the first post to link to a better explanation of this project. You can see it here: http://www.cemetech.net/forum/viewtopic.php?t=6546 (http://www.cemetech.net/forum/viewtopic.php?t=6546)
Title: Re: Tile-Cat Map Editor
Post by: Scipi on July 22, 2011, 01:12:01 pm
Scratch that last post I updated the first post directly.
http://ourl.ca/11727/221554 (http://ourl.ca/11727/221554)
Title: Re: Tile-Cat Map Editor
Post by: Munchor on July 24, 2011, 09:43:51 am
Ok, so I just got a few great ideas to make this program better for calc games.

1. Importing/Exporting to an AppVar.

2. Sending files through the Graphic Link Port. (Hopefully x.x)

This would make integrating the maps, that much simpler. :)

The second one may be quite hard :S But the first shouldn't be too hard. Either way, good luck!
Title: Re: Tile-Cat Map Editor
Post by: Scipi on July 25, 2011, 06:48:44 pm
I could do the second one easily provided TiLP is installed, though there would have to be a lot of specifications done via the user. :S
Title: Re: Tile-Cat Map Editor
Post by: Scipi on November 03, 2011, 02:14:42 pm
Ok, I have completely rewritten the source code to actually make it possible to add features (The old code was a mess!) :P

Important changes:

Files now save as ints! Meaning you have to load 4 bytes for every tile

This allows for much larger tilesets that are not limited to 255 tiles. (I may write a small C++ library to give a save ad load function)

You also now have evnts and NPC as available maps.

This build is overall much faster I believe as well.

Coming soon:

The ability to open new windows for other tilemaps within the program.
More optimizations as to the number of tiles drawn at one time (right now each tile is drawn each frame)
Export to calculator format (is there a program that can do this to a binary file or a text file?)

I have attached a zip containing the source as well as the old and new builds. (Hopefully the file is small enough) :S

Edit: It's not. I'll just upload it to dropbox (Though I wish I could see how many people download it)  <_<

http://dl.dropbox.com/u/10573921/Tile%20Map%20Editor.zip (http://dl.dropbox.com/u/10573921/Tile%20Map%20Editor.zip)
Title: Re: Tile-Cat Map Editor
Post by: Scipi on November 11, 2011, 02:08:46 pm
New updates :D

I added two important features.

A Fill function (Ctrl + F + Click)

and a Copy/Paste Function (Ctrl + C/V + Click)

The copy and fill function both require you to press the hotkey and click at the same time, then they wait for you to click someplace else to get the area to fill/copy.

The paste function is a bit glitchy so be careful. It sometimes makes the program crash and I do not know why yet.
Title: Re: Tile-Cat Map Editor
Post by: DJ Omnimaga on November 19, 2011, 02:42:52 pm
Fill function seems cool. I hate having to paste a tile at like OVER 9000 locations when I'm making a huge map. :P

What's the largest possible map that can be done in this and can it be exported to various formats?
Title: Re: Tile-Cat Map Editor
Post by: Scipi on November 19, 2011, 02:46:12 pm
The largest map can be 4.61168601 × 10^18

Or however large a vector of ints can be in C++ :P

I can add some code to change the format. I want to give the option to save the map as chars (1 byte) or ints (4bytes)

Also I want to be able to export to an AppVar so calc coders can benefit from it.
Title: Re: Tile-Cat Map Editor
Post by: ACagliano on May 02, 2012, 10:46:33 am
It would be great if someone could actually create a Linux/OS X build for this that we can just run.
Title: Re: Tile-Cat Map Editor
Post by: Eiyeron on May 02, 2012, 10:48:41 am
Neat project! I'll take a look when my title screen will be done!
Title: Re: Tile-Cat Map Editor
Post by: DJ Omnimaga on May 02, 2012, 11:27:40 am
I shall take a look at this when I have some time. Does it support dynamic tiles btw?
Title: Re: Tile-Cat Map Editor
Post by: Scipi on May 02, 2012, 12:30:41 pm
I shall take a look at this when I have some time. Does it support dynamic tiles btw?

Like tiles that change themselves? No. Not currently, though you could easily build that functionality into the engine by manipulating the map data directly from within your game.

I'm going to look into isometric maps over the summer and try my hand at those for a bit :P

I want to expand this project more ^^