Server Help

LVZ/LVL Questions - New Lvl & Lvz Editor

2dragons - Sat May 08, 2004 7:06 pm
Post subject: New Lvl & Lvz Editor
As I've mentioned before I'm writing a lvl/lvz editor. Recently Vampz has joined in on the project and we thought it'd be beneficial to ask a few questions from map developers to tailor it better to your needs. Any response will be much appreciated and your input totally counts. icon_biggrin.gif


When using SSME how often do you use the ability to tile with both the left and right click?

Which would you prefer most:
1. A tile and an erase tool? (As SSME)
2. A tile and an erase tool, but when tiling a spot the same as it was it will be erased? (Basically you could erase any tile by double clicking it)
3. Left click tile, Right click erase?
4. Other idea?

What drawbacks do you find in SSME/CLE?

What features would you like to see added to a lvl/lvz editor?

What is the most time consuming thing you do when making a map/lvz?
wEaViL - Sat May 08, 2004 7:17 pm
Post subject:
Left click to place a tile and right to erase sounds good..

How about a fill tool that when used in a closed tile outline will fill the inside with the curent tile selected.. Kinda like mspaint when you draw a box with black then you can fill it in with red just by using the paint bucket tool but the black outline stays.
SuSE - Sat May 08, 2004 8:08 pm
Post subject:
I use left/right for two different tiles quite frequently.
Often I use one for vertical tiles and one for horizontal (or left-side diagonal & right-side diagonal).

If you ask which type I'd prefer - I'd prefer to be able to set an option to do whichever. biggrin.gif

The most time-consuming thing with maps is just laying out the tiles, especially with complex tilesets.

The most time-consuming part of lvz is just laying it all out...I'm assuming any lvz-placement editor will cover that, so there you have it.

I have tons more desires for a zone editor, but I need to compile them.
Kill9mm - Sat May 08, 2004 8:44 pm
Post subject:
Why not make customizable keys and mousebuttons for that? Just throw everything in variables.. variables are LIFE, man. The key to happiness in life is coding in variables! icon_smile.gif
Mr Ekted - Sat May 08, 2004 9:04 pm
Post subject:
Um...
Helicon - Sat May 08, 2004 9:52 pm
Post subject:
Kill9mm wrote:
Just throw everything in variables.. variables are LIFE, man. The key to happiness in life is coding in variables! icon_smile.gif

the "American Diet Guide to Programming"
Cyan~Fire - Sun May 09, 2004 11:34 am
Post subject:
So that's what I was doing wrong! I never used any variables and my programs all sucked...
CypherJF - Mon May 10, 2004 12:08 am
Post subject:
I'm not sure whether or not this was mentioned, didn't bother to read responces, due to lack of time here; but I believe there is a setting? or was a setting in one of the map editors that allowed for the option what to do with the right click (erase/tile/select). maybe consider that.

Double clicking to erase, although sounds good, I'd be afraid; because sometimes either I accidentally dbl click or the mouse is dumb or w/e reason. Option it. icon_smile.gif

I love all of SSME's options; as is basically. Although, there are issues of the deleting areas/selection, but that's just a SSME internal issue.

But, what I'd like in a LVZ, is a way to do a 'project' type system, basically treeview it:
projOmega
- LVL
- LVZ
- LVZ

an option to insert the files into the server.cfg (for subgame users :/) or w/e ASSS needs to accomplish this...

Take into account for screen objects the letter system, it'd be nice for a easier way to place objects if there was a better documentation on it. Okay that whole thing didnt make sense, maybe it did?

But bottom line, SSME is good, had its minor things but it worked (such as the colors, not able to open maps with "missing/toomany tiles", etc.), the delete, will mess up w/e you had in copy/cut(?) or something; but make sure you keep the nice coord system in the status bar.
Anonymous - Tue May 11, 2004 2:14 pm
Post subject:
Most time consuming is tiling flipped parts. Would be nc eif it would be possible to change certain tiles in a marked area into something specified. (e.g.: every tileA in the marked area will be replaced by TileB)
Mine GO BOOM - Tue May 11, 2004 2:29 pm
Post subject:
Anonymous wrote:
Most time consuming is tiling flipped parts. Would be nc eif it would be possible to change certain tiles in a marked area into something specified. (e.g.: every tileA in the marked area will be replaced by TileB)

Something else along this line, which is a good idea, is that angles/bends in tiles are also a large portion of making a map look good.

Say you can setup "groups" of tiles together. And in this group, you can have vertical, horizontal, 90deg bends of all ways, T and + intersections, blank ones sitting alone, and maybe even diagonals. That way, you can just setup a couple of groups for a tileset.

So you can create a map with just some generic tiles, and once you are done, you can flood-fill that base (or use the above masking replace) into this group. The program will figure out which tile should be the horizontal tiles, which should be the intersection ones, etc.

Should also have a drawing tool with this group. So you can add a couple of tiles to the map, and the tiles it touches will fix itself into the correct angle/intersection tile.
Smong - Wed May 12, 2004 7:02 am
Post subject: Re: New Lvl & Lvz Editor
2dragons wrote:
2. A tile and an erase tool, but when tiling a spot the same as it was it will be erased? (Basically you could erase any tile by double clicking it)

2dragons wrote:
What drawbacks do you find in SSME?
I notice sometimes when you zoom out some tiles get scaled differently, making you zoom in to find out what the tile really is.

2dragons wrote:
What features would you like to see added to a lvl/lvz editor?
I would like to see something where you can tweak the DoorDelay and DoorMode and it opens/closes the doors exactly as ss/ctm would. Also somewhere to change the MapZoomFactor for the radar.

I would like to see something like ctrl + F5, then when I press F5 it jumps back to that part of the map like bookmarks in RTS games.

I would also like to be able to change tool with hotkeys, save me moving the mouse to the tool buttons (this is partly why paint shop pro ****s).

wEaViL wrote:
How about a fill tool
Are you crazy? This will kill FPS.
wEaViL - Wed May 12, 2004 2:50 pm
Post subject:
Yes... Yes I am crazy icon_smile.gif
Mr Ekted - Wed May 12, 2004 3:05 pm
Post subject:
A fill tool has nothing to do with FPS. And it is a good idea.
2dragons - Wed May 12, 2004 3:11 pm
Post subject:
Oh some really good ideas emerging. Keep them comming =p
D1st0rt - Thu May 13, 2004 4:26 pm
Post subject:
You should do a FACTS-ish import from image file
MATTtheWAZ - Thu May 13, 2004 5:57 pm
Post subject:
How 'bout doing right click erase and also make the arrow keys of some other keys pick between tiles so that precious time isn't wasted moving the mouse over to the tile pallet. I know I sound crazy to some, but I know some will agree that in a lotof cases keyboard commands are the fastest and easiest way to get things done.
In that sense, numbers could be different tools, and saved map locations like somebody else suggested. Copy paste is a must.

Perhaps what could also be added is a way to define different sides of a object as certain tiles... like if you select a certain set of tiles making a vertical line would automatically use whatever the user has set as the tile for vertacal wall tiles or something. It could even figure in corners and such, saving valuable time so that users don't have to switch in between tiles on the pallet.

To do this it could detect at each square that you paint onto what tiles are beside that one. A square that is painted sees another tile to the left of it so it acts like a horizontal tile. Of course it would need to be up to the user to choose what tile is a "Horizontal Type"

Damnit, wish I knew C or C++ cause I'd totally be into helping you guys out. I know a lot of VB, and once made an RPG that I supplemented with it's very own leveleditor that worked a lot like paint. Ehehe... but VB just ain't very good so... I need to learn C/C++ soon before I kill somebody (VB SUCKS FOR REALTIME GAMES GAAAAA!!!!)
MATTtheWAZ - Thu May 13, 2004 6:07 pm
Post subject:
Ahh I see MINE GO BOOM already wrote my major idea, *Shrug*

Ohh well, I should have done more than skip th etopic befoer I replied.

Good luck anyways
Mine GO BOOM - Thu May 13, 2004 6:14 pm
Post subject:
How far along are you on this project? What UI you using? What language? Planning on opening the source for others to assist in making?
Anonymous - Fri May 14, 2004 5:55 am
Post subject:
I suspect it will be in Java as 2dragons has already released some things in this thread http://forums.minegoboom.com/viewtopic.php?t=1843&postdays=0&postorder=asc&start=25

Another idea for a hotkey is hold down ctrl to use the dropper (current paint tile becomes the one you clicked). This would work with most tools.

Why do filled in areas not kill FPS? Isn't screen draw time proportional to the number of visible tiles?
Mine GO BOOM - Fri May 14, 2004 11:20 am
Post subject:
-Smong- wrote:
Why do filled in areas not kill FPS?

Why does not no one figure this out? In Continuum, having a bunch of tiles on the screen kills FPS really fast. So, the assumption would be that if there is a flood fill, it would only be used to fill in huge squares of tiles with one tile, thus killing anyone's client whenever they get near it on screen.

I believe having the tool would be useful, because you can mass-replace a large connected section of tiles with another type really fast. But then again, having a replacing mask tool would do this job safer.
Smong - Fri May 14, 2004 11:56 am
Post subject:
I agree that a tool that converts connected tiles to another type at one click is much better than filling an empty area edged with tiles.
2dragons - Fri May 14, 2004 7:09 pm
Post subject:
The project is being written in java.

Currently it supports editings levels. An earlier version had support for some screenobject stuff. Vampz at this time is working on an interface to edit any sort of image used in the editor (tilesets,lvz,etc...)

It was my previous intention to release the source after enough progress had been made to begin using it as a lvz editor.
2dragons - Fri May 14, 2004 7:11 pm
Post subject:
I really like the idea of defining tiles as vertical edges/hortizontal edges, end of walls, corners, etc...

And seems like a few of you have suggested it so I think it would be a good thing to plan for that in the editor.
Dr Brain - Fri May 14, 2004 7:13 pm
Post subject:
ASSS region support.
2dragons - Fri May 14, 2004 7:13 pm
Post subject:
Sorry to create numerous posts but I wanted to touch on a question MGB had again.

You asked about open sourcing and I said I'd like to after most of the functionality was there.

On another note it would be nice to open it earlier so others could contribute however I'm not sure that I have the capabilities to organize that. And again I've struggled to layout the code nicely.

If you have suggestions on how I could go about it I'm all ears. I'd be more than happy to let others assist in the project if I can find an organized manner to do so. +)
2dragons - Fri May 14, 2004 7:14 pm
Post subject:
Can you expand on 'Asss region support?'
D1st0rt - Fri May 14, 2004 8:22 pm
Post subject:
region.h:
Code: Show/Hide
/* dist: public */

#ifndef __REGION_H
#define __REGION_H

/* structs */

typedef struct coord_t
{
   int x,y;
} coord_t;

typedef struct coordlist_t
{
   coord_t *data;
   int count, allocated;
} coordlist_t;

typedef struct rect_t
{
   int x, y, w, h;
} rect_t;

typedef struct rectlist_t
{
   rect_t *data;
   int count, allocated;
} rectlist_t;


/* functions */

coordlist_t init_coordlist(void);
void add_coord(coordlist_t *l, int x, int y);
void delete_coordlist(coordlist_t l);
rectlist_t init_rectlist(void);
void add_rect(rectlist_t *l, rect_t rect);
void delete_rectlist(rectlist_t l);
char val_to_char(int val);
int char_to_val(char c);
void encode_rectangle(char *s, rect_t r);
rect_t decode_rectangle(char *s);

#define HEADER "asss region file version 1"

#endif

Mine GO BOOM - Fri May 14, 2004 8:37 pm
Post subject:
CVS is good. If you need access to a resource for this, SourceForge is a nice free place to get unlimited hosting for your project.
Dr Brain - Fri May 14, 2004 8:54 pm
Post subject:
ASSS uses a file (region.conf) to define named regions of rectangles.

For example, a module can check if a player is in the "noanti" region. The server checks the region.conf in the arena's folder, and uses the rectangle lists to determine if they are indeed in the region.

All the source is in region.c
Mr Ekted - Fri May 14, 2004 9:25 pm
Post subject:
Noanti? Is that anywhere near Dantooine?
Dr Brain - Fri May 14, 2004 11:12 pm
Post subject:
No, noanti is closer to Endor and Bakura.

Ask a stupid question... get a stupid answer.
MATTtheWAZ - Sat May 15, 2004 6:25 pm
Post subject:
Well good luck with it.... can't wait for the completed project
Anonymous - Sun May 16, 2004 2:14 pm
Post subject:
Rotate tool is what we need
Anonymous - Sun May 16, 2004 3:47 pm
Post subject: regions
I thought it was mapname.rgn, also that some stuff was actually in the .lvl file using invalid tile types (although I may just be pulling an mi2g).
Anonymous - Mon Jun 07, 2004 11:23 am
Post subject:
how goes this? yuns wouldnt happen to have figured out the tile draw routines would ya, like circle mainly...... hehe. serioulsy tho,....mines in VB(using directdraw7). it performs.
i have to agree tho, VB is not good for games, but for making editor using DirectX.....its totaly fine icon_smile.gif

do you have yers layering yet? thats my current mission. hehe.

just lettin it be known. some good friendly competition always makes things better icon_smile.gif

suks all the ppl making editors now are using diff langs. icon_sad.gif

the purple are lvz images.

http://www.sscentral.com/zignotzag/conted5.jpg
Anonymous - Mon Jun 07, 2004 7:38 pm
Post subject:
wEaViL wrote:
How about a fill tool that when used in a closed tile outline will fill the inside with the curent tile selected.. Kinda like mspaint when you draw a box with black then you can fill it in with red just by using the paint bucket tool but the black outline stays.


It's done in SSME
SuSE - Mon Jun 07, 2004 7:52 pm
Post subject:
Anonymous wrote:
[..]



It's done in SSME

no it isn't - perhaps you meant CLE
Mr Ekted - Mon Jun 07, 2004 8:16 pm
Post subject:
My gripes/desires with map editors:

- renders too slow
- floating windows suck (tiles, radar)
- overuse of vertical space, don't have toolbar under menu, bottom status bar, or scoll bars
- need key to toggle everything on/off to view as much of map as possible
- "erase" should not be a tool, it should be a tile
- mouse panning, photoshop style
- single key tool/action selection, photoshop style
- need brushes (sets of re-usable tile arrangements)
- need more than 1 level of grids, different color or thickness
- grids must have selectable origins
- layers of course (this requires a new file format other than lvl, export to lvl files)
- reference layer (load a different map in background that is not editable, and draws faded)
- guide lines (as in photoshop), and guide points
- mirror drawing (using guide lines/points)
- alphabet tiles, type to drop letter tiles into map, requires user setup with tileset (this may exist in some newer editors)
- random fills by percentage (eg draw a big circle, randomly fill with 5% of the space with a tile)
- fills by brush (drop a repeating pattern of tiles into a selected region)
- selection modification like photoshop (expand/contract, smooth)
- better selection choices like photoshop wand (eg all touching tiles, all touching like tiles, all touching blank space, entire row/col)
- snap to grid/guide
- snap to nearby (or offscreen) tile edge by row or column
nintendo64 - Mon Jun 07, 2004 8:41 pm
Post subject:
Mr Ekted, what happened to your map editor project? did it become boring?

-nintendo64
CypherJF - Mon Jun 07, 2004 8:43 pm
Post subject:
I agree w/ most of those, but I strongly encourage the toolbar/status bar (for ez click actions, and location XY etc etc info in status)
SuSE - Mon Jun 07, 2004 9:19 pm
Post subject:
Mr Ekted wrote:
My gripes/desires with map editors:

- renders too slow
- floating windows suck (tiles, radar)
- overuse of vertical space, don't have toolbar under menu, bottom status bar, or scoll bars
- need key to toggle everything on/off to view as much of map as possible
- "erase" should not be a tool, it should be a tile
- mouse panning, photoshop style
- single key tool/action selection, photoshop style
- need brushes (sets of re-usable tile arrangements)
- need more than 1 level of grids, different color or thickness
- grids must have selectable origins
- layers of course (this requires a new file format other than lvl, export to lvl files)
- reference layer (load a different map in background that is not editable, and draws faded)
- guide lines (as in photoshop), and guide points
- mirror drawing (using guide lines/points)
- alphabet tiles, type to drop letter tiles into map, requires user setup with tileset (this may exist in some newer editors)
- random fills by percentage (eg draw a big circle, randomly fill with 5% of the space with a tile)
- fills by brush (drop a repeating pattern of tiles into a selected region)
- selection modification like photoshop (expand/contract, smooth)
- better selection choices like photoshop wand (eg all touching tiles, all touching like tiles, all touching blank space, entire row/col)
- snap to grid/guide
- snap to nearby (or offscreen) tile edge by row or column


translation: Photoshop with an "export as .lvl" feature sa_tongue.gif
Mr Ekted - Mon Jun 07, 2004 11:15 pm
Post subject:
SuSE wrote:
[..]translation: Photoshop with an "export as .lvl" feature sa_tongue.gif


Kind of yes, but more specific to tiled maps (no offense to FACTS). Photoshop is a little too generic and low-level for map drawing. It isn't meant to deal with individual pixels (although it can). It is made to deal with larger graphic elements, blending, etc. When you are editing SS maps, you generally work at 1:1, setting individual tiles.
Anonymous - Thu Jun 10, 2004 2:19 am
Post subject:
I dont know how hard it would be.. but i think it would be nice to be able to import lvz into a map file, i mean.. not for them to stay, but to see its effect, suh as a background or something... -shrugs- you get the idea icon_smile.gif
Anonymous - Sun Jun 13, 2004 8:27 am
Post subject:
wEaViL wrote:
Left click to place a tile and right to erase sounds good..

How about a fill tool that when used in a closed tile outline will fill the inside with the curent tile selected.. Kinda like mspaint when you draw a box with black then you can fill it in with red just by using the paint bucket tool but the black outline stays.

Great ideas!
D1st0rt - Sun Jun 13, 2004 12:14 pm
Post subject:
Don't tell me... you're making a map editor too?
KrynetiX - Mon Jun 14, 2004 12:16 pm
Post subject:
I have to say Left-Click=Tile1 RightClick=Tile2.

Keep all the buttons the same as SSME becuase most of us have grown efficient with them.

Suggestions:

Ablility to select more than one tile. (for numerous reasons)

Holding in shift with line tool = Straight line. (same for pensil)
Holding in shift with circle tool = Perfect circle. (same for square)

Possible "black=notiles", so you can overlay selected portions of the map onto another, instead of having it cut out a quare within it.

90 degree rotation, i'm tired of counting the tiles and re-drawing icon_smile.gif

A text tool would be usefull, but not uless you are able to use any font in your wondws/fonts folder.

Thats my 2 Cents.
Mr Ekted - Mon Jun 14, 2004 2:18 pm
Post subject:
KrynetiX wrote:
A text tool would be usefull, but not uless you are able to use any font in your wondws/fonts folder.


A text tool has to lay tiles with the letters already on them. You can't drop arbitrary graphics onto a map in an LVL. The trick is you need to tell the map editor which tile is which letter. If someone wants to impress me, write code to auto-detect the letters on the tiles by character recognition. icon_smile.gif
SuSE - Mon Jun 14, 2004 2:22 pm
Post subject:
Mr Ekted wrote:
A text tool has to lay tiles with the letters already on them. You can't drop arbitrary graphics onto a map in an LVL.

of course you can - just have it build the tileset afterwards or something
would be a pain, of course...

...or you could go the route of SOS and just use lvz to "tile" stuff
that way you can do whatever you want
Anonymous - Tue Jun 15, 2004 9:31 am
Post subject:
Mr Ekted wrote:
[..]



A text tool has to lay tiles with the letters already on them. You can't drop arbitrary graphics onto a map in an LVL. The trick is you need to tell the map editor which tile is which letter. If someone wants to impress me, write code to auto-detect the letters on the tiles by character recognition. icon_smile.gif


how about you impress us and do it yourself? haha.

anyhow, making such a thing would almost promote wasting your tiles on text. im working on a lvz feature like this. using lvz you can use text of any size, and put it anywhere, and its transparent. by simple naming the files A, B, C.jpg. the program allready knows what is what. making any sort of enumeration a moot point. so all one will have to do is click a text tool, click the map, type...hit enter. done. cound also have both cases that way as well. the benifits of using lvz to do this are many. and the drawbacks of using tiles to do it are great(26 of your 190 tiles) at the very least.

if you use tiles to do it, what is the good of even having lvz ? icon_smile.gif

imho.

-zig
Mr Ekted - Tue Jun 15, 2004 10:32 am
Post subject:
Anonymous wrote:
[..]using lvz you can use text of any size, and put it anywhere, and its transparent. by simple naming the files A, B, C.jpg.


You do realize that you actually have write out valid JPG files? You can't just rename a BMP to JPG and have the file magically change format. But why do this? You can get transparency with BMP's in Cont as long as you make the background black.
SuSE - Tue Jun 15, 2004 11:01 am
Post subject:
I think his basic message is that lvz is cooler than tilesets because it's less limiting
Anonymous - Tue Jun 15, 2004 11:08 am
Post subject:
erm...i dont plan on the editor making anything for you aside from a lvl file and a ini. i think you missunderstand my intentions. merely a tool. which is nothing unless the person so inclined sets out to make a A.jpg or A.bmp or A.gif.

and as far as image formating goes. you can find most of that allready written free source. almost cut,paste and compile.


-zig icon_smile.gif
Mr Ekted - Tue Jun 15, 2004 12:33 pm
Post subject:
You sound like Qndre now. icon_smile.gif
Cyan~Fire - Tue Jun 15, 2004 1:21 pm
Post subject:
Not quite. He's not saying "I heard from a friend that JPG is actually a bitmap renamed, which I have confirmed with a self-written ASM program which for some reason doesn't work."
Mr Ekted - Tue Jun 15, 2004 1:55 pm
Post subject:
OMG Cyan! You nailed him! $$
k0zy - Tue Jun 15, 2004 2:13 pm
Post subject:
Cyan~Fire wrote:
Not quite. He's not saying "I heard from a friend that JPG is actually a bitmap renamed, which I have confirmed with a self-written ASM program which for some reason doesn't work."


rofl!
SuSE - Tue Jun 15, 2004 5:30 pm
Post subject:
Qndre doesn't have screenshots of a functional program


Smong - Thu Jun 17, 2004 6:49 am
Post subject:
I think for a text2lvz thing, it should look for patterns in the text and generate separate images of partial words. Having one image for each letter is going to decrease fps.

I'm not a mapper, but I find a 12x4 font block (a-z, 0-9, some symbols) leaves plenty of space for at least 5 tile blocks.
Anonymous - Thu Jun 17, 2004 10:35 am
Post subject:
Smong wrote:
I think for a text2lvz thing, it should look for patterns in the text and generate separate images of partial words. Having one image for each letter is going to decrease fps.

I'm not a mapper, but I find a 12x4 font block (a-z, 0-9, some symbols) leaves plenty of space for at least 5 tile blocks.


it wont slow it down anymore than if they where tiles. in fact tiles might quite possible be even slower. for the simple fact that many more calculations have to occur for tiles...collisions etc. none of those things matter for lvz. cant really say. and the only person who can is priitk. without actually testing it.
Smong - Thu Jun 17, 2004 10:59 am
Post subject:
I don't think each tile is tested for collisions, simply each ship and each weapon.

Drawing the map would only require a lookup in some kind of table.
Depending on how the lvz objects have been implemented there could be at least one conditional to check (is it visible) increasing execution time.
Anonymous - Thu Jun 17, 2004 12:37 pm
Post subject:
good points, well see i suppose, but its been my experience so far, that it can handle quite a bit of abuse. my evo zone 7 megs, and thresh which is a whole lot more optimized both run respectably well, even on junk video card. 16 meg voodoo3 2000( well old(glide owned))

soon now i will have adding things working. and i will experiment some. i just seem to remember tiles just wreaking havoc on the engine.

member that tank zone that used a tiled bg? ive had alot of large ass images floating around on the screen, and never even came close to running as bad as that does. one draw is way way faster than 2 regardless of size. so maybe if you tiled a back with 16x16 tiles LVZ it will run just as horrible, but something makes me doubt it. which makes me think there is more going on with the tiles.
Matzke - Fri Jun 25, 2004 8:03 pm
Post subject:
i think a awesome idea to save time would be you could click and drag your mouse over a few tiles then u click the tile u want them on, and they'd be placed right there. for example some tilesets might have a tree, bush, or bunker that is a few tiles, u could drag your mouse over them and walla they can be placed on your screen, BIG time saver[/quote]
Mr Ekted - Fri Jun 25, 2004 9:00 pm
Post subject:
That's equivalent to the Photoshop PEN tool. As I suggested before, two other similarly useful things are BRUSH tool and BUCKET tool.

BRUSH: Define a bunch of small(ish) pattern of tiles, select a pattern, and drop it onto the map all at once with a single click, as many times as you like.

BUCKET: Select a tile and click on the map. All touching empty tiles (clicked on empty space) or all touching similar tiles (clicked on existing tile) or all touching non-empty tiles (maybe shift-click) are filled with the selected tile.
ZiGNoTZaG - Fri Jun 25, 2004 10:42 pm
Post subject:
can be done, the tile brushes. the only thing to decide would be where to store the settings.

the fill of course, simply involves adding tiles around the origin tile until every tile included in the fill had all 4 of its sides touching another tile. this could easily end up filling you entire map with tiles. 1 million entries. a one million step undo? heh. there would have to be a limit.
Mr Ekted - Fri Jun 25, 2004 11:04 pm
Post subject:
Undo should be by change, not by tile. Fill is a single action. Undo states for large actions need to be block map/layer saves. I would recommend using compression. You can limit the region to just the affected tiles, store a sub-array of tile id's, then compress that block. Even if it's 50K per compressed undo region (which is really high), that's still 20 undo's per megabyte, which is nothing.
ZiGNoTZaG - Wed Jun 30, 2004 6:25 am
Post subject:
like an array of dynamic arrays? not sure about the compresion. need more research.
CypherJF - Wed Jun 30, 2004 1:07 pm
Post subject:
You'd need to store all the modified tiles past value(s); and store em into some sort of an array but compress em before hand. That way you're not saving extra data that you don't need. ie: all 1024x1024 tiles. I think that's what ekted is trying to say.
ZiGNoTZaG - Wed Jun 30, 2004 4:13 pm
Post subject:
yeah ive started thinking about this and the best way i can think of is to have like an array of a set limit. such as 20 or 40. contained inside of this would be a dynamic array that you could size to the amount of objects selected.

that would handle large undos.



this would either have to polymorph for lvz or be two differant types.
2dragons - Wed Jun 30, 2004 8:59 pm
Post subject:
An easy way to do compression for tiles is Run Length Encoding (RLE). Lookup how bitmaps do it and you'll have yourself a good example.
Mr Ekted - Wed Jun 30, 2004 11:57 pm
Post subject:
Easiest way is to take the raw map (1024x1024 tiles) before the change occurs, and zlib compress it. Results should easily be less than 1 byte per actual tile, and should only take a few milliseconds.
CypherJF - Thu Jul 01, 2004 12:04 am
Post subject:
Suggesting, to serialize the "map" object then compress it?
Mr Ekted - Thu Jul 01, 2004 12:21 am
Post subject:
CypherJF wrote:
Suggesting, to serialize the "map" object then compress it?


You don't need to "serialize" anything. In memory, your map should be a 1024x1024 byte array. That's 1MB of linear memory that can be directly fed into compress(). If you wrap that inside some crazy C++ object, then it's your own fault, and you'll need lots more code to deal with it.
ZiGNoTZaG - Thu Jul 01, 2004 12:41 am
Post subject:
Mr Ekted wrote:
Easiest way is to take the raw map (1024x1024 tiles) before the change occurs, and zlib compress it. Results should easily be less than 1 byte per actual tile, and should only take a few milliseconds.


thats sounds reasonable, ill look into that icon_smile.gif
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group