Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,472,605
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-23-24 07:21 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: 30938337
Next: 724644

Since: 02-20-07
From: The Netherlands

Last post: 4495 days
Last view: 2631 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: 30938337
Next: 724644

Since: 02-20-07
From: The Netherlands

Last post: 4495 days
Last view: 2631 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: 14273
Next: 2111

Since: 02-13-10

Last post: 4176 days
Last view: 3050 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: 30938337
Next: 724644

Since: 02-20-07
From: The Netherlands

Last post: 4495 days
Last view: 2631 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: 11918235
Next: 344025

Since: 07-13-07

Last post: 4494 days
Last view: 4464 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: 30938337
Next: 724644

Since: 02-20-07
From: The Netherlands

Last post: 4495 days
Last view: 2631 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: 154326
Next: 11543

Since: 02-19-07

Last post: 4802 days
Last view: 1087 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: 30938337
Next: 724644

Since: 02-20-07
From: The Netherlands

Last post: 4495 days
Last view: 2631 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: 154326
Next: 11543

Since: 02-19-07

Last post: 4802 days
Last view: 1087 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: 30938337
Next: 724644

Since: 02-20-07
From: The Netherlands

Last post: 4495 days
Last view: 2631 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: 154326
Next: 11543

Since: 02-19-07

Last post: 4802 days
Last view: 1087 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: 30938337
Next: 724644

Since: 02-20-07
From: The Netherlands

Last post: 4495 days
Last view: 2631 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: 1361005
Next: 37171

Since: 02-22-07

Last post: 683 days
Last view: 305 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: 30938337
Next: 724644

Since: 02-20-07
From: The Netherlands

Last post: 4495 days
Last view: 2631 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: 1361005
Next: 37171

Since: 02-22-07

Last post: 683 days
Last view: 305 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: 6986
Next: 935

Since: 08-11-07

Last post: 3723 days
Last view: 3723 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: 30938337
Next: 724644

Since: 02-20-07
From: The Netherlands

Last post: 4495 days
Last view: 2631 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: 1361005
Next: 37171

Since: 02-22-07

Last post: 683 days
Last view: 305 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: 19774939
Next: 281757

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

Last post: 3298 days
Last view: 2049 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.060 seconds. (322KB of memory used)
MySQL - queries: 69, rows: 96/99, time: 0.045 seconds.