1

Right, so, sorry about the probably poor topic name, but this is a stream of consciousness containing a few very related ideas. Right, so this starts with me seeing a major issue. The number of high quality game development tools is sitting rather low. I don't think I've seen an Unreal Engine level thing for audio games, anyways. My next thought, well, that considered, we're a long way out from something so grandious. Well, how hard would it be to at least create more improved tools, anyways. There's an open-source 2D and 3D game engine already out in the wild called the Godot engine. Why not grab that, and get to work modifying it. Well, that would take years I'm sure for even a team, let alone one person who is only getting started with C++. Well, let's think smaller, how about a 2D game engine. I've found an open source 2D engine called Torque2D that might work. Well, then I was coming up with ideas for a game and thinking about working on something for it, when I had another thought. Something that would still be relevant to the 2D game engine, but would be a lot more useful to me at this moment. I need a map editor. I wonder if I could make Til'd accessible. I once looked at the idea, as well. Of course, then I wasn't as versed with C++ let alone gui programming, but it might be worth another look. If nothing else, a map maker would be a nice thing to have. So, is there anyone else interested in this project?

Thumbs up

2

There's a few engines floating around that others have put together here, although i'm not sure if their as easy to snap together as Unity et al, as opposed to being more of a code foundation. As for a map editor, hmm. It kind of depends on what you have in mind for your map data structure, but generally if were talking 2D only then BrushTone could probably be used for that.

In a tile editor whenever someone paints a grass or sand tile what it generally does is assign a reference number, such as 1 or 2, to a 2D array that references that particular tile type. When drawing a 2D image you basically do the same thing, as drawing a pixel assigns a color value to a 2D array, so it would just be a matter of reprocessing the image data into a map array.

-BrushTone v1.3.2: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

Thumbs up

3 (edited by Jaseoffire 2018-05-11 01:32:47)

I suppose the only issue is that the tiles would be one color for each tile type. Unless somewhere down that pipeline, you were to reassign the ids from the pixel data to tiles in a tileset. Unless I'm thinking about this wrongly, which is likely as well. I don't know. Tiled does give a tmx file that I suppose one could just learn how to write by hand, but that's what I'm hoping to not have to do. Not that it wouldn't work, it just might be a lot less dull to be able to use actual map editing and painting tools.

Thumbs up

4

Yes exactly, it would be one color per pixel value which would then be reassigned to corrispond with a tiles position in a tileset. Each pixel consists of 3 values that range from 0 to 255 for 16581375 different combinations, so you could just use one of those values ranging from 0 to 255 to associate with 255 different tiles in a tileset, or use any of the other two values as offsets for however many different tiles or settings you like. After that a relatively simple converter script can extract the pixel data from the image and process it into a data array. As an example in python:

import pyglet
import numpy

#load the target image.
box = pyglet.image.load('example.png')
#extract the images Red, Green, and Blue Data values.
rawimage = box.get_image_data()
pixels = rawimage.get_data('RGB',rawimage.width*3)
#convert the hex string into unsigned 8 bit integers.
data = numpy.fromstring(pixels,dtype='uint8')
#reshape the resulting array into a 2D array that matches the
#images width and height values.
data = numpy.reshape(data,(box.width,box.height,3))

#Print the array.
print data

Tiled though seems to have a number of additional features such as editing a number of other programs map formats, layering, isometric or hexagonal orientation, etc. As I said it depends on what you have in mind for your map data structure or what you plan on using it with.

-BrushTone v1.3.2: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

Thumbs up

5

The idea is most certainly interesting. If nothing else, I may try it out as a programming excercise, but I do want to expand beyond that eventually. Many of tiled's functionality, such as hexagonal mapping, the verying layers it could do, and the ability to edit other mapping formats would be nice to have. Along with using Tiled for 2D video game maps, I want to investigate a nice way of using it for making virtual table top maps as well. More of what I would do after adding accessibility to tiled if I could figure that out.

Thumbs up