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

I think everything is fixed. If not, please tell me.

Attachments:

OK, since I added another enemy in room 4, the code I had for enemy collision wasn’t working, so now I need to come up with a new one. What is a good way to have collision detection?

Attachments:

I had to make some more changes to the code because I added an enemy, and apparently it doesn’t like it when I add another world, the previous code goes berzerk and so I have to modify it. I think I’m done with worlds for now, and the game has three rooms now, with an enemy on level 3, and if you’ll look at my code, there is not one single goto.

Attachments:

OK, the code has been nice and polished. (although the jumping is still the way it was before.) I think I understand what while(1) does, but, what if I want to go back to before I typed in while(1)? What is an easy way to do that without using a goto statement? For example, what I want to do is once the character enters the door, go back (codewise) and add +1 to the room value so it displays a new room.

Attachments:

OK, I need help. As things stand right now, I have the guy in CharSeg 2, the walls (room info) in CharSeg1, and the door in CharSeg 0. No matter how I change things around, the guy is always behind the door and behind the walls (even when he was at CharSeg 0, the walls being CharSeg1, and the door being CharSeg 2.) How do I make the guy be in front of everything?

Attachments:

What do you mean by linear gravity? Also, thanks for telling me about the vbWaitFrame function, now I know not to use it.

What’s the solution to level 1 using only one block?

OK, after a long hiatus, I have returned to work on this. I changed the code a bit because I had no idea what it was doing since I worked on it last. Level 1 is new, and level 2 is what used to be the old level 1 (which I found a shortcut to, so now you have only one block instead of two.) Controls: B = place block, A = remove last block, START = begin moving mouse, SELECT = start level over again, left control pad = move cursor (which now blinks.)

Attachments:

The mouse moves right when it hits an intersection. To place a block, press A. Pressing B undoes the previous block. Start makes the mouse move. Select resets the level. There is no cat in my game. I can make the mouse speed up if you want me to.

OK, but what if there’s two exit points, like in my example shown below? (by the way, the game *is* playable in its current form, so tell me what you think of level 2. Too hard? Too easy?)

Attachments:

Many changes:
+borders defined
+instead of a rocket, there is cheese
+puzzle #1 set up.

In puzzle #1, you can only use one block, so use it wisely. To make the mouse start moving, press Start.

The tentative title for this game: “Nice Mice”.

Also, I had to use a goto statement in order to make this work. Can anyone tell me how to make it work without it?

Attachments:

Yep, it’s supposed to work that way. The next step is defining the borders, but right now, you can place the blocks anywhere. Oh, and if anyone wants to draw up a nice mouse sprite for me, go ahead.

I finally got a little demo working. Press the left + pad to move the cursor and A to place a block. The mouse will always turn right when it hits a block or the side. This isn’t how ChuChu Rocket actually works (in ChuChu Rocket, the blocks have arrows on them), so my level designs will have to be a little different than the actual ChuChu Rocket levels in the game. Right now you can only put 2 blocks on the board. And yes, I’ll be designing new levels for this game.

Attachments:

OK, I got rid of the goto thing and cleaned up the code a little. But what I don’t understand are the terms GX and GY. I thought I was doing the exact same thing in GoSub, and it worked that time. I checked the code to make sure all the numbers were in the right places when I set the worlds. Also, to have more than one block, I’m using different levels for the different blocks. Is there a different and better way to do this?

Ok, so that code won’t produce a “random” number between 0-4? What code can I use to get one once e reaches 60?

OK, I understand that there is no such thing as a random number. But using your example, say I want a number from one to four. What would be the name of the variable that’s value I made is from one to four?

	static int rand_num_table[4] = {1, 2, 3, 4}; 
	int randomPointer = 0; 

	int getRandom(int range) { 
	randomPointer++; 
	if (randomPointer >= 4) randomPointer = 0; 
	return rand_num_table[randomPointer]%range; 
	} 

I have made it call a variable number by doing the following:

e=e+1;
if (e>60) e=0, getRandom(3);

By the way, your code did compile, so I’m using it.

Up isn’t for jumping, it’s for moving up on the floor. Imagine a parrellelogram on the bottom of the floor, and it’s 3D movement, like how the up button goes up in NBA Jam. I was going to have A be jumping, while B, and the left and right buttons under the controller be for attacking.

I don’t understand. To use these examples, do I need to put
int random=0, prng_counter=0;
at the beginning of my program, or what? I put this code in my code, with the int random=0, prng_counter=0; line in and I just get an opponent that goes left, down, up and right with no random movement whatsoever.

{ 
   e=e+1;
     prng_counter=prng_counter+1;
   random = prng_counter % 256;
   if ((random<64) && (opponentx<160) && (e<60)) opponentx=opponentx+1;
   if ((random>63) && (random<128) && (opponentx>-80) && (e<60))  opponentx=opponentx-1;
   if ((random>127) && (random<196) && (opponenty<11) && (e<60))  opponenty=opponenty+1;
   if ((random>195) && (opponenty>-40) && (e<60))  opponenty=opponenty-1;
   // if (prng_counter>60) prng_counter=0;
   if (e>60) e=0;
  • This reply was modified 16 years, 6 months ago by VirtualChris.

I too am interested in getting random numbers. What is the modulo operation?

Here’s what I was thinking along the lines of character design. Press start to get past the choosing the CPU opponent screen to see Killipede. Up, down, left and right move him, while start goes back to the beginning.

Attachments: