Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,813,901
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 06-20-24 06:47 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

Pages: 1 2 3

Kawa
Posted on 03-24-10 09:40 PM Link | Quote | ID: 128818


CHIKKN NI A BAAZZKIT!!!
80's Cheerilee is best pony
Level: 138

Posts: 3423/5344
EXP: 31081005
Next: 581976

Since: 02-20-07
From: The Netherlands

Last post: 4553 days
Last view: 2688 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 — byuu

Kawa
Posted on 03-29-10 05:18 PM Link | Quote | ID: 129168


CHIKKN NI A BAAZZKIT!!!
80's Cheerilee is best pony
Level: 138

Posts: 3482/5344
EXP: 31081005
Next: 581976

Since: 02-20-07
From: The Netherlands

Last post: 4553 days
Last view: 2688 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 — byuu

zkip
Posted on 04-11-10 02:14 AM Link | Quote | ID: 129734


Level: 15

Posts: 9/34
EXP: 14353
Next: 2031

Since: 02-13-10

Last post: 4234 days
Last view: 3108 days


~zkip:
Well, I may be a little late, but

What to do next in this tutorial?


If you are asking what we want to see next. Would an OOP interface be too much? Like insted of the actual tile drawing, having the tiles be standalone objects where you can move them. Similar to Lunar Magic, I guess..

____________________



Kawa
Posted on 04-11-10 04:18 PM Link | Quote | ID: 129752


CHIKKN NI A BAAZZKIT!!!
80's Cheerilee is best pony
Level: 138

Posts: 3564/5344
EXP: 31081005
Next: 581976

Since: 02-20-07
From: The Netherlands

Last post: 4553 days
Last view: 2688 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 — byuu

GreyMaria
Posted on 11-03-10 04:58 AM Link | Quote | ID: 137625

>implying even the Japanese understand the Japanese
Level: 105

Posts: 2067/2851
EXP: 11974466
Next: 287794

Since: 07-13-07

Last post: 4552 days
Last view: 4522 days
Posted by Kawa
Similar to every single Mario level editor that wasn't on the Game Boy, you mean!


This intrigues me.

____________________
we're currently experiencing some technical difficulties

Kawa
Posted on 11-03-10 01:59 PM Link | Quote | ID: 137630


CHIKKN NI A BAAZZKIT!!!
80's Cheerilee is best pony
Level: 138

Posts: 4265/5344
EXP: 31081005
Next: 581976

Since: 02-20-07
From: The Netherlands

Last post: 4553 days
Last view: 2688 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 — byuu

spel werdz rite
Posted on 11-03-10 07:28 PM Link | Quote | ID: 137634


Paratroopa
Level: 30

Posts: 152/156
EXP: 155038
Next: 10831

Since: 02-19-07

Last post: 4860 days
Last view: 1145 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
Posted on 11-03-10 07:35 PM Link | Quote | ID: 137635


CHIKKN NI A BAAZZKIT!!!
80's Cheerilee is best pony
Level: 138

Posts: 4266/5344
EXP: 31081005
Next: 581976

Since: 02-20-07
From: The Netherlands

Last post: 4553 days
Last view: 2688 days
Posted by spel werdz rite
Also, for a map editor, using unsafe code is strongly recommended.
Can 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 — byuu

spel werdz rite
Posted on 11-03-10 09:30 PM Link | Quote | ID: 137636


Paratroopa
Level: 30

Posts: 153/156
EXP: 155038
Next: 10831

Since: 02-19-07

Last post: 4860 days
Last view: 1145 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
Posted on 11-03-10 09:34 PM Link | Quote | ID: 137637


CHIKKN NI A BAAZZKIT!!!
80's Cheerilee is best pony
Level: 138

Posts: 4267/5344
EXP: 31081005
Next: 581976

Since: 02-20-07
From: The Netherlands

Last post: 4553 days
Last view: 2688 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 — byuu

spel werdz rite
Posted on 11-03-10 09:38 PM Link | Quote | ID: 137638


Paratroopa
Level: 30

Posts: 154/156
EXP: 155038
Next: 10831

Since: 02-19-07

Last post: 4860 days
Last view: 1145 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
Posted on 11-03-10 09:39 PM Link | Quote | ID: 137639


CHIKKN NI A BAAZZKIT!!!
80's Cheerilee is best pony
Level: 138

Posts: 4268/5344
EXP: 31081005
Next: 581976

Since: 02-20-07
From: The Netherlands

Last post: 4553 days
Last view: 2688 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 — byuu

Stifu
Posted on 11-03-10 10:00 PM Link | Quote | ID: 137640


Cobrat
Level: 56

Posts: 331/666
EXP: 1367283
Next: 30893

Since: 02-22-07

Last post: 741 days
Last view: 363 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
Posted on 11-03-10 10:01 PM Link | Quote | ID: 137641


CHIKKN NI A BAAZZKIT!!!
80's Cheerilee is best pony
Level: 138

Posts: 4269/5344
EXP: 31081005
Next: 581976

Since: 02-20-07
From: The Netherlands

Last post: 4553 days
Last view: 2688 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 — byuu

Stifu
Posted on 11-03-10 10:06 PM Link | Quote | ID: 137642


Cobrat
Level: 56

Posts: 332/666
EXP: 1367283
Next: 30893

Since: 02-22-07

Last post: 741 days
Last view: 363 days


Simple examples on how to use

Chris
Posted on 11-21-10 09:43 AM (rev. 2 of 11-21-10 09:54 AM) Link | Quote | ID: 138039


Goomba
Level: 12

Posts: 7/20
EXP: 7019
Next: 902

Since: 08-11-07

Last post: 3781 days
Last view: 3781 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
Posted on 11-21-10 02:46 PM Link | Quote | ID: 138046


CHIKKN NI A BAAZZKIT!!!
80's Cheerilee is best pony
Level: 138

Posts: 4314/5344
EXP: 31081005
Next: 581976

Since: 02-20-07
From: The Netherlands

Last post: 4553 days
Last view: 2688 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 — byuu

Stifu
Posted on 11-21-10 05:20 PM (rev. 2 of 11-21-10 05:43 PM) Link | Quote | ID: 138047


Cobrat
Level: 56

Posts: 340/666
EXP: 1367283
Next: 30893

Since: 02-22-07

Last post: 741 days
Last view: 363 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
Posted on 12-03-10 11:57 PM Link | Quote | ID: 138346

Hats
Steam Board2 group
Level: 121

Posts: 3650/3965
EXP: 19866106
Next: 190590

Since: 02-19-07
From: Sweden, Skåne

Last post: 3356 days
Last view: 2107 days
Posted by Kawa
That doesn't matter now.

What I wonder though, is how easy the principles in this thread so far can be practically used in other languages (besides VB.Net).
Late 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 DarkBoyHacker
Well, I may be a little late, but

What to do next in this tutorial?


If you are asking what we want to see next. Would an OOP interface be too much? Like insted of the actual tile drawing, having the tiles be standalone objects where you can move them. Similar to Lunar Magic, I guess..
Pretty 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

Pages: 1 2 3


Main - ROM Hacking Archives - Kawa's Map Editor Creation Tutorial New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.029 seconds. (324KB of memory used)
MySQL - queries: 69, rows: 96/99, time: 0.019 seconds.