 johnnyboyct
join:2003-06-11 Newington, CT
·Cox HSI
| Ubuntu app programming? Im trying to write a simple app for my 5 month old daughter to play with. She loves the lights on the keyboard (saitek eclipse 2) and presses and really looks up to see whats going on.
Id like to make a really quick app to catch key strokes, and play sound files, as well as something colorful on the screen.
Ive done 80% PHP/MySQL Javascript type web development and not much desktop dev. Im thinking Java might be the best route because I mostly use Ubuntu, but if I did a bunch of work on this, id be nice to make work on my windows laptop..
Any suggestions or advice? -- Connecticut Web Design and Development | |
|
  jayco437 Premium join:2001-08-11 Lincoln, NE | Re: Ubuntu app programming? Take a look at Python and Pygame. Also might take a look at Ruby and Shoes. Either of which will work cross-platform. | |
|
 |
 |
 |   jayco437 Premium join:2001-08-11 Lincoln, NE
·Windstream
| Re: Ubuntu app programming? Yeah, not sure about sound yet. It's billed as a "tiny toolkit" and its missing some things that I'm certain Pygame has. I probably shouldn't even mention them in the same sentence, but I found I prefer working with Ruby over Python of late. I know the documentation available on the net (such as the book) fails to mention some things that had been released in the latest public release Checkboxes I think, or maybe radio buttons? Maybe both? Either way, check the examples included with the app.
The video includes sound, so I know it'll *do* sound, but maybe it might not have to be "pretty" (i.e. a hidden video clip or something). | |
|
  johnnyboyct
join:2003-06-11 Newington, CT
·Cox HSI
| Actually Ive figured out through the shoebox examples how to listen for the keyboard strokes, put the large letter on the screen with a dynamic background, and play a sound. Im trying to figure out how I can animate the background gradient to fade to black, but I think thats a programming challenge vs an ability of the language (although youd think fade would be simple?) I just need to do something like
obuviosly thats aweful, but I learned enough for a Sunday and havent had to code since before xmas :P
-- Connecticut Web Design and Development | |
|
 |   jayco437 Premium join:2001-08-11 Lincoln, NE | Re: Ubuntu app programming? I'm totally not familiar with Shoes much of anything. Looking at it quickly though, do you need a while where you have the if? | |
|
 |
 |   jayco437 Premium join:2001-08-11 Lincoln, NE | Re: Ubuntu app programming? I played aroudn with it but couldn't get anything that worked. Tried fading out the alpha channel and fading a regular color even but I need to slow it down without blocking it. Be interested to see if you come up withs omething though.... | |
|
  johnnyboyct
join:2003-06-11 Newington, CT
·Cox HSI
| This is rough lol, but im learning ruby so screw it :P
Im having a really tough time with flow control. Like the first problem with the fading not working, Im now finding you cant load a sound on keypress. So I have to loop through all the sounds at load and put them in an array I guess, then use those index's.
this isnt working, but I think im getting there.
-- Connecticut Web Design and Development | |
|
 |   jayco437 Premium join:2001-08-11 Lincoln, NE
·Windstream
| Re: Ubuntu app programming?Not sure where you're erroring out, but I think your attempt to build an array from a to z doesn't look quite right.
Run this in irb:
| |
|
  johnnyboyct
join:2003-06-11 Newington, CT
·Cox HSI
| Yeah I'm frustrated with this.It looks nice, but I dont see a reason to choose it over adobe air or something if im learning something new. I cant find any help anywhere :/
It could be me being frustrated. I just wanted to load the sounds, but its being redonkulus even if I put them in an array, it wont play right on keypress :/
Ill let you know what I come up with John -- Connecticut Web Design and Development | |
|
 |   jayco437 Premium join:2001-08-11 Lincoln, NE | Re: Ubuntu app programming? Yeah, it's pretty new so there isn't a lot out on it yet compared to other languages. But it's ruby 
What do you mean it won't load right on keypress? | |
|
 |  |   johnnyboyct
join:2003-06-11 Newington, CT
·Cox HSI
1 edit | Re: Ubuntu app programming?Im glad I took a look at it, and I really like ruby syntax so its good I peaked :)
FWIW I cant figure out how to load a sound file from assets and store it in an array to play on keypress.
I tried here, but I had a few drinks after a long day of work and its pissing me off :P
Seems you cant do it on the key event, so you have to do it before when it loads, but I cant get the stuff to load into an array correctly, nor get the progress bar to not be useless...
I reinstalled flex builder to see if I can do it eiseir with air or something,but would love to get this eventually ,. | |
|
 |
|
 |