Goplanes

Announce (tech) demos or games releases

Moderator: Mask of Destiny

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Fri Jun 01, 2012 1:28 pm

Development update:

Currently figuring out a level-making production pipeline. At the moment all the objects positions are hard coded. So I have to come up with a more flexible system, using a map editor for object placement level and exporting placements to C. I've been using Mappy for making and exporting levels and I had originally planned to use its object editing. Unfortunately the object editing feature is very cumbersome and not very efficient to use. I'm in the process of figuring out a solution using it's Lua support. Hopefully I'll be able to jerry rig something that works better than what I have now.

So, yeah, I'm back to fighting with tools. :)

I had also thought about using Tiled http://www.mapeditor.org/ as suggested by Chilly Willy. But then I'd have to go and learn another tool, learning another plug in architecture, etc. etc. I think I'll tough it out with Mappy for now, but I'll keep Tiled in mind. I'll definitely look into Tiled if ever I start a new project.

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Sun Jun 03, 2012 1:04 am

Changed my mind. Decided to check out Tiled more in depth. Downloaded the Tiled source code and QT Creator. It compiled and ran on my first try! Absolutely amazing. In my experience that rarely happens. Had a bit of trouble configuring it so that I could debug properly, but Google and Stack Overflow helped out. I needed to install Debugging Tools For Windows and then poke around with settings. But now it works, so good.

Creating a new plugin for Goplanes was pretty straightforward. And now I'm in the middle of exporting C source and headers. Going pretty well so far.

QT Creator is a pretty decent IDE.

I guess changing tools wasn't so bad after all!

The interesting thing about Tiled is that it's open source. I think I'll spend some time figuring out if I can add an editing mode to flip tiles vertically and horizontally, plus maybe set a palette, and then export that into a Genesis friendly format. But first I have to get everything working to how it was before looking into adding new features.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sun Jun 03, 2012 6:02 am

Tiled supports flipping, and now rotation of tiles. From the spec page...
When you use the tile flipping feature added in Tiled Qt 0.7.0, the highest two bits of the gid store the flipped state. Bit 32 is used for storing whether the tile is horizontally flipped and bit 31 is used for the vertically flipped tiles. And since Tiled Qt 0.8.0, bit 30 means whether the tile is flipped (anti) diagonally, enabling tile rotation. These bits have to be read and cleared before you can find out which tileset a tile belongs to.
I don't see using the rotation on the MD, but the tile flipping fits perfectly.

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Sun Jun 03, 2012 12:26 pm

Awesome!

So much work saved!

sega16
Very interested
Posts: 251
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 » Sun Jun 03, 2012 4:56 pm

djcouchycouch your lucky I wish I could be so focused on a project but for me when something becomes difficult I sometimes end up moving on another project. I try not to though.

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Sun Jun 03, 2012 5:01 pm

sega16 wrote:djcouchycouch your lucky I wish I could be so focused on a project but for me when something becomes difficult I sometimes end up moving on another project. I try not to though.
Do like me and have a baby! :)

Then you'll realize you've only got 2 hours out of the day to yourself and you don't want to waste it :)

But seriously, it's certainly helped in keeping me focused. It seems the more free time I have, the more I waste it doing nothing.

sega16
Very interested
Posts: 251
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 » Sun Jun 03, 2012 5:48 pm

djcouchycouch wrote: Do like me and have a baby! :)

Then you'll realize you've only got 2 hours out of the day to yourself and you don't want to waste it :)

But seriously, it's certainly helped in keeping me focused. It seems the more free time I have, the more I waste it doing nothing.
Literally? Or is this a joke? :oops:

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Sun Jun 03, 2012 5:51 pm

Totally true. I have been so much more productive with my personal projects with a baby that I have been without.

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Sun Jun 03, 2012 8:04 pm

There, fully switched over to using Tiled from Mappy. That was definitely a good move. It had the side effect of improving and simplifying Goplanes code and resource use.

Ricky
Interested
Posts: 23
Joined: Tue May 22, 2012 10:09 am

Post by Ricky » Mon Jun 04, 2012 2:02 am

djcouchycouch wrote:There, fully switched over to using Tiled from Mappy. That was definitely a good move. It had the side effect of improving and simplifying Goplanes code and resource use.
can you give us any tips on how you got your setup arranged?

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Mon Jun 04, 2012 1:54 pm

Here goes:

For coding I'm using Visual Studio 2010. I made a dummy solution that contains my project files and all the SGDK files. Having all the files in a solution makes for searching easier. Other benefits include auto-completion of types. It doesn't always work in every case but often enough to be helpful.

To compile, I've set up an external tool in Visual Studio to call a batch file whenever I hit F6. That batch file calls SGDK compiler in the Goplanes code folder.

As for graphics, to modify the existing sprites and to create new ones, I'm using Graphics Gale (http://www.humanbalance.net/gale/us/). It supports and exports to 16 color bitmaps, which is sweet. It's a pretty good tool. I've done all the sprite effects with it so far.

I'm using SGDK's genres support to import sprite bitmaps using the resource.rc file. I wish I didn't have the same extension as a Visual Studio resource file :) Whenever I accidentally load it in Visual Studio, it tries to interpret it as Win32 resources (dialogs, text, etc.) and that fails. Not a big deal, though.

For building levels, I've used Mappy since the beginning because that's what seemed to be the tile editor most used around here. I took Kaneda's MDPPY's exporter plugin, added support to export C code, called it MDPPY++ and released it here http://dl.dropbox.com/u/17303735/MDPPY% ... 01.1.0.zip. I kept working on the plugin but now it's pretty much geared for exporting to Goplanes. So it's not really a generic plugin anymore.

I export tilemap data to C arrays and structures. I'm not using genres's support for Mappy's format since it doesn't fit my usage.

Mappy was workable at first but I got tired of some of its limitations so I decided to look around for an alternative. At Chilly Willy's suggestion, I looked at Tiled. http://www.mapeditor.org/.

Tiled is open source, and supports external exporters as DLL written in C++. Getting it compiled and running was incredibly smooth. It's written in QT Creator which I never used before but it was pretty straightforward to install and get running. Getting debugging to work took about a half hour to figure out but after that everything was fine.

It went so well I ended up writing two plugins for Goplanes for Tiled, a tilemap exporter and an object spawn point exporter. I thought moving to Tiled would be a big pain in the ass, but now I'm much more ahead now than I was with Mappy.

For emulation, I'm using a modified version Kaneda's Gens KMod. Orignal: http://gendev.spritesmind.net/page-gensK.html. I first added Visual Studio 2010 support to it, that version found here: http://dl.dropbox.com/u/17303735/gensKM ... io2010.zip.

I then added fixes to things I found annoying. I don't remember the entire list off hand, but I added things like:
- save the restore the position of the debug window
- toggled the debug window with a hotkey
- removed the 32k limitation of the debug window output. it's not perfect, but at least I don't have to manually clear the window whenever the text box is full, which happened often.

I should put up that version on my Dropbox so that people can get to it.

What else? I'm running on a Mac so I have a Windows XP install running in Virtual Box. The only problem that's been causing me is Virtual Box's iffy OpenGL/DirectX support. Some emulators don't work well since they can't instantiate a primary buffer. Getting Gens to work involved changing the display settings to 16-bit color.

That should be it!

If you have any questions, I'll do my best to answer them.

Ricky
Interested
Posts: 23
Joined: Tue May 22, 2012 10:09 am

Post by Ricky » Mon Jun 04, 2012 4:34 pm

djcouchycouch wrote:Here goes:

For coding I'm using Visual Studio 2010. I made a dummy solution that contains my project files and all the SGDK files. Having all the files in a solution makes for searching easier. Other benefits include auto-completion of types. It doesn't always work in every case but often enough to be helpful.

To compile, I've set up an external tool in Visual Studio to call a batch file whenever I hit F6. That batch file calls SGDK compiler in the Goplanes code folder.

As for graphics, to modify the existing sprites and to create new ones, I'm using Graphics Gale (http://www.humanbalance.net/gale/us/). It supports and exports to 16 color bitmaps, which is sweet. It's a pretty good tool. I've done all the sprite effects with it so far.

I'm using SGDK's genres support to import sprite bitmaps using the resource.rc file. I wish I didn't have the same extension as a Visual Studio resource file :) Whenever I accidentally load it in Visual Studio, it tries to interpret it as Win32 resources (dialogs, text, etc.) and that fails. Not a big deal, though.

For building levels, I've used Mappy since the beginning because that's what seemed to be the tile editor most used around here. I took Kaneda's MDPPY's exporter plugin, added support to export C code, called it MDPPY++ and released it here http://dl.dropbox.com/u/17303735/MDPPY% ... 01.1.0.zip. I kept working on the plugin but now it's pretty much geared for exporting to Goplanes. So it's not really a generic plugin anymore.

I export tilemap data to C arrays and structures. I'm not using genres's support for Mappy's format since it doesn't fit my usage.

Mappy was workable at first but I got tired of some of its limitations so I decided to look around for an alternative. At Chilly Willy's suggestion, I looked at Tiled. http://www.mapeditor.org/.

Tiled is open source, and supports external exporters as DLL written in C++. Getting it compiled and running was incredibly smooth. It's written in QT Creator which I never used before but it was pretty straightforward to install and get running. Getting debugging to work took about a half hour to figure out but after that everything was fine.

It went so well I ended up writing two plugins for Goplanes for Tiled, a tilemap exporter and an object spawn point exporter. I thought moving to Tiled would be a big pain in the ass, but now I'm much more ahead now than I was with Mappy.

For emulation, I'm using a modified version Kaneda's Gens KMod. Orignal: http://gendev.spritesmind.net/page-gensK.html. I first added Visual Studio 2010 support to it, that version found here: http://dl.dropbox.com/u/17303735/gensKM ... io2010.zip.

I then added fixes to things I found annoying. I don't remember the entire list off hand, but I added things like:
- save the restore the position of the debug window
- toggled the debug window with a hotkey
- removed the 32k limitation of the debug window output. it's not perfect, but at least I don't have to manually clear the window whenever the text box is full, which happened often.

I should put up that version on my Dropbox so that people can get to it.

What else? I'm running on a Mac so I have a Windows XP install running in Virtual Box. The only problem that's been causing me is Virtual Box's iffy OpenGL/DirectX support. Some emulators don't work well since they can't instantiate a primary buffer. Getting Gens to work involved changing the display settings to 16-bit color.

That should be it!

If you have any questions, I'll do my best to answer them.
great :) I guess I'll write my own plugins for Tile then. To fix the *.rc problem I just renamed it *.mdrc and the genres program could care less what the file extension is and CodeBlocks isn't bugging me trying to compile a windows resource file ;) I use graphics gale too, it is a really nice program. Alright thanks for the reply, I'll see you in a bit :D

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Sun Jun 10, 2012 2:24 am

This week was pretty light, development wise. Did some refactoring of player spawning. Now I'm using the object spawn points that I place in Tiled instead of hardcoding the positions. Removed a few related functions that I don't need anymore.

Also started watching this VGM Music Maker tutorial. http://youtu.be/Zrw34nz5NkY.

That's pretty much it!

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sun Jun 10, 2012 4:13 am

I'm glad Tiled is working so well for you. Do you plan to release the exporters you made? Maybe the code so linux versions could be made? I guess you did the exporters so you wouldn't need to deal with XML on the MD directly.

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Sun Jun 10, 2012 10:45 am

Chilly Willy wrote:I'm glad Tiled is working so well for you. Do you plan to release the exporters you made? Maybe the code so linux versions could be made? I guess you did the exporters so you wouldn't need to deal with XML on the MD directly.
I'd like to release the code for the exporters. They're pretty simple at the moment, but I'm sure it'll help out others.

I've posted on the Tiled mailing list wondering how best to release the code. It's an open source project so I figure the exporters should be open source too, but since my plugins are specific to my needs I'm not sure it should go into the Tiled project. So I've asked for some clarification.

As soon as I know, I'll put up the source code somewhere.

Post Reply