| |||
Views: 86,391,941![]() |
![]() ![]() ![]() ![]() |
03-29-23 07:32 PM![]() |
|
Guest: Register | Login |
0 users currently in ROM Hacking Archives | 1 guest |
Main - ROM Hacking Archives - Kawa's Map Editor Creation Tutorial | New thread | New reply |
Kawa |
| ||
![]() ![]() CHIKKN NI A BAAZZKIT!!! 80's Cheerilee is best pony Level: 136 Posts: 3423/5344 EXP: 29958457 Next: 138458 Since: 02-20-07 From: The Netherlands Last post: 4104 days Last view: 2240 days |
You just keep learning, Aaendi. If you read carefully you see, from your last post, what basically amounts to "that shouldn't be too hard, good luck on that", and an admitted mistake.
So you just keep on truckin'. ____________________ Wife make lunch - Shampoo Opera - give it a spin Spare some of your free time? <GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered Kawa rocks ![]() |
Kawa |
| ||
![]() ![]() CHIKKN NI A BAAZZKIT!!! 80's Cheerilee is best pony Level: 136 Posts: 3482/5344 EXP: 29958457 Next: 138458 Since: 02-20-07 From: The Netherlands Last post: 4104 days Last view: 2240 days |
Well now. Since Aaendi is a little busy, shall we say, falling from grace, let's see if this thing can be improved a bit, with the simple to ask, hard to answer question...
What to do next in this tutorial? ____________________ Wife make lunch - Shampoo Opera - give it a spin Spare some of your free time? <GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered Kawa rocks ![]() |
zkip |
| |||
![]() Level: 15 Posts: 9/34 EXP: 13724 Next: 2660 Since: 02-13-10 Last post: 3785 days Last view: 2659 days |
|
Kawa |
| ||
![]() ![]() CHIKKN NI A BAAZZKIT!!! 80's Cheerilee is best pony Level: 136 Posts: 3564/5344 EXP: 29958457 Next: 138458 Since: 02-20-07 From: The Netherlands Last post: 4104 days Last view: 2240 days |
That would require a completely new tutorial, DBH. I like the idea though, and I might bite and do it. I think the main problem would be in rendering the objects.
"Similar to Lunar Magic", he says... Similar to every single Mario level editor that wasn't on the Game Boy, you mean! ![]() ____________________ Wife make lunch - Shampoo Opera - give it a spin Spare some of your free time? <GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered Kawa rocks ![]() |
GreyMaria |
| ||
![]() >implying even the Japanese understand the Japanese Level: 104 Posts: 2067/2851 EXP: 11531854 Next: 330272 Since: 07-13-07 Last post: 4103 days Last view: 4073 days |
Posted by Kawa This intrigues me. ____________________ we're currently experiencing some technical difficulties |
Kawa |
| ||
![]() ![]() CHIKKN NI A BAAZZKIT!!! 80's Cheerilee is best pony Level: 136 Posts: 4265/5344 EXP: 29958457 Next: 138458 Since: 02-20-07 From: The Netherlands Last post: 4104 days Last view: 2240 days |
Well, allow me to indulge you.
From what I've seen, every single Mario platformer that wasn't on the Game Boy used an object list based level format. SMB1, 2, 3, SMW, YI... Even SM64 counts, to some degree. On the other hand, SML uses a stripe system if I remember correctly, and SML2 was a plain tile map. Note that the object list is rendered to a tilemap for actual gameplay. How else would you break bricks or collect coins when that strip of bricks/coins is one single "coin" object with a >1 width? If you look at a RAM viewer, you can see the level as a plain tilemap of the kind this tutorial would let you edit. ____________________ Wife make lunch - Shampoo Opera - give it a spin Spare some of your free time? <GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered Kawa rocks ![]() |
spel werdz rite |
| ||
![]() ![]() Paratroopa Level: 30 Posts: 152/156 EXP: 149440 Next: 16429 Since: 02-19-07 Last post: 4411 days Last view: 696 days |
For MushROMs, I used a rather comprehensive switch statement to break down every object, and then jump to different codes where it would determine that specific object's properties and write it to a rectangular array containing of indexes of map16 tiles. The whole system is rather complex, but it works. Also, for a map editor, using unsafe code is strongly recommended. I haven't looked through the thread in a while, so it may have already been brought up/done, but I still felt it worth mention. |
Kawa |
| ||
![]() ![]() CHIKKN NI A BAAZZKIT!!! 80's Cheerilee is best pony Level: 136 Posts: 4266/5344 EXP: 29958457 Next: 138458 Since: 02-20-07 From: The Netherlands Last post: 4104 days Last view: 2240 days |
Posted by spel werdz riteCan you elaborate on that? Is it just the pointers? ____________________ Wife make lunch - Shampoo Opera - give it a spin Spare some of your free time? <GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered Kawa rocks ![]() |
spel werdz rite |
| ||
![]() ![]() Paratroopa Level: 30 Posts: 153/156 EXP: 149440 Next: 16429 Since: 02-19-07 Last post: 4411 days Last view: 696 days |
Yeah, it's pretty much pointers and working with the memory directly. It's major advantage is the speed. Cuts drawing time in about half to one-fourth depending on how well executed it is done. The down sides are the limits of what you can get pointers of, and the increased complexity of drawing. Both are minimal and barely weigh down the benefit. I would totally recommend against SetPixel and GetPixel for drawing. |
Kawa |
| ||
![]() ![]() CHIKKN NI A BAAZZKIT!!! 80's Cheerilee is best pony Level: 136 Posts: 4267/5344 EXP: 29958457 Next: 138458 Since: 02-20-07 From: The Netherlands Last post: 4104 days Last view: 2240 days |
Well put. Stupidly, SetPixel/GetPixel already cut drawing time in about half compared to DrawImage, at least in my observations. Still, well put. ____________________ Wife make lunch - Shampoo Opera - give it a spin Spare some of your free time? <GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered Kawa rocks ![]() |
spel werdz rite |
| ||
![]() ![]() Paratroopa Level: 30 Posts: 154/156 EXP: 149440 Next: 16429 Since: 02-19-07 Last post: 4411 days Last view: 696 days |
Once you use pointers, you'll realize how pathetic even Get/SetPixel is. There's a little more math involved, but it gets the job done if you're a competent programmer.
I may post a little tut on how to get it all done. |
Kawa |
| ||
![]() ![]() CHIKKN NI A BAAZZKIT!!! 80's Cheerilee is best pony Level: 136 Posts: 4268/5344 EXP: 29958457 Next: 138458 Since: 02-20-07 From: The Netherlands Last post: 4104 days Last view: 2240 days |
Go right ahead. ____________________ Wife make lunch - Shampoo Opera - give it a spin Spare some of your free time? <GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered Kawa rocks ![]() |
Stifu |
| ||
![]() ![]() Cobrat Level: 56 Posts: 331/666 EXP: 1317889 Next: 80287 Since: 02-22-07 Last post: 292 days Last view: 4 days |
Personally, I simply use an unsafe FastBitmap class (this is a slightly modified version of something I found on the net).
From the outside, you don't need to care about the details (OOP, yay) ; it's like the regular Bitmap class, except you have a Release method to call to unlock the Bitmap. I messed around trying to get a safe but still fast Bitmap class, and got quite good results, but not as good as the unsafe one. |
Kawa |
| ||
![]() ![]() CHIKKN NI A BAAZZKIT!!! 80's Cheerilee is best pony Level: 136 Posts: 4269/5344 EXP: 29958457 Next: 138458 Since: 02-20-07 From: The Netherlands Last post: 4104 days Last view: 2240 days |
Oh, how interesting ![]() * Kawa swipes it ____________________ Wife make lunch - Shampoo Opera - give it a spin Spare some of your free time? <GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered Kawa rocks ![]() |
Stifu |
| ||
![]() ![]() Cobrat Level: 56 Posts: 332/666 EXP: 1317889 Next: 80287 Since: 02-22-07 Last post: 292 days Last view: 4 days |
![]() Simple examples on how to use |
Chris |
| ||
![]() ![]() Goomba Level: 12 Posts: 7/20 EXP: 6758 Next: 1163 Since: 08-11-07 Last post: 3332 days Last view: 3332 days |
Many thanks goes to Kawa for the map editor tutorial. I actually found it quite useful.
However, I'm experiencing some issues in terms of drawing the images in my level editor (for AdvLolo). DrawImage() is clearly slow, for the most part. I tried looking at SetPixel(), but it too seemed quite slow. I'll try and take a look at FastBitmap, though. Hopefully that will get me someplace.. Sadly, having each block or sprite in a seperate .png file or whatever seems to work greatly, in terms of speed, than having everything thrown into one .png file altogether. At least, that's based off of what I've tested... |
Kawa |
| ||
![]() ![]() CHIKKN NI A BAAZZKIT!!! 80's Cheerilee is best pony Level: 136 Posts: 4314/5344 EXP: 29958457 Next: 138458 Since: 02-20-07 From: The Netherlands Last post: 4104 days Last view: 2240 days |
Having each block in its own Bitmap object is indeed fast, since DrawImage won't need to do any clipping from a larger tileset. ____________________ Wife make lunch - Shampoo Opera - give it a spin Spare some of your free time? <GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered Kawa rocks ![]() |
Stifu |
| ||
![]() ![]() Cobrat Level: 56 Posts: 340/666 EXP: 1317889 Next: 80287 Since: 02-22-07 Last post: 292 days Last view: 4 days |
The FastBitmap class is not a replacement for the DrawImage method. It just makes GetPixel and SetPixel much faster. But once your image is created, you should keep the Bitmap and drop the FastBitmap, and you should still use DrawImage.
Do not use GetPixel or SetPixel for each control repaint, whether with Bitmap or FastBitmap. If you're already caching as much stuff as you can, I think you should just look into clipping, so you don't fully repaint the control when it should only be partially repainted. Edit: I forgot one detail: to optimize performances further, ensure all your Bitmaps use PixelFormat.Format32bppPArgb. |
Ailure |
| ||
![]() Hats Steam Board2 group Level: 120 Posts: 3650/3965 EXP: 19148782 Next: 338389 Since: 02-19-07 From: Sweden, Skåne Last post: 2907 days Last view: 1658 days |
Posted by KawaLate reply, but it can be easily transfered over into Java. Hell I can make a Java version of the example code if I'd bothered to. Posted by DarkBoyHackerPretty much how I would do it myself. Kawa's solution is good for tilebased games (like advance wars) but not for games like Super Mario World where things are object-based. I done this a few times already, just not with hacking related projects. :/ ____________________ AIM: gamefreak1337, MSN: Emil_sim@spray.se, XMPP: ailure@xmpp.kafuka.org
|
Main - ROM Hacking Archives - Kawa's Map Editor Creation Tutorial | New thread | New reply |
© 2005-2023 Acmlm, blackhole89, Xkeeper et al. |
MySQL - queries: 69, rows: 96/99, time: 0.035 seconds. |