ArianeSoft - Programming and development for Windows and Windows Mobile :: Forums :: PPL - Pocket Programming Language :: Made with PPL |
|
<< Previous thread | Next thread >> |
Simple Game |
Go to page [1] 2 | |
Moderators: kornalius, bmanske, PointOfLight
|
Author | Post | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | Here is a 'very' simple game idea, a very simple implementation by a very simple programmer! ME. BLOCKRUNNER - The idea is to manouver your red block for as long as possible by dodging and running from the coloured blocks. Avoid the left, right and bottom borders too as these will also end the game. Looks and sounds simple, but it can be quite tricky! - I have managed 20 seconds so far - thats it. Coded and tested in about 2 or so hours (and it shows) - so don't give me grief about how bad it is! ha ha Try and enjoy it - if you can. PC only at this stage, and source code to follow; 1196286932_671_FT0_blockrunner-x86.zip Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
PointOfLight |
| ||
Registered Member #49 Joined: Sun Sep 17 2006, 03:02pmPosts: 1129 | I downloaded and tried to run the game, and unfortunately it won't work for me. The splash screen comes up, but when I tap the screen to continue I get what basically amounts to an access violation error and the program terminates. I'd hardly classify you as a "simple programmer". You've turned out some pretty amazing stuff on this forum. Eric Pankoke Founder Point Of Light Software http://www.polsoftware.com/ | ||
Back to top | | ||
PointOfLight |
| ||
Registered Member #49 Joined: Sun Sep 17 2006, 03:02pmPosts: 1129 | Okay, I just tried it on my Windows XP machine (the other one was running Windows 2000), and on XP it runs fine. This is cool! I don't know why, but for some reason I really like this type of game. But 20 seconds????? I barely made 10 once, and that's about it. If you ever plan on making any additions / changes to this, I would offer a couple of suggestions: 1. Maybe make the blocks smaller to start with, and grow as the game progresses 2. Make sure the player's box is always under the cursor before the game "starts" 3. Make sure the player is always clear before the game starts. I lost so many games right away because my block started in a collision with an enemy block. Other than that, this is a great little example of what PPL can do. Eric Pankoke Founder Point Of Light Software http://www.polsoftware.com/ | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | Thanks Eric, - I must be a simple programmer as Donone's class example gave me a headache! (Don't understand classes) Originally I had some code that made the blocks speed up, but it got to the stage where it was so impossible to play, I removed it for initial release. There is still a low wrong with the game - I dont know if you noticed but sometimes the blocks clump together and move in unison! - That definately needs to be fixed! ROFL. I thought the red block always started where the cursor was? Hmmm I will have a look at that. Maybe next release will have multi coloured size changing speed changing blocks ... I will see how much time and brain power I can turn to it. I do know that the code is ver inefficient and needs work too! (Sloppy quick coding) Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
matteo.m |
| ||
Registered Member #8 Joined: Fri Jun 16 2006, 05:40amPosts: 367 | Hi Mike, i tried under my windows vista and i get the same behavior that POL is having under w2000 | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | Hmm - I run it under Vista Home Premium and it works fine. (I have User Access Control enabled too - Wonder if its something to do with that) Very strange - It is compiled under 1.32 Pro and not a beta. Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | I have just tried the file on a works PC (XP Pro) and it does work. This does not bode well! I might have a compilation issue - I will try the archive tonight on my wife's Vista laptop and see if it works. Anyone else had this issue? Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
kornalius |
| ||
Registered Member #1 Joined: Wed Apr 19 2006, 08:25pmPosts: 2783 | XP here and it is not running either. When I click the screen to start the game (after the splash screen) I get an access violation. If you'd like to send me the source code, I might be able to tell you exactly were the problem is and if it is a bug in PPL I can fix it! support©arianesoft.ca Regards, Alain Deschenes President and programmer ArianeSoft Inc. (http://www.arianesoft.ca) | ||
Back to top | | ||
Donone |
| ||
Registered Member #231 Joined: Fri Jan 12 2007, 10:17amPosts: 626 | Hello Mike, just spotted your comment, I agree with PointOfLight, far from simple programmer. I haven't tried this game yet but will. I will only let on how long I last when I achieve 21 seconds As a matter of interest I have posted a diagram for the PathSprite Class that may assist you if you are that way inclined. I wish to heck I understood 3D, so hopefully you will publish in the next newsletter. [EDIT] Yes I have just played and can say two things... one it is hellish addictive two I think your clock is running very very slow I managed 7 seconds. [ Edited Thu Nov 29 2007, 10:48am ] You only stop learning when you die. Sometimes I think I am dead http://www.don-simmonds.co.uk | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | Thanks Donone. - Wonder why we can play it but the others can't! :S Have seen your document upload - I wil have a look to see if I can get to grips with classes. BTW. The clock is calculated via the system TICKS routine so should be 100% accurate! hee hee - You need more practice!!! Alain - I have eMailed the source to you. Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
Donone |
| ||
Registered Member #231 Joined: Fri Jan 12 2007, 10:17amPosts: 626 | I am working on a simpler example of the construction and use of Classes, (perhaps a couple of days) in case it may be of benefit to people that have not ventured into that area. The PathSprite Class was a little complicated. I'll keep practicing, I'm using XP pro. PointOfLight got it running and hit 10 seconds. Perhaps his system clock is faster As for yours, you may well have a variable clock :-) You only stop learning when you die. Sometimes I think I am dead http://www.don-simmonds.co.uk | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | I think I may have got that score before I fixed the timer and the enemy movement issues - I can now only get 9 seconds max! ROFL. How rubbish am I at my own game! hee hee Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
PointOfLight |
| ||
Registered Member #49 Joined: Sun Sep 17 2006, 03:02pmPosts: 1129 | I haven't tried it with Mike's game yet, but the trick to this type of game in general is to get a background process running that hits the CPU really hard. That will slow down the enemy blocks enough to get you a high score Eric Pankoke Founder Point Of Light Software http://www.polsoftware.com/ | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | Oi - Cheat! ROFL!!! ha ha ha Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
PointOfLight |
| ||
Registered Member #49 Joined: Sun Sep 17 2006, 03:02pmPosts: 1129 | I just tried it on my box at home (XP SP2), and it fails there as well. There's a lot of differences between what's installed on all 3 machines, but the one thing definitely common between the two that failed that's missing on the one that worked is PPL. On my home box and the Windows 2000 box at work I have PPL installed. The other box has never had anything PPL related on it before. Eric Pankoke Founder Point Of Light Software http://www.polsoftware.com/ | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | Hmmm - I will try and uninstall PPL on the work machine and see if that makes a difference. Still not tried it on my wife's vista laptop yet - I finish work early on Fridays so will get the chance to try tonight! Will post the results later tonioght. Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
kornalius |
| ||
Registered Member #1 Joined: Wed Apr 19 2006, 08:25pmPosts: 2783 | I just tried your code Mike and there are quite a few runtime errors. I don't think it is related to the machine per se. Run your code in the PIDE using Run and not Run Dedicated. In dedicated mode it tries to run as fast as possible it doesn't do any runtime checks. Regards, Alain Deschenes President and programmer ArianeSoft Inc. (http://www.arianesoft.ca) | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | I have run the code in 'Run' and not 'Dedicated run' mode and the only error I got was that the dimensioning of 3 variables was off by 1. Fixed those and it ran without issue. (Increased the DIRX variables by an extra 1) Don't know why others are having issues. (Tried this on WIN XP today and not Vista) Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
matteo.m |
| ||
Registered Member #8 Joined: Fri Jun 16 2006, 05:40amPosts: 367 | Is still not working on my windows vista... as soon i press the mouse button after the splash screen it crash. I can read on the bottom you survived 0 sec and that's it. I may suggest to put some debug line to write a log file so i may can help to understand what's wrong. | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | OK... I have now tried this on my wife's Vista machine and it worked first time. In fact every .EXE that I have made worked immediately with no errors. Both same versions of VISTA HOME PREMIUM. Both have UAC enabled, both have 1GB ram - My laptop is 2Ghz my wife's is 1.73Ghz. My wife's laptop does not have PPL installed Could it be some sort of localisation thing. Both our laptops are set for UK English (across the board). - Maybe this is why Donone is able to run them too! ?? Don't know if this helps any? Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
kornalius |
| ||
Registered Member #1 Joined: Wed Apr 19 2006, 08:25pmPosts: 2783 | Have you fixed the Collision grid issue as well? SetCollisionGrid() ? I got a message that it was too small when I ran your code. Regards, Alain Deschenes President and programmer ArianeSoft Inc. (http://www.arianesoft.ca) | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | I have added SetCollisionGrid(128,128,128); before the GAMECOLLIDE(True); routine. This seems to fix this issue with the collision grid. Alain, when running code from the PIDE is it best to use RUN or DEDICATED RUN? I have been using DEDICATED RUN ever since starting using PPL Why is it there if it masks potential errors? - What run mode is used when an EXE is made? Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
kornalius |
| ||
Registered Member #1 Joined: Wed Apr 19 2006, 08:25pmPosts: 2783 | Executables are ran in the fastest mode possible, which is, dedicated. Normal run mode will do a lot of runtime checks, not dedicated. You should always develop with normal run mode and finally test with dedicated for speed. Regards, Alain Deschenes President and programmer ArianeSoft Inc. (http://www.arianesoft.ca) | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | Here is a re-compiled version of BLOCKRUNNER - Hopefully this version will run on other users PC's as well as mine. I have included all version builds in this archive so you can try it on all your devices. Expand to a folder on your smartcard or PC and run from there. Please let me know if you are still having issues running the game. Thanks Mike. 1196710162_671_FT8117_blockrunner.zip Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
kornalius |
| ||
Registered Member #1 Joined: Wed Apr 19 2006, 08:25pmPosts: 2783 | Hi Mike, Now I get the white screen with the red box in the middle and then it crashes on the PC. Regards, Alain Deschenes President and programmer ArianeSoft Inc. (http://www.arianesoft.ca) | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | Well you are getting further! I cant quite put my finger on what is wrong. You are able to run other things I compile and submit. Maybe there should be a forum thread where we can discuss our development machines and enviroments there in. This way I can try re-compiling and see which environments work best. I will try and get my VMware machine up and running with XP PRO installed to see if I get more success with that instead of vista. Don't understand why I can run this on my DEV machine and my wife's laptop without any issues (and play full games too)! I will keep you all posted. Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
PointOfLight |
| ||
Registered Member #49 Joined: Sun Sep 17 2006, 03:02pmPosts: 1129 | Actually, you are getting closer. I just tried it on my Windows 2000 machine, which previously didn't work, and it runs flawlessly. I would make one minor suggestion, though. On the main screen, determine whether you're running WinCE or Windows and change the instructions to say Hit Space To Exit if on Windows. Really minor, I know, but for those who don't know that the A button on the PPC translates to space on the PC, that would be useful. Eric Pankoke Founder Point Of Light Software http://www.polsoftware.com/ | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | I will include this detection in my future releases when they are both on PC and PDA. I should really change my text to say "SPACE" when its PC only! Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
Donone |
| ||
Registered Member #231 Joined: Fri Jan 12 2007, 10:17amPosts: 626 | Hello Mike, you might want to try this... http://members.iinet.net.au/~pontipak/redsquare.html You only stop learning when you die. Sometimes I think I am dead http://www.don-simmonds.co.uk | ||
Back to top | | ||
Mike Halliday |
| ||
Registered Member #671 Joined: Tue Sep 25 2007, 12:22pmPosts: 400 | 18.86 seconds on that one on my first attempt - huh some sort of genius? I dont' think so, that version is too easy, and is on a bigger screen! rofl! Editor of \'Voice of the PPL\' the newsletter for the PPL by the PPL! Still trying to get people to contribute to the newsletter! | ||
Back to top | | ||
Go to page [1] 2 | |