View Full Version : Level Creator Source
I am working on creating a Hooptie level creator and it goes well so far. Question: where can I find the source for the other editors floating around?
Pazolli
2002.10.06, 11:32 AM
The source to one such editor is available here (http://24.97.192.74/silverstreaksoftware/Hoopeditor.html), others have worked on editors but that is the only one I know where to find the source for. If you are working on an editor remember to take a look at the "map_values.rtf" in the "documentation" directory of the CVS. Otherwise most of the stuff you may want to know should be possible to work out from the sample set of levels, "Alan's Levels.hlvls" included both with the latest Hooptie release and available through the CVS. jnikolai (http://www.idevgames.com/forum/member.php?s=&action=getinfo&userid=65) was working on an editor but I haven't heard anything from him recently. It might be worth e-mailing him through his user profile to see if he has any advice/code to offer.
Cheers and of course good luck,
Mark.
Originally posted by Pazolli
jnikolai (http://www.idevgames.com/forum/member.php?s=&action=getinfo&userid=65) was working on an editor but I haven't heard anything from him recently. It might be worth e-mailing him through his user profile to see if he has any advice/code to offer.I emailed him. The biggest problem I have found thus far is making sure that the images are aligned to the grid. Any ideas? Perhaps find the mouse pos and then round it to the nearest vaild grid position?
ededed
2002.10.06, 02:56 PM
You should draw the tiles like the Hooptie GameView does.
flipflop
2002.10.07, 01:21 AM
I sent the files that I have to you jabber.
Sorry for being a flake... seems that work has gotten the better of me these past few weeks. My contract with Qpass expires on Oct. 31st and I was planning on getting some coding done then but I do need to find a job so that we can still pay the bills. :rolleyes:
Best of luck jabber! If you have any questions or any problems getting the files, please let me know.
Thank you eversomuch jnikolai! The bundle loading/saving saved me a lot of time/frustration/posts to the forum. I have the basic editor working and I *think* all of the hard stuff is behind me. All I have to do is add basic functionality (i.e. loading, erasing tiles, GUI improvments, etc.). Question: what is the name of that one new bot that flies and what is his level value?
Oh, one more question. Hooptie draws top to bottom, right?
Chris Burkhardt
2002.10.08, 04:52 PM
> Question: what is the name of that one new bot that flies and what is his level value?
That one is called the Hoverbot, and it is represented by the value '5' in the text levels (maybe you could update the "map_values.rtf" doc)
Kjurtyl
2002.10.08, 04:59 PM
The name of the second flying robot is Fly-botĘ of course! It is also known as the FlyBot and Hoverbot with varying capitalizations.
Really you can call it whatever you like, but I believe the "official" (is there any?) name is Fly-bot as it was the first one used to describe it. Much more important is it's level value which is 5.
As for the drawing, I believe Hooptie draws from top left to bottom right if I remember correctly. But the drawing is done in layers therefore I do suggest you look over the tech_explore file (if you haven't already ) for further details if you don't want to go rummaging into the code itself.
I'm sure Mark will be able to give you a much more detailed explanation on that topic.
- Kjurtyl.
flipflop
2002.10.08, 05:15 PM
I do want to help out still with the editor, jabber. One thing I wanted to add was a UI to move a level file up or down in the bundle, dynamicly renumbering / renaming the levels as it moves. The Snake Quest editor has this ability but I also wanted to see about adding a small snapshot of the level. This same UI can also be used to select a particular level to edit.
One note about the editor.old code I sent you. I do invert the map array read in from a level file. This was to make it easier to add objects to the array without having to do calculations. I believe (it has been a while so I may be wrong) that I'm using a lot of drawing code from the hoopite source so it should still be drawing from top left to bottom right.
Carlos Camacho
2002.10.08, 07:55 PM
jabber - In building your editor, you might want to have a look at the source code for "Level Creator." It was made for SpriteWorld and saves levels as resource files. However, looking at the code, I think you can get some good ideas for building a Cocoa-base level editor. Actually Level Creator is really nice little utility (you can get the compiled version of course.) Would love to see it Carbonized or moved to Cocoa and use standard file formats....
Cheers
Pazolli
2002.10.08, 08:52 PM
Originally posted by jabber
Oh, one more question. Hooptie draws top to bottom, right?
Hooptie draws a periodically sorted list, however it only needs to draw this way because of animation. My suggestion would be to make the objects all motionless in which case you can just draw the bases of the sprites first (top-to-bottom) and then the heads (top-to-bottom). Currently I'm planning on making some huge changes to the way Hooptie draws sprites because I want to use a more memory efficient and easier-to-program-for method. Under this new method, all of the images would be tied into 5 or so big images and you'd then pull-off the image you want (like most Carbon games do at the moment). I realize this isn't great news to be hearing at the moment, but it really needs to be done and hopefully once the change is made, substituting in the new model to the editor won't be too difficult.
Originally posted by Chris Burkhardt
That one is called the Hoverbot, and it is represented by the value '5' in the text levels (maybe you could update the "map_values.rtf" doc)
Done I already had the updated values on my hard disk, I just hadn't committed them to the CVS.
Cheers,
Mark.
Originally posted by Pazolli
Currently I'm planning on making some huge changes to the way Hooptie draws sprites because I want to use a more memory efficient and easier-to-program-for method. Under this new method, all of the images would be tied into 5 or so big images and you'd then pull-off the image you want (like most Carbon games do at the moment). I realize this isn't great news to be hearing at the moment, but it really needs to be done and hopefully once the change is made, substituting in the new model to the editor won't be too difficult.How would this mess up the editor? The map format would still be the same and the editor doesn't nessecarily have to draw like Hooptie does, as long as the image is in the right pos. Or am I missing something?
Originally posted by Camacho
jabber - In building your editor, you might want to have a look at the source code for "Level Creator." It was made for SpriteWorld and saves levels as resource files. However, looking at the code, I think you can get some good ideas for building a Cocoa-base level editor. Actually Level Creator is really nice little utility (you can get the compiled version of course.) Would love to see it Carbonized or moved to Cocoa and use standard file formats....That is a good idea and I don't think that it would be hard once I get the basic editor done. I will have to download Level Creator to get some ideas.
Chris Burkhardt
2002.10.08, 09:36 PM
Level Creator link: http://www.swarming.net/levelcreator/
It seems overkill for the simple/small maps that Hooptie uses, but it probably wouldn't be too hard to write a little plug-in that outputs the levels as the text files Hooptie uses. Then I could make Hooptie levels from the comfort of OS 9! I'll look into that.
Currently I'm planning on making some huge changes to the way Hooptie draws sprites because I want to use a more memory efficient and easier-to-program-for method. Under this new method, all of the images would be tied into 5 or so big images and you'd then pull-off the image you want (like most Carbon games do at the moment).Sounds good... I do tend to get lost whenever I venture into the code of the current method. And having all images in a seperate file is starting to become hard to manage.
I realize this isn't great news to be hearing at the moment, but it really needs to be done and hopefully once the change is made, substituting in the new model to the editor won't be too difficult.Better to make major changes now than later (actually, probably better to make them earlier than now.. ah well).
Done I already had the updated values on my hard disk, I just hadn't committed them to the CVS.Oh good :cool: BTW, I just visited the Inkubator website for the first time in a long time and noticed it changed. I like it... especially the online CVS instructions... I think I'm finally getting a very basic grasp on this silly UNIX stuff.
Originally posted by Chris Burkhardt
It seems overkill for the simple/small maps that Hooptie uses, but it probably wouldn't be too hard to write a little plug-in that outputs the levels as the text files Hooptie uses.If I (or someone else) were to write a Level Creator-like app, it would be seperate from the editor I am working on now. And it would be Cocoa, so you couldn't create Hooptie levels from the comfort of 9 :D But come now, Chris. Why don't you use X? Everyone else is doing it... ;)
Pazolli
2002.10.09, 04:03 AM
Originally posted by jabber
How would this mess up the editor? The map format would still be the same and the editor doesn't nessecarily have to draw like Hooptie does, as long as the image is in the right pos. Or am I missing something?
That's very true. It was only important if you were going to do something heavily reliant on Hooptie's graphics engine (which as you hinted at probably isn't a good idea). The only question then I guess, is if you want to put everything in a single image yourself. It's far less important than for Hooptie because the editor won't be animated and won't benefit as much from the optimization but it is simple to do and sometimes easier to work with. You just use "drawAtPoint: fromRect: operation: fraction:" instead of "drawAtPoint: operation: fraction:".
Cheers,
Mark
Originally posted by Pazolli
That's very true. It was only important if you were going to do something heavily reliant on Hooptie's graphics engine (which as you hinted at probably isn't a good idea). The only question then I guess, is if you want to put everything in a single image yourself. It's far less important than for Hooptie because the editor won't be animated and won't benefit as much from the optimization but it is simple to do and sometimes easier to work with. You just use "drawAtPoint: fromRect: operation: fraction:" instead of "drawAtPoint: operation: fraction:".Ah, good. You had me worried there for a minute :) Once I get the saving feature fully implemented, I think I will release it to you all for a test run. Just gotta find a server to host it...
Pazolli
2002.10.10, 01:54 AM
There is of course no problem hosting it all here through the Inkubator web site, just e-mail me it pazolli@idevgames.com.
WOOHOO! It all works! You can only have one level in a level bundle but that will change soon (hopefully). Mark, I will email it to you tomorrow (Friday) or Saturday.
Another question: what is the map value for the rock?
BTW, can I get any volunteers to make an icon for it? It is going to be called PenguinEdit.
Pazolli
2002.10.11, 09:01 AM
Originally posted by Pazolli
You just use "drawAtPoint: fromRect: operation: fraction:" instead of "drawAtPoint: operation: fraction:".
That should be "compositeToPoint: fromRect: operation: fraction:" instead of "compositeToPoint: operation: fraction:". If you use "drawAtPoint" you may well end-up with unexpected (buggy) behaviour. So use "compositeToPoint:" unless you know what you're doing.
Mark.
Sorry, no level editor yet. jnikolai and I are very close to making it able to have more than one level per level bundle.
Pazolli
2002.10.13, 05:23 AM
I've basically completed those changes I mentioned earlier about putting all the images together in master images. That change, along with others, has caused the game to peform better (which is great news). The changes so far can be downloaded in source form from the CVS and I'll release a new binary version of Hooptie with them soon (but I've still got some other changes I want to make before doing that).
Mark.
Kjurtyl
2002.10.13, 05:30 PM
Since the latest changes I've seen Hooptie's performance skyrocket.. Especially the bonus screen which now goes at blazingly fast speeds. When music is on it IS more playable but it still has a ways to go. Didn't think "Cocoa/Quartz" could ever be described as "blazingly fast", now did ya?
In fact, perhaps the bonus screen could go a tad slower but I am extremely satisfied with it's speed right now.
Here's a comparison of my previous performance test and the latest:
Old Test
0 - 59.3
1 - 27.0
2 - 9.5
3 - 1.1
4 - 2.1
5 - 0.5
New Test
0 - 98 74.2
1 - 24 18.2
2 - 10 7.6
Both without music, on the same old 350mhz Imac.
How's that for good news?
Although is it just me or are the blocks a touch darker now?
- Kjurtyl
Pazolli
2002.10.13, 09:37 PM
Originally posted by Kjurtyl
Since the latest changes I've seen Hooptie's performance skyrocket.. Especially the bonus screen which now goes at blazingly fast speeds. When music is on it IS more playable but it still has a ways to go. Didn't think "Cocoa/Quartz" could ever be described as "blazingly fast", now did ya?
In fact, perhaps the bonus screen could go a tad slower but I am extremely satisfied with it's speed right now.
Here's a comparison of my previous performance test and the latest:
Old Test
0 - 59.3
1 - 27.0
2 - 9.5
3 - 1.1
4 - 2.1
5 - 0.5
New Test
0 - 98 74.2
1 - 24 18.2
2 - 10 7.6
Both without music, on the same old 350mhz Imac.
How's that for good news?
That is very good news. I really managed to reduce the memory Hooptie uses by letting Cocoa decide what to do with the images rather than forcing it to keep copies of the image information in its memory and I think this far improved memory management may be what accounted for the great speed improvements.
Although is it just me or are the blocks a touch darker now?
No this is a real difference and is due to me using Adobe Photoshop 3 to work with the graphics. I think I'll need to ask Alan to touch up the images again, but I'm also going to add a few changes soon so that putting your changes to the graphics into effect is easier.
Mark.
DaFalcon
2002.10.14, 04:39 PM
Originally posted by jabber
BTW, can I get any volunteers to make an icon for it? It is going to be called PenguinEdit.
I made a "H edit" icon before, with the Hooptie icon H pixelated and then a kind of ice-text "edit". I can see about a different PenguinEdit icon if you want :)
Originally posted by DaFalcon
I made a "H edit" icon before, with the Hooptie icon H pixelated and then a kind of ice-text "edit". I can see about a different PenguinEdit icon if you want :) It would be wonderful if you could make a icon, though right now anything would work. On the other hand, perhaps I should be more worried about getting it working properly over getting an icon... ;)
Pazolli
2002.10.16, 09:51 AM
I mentioned earlier in this thread how Hooptie sorts its sprites before drawing them. Well previously it was doing this in a far from optimal manner, what I learnt in my Computer Science course has allowed me to better implement sorting. It's not going to radically improve the game speed, but I guess every little bit counts. The recent changes move Hooptie fairly close to what I consider being a polished game (though there is still a fair bit to implement) and I'd like to take the opportunity to thank everyone who has stuck with us for so long. But most of all I have to thank DaFalcon, whose loyalty and contribution to Hooptie has been absolutely amazing (especially for someone who started working on the project without an OS X Mac to the play the game on :)).
As always the binary release will hopefully come soon. Unfortunately my time will be limited over the next month, but I really hope you all hang around, it's been a long journey, I know, but we're really begining to see the worth of it now.
Mark. :)
Pazolli
2002.10.16, 09:58 AM
Originally posted by jabber
Another question: what is the map value for the rock?
"7" 0x37 - A rock
It's in the "map_values.rtf (http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/inkubator/hooptie/obj-c/documentation/map_values.rtf)", because of its size the rock is a sprite not a tile.
Mark. :)
DaFalcon
2002.10.17, 11:53 PM
Hey everyone,
Thanks for the kind words, Mark, I'm really just thrilled to have had the opportunity to work on this project and to see it continue to grow and help people learn to program great mac games ;-)
I will create that icon for you, jabber, but It'll take a lil while :-) Like Mark, I've got limited time over the next month. And for my birthday I got Kingdom Hearts, Jak & Daxter, Tony Hawk 3 and Sly Cooper (OK, so I bought three of those myself, but I called it a birthday present anyway! :)) all for the PS2, so I've been kinda pouring my free time into those. Man, what awesome graphics that machine pours out! What amazing game developers are cranking these games out! What fun :-) (What an expense! :()
Mark, let me know what needs to be done to clean up the graphics for Hooptie and I'll do that too when I get the chance :-)
flipflop
2002.10.20, 01:06 PM
Hey Mark,
Jabber and I are going to run into merging problems here soon as we are both working on the same source. I was wondering if we can use the Hooptie CVS tree to store the editor source so that CVS can do this for us.
One more question, how did you guys start Hooptie and CVS? Did you get something simple working first and THEN store it in CVS for public access or did you start using CVS right away and anyone could contribute to the source at any time?
Thanks!
- John
Pazolli
2002.10.20, 07:06 PM
Originally posted by jnikolai
Hey Mark,
Jabber and I are going to run into merging problems here soon as we are both working on the same source. I was wondering if we can use the Hooptie CVS tree to store the editor source so that CVS can do this for us.
Sure.
One more question, how did you guys start Hooptie and CVS? Did you get something simple working first and THEN store it in CVS for public access or did you start using CVS right away and anyone could contribute to the source at any time?
Something simple working and then stored it on the CVS.
flipflop
2002.11.04, 12:49 PM
Quick implementation question:
We want the ability to easily add new images to the editor AND not require the user to download the whole editor again. We are in the process of writing code to read in the tile and sprite images from what is currently in hooptie CVS. We are also creating a simple plist file so that we can select which image we are interested in reading and used for drawing in the editor from those image files. Once the code is in place we need to figure out the best way to install the new images to the editor.
(1) Since the user will need to download the new Hooptie with the new images we can use the Hooptie application bundle to get the images. This would require a new plist to tell the editor about the new images. At the start of the editor we will need to find the Hooptie application so we can read the image files. This information can then be stored in the users preference for further launchings of the editor.
(2) Have the user download the new images and plist for the editor.
(3) Force the user to download the editor again
(4) Have the editor be a part of the Hooptie game download (like Snake Quest). If they want the new version they will need to download the whole application.
Thoughts? Suggestions?
- John
ededed
2002.11.17, 04:07 PM
Here is my editor. There is an example level set with it. Save and load dont work and so just now command-s (or save) NSLog's the level data and you have to run it from project builder to get your finished level. It also doesnt load the tiles like it should but I have made some good levels with it and I will try and finish it soon.
Download it at
http://www.geocities.com/ed72678954/index.html
If anyone can give me any code to make it better please do...
furballphat
2002.11.18, 11:25 AM
That's a good editor. It's easy to use and seems quite powerful.
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.