For those that missed the sneak peek at EGX Rezzed (NEC), or the official release at the Acorn and RISC OS show at Wakefield, here is my nearly final version of Carnivale (now with an added e to match the old school (C) renaming).
Attachment:
File comment: Near final version of Carnivale (two bugs remaining)
carnivale.zip [19.81 KiB]
Downloaded 18 times
To build with beebasm from source, see links at the bottom of this post.
There seems to be two bugs remaining:
1. If you hit a falling duck, just wrong, the bullet gets left behind.
2. Somehow the palette gets corrupt including the background going white.
If anyone catches a video of this, or can spot the bug in the code, I would be very happy.
Here is a brief summary of my Carnivale project (hopefully it will get moved to a project page).
The game carnival came out in 1980 in the arcades. You control a gun at the bottom of the screen and try to shoot all the targets scrolling horizontally across the middle of the screen before you run out of bullets. There are some "pipes" at the top of the screen, which must be shot before you can move on to the "bonus" round where you shoot a bear, which changes direction each time you shoot it. As you play the main game and bonus rounds they get faster, with "ducks" occasionally flying down the main game screen to eat your bullets if they get to the bottom.
To get a "maximum" score, you need to shoot all pipes first without missing any shots or hitting anything else, then all the ducks, bears and rabbits as they move along the top row. Finally, shoot the letters "B", "O", "N", "U", "S" in that order. There are also bonus bullet targets (which disappear after the middle row) and a bonus/penalty box that appears on the top left.
My project started as most of my programming projects do with an idea for how I could do a "tricky" part of a game in a time or memory (or sometimes both) efficient way. With Carnivale, it was an idea for how to draw the main targets (13, each 3x2x8 bytes in MODE1) quickly enough to not flicker. If I hadn't put a demo on
viewtopic.php?f=19&t=877, that would probably have been the end of it.
The demo pixel scrolled the top and bottom rows of targets to the right with the middle row going left, but leaving trails and not drawing correctly. With a few kind words from RobC and DaveM, I felt enthusiastic enough to add a bit more (mostly just hiding the dodgy middle row).
More kind words from jbnbeeb and off I went to run Carnival on MAME, capture a video and write some C code on the PC to grab the differences between frames of the "pipes" animating. I added a bit more to "generate" the 6502 to draw the pipes in the smallest amount of time and memory, but allow changing the colours of the pipes because I could only fit four frames of each.
More words of encouragement, this time from simonh and oss003 and hitting pipes was in. There was a suggestion that I add master support to use the extra memory as I was already running out. I've only had BBC-Bs and didn't really feel the love for the others, so I decided to kick out the OS, DFS and BASIC and go straight to the metal to free up more memory (later, this would make saving hi-scores a problem).
While I was looking at the video from MAME, I noticed that the original game moved sprites two pixels at a time and ran at 25Hz, this made me feel much better about the effort I had gone to to move single pixels at 50Hz.
With scoring in (including pipes bonus, but not double for hitting opposite pipes with consecutive shots), the middle row behaving (mostly) and ducks now falling, I was feeling quite good about the progress I had made in only a couple of weeks, despite some blood pressure issues. More encouragement, DavidB and DaveM and some suggestions to add more colour (well swapping white for cyan) which I wasn't thrilled with at first, because to me, red owls, white rabbits, yellow ducks and black background were the main colours.
As week three came and went and I added shooting falling ducks, bullet eating and end of level, I ran out of memory a couple of times and had to steal a bit more from the system, I realised that I wouldn't be able to save the hi-scores even if I added them.
With Christmas fast approaching, I tried to get the music in, this nearly drove me mad and I suspect frustrated DaveM, RobC, DaveF and PitfallJ, all who tried to help me get the music right. I learnt much more about MIDI and how various emulators support sound chips from the 8 bit days than I ever wanted to.
Over Christmas, I grabbed a video of the bears and wrote another program to generate the bonus round's bear's code and data; this involved as with the pipes finding matching 8 bytes blocks so that I could draw them without having to have full copies of each sprite for each frame.
As January started, DaveM was giving me lots of suggestions/encouragement and then RichTW joined in with the encouragement and saved me quite a bit of time finding more places to "steal" memory and oh yes, suggesting more colours. More encouragement from RichTW, DaveM and jbnbeeb gave me the push I needed to add a hi-score table, although I didn't think I would have enough memory to display it!
Then for a while everyone kept telling me that the music was broken, I had no idea what was wrong as I have always been useless with music despite my father being able to play anything and my sister being an excellent singer. DaveM put up a video of "Karnival" playing on his "PC in an arcade cabinet" and I could see/hear what they meant, which gave me another push, just when the music had nearly killed my interest in the project.
I was still thinking at this point of doing a BBC themed version with BBC related graphics. eg swap the owl for the one from the "BBC MICRO" programs, maybe use Chuckie Egg's duck etc. I wanted to add a second player and allow co-operative multi-player, that is, a second gun facing the other way and shooting on the odd pixels, as the first only shoots on the even ones. At this point, I realised that my enthusiasm for the project was going to run out before it was finished and that seemed a shame.
DevidB commented that my game was "much more polished" than Acornsoft's Carousel and I wasn't sure whether that was good or bad - sorry DavidB. trevj, did you ever get round to comparing Carnivale (as it is now called) to Carousel?
Three quarters of the way through Jan and I was sure DaveM had said that RetroSoftware might want to release it, but as he was away working, I wasn't sure what that meant for further releases on the forums, so there weren't any until now

oss003, I never got around to doing that developer diary, but I hope this goes some way to compensating. I plan to explain parts of the code, hopefully to encourage others to do a bit more on some of their projects when (if) I get a project page.
More sound woes with various people trying to help; thanks RobC, I won't get around to adding SID support, but maybe you or someone else would consider adding it? I grabbed the MAME audio and my audio and compared the waveforms and saw what my ears could not; the pitch was wrong and with a time line, I could see by how much; fixing this made the music sound just right.
Time to add joystick support, thanks TomW for the pointers. I didn't really do much for a month or so and then DaveM got in contact and spurred me on to start the final straight. Apart from some sloppy coding, joystick support for B/master/compact was quite easy: do an OSBYTE 0 (*fx0) to get the OS and imply the joystick type from their (copy the appropriate routine over the default (longest) one.
For many weeks, I haven't been putting anything on the forums about Carnival, so DaveM has had to do all the encouraging and play-testing while I tried to fix the last couple of issues, get the hi-score working and add a bit more colour (now has all colours in MODE1 – 9 on a slow lcd).
The arcade version had a high score of 29 names, but I think you could only ever see the top three. I started with a hi-score of 30 entries, which I keep near the bottom of the stack and then when you "re-boot", look for a signature and save/load/re-create as appropriate. There isn't a "safe" area to keep the hi-score and I have no room to do a *SAVE, so I have reduce the number of entries to 21 and trimmed the signature. What is left works on most of the config's that I have tried, but not on all (eg compact).
DaveM took it to Rezzed over the weekend and apart from there still being a couple of infrequent bugs, says that it went down well. Hopefully I will make it to Wakefield for its official launch, although it is quite a way from Hertfordshire where I live.
I have now pretty much stopped work on it, although, I will fix any bugs that I can reproduce and help with any work anyone else wants to do on it.
I'm fairly keen to get on with the next project, maybe an "updated" version of Rally-X or possibly a version of Super Mario Bros (Imogen is now asking for Frogger, but I think there are already quite a few good versions – although, it does have rows of scrolling things

- I'm not very creative; although I can code when I have to

Carnival has a basic program LOADER, which saves/loads/re-creates the hi-scores and allows selection of Z/X/RETURN, joystick or redefining the keys, this could do with some love, as could the key redefinition program – volunteers?
That's all for now, except to thank everyone who uses RetroSoftware or supports it by buying games for allowing Dave to keep the site going and encouraging people like me to make projects like Carnivale.
To build with beebasm, download the .ssd template and the source code below and then use this command line:
beebasm.exe -i carnival.asm -do carnivale.ssd -di template.ssd -v
Attachment:
File comment: asm and include files for building Carnivale with beebasm
source_code.zip [32.01 KiB]
Downloaded 11 times
Attachment:
File comment: template file for .ssd with loader, marquee and key redefinition (plus bonus key combination checker)
template.zip [10.94 KiB]
Downloaded 9 times