My Map Editor

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
xiphirx
Chaos Rift Junior
Chaos Rift Junior
Posts: 324
Joined: Mon Mar 22, 2010 3:15 pm
Current Project: ******** (Unkown for the time being)
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Contact:

My Map Editor

Post by xiphirx »

A little interesting fact about this project, I started it when I was a beginner with C++, and worked on it until now. Im trying not to change any code to create a timline of sorts of my coding methods XD.

It would be great if you guys could try it out and report bugs, thanks.

This post was taken from another forum
-----------------------------------------------------------------------
CSPSPMEP Public Beta 2


Features in this beta:
- Loading Maps
- Rotating the map
- Flipping the map
- Choosing a tile
- Scrolling through tiles
- Changing the map width and height
- Drag Fill
- Bucket Fill
- Grid
- Saving maps (saves tile data ONLY, all other data that was on the map will be ERASED)
- Open multiple maps at once
- New GUI

Controls:
q - toggle map information
w a s d - scroll around the map
x - (HOLD) bring up tile selection
v - toggle grid
n - increase grid
m - decrease grid
g - bucket fill
mouse wheel - scroll through tiles
mmb + drag - dragfill

Feedback
- Please post any bugs you find
- Please rate the usability

Known Bugs
- MEP Crashes upon exit
- Background fill doesn't fill on smaller maps

Download: http://arse.voidteam.net/Personal/CSPSPMEPPUBLICBETA2.zip
StarCraft II Zerg Strategy, open to all levels of players!

Looking for paid work :< Contact me if you are interested in creating a website, need a web design, or anything else you think I'm capable of :)
pritam
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 991
Joined: Thu Nov 13, 2008 3:16 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Amiga, PSOne, NDS
Programming Language of Choice: C++
Location: Sweden

Re: My Map Editor

Post by pritam »

Tried it out and it works perfectly fine, didn't find any new bugs. I'm impressed with the fill tool, I've checked out algorithms for it but never gotten far enough to implement it in an application.
User avatar
xiphirx
Chaos Rift Junior
Chaos Rift Junior
Posts: 324
Joined: Mon Mar 22, 2010 3:15 pm
Current Project: ******** (Unkown for the time being)
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Contact:

Re: My Map Editor

Post by xiphirx »

pritam wrote:Tried it out and it works perfectly fine, didn't find any new bugs. I'm impressed with the fill tool, I've checked out algorithms for it but never gotten far enough to implement it in an application.
The algo Im using is recursive, not quite efficient, but it gets the job done.

Code: Select all

Flood-fill (node, target-color, replacement-color):
 1. If the color of node is not equal to target-color, return.
 2. Set the color of node to replacement-color.
 3. Perform Flood-fill (one step to the west of node, target-color, replacement-color).
    Perform Flood-fill (one step to the east of node, target-color, replacement-color).
    Perform Flood-fill (one step to the north of node, target-color, replacement-color).
    Perform Flood-fill (one step to the south of node, target-color, replacement-color).
 4. Return.
http://en.wikipedia.org/wiki/Flood_fill :)
StarCraft II Zerg Strategy, open to all levels of players!

Looking for paid work :< Contact me if you are interested in creating a website, need a web design, or anything else you think I'm capable of :)
pritam
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 991
Joined: Thu Nov 13, 2008 3:16 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Amiga, PSOne, NDS
Programming Language of Choice: C++
Location: Sweden

Re: My Map Editor

Post by pritam »

Yeah, that's my source right there.
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: My Map Editor

Post by Ginto8 »

xiphirx wrote:
pritam wrote:Tried it out and it works perfectly fine, didn't find any new bugs. I'm impressed with the fill tool, I've checked out algorithms for it but never gotten far enough to implement it in an application.
The algo Im using is recursive, not quite efficient, but it gets the job done.

Code: Select all

Flood-fill (node, target-color, replacement-color):
 1. If the color of node is not equal to target-color, return.
 2. Set the color of node to replacement-color.
 3. Perform Flood-fill (one step to the west of node, target-color, replacement-color).
    Perform Flood-fill (one step to the east of node, target-color, replacement-color).
    Perform Flood-fill (one step to the north of node, target-color, replacement-color).
    Perform Flood-fill (one step to the south of node, target-color, replacement-color).
 4. Return.
http://en.wikipedia.org/wiki/Flood_fill :)
so basically you went one line at a time?
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
User avatar
GroundUpEngine
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 835
Joined: Sun Nov 08, 2009 2:01 pm
Current Project: mixture
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Location: UK

Re: My Map Editor

Post by GroundUpEngine »

Nice editor! ;)

When I try to open another map e.g. de_inferno_source map, the debug gets to "LOADING TILE.PNG" then crashes?!
What about a Zoom In/Out feature? :P
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: My Map Editor

Post by Ginto8 »

GroundUpEngine wrote:What about a Zoom In/Out feature? :P
That would probably be extremely useful for a level editor (seeing how the whole level looks overall, and also being able to edit more precisely), and if you're using OpenGL it'd be a snap. I think you should definitely try implementing it.
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
User avatar
xiphirx
Chaos Rift Junior
Chaos Rift Junior
Posts: 324
Joined: Mon Mar 22, 2010 3:15 pm
Current Project: ******** (Unkown for the time being)
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Contact:

Re: My Map Editor

Post by xiphirx »

GroundUpEngine wrote:Nice editor! ;)

When I try to open another map e.g. de_inferno_source map, the debug gets to "LOADING TILE.PNG" then crashes?!
What about a Zoom In/Out feature? :P
Wait, did you download the map from my website? I think I only included one full map... (the one that opens when you open the editor)

Im not using openGL, I still haven't wrapped my head around it :(
StarCraft II Zerg Strategy, open to all levels of players!

Looking for paid work :< Contact me if you are interested in creating a website, need a web design, or anything else you think I'm capable of :)
User avatar
GroundUpEngine
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 835
Joined: Sun Nov 08, 2009 2:01 pm
Current Project: mixture
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Location: UK

Re: My Map Editor

Post by GroundUpEngine »

xiphirx wrote:
GroundUpEngine wrote:Nice editor! ;)

When I try to open another map e.g. de_inferno_source map, the debug gets to "LOADING TILE.PNG" then crashes?!
What about a Zoom In/Out feature? :P
Wait, did you download the map from my website? I think I only included one full map... (the one that opens when you open the editor)

Im not using openGL, I still haven't wrapped my head around it :(
kk, apart from that no problems with editor. Also OpenGL takes quite a while to learn so dw ;)
User avatar
xiphirx
Chaos Rift Junior
Chaos Rift Junior
Posts: 324
Joined: Mon Mar 22, 2010 3:15 pm
Current Project: ******** (Unkown for the time being)
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Contact:

Re: My Map Editor

Post by xiphirx »

GroundUpEngine wrote:
xiphirx wrote:
GroundUpEngine wrote:Nice editor! ;)

When I try to open another map e.g. de_inferno_source map, the debug gets to "LOADING TILE.PNG" then crashes?!
What about a Zoom In/Out feature? :P
Wait, did you download the map from my website? I think I only included one full map... (the one that opens when you open the editor)

Im not using openGL, I still haven't wrapped my head around it :(
kk, apart from that no problems with editor. Also OpenGL takes quite a while to learn so dw ;)
Okay then.

I'm surprised it hasn't crashed yet (except for when you exit D:)
StarCraft II Zerg Strategy, open to all levels of players!

Looking for paid work :< Contact me if you are interested in creating a website, need a web design, or anything else you think I'm capable of :)
User avatar
mv2112
Chaos Rift Junior
Chaos Rift Junior
Posts: 240
Joined: Sat Feb 20, 2010 4:15 am
Current Project: Java Tower Defence Game
Favorite Gaming Platforms: N64/Xbox 360/PC/GameCube
Programming Language of Choice: C/++, Java
Location: /usr/home/mv2112
Contact:

Re: My Map Editor

Post by mv2112 »

Doesn't work under Wine :(
Damn visual studio dependencies...
User avatar
Ginto8
ES Beta Backer
ES Beta Backer
Posts: 1064
Joined: Tue Jan 06, 2009 4:12 pm
Programming Language of Choice: C/C++, Java

Re: My Map Editor

Post by Ginto8 »

mv2112 wrote:Doesn't work under Wine :(
Damn visual studio dependencies...
VirtualBox! ;)
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
User avatar
mv2112
Chaos Rift Junior
Chaos Rift Junior
Posts: 240
Joined: Sat Feb 20, 2010 4:15 am
Current Project: Java Tower Defence Game
Favorite Gaming Platforms: N64/Xbox 360/PC/GameCube
Programming Language of Choice: C/++, Java
Location: /usr/home/mv2112
Contact:

Re: My Map Editor

Post by mv2112 »

Ginto8 wrote:
mv2112 wrote:Doesn't work under Wine :(
Damn visual studio dependencies...
VirtualBox! ;)
touche...
Post Reply