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

You can set all the characters of a BGMap to use one palette and then modify the corresponding GPLT register. This will give you 4 levels of brightness.

http://www.planetvb.com/modules/dokuwiki/doku.php?id=palettes_and_transparency

First update of 2014.
I got rid of the banana at the beginning. I found this old toy harmonica in the pantry with the word “Oktavia” on it. I thought “that would be a cool name instead of a dorky banana.” One search for “Oktavia” led to some sort of web developer thingy, but nobody that makes software. The name Banana for software has already been taken. I googled “Banana Software” and found a company. By this point, probably all the fruit has been taken to compete with Apple. So should I try vegetables? 😉
Anyway, I added some quick fade ins and fade outs to the beginning. While it doesn’t seem like much, it did take a few attempts and about a half-hour to get it right.
Like always, the C code is included, so if you want to learn how I’m doing this, it’s OK. It could be cleaned up a lot, and it’s not the greatest. I want to experiment with adding music to the warning screen and stuff, so that will be next. Can music using the Soviet engine be played while screens fade in and out?

VirtualChris wrote:
Can music using the Soviet engine be played while screens fade in and out?

The engine does its stuff whenever you call DoSounds. So you could use custom fading functions that call it while fading. Like this:

#define kBrightness 32  // You might want to make this a variable or a parameter to the fading functions.

void WaitForVIP ()
{
  // Waits for the VIP to finish drawing the current frame.

  while(!(VIP_REGS[INTPND] & XPEND));
  VIP_REGS[INTCLR] = XPEND;
}

void SetBrightness (u16 Brightness)
{
  // Sets the brightness.

  VIP_REGS[BRTA] = Brightness;
  VIP_REGS[BRTB] = Brightness << 1;
  VIP_REGS[BRTC] = Brightness;
}

void FadeIn ()
{
  u16 i;

  for(i = 0; i <= kBrightness; i += 2 /* change the 2 to adjust the speed */)
  {
    WaitForVIP();
    DoSounds();
    SetBrightness(i);
  }
}

void FadeOut ()
{
  u16 i;
  
  for(i = kBrightness; i > 1; i -= 2 /* same here */)
  {
    WaitForVIP();
    DoSounds();
    SetBrightness(i);
  }

  SetBrightness(0);  // Ensure it's pitch black.
}

Alternatively, you could use a VIP interrupt handler that would get called 50 times per second and have it call DoSounds. This would ensure that sounds get played no matter what, and at a consistent speed. I’ve never done that so I can’t help you there.

Now I’m having troubles again. It seems as though I’m past the 512KB limit. I am having troubles making the make.bat file support 1MB limit (like most commercial VB games have.) How would I make this game be 1MB and not 512KB any more?

Please help. I am unable to make this game 8 MB. I got rid of the number in the padding section of the vbh file and it still wants to be an abnormal size. What am I doing wrong?

VirtualChris wrote:
Please help. I am unable to make this game 8 MB. I got rid of the number in the padding section of the vbh file and it still wants to be an abnormal size. What am I doing wrong?

At least on my system, there is nothing padding-related in the VBH file, nor the build batch file. The padder is only called in the “Flash” script before the FlashBoy writing app is run.

Have you tried manually running the padder on the ROM?

I think the ROM should come out of the compiler a power of two in size. If it doesn’t, you’ve probably run into a bug in the linker script, or exceeded the size of one of the sections.

I must have exceeded the size of one of the sections, because it didn’t come out as a power of two. I didn’t even know there were sections on this thing. How do I start a new section, then? If I can’t make a 512 KB game, how do I tell it to make a 1 MB one?

I was referring to ELF sections. You don’t “start new ones” as they are pre-defined for particular purposes.

If it is a compiler bug, there’s no telling when it’ll be fixed. You should probably just start looking for places where you can reduce the memory footprint of your game. Compression is worth a try. BGMaps and, to a lesser extent, Charsets are both amenable to many different compression algorithms.

If this is the case, then how was a game like Hyper Fighting ever made? I’m confused as to why I just can’t have a 8 MB game here.

If you havent read through the following forum thread it would be a good idea. A lot of good points are brought out about memory and how/where variables are stored and when.
Forum Thread
If you add

-Map,($Target).map

in your makefile v810-gcc.exe command parameters the compiler will generate a memory map of all of your allocated variables and where they are stored. It might give you an idea of which area of memory you’ve hit a limit on.
More than likely it’s the
Name Origin Length Attributes
wram 0x05000000 0x00010000 !r
section.
For example in my program the last entry for that area is 0x05005320 cam
so I know I’m getting close to half of the allowed memory usage which would be at 0x05008000.

It’s not a perferct science but it can give you an idea.

I’ll give that a try, but it looks like it would be all Greek to me. Here’s an updated Insecticide, but it’s only 4 MB.

I tried putting it into my make.bat file but it doesn’t like it. It says it’s not an internal or external command, operable program or batch file.

It’s working again! I was able to make an 8MB game! The problem was that I had the number put as 18 in the pad rom section of the make.bat file. So I set it to 19 and it worked!

Something I discovered that helps:
You can’t comment brackets. Going:
//{
is the same as
{
.

I put in the bee stinging. You’ll notice if you play this in Mednafen, if you do a special move the music will play faster. This is not true on real hardware. The music’s tempo stays the same. So I’m leaving this in for now. I also need to make the bee sting faster and it’s on my list of things to do now.

I fixed the punching glitch which didn’t cause you to punch at all. I think I’m going to get rid of Slaying Mantis and replace him with a Ter-Might. The reason is this. Rumblebee’s attack (stinging) misses Slaying Mantis sometimes, so it looks as though Rumblebee is stinging air (as you can see in the picture below. You can also try it out yourself with the ROM). I think another longer insect would solve this problem. Plus, I think Ter-Might is a better pun than Slaying Mantis anyway. Termites are famous for gnawing at wood, so Ter-Might’s special move would be gnawing.

Hey VC it looks as though your own hand drawn graphics are getting better. Keep up the good work :thumbup:

Virtual Chris wrote

I think I’m going to get rid of Slaying Mantis and replace him with a Ter-Might.

If I were you I wouldn’t get rid of slaying mantis. Preying mantis’s are notorious for being great fighters. I would just find another way to fix your problem.

Yeah the last pic shows quite an improvement!

Thanks for the compliments. I also fixed the problem I had and Slaying Mantis still gets to be in the game. For the graphics, I just used Google Images and drew the pictures in Paint by hand (or should I say mouse?) Let me know if there are any glitches you see that I missed.

Attachments:

I updated the ROM for (hopefully) the last time today. I didn’t want to clog up the servers here so I’m going to link to where you can get it.
Insecticide offical homepage
Just so you know, check this website when I feel like working on it. It will always have the latest available ROM and code.

V.C. One tip for Ya. Try to draw a black outline over your sprites so they will not blend into the background so much.
I think you’ll like the results a lot better.
>B

 

Write a reply

You must be logged in to reply to this topic.