This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - ZippyDee
Pages: 1 ... 10 11 [12] 13 14 ... 51
166
« on: January 07, 2012, 05:59:41 pm »
Well one thing that I noticed is the createAndValidateTopMap() routine in the LevelGen class:
public static byte[][] createAndValidateTopMap(int w, int h) { int attempt = 0; do { byte[][] result = createTopMap(w, h);
int[] count = new int[256];
for (int i = 0; i < w * h; i++) { count[result[0][i] & 0xff]++; } if (count[Tile.rock.id & 0xff] < 100) continue; if (count[Tile.sand.id & 0xff] < 100) continue; if (count[Tile.grass.id & 0xff] < 100) continue; if (count[Tile.tree.id & 0xff] < 100) continue; if (count[Tile.stairsDown.id & 0xff] < 2) continue;
return result;
} while (true); } The map must contain at least 100 rock, sand, grass, and tree tiles, and at least 2 stairs, otherwise it generates an entirely new map and tests again. Note that result contains two arrays. result[0] is an array of map tiles, and result[1] is an array of level data (objects and whatnot, I guess).
Looking at this, I don't know how slow it might be to generate such a map on the calc...I guess it depends on the rest of the level generation algorithm to see how likely a valid map is to occur.
167
« on: January 07, 2012, 05:48:26 pm »
Jim, RegEx patterns are placed in strings in Java. They are not wrapped with //.
168
« on: January 07, 2012, 05:25:15 pm »
Yes, that's what they mean.
169
« on: January 07, 2012, 05:19:32 pm »
Actually, JL235, if you're trying to match the string "\.omega" then you'd have to have a pattern of "\\\.omega" because you have to escape both the \ and the . in the pattern.
170
« on: December 30, 2011, 05:34:22 am »
Hello, everyone. A friend of mine is trying to get some attention for his Kickstarter project, and I thought I'd bring it to this wonderful community. All I can really say is that it would be absolutely wonderful if you guys could spread this around. Other than that I'll let their Kickstarter video speak for itself, but please visit the Kickstarter page as well (link at the bottom). Please read and see more here: http://www.kickstarter.com/projects/1475020745/meet-the-hugalopes-the-future-of-fluffy-fluffy-fun
171
« on: December 29, 2011, 06:43:04 pm »
:Disp "Blah" :Disp "More Blah" optimized:
:Disp "Blah","More Blah Don't
:Disp "Blah :Disp "More Blah
takes less space?
No, it takes the same amount of space. You still have a line return there.
172
« on: December 29, 2011, 06:40:15 pm »
You don't need the Else there.
yes you do.... otherwise no matter what X would be 1 by the end.
173
« on: December 29, 2011, 06:35:23 pm »
Because toast.
Who let the dogs out?
174
« on: December 29, 2011, 05:02:27 am »
This is awesome. Seriously. Keep it up. When I started ASM, I started with hex (which was really stupid of me, so I was very confused and had lots of ram clears at first) And this is actually just about what my syntax looked like as I was coding until I counted bytes for relative jumps, etc, which this does for you (yay) so I can see myself using this for sure!
175
« on: December 25, 2011, 12:46:34 pm »
Definitely not Smoke on the Water. I can tell just by looking at it. It's a fairly nondescript bassline, so I don't know if the exact song will be easily figured out...First thing that came to mind for me was Muse for the first one, but I'm fairly certain that's completely wrong, too.
176
« on: December 24, 2011, 10:50:45 pm »
Yeah, that one seems to be dropped, as far as I know. Anyway, that was a browser-based application, not an actual app for any mobile OS.
177
« on: December 24, 2011, 10:43:54 pm »
178
« on: December 24, 2011, 01:22:00 am »
Explain how that works please...>.< I've never understood how to use parity.
Edit: After thinking about it that makes sense, but that only allows you to test two bits, whereas my method could be used to test any number (I think). Of course the swapping would only work for two bits at a time...
179
« on: December 24, 2011, 01:13:39 am »
You can also use xor to test whether two bits within a byte are the same.
and MASK jr z, bitsAreTheSame xor MASK jr z, bitsAreTheSame ;... otherwise, bits are different where MASK is a mask of the two bits to compare
With this concept, you can use it to swap two bits within a byte: ld a, (addr) and MASK jr z, doneSwapping xor MASK jr z, doneSwapping ld a, (addr) xor MASK ld (addr), a
180
« on: December 24, 2011, 12:22:09 am »
I'm BACK.....-ish. I'm back for now, at least. I've got some time to work on programming now that my other activities are halted during winter break.
I'm gonna start over on this project. I'm gonna try to do it in ASM instead of Axe, because I just had a shitty day at work and I feel like doing some cathartic ASM more than Axe right now.
Pages: 1 ... 10 11 [12] 13 14 ... 51
|