It is currently Mon Oct 20, 2014 4:23 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 129 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 7  Next
Author Message
PostPosted: Sun Dec 22, 2013 2:17 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:41 pm
Posts: 373
Wow! Just tried it and got up to level 7 with 21400 points when I ran out of bullets (no sign of the 'bug' but I only played it the once).

Good news re: the timing interrupts; maybe you can even get the PIPES lettering/numbers in green (that would be the icing on the cake, heh!).

Keep up the astonishing work! (but remember to take a little bit of time off for Xmas, yeah? ;) ).


Top
 
PostPosted: Sun Dec 22, 2013 8:41 pm 
Offline
User avatar
 Profile

Joined: Sat Mar 26, 2011 3:01 pm
Posts: 263
Location: Kings Langley
New Hi-score, I probably need to make it harder - even if only to keep the hi-score ;)

Been out today, so no new code, just had time for a game though!

Image


Attachments:
File comment: New hi-score ;)
carnival-hi-score.jpg [9.35 KiB]
Not downloaded yet
Top
 
PostPosted: Mon Dec 23, 2013 11:26 pm 
Offline
User avatar
 Profile

Joined: Sat Mar 26, 2011 3:01 pm
Posts: 263
Location: Kings Langley
I'm struggling with my health and SOUND!

Here is the basic tune that through some strange methods, I have constructed.

30 REM Next,Frame *10,Len * 10,Note,Velocity
40 channel = 1
50 T = TIME
60 REPEAT
70 READ Next, Frame, Duration, Pitch, Velocity
80 PRINT Next, channel, Duration, Pitch
90 SOUND channel, -15, Pitch, Duration * 6.66666
100 channel = (channel MOD 3) + 1
110 T = T + Next * 33.3333
120 REPEAT UNTIL TIME >= T
130 UNTIL Next = 0 AND Frame = 0 AND Duration = 0 AND Pitch = 0 AND Velocity = 0
150 DATA 3,0,3,49,62
160 DATA 1,3,1,45,56
170 DATA 1,4,1,49,76
180 DATA 1,5,1,61,85
190 DATA 4,6,4,81,81
200 DATA 1,10,1,77,86
210 DATA 1,11,1,81,73
220 DATA 1,12,1,89,74
230 DATA 1,13,1,81,74
240 DATA 1,14,1,77,68
250 DATA 1,15,1,81,76
260 DATA 1,16,1,49,69
270 DATA 1,17,1,61,75
280 DATA 6,18,4,77,79
290 DATA 3,24,3,53,63
300 DATA 1,27,1,49,61
310 DATA 1,28,1,53,76
320 DATA 1,29,1,61,85
330 DATA 4,30,4,77,80
340 DATA 1,34,1,73,72
350 DATA 1,35,1,77,77
360 DATA 1,36,1,81,83
370 DATA 1,37,1,77,69
380 DATA 1,38,1,73,63
390 DATA 1,39,1,77,75
400 DATA 1,40,1,53,63
410 DATA 1,41,1,77,80
420 DATA 6,42,4,49,75
430 DATA 3,48,3,49,63
440 DATA 1,51,1,45,63
450 DATA 1,52,1,49,76
460 DATA 1,53,1,61,79
470 DATA 4,54,4,81,80
480 DATA 1,58,1,77,78
490 DATA 1,59,1,81,73
500 DATA 1,60,1,89,77
510 DATA 1,61,1,81,64
520 DATA 1,62,1,77,61
530 DATA 1,63,1,81,69
540 DATA 1,64,1,49,66
550 DATA 1,65,1,69,79
560 DATA 6,66,4,69,67
570 DATA 0,72,3,69,103
580 DATA 3,72,3,117,103
590 DATA 0,75,1,89,113
600 DATA 1,75,1,137,113
610 DATA 0,76,1,101,127
620 DATA 1,76,1,149,127
630 DATA 0,77,1,117,127
640 DATA 1,77,1,165,127
650 DATA 0,78,4,109,108
660 DATA 4,78,4,157,108
670 DATA 0,82,1,101,108
680 DATA 1,82,1,149,108
690 DATA 0,83,1,97,104
700 DATA 1,83,1,145,104
710 DATA 0,84,1,89,98
720 DATA 1,84,1,137,98
730 DATA 0,85,1,81,105
740 DATA 1,85,1,129,105
750 DATA 0,86,1,77,95
760 DATA 1,86,1,125,95
770 DATA 0,87,1,69,104
780 DATA 1,87,1,117,104
790 DATA 0,88,1,77,106
800 DATA 1,88,1,125,106
810 DATA 0,89,1,89,127
820 DATA 1,89,1,137,127
830 DATA 0,90,4,81,116
840 DATA 0,90,4,129,116
850 DATA 0,0,0,0,0

I am planning on making a better version, and adding envelope type functionality, but would be happy to open it to the floor so to speak, so if anyone would like a credit on the game, I am quite happy to put in their tune instead (it might just save my sanity ;-)

EDIT The sound on BeebEm doesn't work well on my PC, but B-Em seems fine.


Attachments:
File comment: Program from above for playing a very basic version of the tune.
SOUND.zip [1 KiB]
Downloaded 7 times
Top
 
PostPosted: Wed Dec 25, 2013 11:02 am 
Offline
User avatar
 Profile

Joined: Sat Mar 26, 2011 3:01 pm
Posts: 263
Location: Kings Langley
Found half my bug, if you let a [5] or [10] go off the end of the second row, you can't finish the level - fixed in attached ssd. I have also tweaked the difficulty.


Attachments:
File comment: Fixed can't complete level if [5] or [10] go off second row bug and tweaked difficulty
carnival.zip [5.95 KiB]
Downloaded 4 times
Top
 
PostPosted: Fri Dec 27, 2013 11:06 am 
Offline
User avatar
 Profile

Joined: Sat Mar 26, 2011 3:01 pm
Posts: 263
Location: Kings Langley
Been poorly again, but did manage to get bonus boxes in with +/- score/bullets.
Again, I haven't made it identical, but they are in the spirit of the original.

New hi-score and new disk image attached.


Attachments:
File comment: New disk image with working bonus boxes
carnival.zip [12.04 KiB]
Downloaded 4 times
File comment: Hi-score with bonus boxes working
hi-score.jpg
hi-score.jpg [ 24.53 KiB | Viewed 133 times ]
Top
 
PostPosted: Fri Dec 27, 2013 3:29 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:41 pm
Posts: 373
Lookin' good, Tricky!

Out of interest is it your intention to add the 50/30/10 score indicators on the right-hand side of the screen, alongside the rows of targets (it's just I notice you've left 'space' for them)?

(Oh btw, zip archive only contains the .asm file)


Top
 
PostPosted: Sat Dec 28, 2013 12:45 pm 
Offline
User avatar
 Profile

Joined: Sat Mar 26, 2011 3:01 pm
Posts: 263
Location: Kings Langley
Sorry, like I said, I wasn't well, better this morning.

Here is a disk image - no music, so no music toggle yet!

Image


Attachments:
File comment: new screen shot - spoiler for what the gap on the right was for
carnival-row-scores.jpg [16.95 KiB]
Not downloaded yet
File comment: New disk image showing whet that gap was for
carnival.zip [6.42 KiB]
Downloaded 8 times
Top
 
PostPosted: Sat Dec 28, 2013 5:59 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:41 pm
Posts: 373
Glad you're feeling better!

The game really looks (and plays) the part now. It's great being able to take a proper aim at targets ... on the Acornsoft version, the delay between the bullet being fired and it hitting/passing the target was so slow you were effectively just pressing fire and blindly hoping for the best! Also, I like how the behaviour of the swooping ducks are much more closely aligned to the movement of those in the coin-op ...

Anyway, so that's the score indicators in ... cool ... what's the memory situation looking like now?

Guessing you won't be able to fit *everything* in ... I reckon this would probably be my suggestion for priorities, should you end up having to omit bits:

1) sound effects
2) end of level bonus stage (the bear!!!) [that's if there'd even be room for it at all!]
3) background music
4) joystick support
5) additional colour (via interrupts?)
6) high score name entry/table
7) 'impact' animations
8) 2-player (turn-based)

... though obviously I suppose the amount of RAM each feature takes up will ultimately determine what can/can't go in?


Top
 
PostPosted: Sun Dec 29, 2013 12:11 pm 
Offline
User avatar
 WWW  Profile

Joined: Thu Apr 03, 2008 2:49 pm
Posts: 277
Location: Antarctica
Really nice job :)

Just had a quick go, it plays really nice and smooth and has a good feel to it.

The only issue I spotted was the box around the bonus sometimes didn't draw properly I think if a bullet was just at the point of the box appearing, but that really is very minor.

Some detail on the gun sprite would be nice too, but all in all a top job - not far to go now I presume?


Top
 
PostPosted: Mon Dec 30, 2013 12:14 pm 
Offline
User avatar
 Profile

Joined: Sat Mar 26, 2011 3:01 pm
Posts: 263
Location: Kings Langley
Yesterday was not a good day for me, but today is looking much better - apart from taking the "misses" shopping ;)

The end is in sight and things are looking OK. Thanks for the bug report, that shouldn't be possible, but I will have a look as I am not always at my best when working on this.

I did spot yesterday that I had missed 8 pixels off the width of the target tracks, I am leaving this until I am having a good day as there are quite a lot of magic numbers to rework - serves me right for "hacking it" in the first place.

DaveM's list is pretty close to mine, although I do have a few more labels to add, including game over etc. I don't have an actual font, so entering names will eat some more memory. I have effectively kicked out the OS so saving the hi-score will involve rebooting and finding some intact memory to pass the hi-score table in.

I have used pages 4-7, 9-C and E-37.
leaving me pages 38-3F - 2KB and most of pages:
0 if I avoid what the OS uses during interrupts
1 if I reset the stack pointer and don't get greedy
2 if I avoid the OS's IRQ vectors
D if I RTI the NMI routine, which might be a problem for some hardware

I hadn't thought about joystick control as I haven't seen mine in decades, but should be OK.

So, of the 8 full pages and 4 partial pages left:
[2+] Sound is looking like 2 pages, possibly a bit more for an envelope and code.
[3+] The bears sprites are nearly 3 pages, but I might be able to be creative and make it 2, there will be at least another page for code.
[2+] font (1 page) and name entry code, I could use a smaller font and squeeze it in with some other sprites making it nearly free if necessary, but will still need nearly another page for the hi-score table. The saving code will go with the relocation code and be thrown away at start-up, so that is effectively free as I still have about 12KB of screen space that is available to load in to and use until game start.
[1+] The other bits: labels, 'impact' animations (sprite space already reserved), 2 player, colour changes on interrupt etc don't need much space, but will need a little extra code.

DaveF, the gun sprite is up for re-design, as are nearly all the sprites, but it is currently a bit-wise copy of the original, or will be once the timer code colours it cyan ;)

Richard


Top
 
PostPosted: Mon Dec 30, 2013 3:41 pm 
Offline
 Profile

Joined: Fri Nov 07, 2008 2:28 pm
Posts: 65
Hi Tricky,

Here's a 2 channel version of over the waves. That leaves the third channel free for sound effects.


I can upload a bbc micro player as well in a few hours time (have to clean the source code up a bit first) - although it uses OSWORD so would need the OS interrupts called - I think you override that stuff in your code at the moment because you access the Hardware directly - you also lose envelopes if you do that by the way..

Anyway hope it helps out!

- PJ


Attachments:
over_the_waves.zip [2.64 KiB]
Downloaded 4 times
Top
 
PostPosted: Mon Dec 30, 2013 6:34 pm 
Offline
 Profile

Joined: Fri Nov 07, 2008 2:28 pm
Posts: 65
And here is the program...

I use Beebasm to assemble.

- PJ


Attachments:
over_the_waves2.zip [12.3 KiB]
Downloaded 5 times
Top
 
PostPosted: Mon Dec 30, 2013 6:47 pm 
Offline
User avatar
 Profile

Joined: Sat Mar 26, 2011 3:01 pm
Posts: 263
Location: Kings Langley
Thanks, a player would be best (with source if possible), or what the first and third columns mean and what envelope you use.


Top
 
PostPosted: Mon Dec 30, 2013 7:09 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:41 pm
Posts: 373
Thanks for the update, Tricky.

PJ: Couldn't resist firing up two instances of B-Em ... one for the game, one for the music player. Wonderful stuff! ;)

DaveF: We reckon there'll be two 'releases' of the game:
1) A straight-forward port of the arcade version (so we at least get a finished product 'out of the door' sooner rather than later)
2) An enhanced version with customised [possibly Beeb-specific] graphics plus extra features such as simultaneous two player support. (May require sw/ram).

Also, tried the most recent build on real hardware for the first time yesterday (BBC Master w/ Cub monitor) ... it's astonishingly smooth!


Top
 
PostPosted: Mon Dec 30, 2013 7:14 pm 
Offline
 Profile

Joined: Fri Nov 07, 2008 2:28 pm
Posts: 65
Hi Tricky,

The player is attached to my previous post.

The meaning is:

EQUB $06, __G3, 10*4+CH1 ;55

(1) The first byte is the delay in frames (at 50hz) until the next command

(2) The 2nd byte is the midi number - translated into to the bbc freq number by the midi2bbc table in game.asm

(3) The third byte is the channel+duration*4

the channels are remapped in game.asm with CH0 = 1, CH1=2 etc.

I included some sample envelopes - you can change the ones the tune uses by changing the values at the top of carnival.h

EQUB BBC_SQUARE,BBC_SQUARE,BBC_SQUARE

The bytes above that line are actually not used - they are BeebSID stuff (used by another game I ripped this player from)

I actually made a BeebSID version of Acornsoft's Carousel a while back:
http://stardot.org.uk/forums/viewtopic.php?f=3&t=2530&start=450#p28404

Love the tune!

- PJ


Top
 
PostPosted: Mon Dec 30, 2013 7:28 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:41 pm
Posts: 373
PitfallJ wrote:
I actually made a BeebSID version of Acornsoft's Carousel a while back:
http://stardot.org.uk/forums/viewtopic.php?f=3&t=2530&start=450#p28404

Oh my goodness that's awesome - how on earth did I miss that first time round?

Would love to see Tricky's 'enhanced' version of Carnival use that SID track!!

Have you Sidified any other existing Beeb games? (If not you should! ;) ).


Top
 
PostPosted: Mon Dec 30, 2013 8:48 pm 
Offline
User avatar
 Profile

Joined: Sat Mar 26, 2011 3:01 pm
Posts: 263
Location: Kings Langley
Sorry, the other post arrived while I was typing (or asleep or something!)

It looks like from the code that the first line of the first three lines
EQUB $00, __A2, 1*4+CH1 ;45
EQUB $00, _DS5, 14*4+CH0 ;75
EQUB $00, _DS3, 4*4+CH1 ;51
will be ignored as they all have delay 0 and the third will overwrite the first.

There are three lines later on that look like they will not play the first either
EQUB $06, __A2, 1*4+CH1 ;45
EQUB $00, _DS5, 4*4+CH0 ;75
EQUB $00, _DS4, 4*4+CH1 ;63
the first will cause a delay of 6, but then the next two lines will be applied immediately.

Was this converted from more than two channels? or might a couple of notes have been missed? or have I miss-understood the code?

EDIT:

Has the timing code been changed too, as the whole tune looks like it should play in a few seconds - it looks like delaylow should be counting and then only incrementing delay every 1/4 of a second or so.

EDIT:

but it plays at the correct speed, so the sound statements must be delaying the next note


Top
 
PostPosted: Mon Dec 30, 2013 9:37 pm 
Offline
 Profile

Joined: Fri Nov 07, 2008 2:28 pm
Posts: 65
Quote:
Oh my goodness that's awesome - how on earth did I miss that first time round?
Would love to see Tricky's 'enhanced' version of Carnival use that SID track!!
Have you Sidified any other existing Beeb games? (If not you should! ;) ).

Hi Dave - tee hee - yeah that was a lot of fun sidifing that game. The sid tune was one already made in the HVSC and used 3K and afew CPU cycles - luckerily that particular game hadn't maxed out the BBC already - most other games do unfortunately. So it's possible to do the same for this game if there is room, but I would wait till the normal music is sorted out first.

Quote:
here are three lines later on that look like they will not play the first either
EQUB $06, __A2, 1*4+CH1 ;45
EQUB $00, _DS5, 4*4+CH0 ;75
EQUB $00, _DS4, 4*4+CH1 ;63
the first will cause a delay of 6, but then the next two lines will be applied immediately.

Was this converted from more than two channels? or might a couple of notes have been missed? or have I miss-understood the code?


Hi Tricky,
No - it looks like you understand it perfectly - the data comes from scaling down the input midi file time gaps so sometimes notes might 'incorrectly' overlay so you really have to go thru by hand and remove or reposition (in time) the redundant notes.
As the tune playback sounds 'ok' I guess it's ok.

Actually the input midi file may have some bad notes in it anyway as that was converted from another audio source ( which was the vgm output from the original Acornsoft game! )

You can replace the note data with anything you like - the player won't mind, so you can fine tune the music to you hearts desire.

I think delaylow is not being used - I had another version of the player where you could change the tempo - so delaylow stored the fractional part.
This player just uses 'INC delay' every frame.

I spent this morning ripping out all the non-relevant code - I might have still left some unnecessary stuff in.

The timings in carnival.h in my 2nd download are actually double those in the first - I made a mistake in the first one so it would actually play at double the speed if you try using it.

The tune should be around 24 seconds long.

- PJ


Top
 
PostPosted: Tue Dec 31, 2013 12:13 pm 
Offline
User avatar
 Profile

Joined: Sat Mar 26, 2011 3:01 pm
Posts: 263
Location: Kings Langley
Well, the tune is in, but not quite right!

I did the conversion/indexing in Excel which, took several attempts and isn't quite right; then the code worked second time - got caught out by swapping what i was using X/Y for at one point! (I keep forgetting that indexing ZP,y actually indexes M,y wasting space and time - and no warnings!)

The sound code+data is 309 bytes, so not too bad - well, better than the tune anyway!

When I get the tune correct, I will tidy the code a bit and add it to the code samples - it doesn't use and OS calls, so could replace mr "fibber"'s non-existent sample code.

There are no envelopes yet, as they will needs 100Hz plus to sound much better than what I have and I haven't added the extra timer yet; I expect they will add about 100 bytes timer+code+data.


Attachments:
File comment: Disk image, now with a tune (sort of)
carnival.zip [6.76 KiB]
Downloaded 3 times
Top
 
PostPosted: Tue Dec 31, 2013 1:05 pm 
Offline
User avatar
 Profile

Joined: Sat Mar 26, 2011 3:01 pm
Posts: 263
Location: Kings Langley
Sorry, also missed an A/X swap, new disk image with both channels synchronised and the game freezing/bonus box bug removed - serves me right for bodging the sound update on the end of the wait for vsync - seemed like a good idea at the time.


Attachments:
File comment: new disk image, sound sync'd and bug removed
carnival.zip [6.77 KiB]
Downloaded 5 times
Top
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 129 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 7  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: