Hi All
Whilst waiting for my EUzebox to arrive I've started work on my first project.
Being new to Uzebox / C programming / Tools, I decided to go for something simple to ease myself into things:
Current Planned features
Title: Video Poker (based on the arcade version "Jack's or Better")
Mode 1
Single Player only
High score Table (3 Entries)
100 Credits to play with, when there gone it's game over (100 is a starting point I may adjust this though)
Can bet 1 to 5 credits before first deal, no more betting after that. (Max games: 100 / Min: 20 depends on amount bet each game)
All winnings are banked separately from your credits, this will be your score at the end of the game.
I haven't written much code at this point (so no HEX file to share yet).
I've been at work on my main screen layout and the tiles that it is built from, I've kept them basic for now so I have something to work with.
A couple of screenshots to share for now:
I shall continue to post replies here with updates when they are available.
Any feedback / Hints / Tips are most welcome (especially in the Sound FX / Music department )
Cheers
Roukan / Jim
[Completed] Video Poker
[Completed] Video Poker
Last edited by Roukan on Tue Apr 09, 2013 5:09 pm, edited 2 times in total.
Re: WIP: Video Poker
I'd say, such a game wins from making the opponents visible. No, not strippers , that's kind of disturbing. I think of comic characters with a number of facial expressions you have to identify quickly to check if they have good cards or bad. Oh, and a time limit for your moves of course.
Re: WIP: Video Poker
Looks great to me! Keep in any music for the title only. For FXs, you can simply reuse some from other games, build them from scratch or by using D3thAdd3r's patch tool.
Re: WIP: Video Poker
Graphics are very nice!
Re: WIP: Video Poker
Very nice idea! It could be also a good gane for a later multiplayer option for the Uzebox!
Life's too short to remove usb safely
Web: www.hwhardsoft.de
http://www.facebook.com/hwhardsoft
YouTube: http://www.youtube.com/user/hwhardsoft
Web: www.hwhardsoft.de
http://www.facebook.com/hwhardsoft
YouTube: http://www.youtube.com/user/hwhardsoft
Re: WIP: Video Poker
Hi All
Thanks for the previous comments.
I've thrown together a quick "Title Screen" - has music and displays the current high score table.
Screenshot / Hex / MIDI files attached.
Note the Hex file only contains the title screen code ATM.
I have a slight problem with my music:
It plays fine and sounds like it's supposed to, except at the end of the song there is a 32 second gap of silence before it loops back to the start again
I followed the WIKI tips on preparing MIDI files and converting them using MIDICONV, but I've obviously missed something.
Perhaps if someone has a spare moment or two they could take a look and show me the error of my ways.
Cheers
Roukan / Jim
PATCHES.INC
Thanks for the previous comments.
I've thrown together a quick "Title Screen" - has music and displays the current high score table.
Screenshot / Hex / MIDI files attached.
Note the Hex file only contains the title screen code ATM.
I have a slight problem with my music:
It plays fine and sounds like it's supposed to, except at the end of the song there is a 32 second gap of silence before it loops back to the start again
I followed the WIKI tips on preparing MIDI files and converting them using MIDICONV, but I've obviously missed something.
Perhaps if someone has a spare moment or two they could take a look and show me the error of my ways.
Cheers
Roukan / Jim
PATCHES.INC
Code: Select all
//Square Piano
const char patch00[] PROGMEM ={
0,PC_WAVE,9,
0,PC_ENV_SPEED,-15,
4,PC_ENV_SPEED,-7,
0,PATCH_END
};
const struct PatchStruct patches[] PROGMEM = {
{0,NULL,patch00,0,0}
};
Re: WIP: Video Poker
I'll take a peek this afternoon
Re: WIP: Video Poker
Thank you very much kind sirD3thAdd3r wrote:I'll take a peek this afternoon
Re: WIP: Video Poker
Ah, interesting problem with the midi that I haven't encountered before. What I did in AnvilStudio is look at view->event list to see the events. What I noticed is the midi tick that events start on was getting very high at the end of the song(last note starts at tick 49860!) Also tempo was 134, and apparently Anvil says it is set to change tempo over the course of the track and also volume(I see a track flags event, but I don't know the meaning of track flags bits and I assume they are ignored by midiconv).So my theory/initial thought is, something to do with the song position pointer in ProcessMusic() or related just overflowed due to those large numbers. I could be wrong but am too lazy to look through the code and this solution seems to work well.
What I did is open up a second instance of Anvil and a make a new 2 track song. Then I copy/pasted the notes from your midi into the corresponding tracks of the new song. This adjusted the ticks back to normal ranges, from there you can change your tempo back to 134 if you like. Seems to loop properly now. I changed each track to point to it's own patch which you could change back, but a second patch takes so little space and I recommend giving each instrument at least a slightly different sound to make it a little richer. Try the example patches included to see what I mean.
So I believe you did everything correctly here, it was the midi. Did you do any processing the midi and what program if so? I will try and add a trouble shooting section to the tutorial where such things can be there for everyone.
PS I used these arguments for midiconv and the speed is close you might want to dial it in a bit by changing -f a bit. Start and End are right on.
-s0 -e7680 -f66
I suggest you make your patch file like this to start experimenting:
const char patch00[] PROGMEM ={
0,PC_WAVE,9,//experiment with this one for sure!
0,PC_ENV_VOL,128,//start off with a middle volume, less harsh sounding IMO
0,PC_ENV_SPEED,-15,//volume -= (4*15)
4,PC_ENV_SPEED,-7,//volume -= (10*7)
10,PC_NOTE_CUT,0,//make sure patch goes to 0 volume and is properly terminated
0,PATCH_END
};
const char patch01[] PROGMEM ={
0,PC_WAVE,9,
0,PC_ENV_VOL,128,
0,PC_ENV_SPEED,-20,
4,PC_ENV_SPEED,-7,
7,PC_NOTE_CUT,0,
0,PATCH_END
};
const struct PatchStruct patches[] PROGMEM = {
{0,NULL,patch00,0,0},
{0,NULL,patch01,0,0},
};//this will sound pretty good with this song, experiment with patches to find your flavor
Let me know if this all works, I tend to get hasty throwing zips together
What I did is open up a second instance of Anvil and a make a new 2 track song. Then I copy/pasted the notes from your midi into the corresponding tracks of the new song. This adjusted the ticks back to normal ranges, from there you can change your tempo back to 134 if you like. Seems to loop properly now. I changed each track to point to it's own patch which you could change back, but a second patch takes so little space and I recommend giving each instrument at least a slightly different sound to make it a little richer. Try the example patches included to see what I mean.
So I believe you did everything correctly here, it was the midi. Did you do any processing the midi and what program if so? I will try and add a trouble shooting section to the tutorial where such things can be there for everyone.
PS I used these arguments for midiconv and the speed is close you might want to dial it in a bit by changing -f a bit. Start and End are right on.
-s0 -e7680 -f66
I suggest you make your patch file like this to start experimenting:
const char patch00[] PROGMEM ={
0,PC_WAVE,9,//experiment with this one for sure!
0,PC_ENV_VOL,128,//start off with a middle volume, less harsh sounding IMO
0,PC_ENV_SPEED,-15,//volume -= (4*15)
4,PC_ENV_SPEED,-7,//volume -= (10*7)
10,PC_NOTE_CUT,0,//make sure patch goes to 0 volume and is properly terminated
0,PATCH_END
};
const char patch01[] PROGMEM ={
0,PC_WAVE,9,
0,PC_ENV_VOL,128,
0,PC_ENV_SPEED,-20,
4,PC_ENV_SPEED,-7,
7,PC_NOTE_CUT,0,
0,PATCH_END
};
const struct PatchStruct patches[] PROGMEM = {
{0,NULL,patch00,0,0},
{0,NULL,patch01,0,0},
};//this will sound pretty good with this song, experiment with patches to find your flavor
Let me know if this all works, I tend to get hasty throwing zips together
- Attachments
-
- mfix.zip
- (2.79 KiB) Downloaded 537 times
Re: WIP: Video Poker
Trust me to pick a somewhat alien MIDI fileD3thAdd3r wrote:Ah, interesting problem with the midi that I haven't encountered before. What I did in AnvilStudio is look at view->event list to see the events. What I noticed is the midi tick that events start on was getting very high at the end of the song(last note starts at tick 49860!) Also tempo was 134, and apparently Anvil says it is set to change tempo over the course of the track and also volume(I see a track flags event, but I don't know the meaning of track flags bits and I assume they are ignored by midiconv).So my theory/initial thought is, something to do with the song position pointer in ProcessMusic() or related just overflowed due to those large numbers. I could be wrong but am too lazy to look through the code and this solution seems to work well.
Now this is something I shall utilise in future, it seems like a good idea to start with a clean/empty file and cut/paste stuff across (leave those gremlins behind hopefully).D3thAdd3r wrote:What I did is open up a second instance of Anvil and a make a new 2 track song. Then I copy/pasted the notes from your midi into the corresponding tracks of the new song. This adjusted the ticks back to normal ranges, from there you can change your tempo back to 134 if you like. Seems to loop properly now. I changed each track to point to it's own patch which you could change back, but a second patch takes so little space and I recommend giving each instrument at least a slightly different sound to make it a little richer. Try the example patches included to see what I mean.
I only used Anvil Studio / Midiconv to process the original file:D3thAdd3r wrote:So I believe you did everything correctly here, it was the midi. Did you do any processing the midi and what program if so? I will try and add a trouble shooting section to the tutorial where such things can be there for everyone.
The biggest change I made was chopping the file size down, the reason behind this was due to the fact that when I converted the whole file it finished playing half way through and I couldn't find out why, so I cut the file just before that point to try to get rid of the problem (but it stayed).
I can't recall the exact values for: -e -f I used on the copy I linked in this thread, I think -f12 as by default it played very very slow and as for -e it was 49,xxx (ish).D3thAdd3r wrote:PS I used these arguments for midiconv and the speed is close you might want to dial it in a bit by changing -f a bit. Start and End are right on.
-s0 -e7680 -f66
I switched in your patches & midi include files, recompiled and it works perfectly nowD3thAdd3r wrote:I suggest you make your patch file like this to start experimenting:
const char patch00[] PROGMEM ={
0,PC_WAVE,9,//experiment with this one for sure!
0,PC_ENV_VOL,128,//start off with a middle volume, less harsh sounding IMO
0,PC_ENV_SPEED,-15,//volume -= (4*15)
4,PC_ENV_SPEED,-7,//volume -= (10*7)
10,PC_NOTE_CUT,0,//make sure patch goes to 0 volume and is properly terminated
0,PATCH_END
};
const char patch01[] PROGMEM ={
0,PC_WAVE,9,
0,PC_ENV_VOL,128,
0,PC_ENV_SPEED,-20,
4,PC_ENV_SPEED,-7,
7,PC_NOTE_CUT,0,
0,PATCH_END
};
const struct PatchStruct patches[] PROGMEM = {
{0,NULL,patch00,0,0},
{0,NULL,patch01,0,0},
};//this will sound pretty good with this song, experiment with patches to find your flavor
Let me know if this all works, I tend to get hasty throwing zips together
Thanks for the patch tips, I shall have a play around with them.
To be honest aside from Alien midi files, this system is very nice and straight forward for a novice like me to actually get something coming out of the speakers - I like it
Big Big Thanks D3thAdd3r for taking time out to look into this for me, much appreciate it.
Some very useful tips under my belt which will help me avoid issues like this in the future.
**Edit**
Update:
Just tried the create a new midi file in Anvil and paste the tracks across on the full length version I mentioned earlier - that now works too
Cheers
Roukan / Jim