Original Post

I have a new idea I want to attempt for the Virtual Boy. Basically what you do is explore around trying to find a pineapple. The pineapple is like the Legend of Zelda’s Triforce of this new game idea I have in mind. Only it’s supposed to be a humorous silly game with silly enemies and other stuff. I hope to begin work on it on January 1, 2016. I’m calling it “Pineapple 64,” a callback to when most Nintendo games had the “64” suffix on it, and yes, even though it’s on the incorrect platform to HAVE the “64” suffix on it. That’s how silly the game is. You guide Quincy Quandorf on a guide to find the pineapple. That’s the point. But it will (hopefully) prove hard to do. Not that I’m a fan of hard games or anything. And in this game, I’d probably need to implement saving, so it would need SRAM or whatever, and this would be the first game I would ever program that would need it. Nothing really all that hard to save, though, just what level you begin at, your current health meter and the items you have. To save a game, you’d need to find the bathroom in a certain level and use its toilet. Flush the toilet, save your progress. And I’d only have one save file since, let’s face it, how many people who have a Virtual Boy have more than one person who uses it?

31 Replies

Rounded the trees so they’re not all square. I also removed the path. I hope that it will encourage more exploring of the levels in the long run.
Am I glad I kept the previous version. I totally screwed up working on this game to the point of it being broken, so I had a fresh place to start anew.

Attachments:

I’m very angry. I have put in a river and a bridge. I would only like to put in the game that you can only cross the river if you use the bridge, but whenever I try to, you can walk across the water, which I don’t want to have happen. The river is made entirely up of the first square in Map 1, while the bridge is the 20th square of Map 2. How do I do this? I have been using this:

HWORD getBGMapChar(bgmap, x, y)
    	{ 	
     	return (BGMM[(0x1000) + (y * 64) + x]&0x7ff);
		}

for the collision detection, changing the 0x7ff value to whatever is needed, and it has been working fine, but apparently it only works for Map 1? How can I change the code to make it work for Map 2?

Attachments:

OK, I think I solved the problem. I just took the part of the river under the bridge and erased it. Now it works.

I didn’t like the way the collision detection was working, so I changed it and made it better. I tested the latest version on real hardware and noticed that something flashes once in the corner if you enter screen 4 (the one with the small banana) and then goes away, never to be seen again. Odd… I had a tough time getting the banana to be seen at all, since I apparently changed something while I was working on the collision detection, although I don’t think I changed anything having to do with that.

I dont know why but this made me laugh
Reminds me of that other VB homebrew game I cant remember now that had “eat the instruction booklet”

Got rid of the stupid thing that has been plaguing the fourth screen, that flashes and goes away really quickly. I don’t know how I did it, though.

@akumie
, Yeah, this game has a sense of humor. I think it was BLOX that had “eat the instruction manual” in it.

VirtualChris wrote:
(…) apparently it only works for Map 1?

That’s not a question? 😛

The problem is that you somehow mangled the code. The first parameter of the function is supposed to select which BGMap to test, but it has been removed from the body of the function, so it is being ignored (except by the compiler, which has no doubt been trying to alert you to the damaged code by way of a warning…). It has to be multiplied by 0x1000 to form an offset to the correct section of BGMM, thusly:

HWORD getBGMapChar(bgmap, x, y)
{ 	
    return (BGMM[(bgmap * 0x1000) + (y * 64) + x] & 0x7ff);
}

Also, you’re not supposed to modify the 0x7ff. It’s a mask that filters out things like palettes and flip flags, which leaves just the character number. You then compare the number returned by this function to the number of a character to see if it’s the one you’re looking for.

If you took the time to study the “how” and “why” of coding, rather than programming by means of random copypasta, you wouldn’t run into these kinds of problems.

So how come it works on the second 8×8 square if I do modify it to 0x7fe?
I know I need to better understand how the Virtual Boy, and quite frankly everything else I program, but every time I look at a Wiki, I never understand the technical aspect of it. It all looks like Greek to me. It’s like I don’t have the smarts or the brain to comprehend that type of stuff.

VirtualChris wrote:
So how come it works on the second 8×8 square if I do modify it to 0x7fe?

Basic binary arithmetic, actually:

0x0002 (0000_0000_0000_0010) & 0x07FE (0000_0111_1111_1110) => 0x0002 (0000_0000_0000_0010)

Your other problems (e.g. the bridge collision) probably stem from your misunderstanding and misuse of this bit of code.

I know I need to better understand how the Virtual Boy, and quite frankly everything else I program, but every time I look at a Wiki, I never understand the technical aspect of it. It all looks like Greek to me. It’s like I don’t have the smarts or the brain to comprehend that type of stuff.

Are you trying to look at the two separately? You should probably have both the code you want to study and the VB docs open at the same time, so you have some kind of context to go by.

It may also be that you don’t have a really good grasp of the basics of binary/hex arithmetic, boolean logic, and memory addressing (and especially how these things are represented in the C syntax). These are general programming/computer science topics and are assumed prerequisites to understanding the documentation for any specific system, not just the VB. If you try to read a document without understanding the language in which it’s written, of course it isn’t going to make much sense.

You can now cross the bridge on the last screen. Upon doing so, you will see a strawberry headed towards you. I’m going to add a health meter and a sword to grab up on the screen above. Right now, if you go past the strawberry screen (up), the game will go semi-crazy since I haven’t programmed that part yet.
Right now I’m wondering how to display a health meter in text,
i.e. in BASIC
PRINT “Health meter=”;health
How do I do this in C?

http://www.atari2600land.com/pineapple64/

My suggestion would be to calculate the percentage of health and represent it through ASCII.

I.E.: 50% health
[|||||—–]

 

Write a reply

You must be logged in to reply to this topic.