I think most of us don’t have two Virtual Boys, two FlashBoys, and another VB freak to play against, so I think we should have a way of connecting the VB to the Internet.
For example, you’d have a link cable that you’d connect to a serial (cheaper and easier to use IMO) or USB port on your computer, and you’d run a program that would show you VB Internet games in progress and serve as a proxy; we’d design a protocol for VB-computer communications. And if play your VB on the same desk where your computer is (as I do), you could chat to other players by touch-typing on the computer keyboard and having the keystrokes show up on the VB.
Yes, that’s a complex project but I think the end result would be worth the effort. And everyone who’s written a VB game should try to add multiplayer to their games, so we have an instant selection of multiplayer games.
KR155E wrote:
Wow, that’s great! We should all create some levels, add in some text and graphic hacks and create an “Insmouse No Yakata Reloaded” with this. 🙂
That would be great.
BTW, I am on Windows 7 (64 Bit) and I got the following message when I first tried to start the editor:
Component ‘COMDLG32.OCX’ not correctly registered: file is missing or invalid
The following guide helped me solve the problem: http://devonenote.com/2010/02/register-comdlg32-ocx-on-x64-win7/
I’m on XP, so I’d have never found out. Thanks for providing a solution.
Protoman85 wrote:
That’s cool! Can you put in monsters too?
No, I haven’t yet figured out how to control that. Help is welcome.
Insmouse is a really cool game. Thanks for translating it, now we can finally understand the story.
BTW, when you finish the game (with any ending), the credits are Japanese too.
VirtualChris wrote:
First, the music. It puts out a second channel of notes sometimes when I didn’t tell it to. This must be a result of me not using the Soviet sound engine right or something.
HorvatM wrote:
I noticed you always call DoSounds and PlaySound in pairs. You only have to call PlaySound when you want the sound to start playing. After that, you only have to make sure the game loop calls DoSounds after each frame and that will take care of playing the sounds. Calling PlaySound in a loop will make all free sound channels play the same sound, which probably isn’t what you want.
So don’t do this (example):
while(1)
{
DoSounds();
PlaySound(sndMusic); // takes up all sound channels until none are free
}
Do this instead:
PlaySound(sndMusic); // takes up exactly one sound channel
while(1)
{
DoSounds();
}
And you should be synchronizing your game loop to the VIP, but I don’t know how that would work with your existing code.
A hundred megs? That’s way too much! Native executables would indeed be welcome.
It’s great! An obvious enhancement would be to make it support more MIDI files, but I have no idea how hard that would be. What’s important is that the VB homebrew community finally has an easy way to put sounds and music into games.
That’s cool. But you should use the largest FramesPerNote value possible to eliminate all those HOLDs and save space.
That’s a great review. I like it how you took the time to explain the history of the Virtual Boy and all the details about it, such as the IPD/focus adjustment.
I myself use version 1.0, which is precompiled for Windows, very easy to install, and doesn’t require Cygwin. I’m not entirely sure how it’s different from newer versions, but I know you will need to replace the audio.h file in its version of libgccvb with a newer version to use eg. the Soviet Union 2011 sound engine. Some OBJ management macros also appear to be buggy.
As far as I know, gccVB is ANSI-compliant in terms of syntax. However, it doesn’t have the standard C library, at least not in version 1.0.
It’s always nice to see new homebrew developers. I’ve played through the first track a couple of times and I’ll try it on hardware soon. Maybe we can help you solve the differences between emulators and hardware if you post some code.
The MIDI converter sounds interesting (no pun intended), even more so as the MIDI format looks like quite a chore to interpret (though I admit I haven’t even tried). Are you going to release it?
Correction: it’s Soviet Union 2011. “Soviet Strike” might have been a better title but it’s too late now.
And the engine gets its own page? I didn’t expect that. 😀
Finally, I want to thank DanB and DogP because without studying their sound code, this release couldn’t have happened.
I might eventually add that, but if you want it now, do it yourself.
For volume, you can add a ‘u8 Volume’ property to the tySound structure and modify PlaySound to copy the volume from the sound data or from a parameter and have DoSounds send that instead of 0xFF to the SxLRV registers.
I think you could implement instruments in a way similar to volume, but I don’t know what “waveform RAM address” that the Wiki refers to means. Is it an index for the WAVEDATA to use? Experiment.
I received the FlashBoy on Wednesday and already had the sound working the next day. I spent the other days fixing SU2011, which worked much better on hardware than I expected.
I think the solution was the modulation data. I don’t know what it is, but I saw it in DogP’s sound generator. Apparently it’s some data that’s needed by the VSU to produce sound.
I noticed you always call DoSounds and PlaySound in pairs. You only have to call PlaySound when you want the sound to start playing. After that, you only have to make sure the game loop calls DoSounds after each frame and that will take care of playing the sounds. Calling PlaySound in a loop will make all free sound channels play the same sound, which probably isn’t what you want.
And you don’t need the FramesUntilNextSound variable. I only used that in the example because the sounds are triggered by pressing buttons and holding down a button would create the problem described above.
It’s nice to see my sound engine being used. Just make sure to credit me if you decide to stick with it. 🙂
Version 1.1 is here! This is an update that, among other things, fixes the game to work much better on hardware, thanks to a very generous donation of a FlashBoy Plus by Richard. Sound, for example, now works.
The changes since version 1 (the one above) are listed in the file Changes.txt. The readme file has been updated as well.
Feedback is welcome.
KR155E, can you enable high scores for this game? It needs six charts:
Story mode, easy
Story mode, medium
Story mode, hard
Endless mode, easy
Endless mode, medium
Endless mode, hard
Attachments:
Apparently HFlip gets called three times, with the same parameters, in the game loop, if ‘left’ is true.
So when the fighter is facing left, the code flips an entire BGMap, three times (so it’s the same as if it only got flipped once), for every iteration of the game loop. And each time it is flipped, 1560 memory-to-memory swaps and 3120 in-memory XOR operations are done.
In the end, it’s apparently a matter of choice. The VB has the potential to run games requiring complex engines (DanB’s Hunter proves that), but at the same time the hardware is simple enough to program that you can accomplish a lot without even giving much thought to the design of the code (VirtualChris’ code proves that).
bigmak wrote:
I would defiantly [sic] put this in it’s [sic] own post under the development board :).Some people were trying something similar last year (?)..but they were waiting to have a standard library built.
We already have a standardized library, libgccvb. It’s not perfect, but it’s been good enough so far.
I would start with a demo or an engine that is already built..and try to work it that way. There are several examples that might work out (with the authors permission). Actually, I would contact the author to see if he wanted to spearhead the project.
That’s easy to say if you’re not a programmer. Taking someone else’s code is very difficult if it’s not licensed appropriately, doesn’t have documentation, or is just a plain mess.
DanB’s Yeti3d engine – It does things I didn’t think the VB could do 🙂
Has this actually been released so that others can use it?
Jorgeche’s VbJaEngine – he made a Mario entry in one of the coding competitions using it. I think this was built to help people code on the VB.
It’s poorly documented. The programmer’s guide doesn’t explain much. And it’s much harder for beginners to use. In my opinion, basing a game on a giant engine isn’t such a great idea. Writing your own code gives you much less restrictions on the design of the game.
MK’s Virtual Racing – Amazing racing game.
The source code was never released, was it?
As for music..I think we actually had a musician here at one time wanting to code music for vb games. Manicfoot ?
Yes, I think it was him.
As for sound code, DanB made a MIDI player but I don’t think it has been released for use in projects. VirtualChris uses his own code, based on simple sound code DanB released. For Soviet Union 2011, I wrote my own simple sound engine also based on DanB’s code, capable of playing four sounds at once, intended for music and simple sound effects, and in my opinion the easiest to use, but according to dasi it unfortunately doesn’t work on hardware, which I can’t fix, because I don’t have a FlashBoy.