Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Share Your Creations
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Share Your Creations Show your developed application to Basic4ppc community. Please include source code if possible.

Simon a simple remember the sequence game

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-29-2010, 09:16 PM
Junior Member
 
Join Date: Oct 2009
Location: London
Posts: 43
Smile Simon a simple remember the sequence game

How good an application can you make in only 100 lines of B4PPC code?
Here is my attempt of a ‘Simon’ © type game from the ‘80’s.

I started writing this as an exercise and halfway through decided to challenge myself to write it in just 100 lines, I went over by 4 lines, see what you think… Please forgive the non-existent error checking and lack of sympathy for wide screed devices :-(

Features include buttons that light up and sounds! - all in 100 lines (almost)

How good an application or game can you make in 100 lines?
Attached Images
File Type: jpg ScreenShot058.jpg (9.6 KB, 33 views)

Last edited by Simontelescopium : 06-09-2010 at 07:12 PM.
Reply With Quote
  #2 (permalink)  
Old 03-30-2010, 04:11 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,734
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Very nice!

One small thing:
Code:
Dim ControlNo(0As Byte
You should declare the array as a String array (or do not declare the type at all).
As of the next version you will get an error if you try to convert an array type and this actually happens in this line:
Code:
ControlNo() = StrSplit(Sender.Name,"n")
Because StrSplit returns a String array.
Reply With Quote
  #3 (permalink)  
Old 03-31-2010, 09:50 AM
Junior Member
 
Join Date: Oct 2009
Location: London
Posts: 43
Default

ok thanks for the tip.
I have also noticed that the short mp3 files don't play on the device - not even in media player! but work fine on the desktop, so I converted to WAV and found these short files also have difficulty playing - the problem this time appears to be the speaker on my HTC touch HD which doesn't seem to reproduce pure tones that well (just get white noise seems to be sounds below 500hz) - works better with the headphones in :-)

So once I have generated all the WAV files I'll ditch FMOD and mp3's - makes the program size smaller :-)

Is there any way to compile the sound files into the exe i.e. an image list equivalent for sound files?

Last edited by Simontelescopium : 03-31-2010 at 01:36 PM.
Reply With Quote
  #4 (permalink)  
Old 05-18-2010, 12:36 PM
Knows the basics
 
Join Date: May 2010
Posts: 92
Default

Hello Simon.
You deserve an award for uploading such nice applications.
Me ... I'm still a noob and have a lot to learn in programming.I have tried to rewrite your app (as a self-drill) in a simpler way.Attached is what I have been able to pull off......
My app aint working right.If the player presses a button when userInput is supposed to be false there is no message box displayed and the sequence gets erratic, and when the player presses the wrong button msgbox("Bad luck") is not always displayed.
Yesterday I spent hours trying to sort the aforementioned out, but in vain.
I assume it's not a big trouble for you or for some other expert to check my code and point out the bug.I will appreciate such an effort.

Also I thought of using wav files instead of mp3 as fmodCE seems to have disappeared from that site.But i failed to find any proper sounds for this game.
So any refference to a good wav source will be very welcome.

Thank you.
Nicolas.
Reply With Quote
  #5 (permalink)  
Old 06-02-2010, 07:55 PM
Junior Member
 
Join Date: Oct 2009
Location: London
Posts: 43
Default

The code seems to work for me... What might be happening is you are using the keyword 'sleep' to control the pace of the game, i think these halt the program entirely using the timers you can still react to user input while still controling the pace.


I have added some levels (different numbers of buttons) some scoring and sounds, source available here...http://itslifejim.wikispaces.com/files
I grew bored of this application so am not developing in any further feel free to use and abuse the code/ sound files etc.

Simon.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple BlackJack game ExcludeReality Share Your Creations 7 08-12-2009 08:43 AM
Bluetooth serial port program with Automatic Sequence repeat function. pdablue Share Your Creations 2 04-08-2009 02:10 PM
Sqlite Data Sequence ceaser Questions (Windows Mobile) 2 07-29-2008 11:03 AM
The right SerialOnCom sequence Put Claude Questions (Windows Mobile) 2 01-11-2008 09:28 AM
playing sounds in sequence... Cableguy Questions (Windows Mobile) 3 07-08-2007 09:00 PM


All times are GMT. The time now is 12:32 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0