Scope 2D - Level Editor

Monkey Archive Forums/Monkey Projects/Scope 2D - Level Editor

Shinkiro1(Posted 2011) [#1]
Hello,

I spent the last couple of months creating a level editor for my game and thought it would be worth sharing with other game developers.

Scope 2D is a non-tile based level editor, this means you can place your graphics pixel-perfect where you want them. Still you can use the built in Grid to let your graphics snap to it. Other features:

* Tools: Select, Move, Scale, Rotate
* XML based level format
* Undo/Redo
* Intuitive User Interface
* For Windows & Mac
* Define Custom properties of a level (like music, etc.)

Also be sure to read the Getting started part of the docs before using Scope 2D.

Website: http://scope2d.com/


GC-Martijn(Posted 2011) [#2]
H!

At the moment I'm trying to make a game with only polygons, and using a collision system (convex polygons only) made by Tibit.

I really want to know what collision class you use and if you want to share that part, so I can see how you did that.


Thanks for any information,
GCMartijn


Shinkiro1(Posted 2011) [#3]
Basically I used this code from the code archives: http://www.monkeycoder.co.nz/Community/posts.php?topic=353

Hope that helps.

EDIT: Oh, didn't see that ^^
As soon as I'm home I will upload my collision class with an example.
But I just handle 1 Type of collision and that is if a point(x,y) is inside a rectangle(which can be rotated). I don't know if this is helpful to you.
I will post it in the linked thread though because this one is more about the editor :)


GC-Martijn(Posted 2011) [#4]
haha well my last post in that topic was:
"""Yea a simple example code how to use this please, I don't have BlitzMax so I can't see how to use this. """

I did test the code again some days ago, but it gives me some errors.
That's why I was hoping for some more new code ;)

Does your code handle non convex polygon collisions ?


Skn3(Posted 2011) [#5]
The editor looks cool! Do you have any more details?


Shinkiro1(Posted 2011) [#6]
The editor is written in BlitzMax, so cross platform compatibility shouldn't be an issue (developing it on a mac, though I have tested it on windows which works fine).
The underlying engine was written before development of Scope2d started.

I haven't decided yet if I want to sell the editor or share it with the monkey community. The current plan is to provide the engine(monkey) for free, the editor can be bought for what you think it's worth (min. $1).

Thoughts?


Volker(Posted 2011) [#7]
Sounds good.


Shinkiro1(Posted 2011) [#8]
Demo Download now available for the Mac: http://dl.dropbox.com/u/2892658/Apps/Scope%202D%20Demo%20Mac.zip
Windows is going to follow soon.


Neuro(Posted 2011) [#9]
Not able to open anything with it...


Shinkiro1(Posted 2011) [#10]
Hey,
Could you be more specific? Any errors?
So when you click File -> Open the demo.xml file (which is located in data/scenes/demo.xml) is not loaded?

Right clicking into the canvas will bring up all graphics that are located in data/graphics. Select one of the graphics or right-click to go back.


Neuro(Posted 2011) [#11]
No error messages or anything. Actually the File menu is there but none of the options are active for it so i can't select anything. I'm using OSX Lion so maybe some issues with it.


Armitage1982(Posted 2011) [#12]
Me too same thing is happening.
Got a menu, nothing highlighted except hide and Hide Others, but if I clic that I cannot quit or do anything. There is no main window.

I'm using Lion to.


Shinkiro1(Posted 2011) [#13]
Updated. Any feedback is welcome.


slenkar(Posted 2011) [#14]
the window appears too far up so I cant see most of the buttons,
but i was able to open the demo.xml file...but then it crashed (windows)


Shinkiro1(Posted 2011) [#15]
Ok thanks, I'll take a look into these issues.

#############################
Edit: New Windows version online.
The issue where you can't see the titlebar should be resolved.
This version was also built in debug mode to throw errors when needed.

Has anybody else got problems with opening files?


samowitsch(Posted 2011) [#16]
I have the same problem under OS X Lion. Scope 2D starts up, no main window, menu command quit not working.


Shinkiro1(Posted 2011) [#17]
@samowitsch
I am sorry to hear that. I am still on 10.6 so can't test it at the moment. Could you post a screenshot of it?


AdamRedwoods(Posted 2011) [#18]
Didn't Blitzmax have problems with Lion? I think the solution was to get the latest SDK and rebuild modules.


MikeHart(Posted 2011) [#19]
Hi Shinkiro1,

had a place with Scope2D. It is a nice start. 2 things I didn't like so far:

1) To select a different tile after you modify it, you always need to have a click inside the toolbar. Maybe adding keystrokes to switch the modes would be a good idea.

2) No use of a tile map/sheet possible. When drawing maps, it is important to use as less images as possible.

But it is a nice start. Keep working on it.

Michael


Shinkiro1(Posted 2011) [#20]
Hey,

1) Yes, I'm aware of that. At the moment you can switch Tools by pressing the TAB key, but that's not a solution. Although I already something in mind to solve this.

2) I can't promise support for texture-atlases. Also keep in mind that Scope 2D is primarily aimed for non-tile based games.

Thanks for taking your time to point these things out.

@AdamRedwoods
Thanks for the tip, will try that out.

EDIT:
For all people on OSX Lion:
I've uploaded a new version that may fix the problem where the application didn't even started. I'm still on 10.6 so can't test this.


c.k.(Posted 2011) [#21]
If I build something with this, will it give me edge information, etc., that I can plug into Box2D or something?


Shinkiro1(Posted 2011) [#22]
With edge information do you mean the 4 corner points of the image or a polygon representation?

Currently no such information is saved.


samowitsch(Posted 2011) [#23]
Scope2D is now running also under Lion, thanks!


Shinkiro1(Posted 2011) [#24]
Alpha 2 now online with these changes:


Alpha 2:
- AutoTools: Use tools without selecting anything before
- Enhanced Scene-Properties: Redesigned GUI, Normal Properties added (Menu->Scene->Properties)
- World Borders: so you know big your world is
- Move selected objects with direction keys by 1 pixel




AdamRedwoods(Posted 2011) [#25]
nice start.

You need keyboard commands for the tools, I suggest "1234", since the hand is on "wasd" already.

Also, what type of collision system is recommended for this type of non-grid layout? Box2D? Custom tree sort?


Shinkiro1(Posted 2011) [#26]
Shortcuts for Tools are noted, btw good idea to lay them on "1234"

For the collision: I have no definitive answer for this, it depends very much on how much objects you have.
If you don't have that many objects it should be fine when checking every object against every other one.
Then of course there are optimizations like:
* Do a radius check before you do an expensive collision check
* Tile your world in sections and only check objects in one section against each other (this can have huge performance improvements like 10x)
* Only check an object against another one if it at least one of them is moving (you can give your objects a static:Bool Field and do If (obj1.static And obj2.static) -> Next Object)
* Don't do double checks (A-B, B-A is the same result)


AdamRedwoods(Posted 2011) [#27]
Ok, then the other suggestion would be to add export options for centerpoint/radius and as c.k. mentioned multipoint polys for detailed collisions.

good start, keep going!


Shinkiro1(Posted 2011) [#28]
Scope 2D assumes that you will MidHandle your images, so the x/y coordinate is the center-point.
But export options are generally a good idea, noted that, thanks.