2
\$\begingroup\$

I'm making a 2d game where each tile is a square and it's viewed at straight angle, no skewing, no rotation, it's pretty simple.

Two weeks ago I tried using DataGridView, but as the number of rows and columns increased, it became frustratingly slow, then I read how it should've happened to me earlier, because this control is not supposed to work with large number of cells, and I have at least 7500 cells in my smallest level, which made it unbearable to use.

This is what I expect from my new editor: Most importantly, tile type. Tile images or their color codes are fine (seeing map as it is in-game is cool, but the faster, the better).

Secondly, all tile parameters (in text, preferrably editable in a popup or sidebar).

I'm using my own format, so I'm most probably not going to use third party product. Besides, I'm trying to learn how to do it myself.

\$\endgroup\$
3
  • \$\begingroup\$ You probably want to use a GL or DirectX frame of some kind to render your data. \$\endgroup\$
    – Tetrad
    Commented Apr 10, 2012 at 17:50
  • 2
    \$\begingroup\$ Sounds like you are actually loading the graphics of your entire map at a single time into the control and then panning it around.. Traditional tile engines will want to only draw enough of the tiles to fill the screen plus one set of border tiles so you do not see tiles pop in and out. The point of a tile engine is to load the set of tiles once and use them to draw over and over again. \$\endgroup\$
    – James
    Commented Apr 10, 2012 at 17:54
  • \$\begingroup\$ James, my game engine works fine, I just need to figure out how to make an editor that will work well too. Right now, I have a slow version of what I need, and there is no was I can make it work faster, but I can with other components and I'm trying to find out which. \$\endgroup\$ Commented Apr 10, 2012 at 18:35

4 Answers 4

2
\$\begingroup\$

I use a simple WinForm for a map's canvas and another form for tiles toolbox. No grid is necessary, the user just selects a tile and point-clicks on the canvas. Mouse coords are recalculated according to predefined grid dimensions, and one can easily paint/overwrite the map below the pointer. Another toolbox-form contains varoius objects to place over the map (can be used as a height map). These forms are placed inside a MDI container. It took less than an hour to create the editor, no special controls or DX methods are required, GDI+ works fine.

\$\endgroup\$
1
\$\begingroup\$

Why not use an existing tile editor? Tiled seems well supported.

\$\endgroup\$
0
\$\begingroup\$

A simple 3D engine should suffice, depending on your video card and various other factors it shouldn't be too much to expect that it can draw 100000 quads/tiles with no special optimization.

\$\endgroup\$
0
\$\begingroup\$

If you can play your levels, you can make the editor ingame...

it is not too difficult..

these are two samples one of my tiled games and its ingame editor

1st version ... http://www.youtube.com/watch?v=ZPHjpB-ErnM

3trd version playable... http://www.youtube.com/watch?v=4QDeY15Ox-g

other editor for non tiled game but ingame too...

http://www.youtube.com/watch?v=958eDY3S0No

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .