Building Box2D Worlds?

Box2D / Chipmunk

Moderator: stun

Building Box2D Worlds?

Postby sgeos » Fri May 18, 2012 2:34 am

Does anyone have any advice for a good Box2D world editor that plays well with Moai?
Any original code posted by me is released via the CC0 Public Domain Dedication. It is in the public domain. Do whatever you want with it.
User avatar
sgeos
 
Posts: 241
Joined: Sat Apr 28, 2012 4:42 am
Location: Married in Japan.

Re: Building Box2D Worlds?

Postby ibisum » Fri May 18, 2012 4:16 am

PhysicsEditor.app is probably your best option.
;
--
ibisum@gmail.com
Got a MOAI snippet? Please consider adding it to http://moaisnippets.info/
User avatar
ibisum
 
Posts: 1306
Joined: Mon Oct 17, 2011 1:11 am
Location: Vienna, Austria

Re: Building Box2D Worlds?

Postby thebullno1 » Fri May 18, 2012 4:51 am

+1 for PhysicsEditor: http://www.physicseditor.de
I'm not related to them in anyway but I have to say that if you are going to buy PhysicsEditor, get TexturePacker too.
User avatar
thebullno1
 
Posts: 319
Joined: Sat Jul 02, 2011 8:53 am

Re: Building Box2D Worlds?

Postby sgeos » Fri May 18, 2012 5:47 am

Could I use PhysicsEditor.app to lay out a stage for an Angry Birds clone?
Any original code posted by me is released via the CC0 Public Domain Dedication. It is in the public domain. Do whatever you want with it.
User avatar
sgeos
 
Posts: 241
Joined: Sat Apr 28, 2012 4:42 am
Location: Married in Japan.

Re: Building Box2D Worlds?

Postby thebullno1 » Fri May 18, 2012 6:01 am

PhysicsEditor is an application for defining the shape of a physics body. Last time I checked, it doesn't have the ability to layout objects in a level.
User avatar
thebullno1
 
Posts: 319
Joined: Sat Jul 02, 2011 8:53 am

Re: Building Box2D Worlds?

Postby sgeos » Fri May 18, 2012 6:07 am

Does anyone know of a good tool that can be used to lay out levels for Box2D?
Any original code posted by me is released via the CC0 Public Domain Dedication. It is in the public domain. Do whatever you want with it.
User avatar
sgeos
 
Posts: 241
Joined: Sat Apr 28, 2012 4:42 am
Location: Married in Japan.

Re: Building Box2D Worlds?

Postby ibisum » Fri May 18, 2012 6:29 am

TileMapEditor?
;
--
ibisum@gmail.com
Got a MOAI snippet? Please consider adding it to http://moaisnippets.info/
User avatar
ibisum
 
Posts: 1306
Joined: Mon Oct 17, 2011 1:11 am
Location: Vienna, Austria

Re: Building Box2D Worlds?

Postby sgeos » Fri May 18, 2012 7:32 am

Tiled Map Editor Home Page wrote:Tiled Qt 0.8.0 released
  • Added support for polygon and polyline objects (sponsored by Zipline Games)

I wonder if this feature was used for Wolf Toss.
Any original code posted by me is released via the CC0 Public Domain Dedication. It is in the public domain. Do whatever you want with it.
User avatar
sgeos
 
Posts: 241
Joined: Sat Apr 28, 2012 4:42 am
Location: Married in Japan.

Re: Building Box2D Worlds?

Postby thebullno1 » Fri May 18, 2012 9:38 am

Creating your own is not that hard. I built one for a past game and it helped being able to test the level while you are designing it.
I've tried Tiled, Ogmo, Mappy ... none seem to suit my requirements.
User avatar
thebullno1
 
Posts: 319
Joined: Sat Jul 02, 2011 8:53 am

Re: Building Box2D Worlds?

Postby todd » Fri May 18, 2012 4:17 pm

For Wolf Toss, we used Tiled (http://www.mapeditor.org/) to lay out the worlds and physics objects.
User avatar
todd
 
Posts: 262
Joined: Fri Mar 25, 2011 1:11 pm

Re: Building Box2D Worlds?

Postby sgeos » Fri May 18, 2012 5:39 pm

todd wrote:For Wolf Toss, we used Tiled (http://www.mapeditor.org/) to lay out the worlds and physics objects.

Is there a sample stage available I could take a look at?
Any original code posted by me is released via the CC0 Public Domain Dedication. It is in the public domain. Do whatever you want with it.
User avatar
sgeos
 
Posts: 241
Joined: Sat Apr 28, 2012 4:42 am
Location: Married in Japan.

Re: Building Box2D Worlds?

Postby vladpalos » Fri Dec 21, 2012 9:39 am

I'm a bit new to this, so I want to know if the backgrounds on Wolf Toss were also made with TiledMapEditor.
Do you have every layer in TME associated with a grid in moai ?
Wolf Toss has some nice backgrounds which I think they are made with larger tiles.
Last edited by vladpalos on Fri Dec 21, 2012 9:09 pm, edited 1 time in total.
vladpalos
 
Posts: 25
Joined: Mon Oct 15, 2012 3:55 am

Re: Building Box2D Worlds?

Postby ibisum » Fri Dec 21, 2012 10:19 am

You know, its possible to unpack the WolfToss .ipa file and see for yourself how the resources are organized .. its maybe not something that we should *encourage* people to do, but the option is there, and by inspecting the contents of the .app package/lua/resources, you can see how the talented blokes who made WolfToss arranged the texture maps for the game .. okay, you can also access a fair bit of source too and it looks like the background maps are encoded as Lua tables, somehow. Poke around a bit and let us know what you find! ;)

EDIT: you can see the levels in the 'tilemap-editor-files/' sub-folder .. dunno why these .lua files aren't encrypted, but maybe its not entirely necessary ..
;
--
ibisum@gmail.com
Got a MOAI snippet? Please consider adding it to http://moaisnippets.info/
User avatar
ibisum
 
Posts: 1306
Joined: Mon Oct 17, 2011 1:11 am
Location: Vienna, Austria

Re: Building Box2D Worlds?

Postby vladpalos » Fri Dec 21, 2012 11:54 am

Wow great ! Why didn't I think of that ?!
Thank you! I was struggling for a week with this !
vladpalos
 
Posts: 25
Joined: Mon Oct 15, 2012 3:55 am

Re: Building Box2D Worlds?

Postby mr_j936 » Wed Dec 26, 2012 2:02 am

I have been trying to understand how to build layers and objects with these editors and then use code to make things move... but so far no luck. I am looking at samples and I am completely baffled :P

can someone write a tutorial or explain the concept a bit for me?
mr_j936
 
Posts: 11
Joined: Sat Dec 22, 2012 5:08 am

Re: Building Box2D Worlds?

Postby stun » Wed Dec 26, 2012 7:36 pm

I'm surprised nobody has mentioned R.U.B.E: https://www.iforce2d.net/rube/ which exports the world in a JSON format which is documented. I haven't got around to it yet, but did plan to try it out and build a MOAI loader which shouldn't be too hard I imagine.
1GAM Dev with MOAI for Android: http://fivevolthigh.com
stun
 
Posts: 199
Joined: Wed Jul 25, 2012 2:31 pm

Re: Building Box2D Worlds?

Postby ibisum » Thu Dec 27, 2012 5:15 am

I've used RUBE, and it is pretty nice, but I found it buggy (crashed a lot) and got frustrated with it .. also, it would be nice if it were open source.

I started my own Box2D world-editor project as part of the Metalab MOAI sessions here in Vienna a month or so ago, but it hasn't progressed very far. That said, all the basic pieces of the editor are in place - you can at least draw edges, albeit very rudimentary right now. If anyone likes the idea of doing a Box2D world editor in MOAI, it might be a good (or not) place to start:

https://github.com/seclorum/metalab_ses ... _never_die

Its not fancy, but if you get the inspiration it might lead to something bigger .. I'll probably come back to look at it in a few weeks, once I finish some commercial MOAI projects, so its definitely something on the horizon anyway ..
;
--
ibisum@gmail.com
Got a MOAI snippet? Please consider adding it to http://moaisnippets.info/
User avatar
ibisum
 
Posts: 1306
Joined: Mon Oct 17, 2011 1:11 am
Location: Vienna, Austria

Re: Building Box2D Worlds?

Postby nosheet » Thu Dec 27, 2012 2:30 pm

Wow, I didn't know about RUBE, definitely worth looking at. Even better to see that some interesting Moai-based efforts are on their way ! :)

There is also Level Helper, although it doesn't currently support Moai (however MOAI parser may be very easy to write as there is a Corona SDK export already).

So far, for level design, I use Illustrator or Inkscape to lay out elements, and then add physical properties at SVG Interactivity panel (Illustrator), or SVG Events ( Inkscape ). SVG file format (being XML) is fairly easy to parse, and there are couple of SVG-based level editors such as SVG Level Editor (for Corona) and LevelSVG for Cocos2D.
I have at various times in this forum announced that I'll publish my SVG importer for MOAI here but as in the meantime I have written entire high-level framework from scratch, I'll try to finish the framework, create some samples and tutorials and release everything together.
A quick preview of this functionality:
Image

Actually, these days I am looking for alternative for Illustrator (because of its price and high learning curve) and Inkscape (because its X11 based so I find it extremely user unfriendly on OSX), and was surprised that there is no OSX application in sub $100 range that features a full SVG export. There are a couple of really great vector graphic programs, very affordable (below $25), that would serve as perfect level editors should they supported full SVG export, so I got in touch with developers to see if this could be implemented (as SVG export itself is trivial to code).

Anyway, great to hear more alternatives here, and in the meantime I'll try to improve on SVG-based workflow and post the code to this forum once it's ***finally*** ready :)
N.
A few games I've made, just before I stopped making them:
http://www.spin-up-game.com and http://www.foosballhero.com
User avatar
nosheet
 
Posts: 421
Joined: Mon May 28, 2012 2:40 pm
Location: Madrid, Spain

Re: Building Box2D Worlds?

Postby ibisum » Thu Dec 27, 2012 4:34 pm

Whats wrong with Inkscape on OSX? I use it daily, its awesome .. okay, you have to tweak your clipboard settings in XQuartz, or else you'll slowly go mad when copying objects around (default behaviour: convert to bitmap .. suck!), but other than that I find it quite stable and very usable. Well, I'm a Linux nerd anyway, so I don't mind the X11 factor .. but in case you abandoned Inkscape coz you couldn't handle the bitmap copying, just wanted to point it out to you that once you get XQuartz configured, Inkscape behaves quite nicely on OSX. Also, don't copy/paste: duplicate!
;
--
ibisum@gmail.com
Got a MOAI snippet? Please consider adding it to http://moaisnippets.info/
User avatar
ibisum
 
Posts: 1306
Joined: Mon Oct 17, 2011 1:11 am
Location: Vienna, Austria

Re: Building Box2D Worlds?

Postby nosheet » Thu Dec 27, 2012 11:41 pm

@ibisum, thanks for the insights. :) i so wish to like inkscape as it's overall a great software, but x11 kills it for me, between weird keyboard shortcuts (that I failed to reconfigure to typical OSX cmd-based shortcuts), extremely slow display ( that they say will update with the next version) and awful font rendering and overall interface that looks like it came directly from 1993. It also tends to be as bloated as Illustrator. Ok this will sounds snobbish and spoiled, but if I am set to make some beautiful things, I need beautiful tools too, otherwise my inspiration wears down quickly and productivity + quality of my output drops significantly. :)
If it could get cleaned up a bit, interface reconfigured a bit to a better productivity ( UX design has gone long way since 90ies, :)) and published as native cocoa app, it would be hands down the best graphic editing tool ever.

Similar situation as with Blender, which I wrestled with some time ago, also so much wished to love but couldn't get pass its programmer-GUI (and I had over 15 years experience working in various 3D software packages). At the time, I actually wanted to write another GUI layer for Blender, but realised it's just too much of an effort :) It's a shame, because I would really like to include both of these in my workflow, and actually spent a last couple of days actively looking for good replacements for Photoshop/Illustrator/3D Studio Max combo that I'm used to work with (replacement = smaller, simpler software, and OSX only).

Oh well... :)
A few games I've made, just before I stopped making them:
http://www.spin-up-game.com and http://www.foosballhero.com
User avatar
nosheet
 
Posts: 421
Joined: Mon May 28, 2012 2:40 pm
Location: Madrid, Spain

Next

Return to Physics

Who is online

Users browsing this forum: No registered users and 0 guests

x