Original Post

I’ve decided that since I have absolutely no experience whatsoever playing RPGs, that I am not a good candidate of programming one, so instead, I’m going to work on a fighting game (while I also have no experience playing a fighting game, I’d figure it’d be a lot easier programming one than an RPG.) So here’s my latest brainchild: Insect Combat. Right now, it’s just a warning screen and a title screen. The only two characters I’ve thought of so far are Gi-Ant and Behe-Moth. Any other punny names you guys can think of would also be appreciated.

Attachments:
399 Replies

OK, suppose I have this:

copymem((void*)CharSeg2, (void*)GIANTCRAWL1CHAR, 512*16);
copymem((void*)BGMap(2), (void*)GIANTCRAWL1MAP, 512*16);

I was just wondering if there was a way to change the CharSeg and BGMap to, let’s say, 1 and still make it show right without needing to put the exact same picture in VIDE and changing it to 1 that way?

Sure, then you could use a function like this to loop through the map and update every cell in it:

void ChangeCharsegOfBGMap(BYTE bgmap, BYTE chseg) { 
  HWORD i; 
   
  for (i=0; i<4096; i++) { 
    HWORD* currCell = &BGMM[bgmap*(0x1000) + i]; 
    *currCell &= 0xF9FF;
    *currCell |= (chseg << 9)
  } 
} 

With your example, you would use it like this:

copymem((void*)CharSeg1, (void*)GIANTCRAWL1CHAR, 512*16); 
copymem((void*)BGMap(1), (void*)GIANTCRAWL1MAP, 512*16);
ChangeCharsegOfBGMap(1, 1);

DanB wrote:
With your example, you would use it like this:

copymem((void*)CharSeg1, (void*)GIANTCRAWL1CHAR, 512*16); 
copymem((void*)BGMap(1), (void*)GIANTCRAWL1MAP, 512*16);
ChangeCharsegOfBGMap(1, 1);

Thanks! Now I don’t have to cut the number of fighters down to 6. But I do have a question, though: Would that above code I quoted, does ChangeCharsegOfBGMap change it to 2 then? So I could just use it once before the fighting screen comes up to double all the players essentially?

I can’t put it in my code without causing stupid errors, like saying something is undeclared when in fact it is, and stupid stuff like that. Is there a way to insert it without it acting like a stupid moron? I’ve attached my code.

I dunno, I can’t compile your code without having access to all your .h files too.

I’m guessing it’s the BYTE declaration you’re having problems with? Then you could just change it to char instead in this case to get rid of it.

Also, you should never call the function like this: ChangeCharsegOfBGMap(-1, -1); the bgmap parameter needs to be in the range 0-13, and chseg should be 0-3 ONLY.

But I do have a question, though: Would that above code I quoted, does ChangeCharsegOfBGMap change it to 2 then? So I could just use it once before the fighting screen comes up to double all the players essentially?

The charseg of a BGMap is reset to what you set it to in VIDE only when you do a copymem, so after your copymems you can change the charseg of a map any number of times with ChangeCharsegOfBGMap and it will stay that way. I don’t know if that answers your question?

Also, another thing that bothers me with your code 😛
Why did you make your music with song lenghts of just 3 notes each that you switch between? That was just an example and not how it was intended to be used for real songs. You know you can make a single song with hundreds of notes in it, right?

  • This reply was modified 12 years, 11 months ago by DanB.

DanB wrote:
Why did you make your music with song lenghts of just 3 notes each that you switch between? That was just an example and not how it was intended to be used for real songs. You know you can make a single song with hundreds of notes in it, right?

Because the compiler doesn’t like the following:

	u16 song[] = {F_3, C_4, F_3, B_3, B_3, C_4, C_4, F_3, AS3, F_4, AS3, E_4, E_4, F_4, F_4, AS3, F_3, C_4, F_3, B_3, B_3, AS3, GS3, G_3}; 

By the way, the reason it didn’t like that other code is because I think you forgot a semicolon at the end of the last line. Shouldn’t it be: *currCell |= (chseg << 9);

Because the compiler doesn’t like the following:

  u16 song[] = {F_3, C_4, F_3, B_3, B_3, C_4,
  C_4, F_3, AS3, F_4, AS3, E_4, E_4, F_4, F_4,
  AS3, F_3, C_4, F_3, B_3, B_3, AS3, GS3, G_3}; 

There shouldn’t be a problem with that… What’s the error message? Try adding a const before u16 (look in one of the BGMap *.h files that you export from VIDE to see how it’s done there)

I think you forgot a semicolon at the end of the last line. Shouldn’t it be: *currCell |= (chseg << 9);

Yes it should 🙂 Glad you found the problem. (I haven’t actually tried the function, just wrote it off the top of my head. Hope it works 😛 )

This is what I get regardless of whether or not I put a “const” before “u16”:

Attachments:

Found the problem on my own! It appears it didn’t like my definition of the song inside int main(). But I have a different question now, which shouldn’t take long to answer. In my song, all the even numbered notes (including 0) have a different length than all the odd numbered ones. Is there an easy way to tell it to do something if it’s an odd numbered note instead of an even numbered one? Something like
if the note is an odd number then currNoteLength=300, else currNoteLength=500?

Actually, the problem was I had a variable named “song” I had forgotten about, so I couldn’t name the u 16 “song”.

You can check if a number is odd or even like this:

if (currNote & 1)
  currNoteLength = 300;
else
  currNoteLength = 500;

OK, now I think the title screen would look better if they were in 3D. Only problem is, I don’t really have any experience in making 3D stuff and even if I had the software to do so, I wouldn’t know how to use it. So this is a “complete the picture” problem. Can anyone solve it to make it look good?

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

How does this look? OK to you?

Attachments:

Yeah, that looks good. Maybe the inside of the D should show some dark red too? Did you make it 3D (slightly different image for the other eye)?

No, it’s just one image.

Attachments:

I made a temporary anthills foreground/background with the background moving at half-speed so it looks like Super Mario World. I attached it because I’m wondering how many people care about this project.

Virtual Chris, the background scrolling is nice and it will open up possibilities for your game. However I would like to see the far background pulled further back in space, to utilize the VB hardware to dramatically display a stereoscopic image. I would also like to see your marquee in 3d as well. That’s just my two cents take it for what it’s worth.

Here is Rumblebee’s background. I put the background on different eyes. I tested it on a real VB and I like the results. What do you think? You can download it here:
http://www.atari2600land.com/aegis/ic

Attachments:

OK, so Morintari sends me a bunch of tile sets. I thought that tile sets on the VB were 8×8, but the ones he sent me are 32×32. So my question is, how do I make three tile sets appear all at once if my setup is this:
CharSeg0 = opponent
CharSeg1 = fighter
CharSeg2 = foreground
CharSeg3 = text/background
I had to put the alphabet at the upper left corner of the background picture just to make CharSeg3’s picture of the background work. Apparently there must be something I’m missing here.

Are you really using all 512 chars in each charseg? If not, you’re wasting space and need to combine your charsegs even more.

 

Write a reply

You must be logged in to reply to this topic.