We're using cookies to ensure you get the best experience on our website. More info
Understood
@virtualchrisRegistered April 26, 2008Active 2 weeks, 5 days ago
809 Replies made

There! I had to tweak the code samples a little, but I finally got stuff working again. I’ve added the water waves back.

Attachments:

OK, I’ve done all that, but how would I change the sub wall collision detection to choose between what’s less than 224 and what’s more than 224? Right now, the collision detection is working on both levels like it’s one (which, apparently, now it is.)

        int i;
	for (i = 0; i < 5; i++) { 
	if(getBGMapChar(1, (xpos/8)+i, (ypos/8)+2) == 512) { 
      xpos = 22; 
      ypos = 180; 
      gamesubdir = 0; 
      lives--; 
      b = 1; 
      torpedodir = 0; 
      break; 
		}
	} 

In order to display two different mazes (one for front and one for back), I’m using two different BGMaps along with two different charsegs.

	copymem((void*)CharSeg1, (void*)CORAL, 256*16);
	copymem((void*)BGMap(1), (void*)LEVEL1FRONT, 256*16); 

	copymem((void*)CharSeg2, (void*)CORAL, 256*16);
	copymem((void*)BGMap(2), (void*)LEVEL1BACK, 256*16); 

It sounds like you want me to somehow combine these two things so I don’t have to use BGMap(2) and CharSeg2?

My bad. I meant BGMap instead of charmap.

What I meant was how would I display two seperate worlds using the same charmap? I mean, wouldn’t I be doing this:

	vbSetWorld(31, WRLD_ON|1, 0, -2, 8, 0, 0, 0, 384, 224);		// front mazes 
	vbSetWorld(26, WRLD_ON|1, 0, 2, 8, 0, 0, 0, 384, 224);		// back mazes

question: how do I fit two whole maps on one world? The way I’m doing this now is that I have one map (the front) taking up the whole screen on one world and another map (the back) taking up the whole screen on another. Also, how would I keep it so that you go above part of a world at one part and behind another part at another part?

  • This reply was modified 15 years, 12 months ago by VirtualChris.

Was playing with the title screen a little and was wondering if there was some type of programming that can do what I’ve tried to do for the title screen being in 3D. (By the way, I’ve also added a third level.)

Attachments:

The BASIC I’m used to is batari Basic, which is a type of Basic for the Atari 2600. I don’t really know about for loops yet because I’m confused about where to put the “next.” Anyway, if I get it done by November 1 (which now I’m thinking I will), I’ll put it in the contest.

More like abandoned. I may come back to it once GoSub 2 is finished.

Changed the look of the sub. Also made it, the octopus, and the torpedo smaller when they’re in the background. Also shifted the worlds around a little like DanB suggested.

Attachments:

OK, I figured this out! I just had to tweak DanB’s code a little to make it do what I wanted it to do. Anyway, to switch between foreground and background, press A. To make it easier to tell which dimension you are, use Mednafen because it has the red and blue lines. Hopefully this will actually look like two dimensions on a real Virtual Boy. If possible and you have both a Flash boy and a digital camera, take a picture of it running. I want to make sure I like what I’m doing here.

Attachments:

I got the sub moving again, and I have a question: How do I make two things share the same character? I mean, I type

	copymem((void*)CharSeg1, (void*)CORAL, 256*16);

for one, and

	copymem((void*)CharSeg2, (void*)CORAL, 256*16);

for the other. How would I make them share?

Attachments:

I now have a new problem: The sub won’t move. Before you groan because you have to look through my code, I’ll remind you I tried to fix it up as best I could. If it’s not enough and I need to do it some more, I apologize.

Attachments:

The difference between the my example and yours is I understand mine. Of course, I am still learning C, and why I code the way I do is because I have a lot more experience in Basic than I do in C. But yeah, I will do my best to try and clean up the code to the best of my abilities with what knowledge of C (which is little) I know.

That worked for the foreground, but now the background level has no collision detection.

I’ve been trying to make the game be in 3D but I am having some troubles. It doesn’t matter when the ship is in the foreground or the background, it still hits the first foreground bar. (When the sub is in the background, it shouldn’t hit the foreground bar because it’s not in the sub’s dimension) I think it has something to do with lines 34-37, but I am not sure. I have moved the background maze to world 2 so this has removed the underwater background in favor of an actual 3D game. So if someone could look through my code and tell me what I’m doing wrong with the collision detection, I’d very much appreciate it.

Attachments:

OK, I changed it to two. I don’t really understand the red and blue lines Mednafen is showing, though. I suppose it won’t look like that in a real Virtual Boy?

Attachments:

I did it by hand.

I’ve done a few changes. First off, shooting instead of the A button is now controlled by the right d-pad. Now you can shoot right while going left. I’ve also added a background.

Attachments:

OK, I think I got everything all new. The game runs faster than it did before. And because I can now keep the text on all the time, to make room for it, I shifted the map down 8 pixels. Thanks for your help, Dan!

Attachments: