We're using cookies to ensure you get the best experience on our website. More info
Understood
@virtualchrisRegistered April 26, 2008Active 5 months, 1 week ago
808 Replies made

Added a second level after you complete the first one.

Attachments:

Thank you for the code. If you could attempt to make a 3D sprite, I’d really appreciate it.

Attachments:

I figured it out.
Now, how do I check the collision on the treasure?

EDITED the sourcecode/VB ROM

  • This reply was modified 15 years, 7 months ago by VirtualChris.
  • This reply was modified 15 years, 7 months ago by VirtualChris.
Attachments:

My sub is 5×5 Chars.

I redesigned the submarine sprite so it takes up less blank space. (I know, I can’t really design good-looking sprites like this.) And the code I have now (which is the code from the last post) seems to have a problem, if you look at the picture. How do I go about fixing this?

Attachments:

I got the collision detection working now, but it’s like a square. How would I go about not checking the empty space near the periscope?

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

Why does this work

    	if (getBGMapChar(1, (xpos/8)+1, (ypos/8)+1)==512) level=level-1, xpos=10, ypos=160, horz=0, vert=0;

while this doesn’t?

    	if (getBGMapChar(1, (xpos/8)+1, (ypos/8)+1)==512)||(getBGMapChar(1, (xpos/8)+2, (ypos/8)+1)==512)||(getBGMapChar(1, (xpos/8)+1, (ypos/8)+2)==512)||(getBGMapChar(1, (xpos/8)+2, (ypos/8)+2)==512) level=level-1, xpos=10, ypos=160, horz=0, vert=0;

I’m somewhat getting the hang of it, as you can see from my VB rom code below.

Attachments:

What about the variable “crash”?

I inserted it in the main function, and it doesn’t like the function declaration.

I already have variables for my sub’s x and y positions (xpos and ypos). So if I change it to this:

	HWORD getBGMapChar(bgmap, xpos, ypos) 
	{
  	return (BGMM[(0x1000 * bgmap) + (ypos * 64) + xpos]&0x7FF); 
	}

	if1==40) || (getBGMapChar(bgmap, (xpos+1), (ypos+1))==40)) xpos=10; 

and set the bgmap variable to 1 in the beginning, it says there’s a parse error before getBGMapChar.

(note: I’m not worried about changing the numbers to the correct ones until I get this code compiling.)

Then how does it know what bgmap, x, and y are worth unless you don’t tell it what they’re worth? When I type that code into the computer and compile it, it comes back with error messages that say all three variables are undecleared.

The wall char’s location is 0 in BGMap1, so would I write 512+0? Also, in the first line of your code, you didn’t set bgmap, x, and y to anything (i’m assuming because you wrote an int without an =) , and so it doesn’t like that. What should I set the bgmap, x and y variables to? I did, however, get the walls code up, but I can’t seem to get a handle on the collision code.

Attachments:

Here’s the latest ROM, incorporating the game’s logo in the title screen. I still need help with wall making, though.

Attachments:

What I didn’t try was simply changing it to 16. I thought it would need to be a number like 31 or something. OK, I got it to work now.

You mean the “15” at the end of this:
:: —– Pad ROM/add header —–
copy /b %1%2.VB /b + %1%2.hdr %1%2.VB /b /y > NUL
padromvb.exe %1%2.VB 15 > NUL
if exist %1%2.O del %1%2.O > NUL
if exist %1%2.hdr del %1%2.hdr > NUL

I tried doing everything to that number and my ROM still came out 79 KB and didn’t work.

I just checked the file size of this new GoSub ROM and it’s 79k instead of 64k. Do I need to do something special to make a ROM larger than 64k, and if so, what?

Question: Is there a limit to the number of files you can include? If so, the number seems to be 8, as I tried putting the official GoSub logo picture in and everything went blank. If so, is there any way to get around this? If not, why won’t the following .C file work? (I selected space 1 when it asked me to when I made it into an .h file using VIDE.)

OK, I got it to work. Up next: the walls.

Attachments:

I don’t understand any of this. When I clicked “export to .h” it never asked me what Charseg it wanted it to be in. It just asked what I wanted to name the .h file and where to put it on my hard drive. I have advmap.vpg and INCLUDE.vpg in the same folder where VIDE is located.

A little error that needs to be fixed.
I’m trying to put the treasure map in the game, but it comes out instead of the picture I want, it’s a broken picture of the submarine. How do I make it so it’s the treasure map instead of the broken sub?

Attachments:
  1. getBGMapChar(bgmap, xpos, ypos)==40) || (getBGMapChar(bgmap, (xpos+1), ypos)==40) || (getBGMapChar(bgmap, xpos, (ypos+1 []