Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Previous page Next page Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Page 1 of 2
Topic:
Prontoscript game PRONTONOID - beta version inside
This thread has 16 replies. Displaying posts 1 through 15.
Post 1 made on Thursday August 16, 2007 at 21:37
André du Fresne
Founding Member
Joined:
Posts:
April 2002
783

Download PRONTONOID (updated version from 08/21/07)
So, here it is, my first Prontoscript game: PRONTONOID. It's based on the arcade classics Arkanoid or breakout. And on Lyndel's Pong game - from which I started. Thanks Lyndel, even though I still do not understand the whole scheduler method ;-)
As for the Prontoscript: I am sorry, that it is so chaotic, I haven't really gotten a grasp on Pronto/Javascript, so mostly it's try and error.

Back to PRONTONOID: It features a level template, which can be used to create your own custom levels in just a minute. Right now, there are only five levels, but you can make as many as you want. A small how-to is included in the file.

-- edit: screenshot deleted, since the template page and the shown instructions have changed in the new version --

I don't know how many resources a wav-output would need - as is there are no sounds in this game.
PRONTONOID is completely beta, that's why I decided to not yet upload it to remotecentral. Of course I will do so, once the following points are resolved

Known bugs / issues:
- sometimes the ball bounces without any apparent reason in a completely different direction: I think I know what causes this problem, but I'm afraid, that it cannot be fixed without losing quite a bit of game-speed
- it can happen, that the ball sort of sticks to the wall... will have to look for it.
- There is no this-was-the-last-level condition, but it shouldn't be a big problem to solve this issue.

Hope you have a little bit of fun with it... any feedback / improvements / c&c etc are very appreciated.
André

Last edited by André du Fresne on August 21, 2007 13:06.
TSU-9600, URC MX-3000, ProntoProNG TSU-7000
Post 2 made on Thursday August 16, 2007 at 22:07
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,994
Andre,

You da man!!! Nice graphics. And, not sure where you are located but I'd be willing to dialog with you via email/telephone as to what's going on in the scheduler.

If you google for the guys name in the comments of the Pong ProntoScript, you'll find the HTML version of the Pong game. From there, you can see that the scheduler is nothing more than the HTML Page timer and when that goes off, the next step takes place (ball moves certain # of pixels as do the paddles).

:)

Lyndel
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 3 made on Thursday August 16, 2007 at 22:20
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,994
Andre,

Just downloaded and played. Very nice. Ball/Paddle movement is a bit sluggish but the graphics you put together are one piece of work.

NICE JOB!!!!!
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 4 made on Friday August 17, 2007 at 08:02
André du Fresne
Founding Member
Joined:
Posts:
April 2002
783
Lyndel,
thanks for taking the time to test this - and also thanks for the compliments on the graphics ;-)
As for the controller / ball movement: that's, when there is too much to be calculated (if there are only 5 bricks left, everything runs really smoothly) - and, I fear, that my code is quite dirty. I am not too confident, that the script can be sped up significantly, though: Clean or dirty code, either way, up to 30 collision checks need to be made during one program cycle...
That's why I wanted to fiddle with the scheduler method to speed things up. But I really don't understand its purpose. Why all this try, catch, diagnostics? I don't understand it - all I want is to have this.process() looped, but I couldn't get it to work.
I checked the website of the Pong's author, but to no avail. I didn't even find the source code...
So, I keep working on this little game here.
Thank you again for your help, Lyndel.
André
TSU-9600, URC MX-3000, ProntoProNG TSU-7000
Post 5 made on Saturday August 18, 2007 at 02:42
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,994
Andre,

You can write a tight loop but then the remote would just sit there and loop, never updating the screen, etc... Philips expected that programmers might do such a thing and provided a GUI.updateScreen() or something like that method as well as a System.delay() method.

Activity.scheduleAfter(timeinms, function,parameters) is intended to allow you to write code that is interleaved, allowing buttons to be pressed during execution, etc...

The scheduler in Pong simply moves paddles up or down, moves the ball a certain number of pixels, and checks for collision. The game speed is intended to determine the timeinms above that the next check needs to occur.

I've got your game code and will likely have a look over the next couple of weeks time permitting to see if it can be pared down to run faster. I'll keep you posted.

Lyndel
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 6 made on Saturday August 18, 2007 at 02:48
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,994
On August 17, 2007 at 08:02, André du Fresne said...
| Why all this try, catch, diagnostics? I don't
understand it - all I want is to have this.process()
looped, but I couldn't get it to work.

The try/catch is put in place to facilitate catching errors in your script, logging them and not letting them propagate out into the Pronto Code. This becomes increasingly important when doing TCP socket or RS-232 programming and using asynchronous onData notifications. If you let an error propagate out of your own script, especially in TCP, Pronto will likely close and tear down the socket.

General programming philosophy (aka best practice) is. If your code generates errors, catch and handle/log them and don't let the propagate out into code that you don't own nor do you know how it behaves when an unexpected error is introduced.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 7 made on Saturday August 18, 2007 at 07:20
André du Fresne
Founding Member
Joined:
Posts:
April 2002
783
Lyndel,
that'd really be awfully nice - hope you are not too shocked, by the code ;-)
I used the GUI.updateScreen() method during the explosion and reappear animation of the player (since no user input is needed/wanted) there.
I did some googleing and found some other approaches of collision detection, which I try to implement in the upcoming week, hoping that it will result in a significant gain of speed.
Thank you again, for taking the time
André
TSU-9600, URC MX-3000, ProntoProNG TSU-7000
OP | Post 8 made on Tuesday August 21, 2007 at 10:45
André du Fresne
Founding Member
Joined:
Posts:
April 2002
783
I have uploaded an updated version of PRONTONOID.
Changes are:
- Better and faster collision detection providing much smoother game play
- added "multiple hit bricks", meaning you can define how often a brick must be hit to be destroyed
- added check for last level
- added a new icon for the home page
I think this is close to the final version.
Let me know, what you think.
PRONTONOID (updated version from 08/21/07)
André

Last edited by André du Fresne on August 24, 2007 05:50.
TSU-9600, URC MX-3000, ProntoProNG TSU-7000
Post 9 made on Tuesday August 21, 2007 at 23:38
Anthony
Ultimate Member
Joined:
Posts:
May 2001
28,870
looks cool André
...
Post 10 made on Sunday September 2, 2007 at 02:25
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,994
bump.
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 11 made on Monday November 19, 2007 at 08:15
mike_filippidis
Founding Member
Joined:
Posts:
January 2002
2
Hi All, I'm new to all this so please excuse the newb Q's

I've downloaded the zip file and it contains the xml and folder of bitmaps... How do I get it to play the game on the 9600?

Sorry just got the unit and want to see whats possible.
Mike :)
Post 12 made on Monday November 19, 2007 at 11:20
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,994
The ZIP file is the XCF (config file). You merge this XCF with your own and put a "Jump" Button to it on the home page (or wherever you like) to play.

However, last I heard, there was also a 'Sounds' folder with the distributable. There was also a README file that explained what to do. Are you sure you got the correct version?
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 13 made on Tuesday March 18, 2008 at 05:47
SimonO
Long Time Member
Joined:
Posts:
January 2003
226
Great work Andre, would it be possibe to have a small delay between levels, as it tends to catch me out (unless that was your intention!?). I also still occasionally get the 'ball sticking to wall bug'...
Post 14 made on Tuesday March 18, 2008 at 13:56
GeorgeForester
Long Time Member
Joined:
Posts:
March 2003
46
Pasting this snippet into the activity script, "hacks" in support for the rotary
not really smooth, but it works :-)

-------------------------------------------------------------------------

onRotary = function(clicks)
{
if (clicks>0)
{
for (i=0;i {
b.moveRight();
if ((i%3)==0) GUI.updateScreen();
}
}
else
{
for (i=0;i<(-clicks);i++)
{
b.moveLeft();
if ((i%3)==0) GUI.updateScreen();
}
}
}
Post 15 made on Wednesday March 19, 2008 at 08:19
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,994
Would it not have been smoother to modify moveRight/moveLeft to take a number of clicks as a parameter? That way, you'd not have to do GUI.updateScreen(). The movement might have been a bit jerky but you would not have to do the GUI.updateScreen() that way.
Lyndel McGee
Philips Pronto Addict/Beta Tester
Page 1 of 2


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse