Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,493,429
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-27-24 04:45 PM
Guest: Register | Login

Main - Posts by Kawa

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189

Kawa
Posted on 05-21-09 06:15 PM, in Kawa's Map Editor Creation Tutorial Link | Quote | ID: 107387


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

Posts: 1843/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
I had the same idea.

So what should be in Part 2, people?

____________________
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 05-21-09 06:37 PM, in Wolfram|Alpha (rev. 2 of 05-21-09 06:42 PM) Link | Quote | ID: 107390


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

Posts: 1844/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
I dare you to read the answer to life, the universe and everything in a Data voice.

Speaking of Data, there are apparently 47 species of African swallows according to the error message I got when I asked about the airspeed velocity of an unladen swallow, formed as an actual question.

Baby don't hurt me...


____________________
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 05-21-09 06:44 PM, in I can't wait to bomb some dodongos! Link | Quote | ID: 107391


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

Posts: 1845/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
Posted by James Freeman
I'm using apple quicktime, and it isn't working for me. Which is surprising, because that's what Firefox recommended...
I think the problem is obvious here. Take your pick, Quicktime or Firefox.

____________________
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 05-21-09 08:00 PM, in General Sup Thread. Link | Quote | ID: 107398


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

Posts: 1846/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
Sup maggots.

____________________
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 05-21-09 08:01 PM, in Kawa's Map Editor Creation Tutorial Link | Quote | ID: 107399


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

Posts: 1847/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
I should do that for the OpenPoké map editor first so I know what to do. Redrawing the whole map takes some time, so I think keeping a list of changes per stroke would be a nice starting point.

____________________
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 05-21-09 08:34 PM, in lets talk about the modern and powerful tools you use (rev. 2 of 05-21-09 08:35 PM) Link | Quote | ID: 107404


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

Posts: 1848/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
I call shenagigans. Last time I ran Notepad on Linux it was slow as shit.

Use of Wine implied.

Edit: On a two ghz machine!

____________________
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 05-21-09 09:43 PM, in Kawa's Map Editor Creation Tutorial Link | Quote | ID: 107407


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

Posts: 1849/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
Screw that, that's just an interface paradigm choice. A simple tutorial map editor wouldn't ever reach the point where menus and toolbars are insufficient.

____________________
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 05-21-09 09:59 PM, in Kawa's Map Editor Creation Tutorial Link | Quote | ID: 107410


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

Posts: 1850/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
Events are a good topic to cover at any rate, and I might go onto it in more detail later.


For now, here's a quickie take on it:

Intermission -- Events

  1. Define an Event class. Specific kinds of events can be subclassed from this base class.
  2. It should have at the very least a property to track the event's location on the map. Point or pair of ints, doesn't really matter here.
  3. Add to the map editor a List<Event> variable to store them in.
  4. Add an EventBackbuffer and EventGraphics object. This will be used to draw the events on, in a transparant image.
  5. Add FinalBackbuffer and FinalGraphics objects as well. The basic idea is to draw the map and events on seperate layers, then simply merge them onto the final layer and show that. Makes changing their contents faster, since you don't have to worry about redrawing the one when you change the other.
  6. Add a "currently holding" variable of the Event type.
  7. On mousedown, set "currently holding" to Null and iterate through the events list, comparing coordinates to the cursor's. If you find one, set the currently holding var to that Event and stop. I suggest using an "event mode" bool here.
  8. On mousemove, if the currently holding var is not null, set its' position to the cursor coordinates and call your Event Redraw function.

The graphics should run something like this:
On load, redraw the entire map.
After redrawing the entire map, call the event drawer.
After drawing the events, call the final merger.
The final merger simply blits the map and events to the final buffer in that order and calls picMap.Refresh() as before.
On drawing a tile, blit that single tile to the map buffer as before, then call the merger.
On moving an event, call the event drawer, which in turn calls the merger.
The event drawer just iterates and draws rectangles or whatever.

My fingers hurt now.

____________________
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 05-22-09 04:04 PM, in Kawa's Map Editor Creation Tutorial Link | Quote | ID: 107436


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

Posts: 1851/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
I've thought about undo buffers some more and decided on a hybrid approach. I'll implement it in the OpenPoké map editor, then write up Part 2 of the tutorial. Is that okay?

____________________
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 05-22-09 04:07 PM, in Cute image thread #546257 Link | Quote | ID: 107437


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

Posts: 1852/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
Well, that can't be good.

For those with diabeetus, that is.

____________________
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 05-22-09 04:12 PM, in Jetpack (DOS) Link | Quote | ID: 107438


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

Posts: 1853/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
Hey, that's actually a very nice concept you went with there.

* Kawa applauds

____________________
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 05-22-09 06:37 PM, in Contra One-Level Demo Link | Quote | ID: 107452


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

Posts: 1854/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
Rule #1. No linking to ROM files. Use IPS patches instead.

____________________
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 05-22-09 08:49 PM, in lets talk about the modern and powerful tools you use Link | Quote | ID: 107456


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

Posts: 1855/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
Y'have to admit, it makes an adequate webserver.

____________________
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 05-23-09 12:06 PM, in Kawa's Map Editor Creation Tutorial Link | Quote | ID: 107482


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

Posts: 1856/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days

Part 2 - Undo Buffers


To undo changes, we'll need something to track them in. Since redrawing the entire map can be slow (depending on the map's size ofcourse), we'll basically take screenshots of each operation, before and after. These will be part of each undo state. Not to be too wasteful, we'll not save copies of the entire map array.
	//One single change of the map
class TileChange
{
public int X { get; set; }
public int Y { get; set; }
public int From { get; set; }
public int To { get; set; }
public TileChange(int x, int y, int from, int to)
{
X = x;
Y = y;
From = from;
To = to;
}
}

//One "brush stroke" worth of edits, from mousedown to mouseup.
class UndoState
{
public Bitmap Before { get; set; }
public Bitmap After { get; set; }
public List<TileChange> Changes { get; set; }
public UndoState()
{
Changes = new List<TileChange>();
}
We need "before" and "after" to implement Redo, by the way. If you don't want Redo (why?) you can save a lot of space by removing UndoState.After and TileChange.To. Now, any way, we need some functions to use these things. But first, add two stacks of UndoStates to your editor.
	Stack<UndoState> UndoBuffer = new Stack<UndoState>();
Stack<UndoState> RedoBuffer = new Stack<UndoState>();
The Undo stack will continuously fill with changes. When you undo, we pop the last one, apply it, then push it on the Redo stack, which is cleared every time we change something. Get it so far? Now for those functions...
		public void StartUndo()
{
RedoBuffer.Clear();
NewUndo = new UndoState();
NewUndo.Before = (Bitmap)MapBackbuffer.Clone();
}
It seems fairly obvious what this one does...
		public void AddTileUndo(int x, int y, int from, int to)
{
NewUndo.Changes.Add(new TileChange(x, y, from, to));
}
As does this one...
		public void CommitUndo()
{
NewUndo.After = (Bitmap)MapBackBuffer.Clone();
UndoBuffer.Push(NewUndo);
}
Take another screenshot and push the result...
		public void Undo()
{
if (UndoBuffer.Count == 0)
return;
UndoState ThisUndo = UndoBuffer.Pop();
ApplyUndo(ThisUndo, false);
RedoBuffer.Push(ThisUndo);
mapPictureBox.Refresh();
}

This one's important, it gets extra spacing:
		private void ApplyUndo(UndoState buffer, bool redo)
{
MapGraphics.DrawImageUnscaled(redo ? buffer.After : buffer.Before, 0, 0);
foreach (TileChange c in buffer.Changes)
{
int x = c.X;
int y = c.Y;
int tile = redo ? c.To : c.From;
if (x < 0 || x >= MapWidth || y < 0 || y >= MapHeight)
continue;
Map[x, y] = tile;
}
}
You can see that if redo is True, we use the "after" data instead. With this information, I guess I can leave the Redo function a challenge for the reader

Now, let's hook this system up.
  • Unhook the mousedown event handler and make a new one. It should check for pressing the left mouse button. If so, call StartUndo, then call mapPictureBox_MouseMove with the same sender and eventargs.
  • In the mousemove event handler, before making the actual changes to the map data, call AddTileUndo(x, y, Map[x, y], CurrentTile).
  • Add a mouseup event, again checking for the left mouse button. If so, call CommitUndo.
  • Add two controls (menu items preferred) to call Undo and Redo with. For added bonus, you can disable them easily with, for example, undoToolStripMenuItem.Enabled = (UndoBuffer.Count > 0);


____________________
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 05-23-09 01:08 PM, in Compression types used in games (rev. 2 of 05-23-09 01:16 PM) Link | Quote | ID: 107485


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

Posts: 1858/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
Frankly, I'd think it'd just be bitpacked.

To demonstrate:

That's Pokémon Red's font in the native mode for the original Gameboy, 2 bits per pixel. You can make out the font on the top half, and notice that you can only see every other letter.


That's the same data seen as one bit per pixel. Now it's the bottom half that's messed up. If you squint, you can make out the border in the last few tiles.

The GBA version does the same thing, but from four to two instead. My point here is that bitpacking is a fairly common trick, but it's not compression per se since there's no data "left out" like with RLE, LZ, Huffman...

____________________
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 05-24-09 10:53 AM, in Compression types used in games Link | Quote | ID: 107525


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

Posts: 1861/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
Posted by SecretChao428
The if this board had image attachments for this, I would add an image of the compression method that is used just for those games, given that if I had posted a image of this fixed width format, then we would get the idea of it
How do you think I did this? The Uploader is still a part of the board, y'know? Post your image. Forget Photobucket.
Posted by SecretChao428
but the image text you are showing is using a GB to NES based factor
You speak nonsense. These are both from a Classic Gameboy game.

The NES is 2bpp planar. These images are both linear. The effect would've been recognizably different for NES.

____________________
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 05-24-09 08:16 PM, in I can't wait to bomb some dodongos! Link | Quote | ID: 107537


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

Posts: 1862/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
I dunno dude, depends on what pick you took.

____________________
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 05-25-09 08:57 PM, in IRC quotes thread Link | Quote | ID: 107575


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

Posts: 1863/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
<blackhole89> So I am listening to classical music and talking about rape of minors on the internet
<blackhole89> I feel like a monster.


____________________
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 05-25-09 09:25 PM, in SMILE 2.10, VB App Error 380 Link | Quote | ID: 107577


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

Posts: 1864/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
Error 380, "Invalid property value".

I'd say scrap the header.

____________________
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 05-25-09 09:51 PM, in Your favorite Pizza Place! Link | Quote | ID: 107579


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

Posts: 1865/5344
EXP: 30947935
Next: 715046

Since: 02-20-07
From: The Netherlands

Last post: 4499 days
Last view: 2634 days
I don't go out for my pizza. I microwave 'em.

Mmmmmm, bacon...

____________________
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
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189


Main - Posts by Kawa

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

Page rendered in 0.258 seconds. (349KB of memory used)
MySQL - queries: 37, rows: 69/69, time: 0.247 seconds.