Jump to content
SubSpace Forum Network

Recommended Posts

  • Replies 219
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted

can you make the pencil option more accurate when mapping?

 

When I click somewhere on the grid, the actual tile I want to implement turns up 1 tile below/right of the actual pencil/mouse.

 

Can you fix this please?

Posted

This is the raddest editor I've ever used - thanks guys.

 

Oh, ok. Here I am trying to help blum.gif . I wanted to create a line eraser, so I figured I'd look for the line draw function, hope that it calls a draw function, and recode it to call an eraser function. However, I don't really know squat about VB, so I don't know really where to begin blum.gif . Any ideas on simple things that I can look through to try to familiarise myself with the language / IDE?

Posted

actually, it would be possible to make it call a 'line draw' function, using the tile 0 ...

just have to make it check for special objects cut off...

 

interesting idea

Posted
actually, it would be possible to make it call a 'line draw' function, using the tile 0 ...

just have to make it check for special objects cut off...

 

interesting idea

 

it's better to have an actual tile 0 in the tileset, so all tools can use tile 0

 

the apache: it's because the icon for pencil isn't the same as the original mouse pointer, as the actual x and y of the mouse pointer is top left of that icon, while the pencil is more bottom left. Thats where the problem is.

 

edit:

-made a tile 0 and works with every tool ^^ (also in switch/replace)

-added tile numbers in switch/replace beneath the selected tiles

-fixed offset of selection on radar

-updated the line/rectange/ellipse with less flickering (edit2: actually resolved all flickering now).

 

Oh yeah, the tile 0 in the tileset is next to the last tile (next to the green appearance tile which is 255)

 

Btw: can someone write a help file that explains all features, tools and whatever more (maybe some version updates along the way and such (i really suck at writing that)

 

Btw2: can someone update the file of DCME at subspacedownloads.com ?

DCME1104_edits1.zip

DCME1104_edits1_src.zip

Posted

Hop on SS and ?message Bajan about it, and get his MSN while you're at it. I have it, but that's not my decision to disclose blum.gif

 

Drake: I'm still trying to get involved / learn VB at the same time, any suggestions on how I should go about this?

Posted

wouldnt it be possible to fix the pencil offset by simply changing this line:

(frmGeneral , picpreview_mouseDown)

Case t_pencil, T_Eraser
	Call pencil.MouseDown(button, x, y)

to:

Case t_pencil, T_Eraser
	Call pencil.MouseDown(button, x-[offset], y-[offset])

?

Posted
wouldnt it be possible to fix the pencil offset by simply changing this line:

(frmGeneral , picpreview_mouseDown)

Case t_pencil, T_Eraser
	Call pencil.MouseDown(button, x, y)

to:

Case t_pencil, T_Eraser
	Call pencil.MouseDown(button, x-[offset], y-[offset])

?

 

True

 

 

Yoink: i'm currently commenting as much as possible in DCME, maybe then it will be much easier to understand. But as for all languages, program things from simple stuff to more complicated stuff (i've been programming over 7 years in vb now)

Posted
I learned alot about the structure of a program in vb by reading / editing dcme... before that, I had no idea what was a module, a class, and how to work with them...
Posted

Well, I can't seem to do it, so go ahead and consider this a suggestion: An eraser tool that is more than 1 tile - line, block, circle (full / outline); would be useful!

 

Also, a "Click to Orient", where you enter your coordinates that you desire to center over (say, 512,512 ? smile.gif)

Posted

I'd like to add another request, this time a behavior one.

 

It would be nice, that when you clicked on the tile selector that the pen would be selected (when say coming from zoom or select) ... I notice that I tend to zoom in or out, see something that I need to change, and then select a tile... then have to go reselect the pen...

 

Just a thought... petty, but would be useful...

Posted

yoink: you can change the thickness, and if you select something you can also press delete to delete every tile selected

 

a dead fish: you can use shortcuts p and z if you want to change quickly blum.gif . it used to be auto pen selecting when you select a tile, but it got quite annoying so i removed it (waaaay back in one of the first version)

Posted

Cool - I don't know if this is already a feature, but

 

DRAW FROM CENTER - ie, draw from where you clicked. Hold alt, and instead of expanding only left or right, the circle / square expands evenly (or rectangle/oval).

Posted

you need to hold CTRL for draw from center :D

I KNOW CUZ I DID THAT PART (I'm proud of myself har har har)

also works with line

 

 

oh, and I noticed one bug some time ago... when using the line thickness thing... If you choose, for example, the thicker line, and draw something NEAR the map's border, it will still try to draw some tiles outside the map, and crash the program... It checks if what you are trying to draw is between the limits, but it doesn't check for those extra tiles that are drawn with the thickness thing

 

 

 

and it would be awesome to be able to zoom with the mouse wheel and move around with the 3rd button... I have no idea how to do that however =/

Posted (edited)

for mousewheel that involves subclassing (thats why the module was already in the folder), but i tried it once, but for some reason it didn't work out that well. Well it could be because i don't use a mouse but a touchpad :/

Edit: yeah thats the problem, the driver of my touchpad doesn't invoke the WM_MOUSEWHEEL message that is subclassed, i checked with scrolling in notepad and Winspector Spy. I can't test it if it works now, but you might be able to zoom when you scroll your mousewheel

 

That problem with thicker lines can be resolved by checking if the tiles being drawn are within the borders so x => 0 y>=0 x < 1024 y < 1024

And yeah, thicker lines are also slowing down filled ellipses and filled rectangles. Dunno why :/

Edit: ah i know now, when filling a rectangle it also uses DrawLine, but it has to ignore the tickness then

 

Btw sam, can you comment you CheckCtrlShift() method, haven't got a clue what happens there >.>

Besides that i commented the entire frmMain

 

 

Edit: ok i fixed the thicker lines slowdown when filling and the out of script range error when near a side of the map. Also fixed the drawing near the side of a map, as it would appear if was drawn but it wasn't, so fixed that too.

Also removed some useless stuff from the replace form (you don't see any changes, but it had a picextratiles too and it was useless as it wasn't necessary. Also commented all forms now.

Btw i've done the subclassing again when i build the exe, so try scrolling with the mousewheel, after i build the exe, i've commented the hooks out again because it lets the IDE crash everytime i try to debug (which is very annoying >.>)

DCME1104_edits2_src.zip

DCME1104_edits2.zip

Edited by Drake7707
Posted

it's only 1 number to change, to increase the number of undo / redo's but with every number, the maximum memory usage increases by 8mb, which is a lot (in practice it will never be so much, but im talking worst case here). So now with 10 undo's and 10 redo's and each undo can take 4mb (entire map) then the maximum memory usage of undo/redo storage is 80mb.

 

That's why i didn't want to make it more, maybe i should make an option so you can select the number of undo/redo's

 

Btw does the mousewheel work ?

Edit: tested it by a friend ^^ yup it works, the only problem is that when you select a huge portion of the map, zooming is slowing down to a crawl and erhm some ppl find it funny to extra zoom a little more then >.>

Posted
Undo levels... well, perhaps you should make it check how much RAM the computer has and set the level by that. I'd say set it so that the max usage would use about 2x the computer's RAM (since it's not likely to reach worst case that easily). Or even better, make it calculate how much RAM is used by the undo buffer and just undo till the RAM is half-full.
Posted
Btw sam, can you comment you CheckCtrlShift() method, haven't got a clue what happens there >.>

 

lol $$$

 

i'll do that someday :D

basically, if i remember right, the 'shift' part checks:

tool

diagonals?

if not close enough to diagonal, make it straight line in whatever direction the mouse it the most far from begining

 

and whatever happens in there, it switches values or replaces them, keeping in memory the original ones in the tempx/y variables... or something like that

Posted

yeah something like that but you changed the x and y values passed from windows itself, i don't know but i made that directly p!@#$%^&* it to the tool's mousedown/move/up as i don't know what will happen if you change values outside of the program's memory scope.

As far for memory... i think thats a little too much overhead to check how much ram you have to recalculate the undo/redo stacks ? besides i can make the array bigger without losing stuff , but when i shrink it back all undo will be lost. Besides i don't think allocating memory dynamically is good anyway ( i don't think it's worth the overhead)

 

Btw i should implement a inProgress boolean so no new operations can be done while another is still busy

Posted

As I was saying before the !@#$%^&* forum software ate my post...

 

O...verhead? There shouldn't be any, apart from having to write the required lines of code.

 

but when i shrink it back all undo will be lost
Well, you're doing it wrong then! Just create a new undo array and copy fr om old. (Or just use a linked list which doesn't need such crap at all)

 

Besides i don't think allocating memory dynamically is good anyway ( i don't think it's worth the overhead)

What is this magic overhead? There is none (unless there's something really really wrong with VB. But I doubt that)

 

Anyway, cool map editor. I like the constant work on it smile.gif Gonna check out the code, too...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...