A little different game map editor
A little different game map editor
A little different game map editor
A little different game map editor
A little different game map editor
A little different game map editor A little different game map editor A little different game map editor A little different game map editor A little different game map editor A little different game map editor A little different game map editor A little different game map editor
A little different game map editor A little different game map editor
A little different game map editor
Go Back  Xtreme Visual Basic Talk > > > A little different game map editor


Reply
 
Thread Tools Display Modes
  #1  
Old 11-01-2012, 03:48 PM
VB_Alien VB_Alien is offline
Senior Contributor
 
Join Date: Apr 2004
Posts: 854
Default A little different game map editor


Rather than having all game map tile properties
preset before drawing begins, how about if the
user can apply properties, directly to the map
that they just had drawn.

This is what i have done. After the map is drawn,
you switch the drawing operation to map block mode.
In block mode, you have a choice of either placing a
Red block over area's of the map that means that
tile is not walkable or a Green tile that means that
- that tile represents the layer on which you are
drawing on.

Right now, the transparent tile property is automatically
taken care of, according to what tile you click on from
the sample tiles.

All tiles are walkable until you put a red block over a
tile that you don't want your sprite to walk on.

The only little problem that i have with this program is
when drawing blocks by holding the mouse button down
and moving the cursor around. The problem is that when
you did it this way, the block color is darker than it is suppose
to be but if you click on each tile to draw blocks, the color
is more transparent. It doesn't effect any tiles, drawn under
them though and it doesn't effect setting the properties, other
than what it is suppose to do.

I'll attach a demo. Let me know what you think. In the mean time,
i'm going to make improvements to the editor. This is only a
demo, so don't expect great things.


****Edit*****

Let me know if you have problems opening this
up in design view and i'll repost it again.

I don't know why but i can't remove any executables
from the foldlers or else, i can't open mine in design
view. I even zipped up the original files before i started
removing any files and when i unzipped that one, the
files were missing from that to. I can't figure that one
out.

If i have to repost, it comes with everything or else
i won't post it. If that's the case and mods/admins won't
let me post it, then just delete this whole thread.
Attached Files
File Type: zip MapEditorDemo.zip (83.0 KB, 20 views)

Last edited by VB_Alien; 11-01-2012 at 05:50 PM.
Reply With Quote
  #2  
Old 11-02-2012, 10:03 PM
passel's Avatar
passelA little different game map editor passel is offline
Sinecure Expert

Super Moderator
* Guru *
 
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 8,028
Default

Your blocks go solid because you draw them multiple times on top of each other when you drag.
Let's say your opacity is 50%. The first time you draw, your result is 50% of the new, 50% of the old.
The second time you draw, you'll increase the "new" by another 50% and diminish the "old" by another 50%, so will now be 75% "new" and 25% original.
Next, 87.5% "new", 12.5% original. A few more overwrites, and your new image will have completely obscured your original image.
You could add a precheck, and only draw the block if it is different from what is already there, i.e. check your walkable state against what you're getting ready to set it to. If they are the same, don't redraw the block.
Code:
'Only draw the block if it's walkable state is changed
            Dim drawBlock As Boolean = Map(intX, intY).Walkable <> Walkable

              Map(intX, intY).Walkable = Walkable
              Map(intX, intY).Layer = LayerNum

            If drawBlock Then
              ' The graphic object that will draw selected tile to picDest
              Dim gr As Graphics = Graphics.FromImage(picDest.Image)

              ' Draw selected color block to picDest
              gr.DrawImage(picLayerBlocks.Image, MyDestRect, MysrcRect, GraphicsUnit.Pixel)

              ' Were done drawing, so dispose of the graphic object
              gr.Dispose()
            End If
__________________
There Is An Island Of Opportunity In The Middle of Every Difficulty.
Miss That, Though, And You're Pretty Much Doomed.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
A little different game map editor
A little different game map editor
A little different game map editor A little different game map editor
A little different game map editor
A little different game map editor
A little different game map editor A little different game map editor A little different game map editor A little different game map editor A little different game map editor A little different game map editor A little different game map editor
A little different game map editor
A little different game map editor
 
A little different game map editor
A little different game map editor
 
-->