Page 1 of 1

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Sun Feb 19, 2012 12:33 pm
by loonatic
Inspired by the Raspberry Pi and Liam's tutorials, along with a large dose of nostalgia, I decided to teach myself to program in Python/Pygame.   After playing around for a few days I thought I’d try and recreated my favourite (and first) computer game, Jetpac, which I spent many hours playing as a kid on my rubber keyed Spectrum 48k.

I have uploaded a video of the game in action to YouTube…



I still have a few things to fix and a couple more baddies to implement but it’s basically done.

I wondered if there would be any interest in a tutorial. I have saved the game in its various states and could put together a decent write-up.

I’d like to get my hands on an actual rPi first though as I’m currently running in a VM as per Liam’s first tutorial.

What do you think? Any comments welcomed.

I have ideas for other games of my own invention this time but my try and recreate some other classics too.

Not sure about any possible copyright issues though regarding images/sound.

Cheers, Lee

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Sun Feb 19, 2012 4:24 pm
by toxibunny
Do it!

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Sun Feb 19, 2012 4:59 pm
by meltwater
That looks great.

Would be good to update the graphics as a modern version too.

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Sun Feb 19, 2012 5:54 pm
by MattyD
I would love to see a series of tutorials on this, ranging from planning the actual code structure all the way through to the end.

Even if this is too much of an undertaking, a set of well commented sources would be useful.

Chuckie Egg in Python, that's not too far out is it? That can be my long term goal and I can finally beat my sister's highest score.

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Sun Feb 19, 2012 7:09 pm
by scep
That's superb. The noise of the rocket taking off made me smile

Lee: what programming experience did you have before learning Python? How did you learn it & how long did you take? What resources did you use?  (sorry for the third degree, very interested in how people self-teach programming )

cheers

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Sun Feb 19, 2012 9:22 pm
by loonatic
Thanks for all your comments

Updating the graphics would be cool but not my area of expertise. If anyone would like to volunteer to design a new set of sprites that would be great.

Chuckie Egg would be a good project Matty...maybe do that after my next project which is a game of my own design.

Scep, I have been programming for years mate.  Started off at home with my BBC micro, then progressed onto Pascal and COBOL at college and then Modula 2 and standardML at Uni then back to teaching myself Visual Basic, JavaScript, ASP, PHP and some others I'm sure.  I never got around to C/C++.

I only started with Python when I saw Liam's first tutorial just before Xmas and I started work on the Jetpac Clone about 4 weeks ago - only working on it when the little'un had gone to sleep.  I used the Pygame documentation along with looking at other peoples code and just went from there really.

Thanks, Lee

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Sun Feb 19, 2012 9:35 pm
by deepthought
Absolutely brilliant!

The last time I did any programming it was in Texas TI 99/4A, Sinclair, Dragon, Amstrad and BBC BASIC...

I want to teach myself programming in Python so I'd love to see tutorials on how this was done, please!

I'd be interested to know what your setup is as you say you are using a VM.  I plan to run the nearest equivalent Fedora Linux to the standard Raspberry Pi setup in VirtualBox on my Mac Pro 8-core.

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Sun Feb 19, 2012 9:37 pm
by Jaseman
Oh man! That is BRILLIANT!

Would very much like to see the code.

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Mon Feb 20, 2012 8:34 am
by JoBu
That's a great idea and would be very much appreciated!

Also, the game looks awesome

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Mon Feb 20, 2012 12:15 pm
by JamieR
This would be of strong intrest to me for sure.

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Wed Feb 22, 2012 3:32 pm
by MDC
Try this guy.

feature=plcp

After the initial 43 videos (on Python) he goes onto WXpython (Python with a GUI) and  then he goes onto Pygame. His channel name is thenewboston.

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Fri Feb 24, 2012 12:07 pm
by garyk1968
That is awesome work Lee!

I spent many a happy hour back in the day playing jetpac/sabre wulf/manic miner/jsw etc. and thats a pretty faithful implementation.

Just wondered how you found using python? I've looked at it over the years but never found it that readable. But I suppose doing years and years of xbase, basic and delphi I'm more used to compiled languages than scripted. I did an iphone game using the cocos2d framework which I believe has its origins in pygame.

I would definately be interested in a tutorial.

Other games? hmm how about wizball?

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Tue Feb 28, 2012 1:35 am
by loonatic
Thanks for all your comments...very encouraging.

I have just fixed a few bugs and implemented a more authentic laser which does not fire straight through the platforms. So, apart from the 3 missing baddies, I have finished coding...for now anyways. Might do an updated video tomorrow if I get time.

I have started breaking down the code into tutorial sized chunks and hope to have the first installment on my website early next week.

I would ideally like to try the code on a real-life rPi but the odds arn"t looking good on getting one on Wednesday - assuming that"s what the slightly cryptic message is about.
Cheers, Lee

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Sat Mar 03, 2012 10:55 pm
by flatpack
MattyD said:


I would love to see a series of tutorials on this, ranging from planning the actual code structure all the way through to the end.

Even if this is too much of an undertaking, a set of well commented sources would be useful.

Chuckie Egg in Python, that's not too far out is it? That can be my long term goal and I can finally beat my sister's highest score.



Second this.

I'm looking to see how we can add programming to our scheme of work without needing to teach too much theory (as it puts pupils off). They love the follow me videos we have used in the past for Scratch games. Mostly we will be using PC's but I hope to get a set of Pi's in the future too so I'd need to find a way to use the tutorials on both.

Having explanations of planning etc to back up the tutorials would be great, some pupils will ignore them, others will get hooked which is what we want.

Maybe have an explanation about the quality of the graphics and then at the end show pupils how to use different graphics. The pupils can experiment changing the graphics and seeing if they have to update or edit the code to make the game work correctly.

Rick

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Sun Mar 04, 2012 9:39 pm
by bobba_dwj
loonatic said:


I have started breaking down the code into tutorial sized chunks and hope to have the first installment on my website early next week.


That would be great, please keep us posted.  I'll look forward to seeing your tutorial - I've having fun with Python & Pygame myself recently.

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Sun Mar 04, 2012 10:25 pm
by boley
toxibunny said:


Do it!


I agree.  Great work!

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Wed Apr 11, 2012 8:23 am
by pugmartin
Anything happen with this?

Been keenly checking for updates

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Fri Jun 08, 2012 10:48 am
by tsdadam
Likewise, I'd love to have a crack at this :)

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Fri Jun 08, 2012 2:47 pm
by Genius23008
Personally, I would LOVE to learn Python but I don't know how! I would like to create a game like Nitrome Must Die, can you do that?

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Sat Jun 09, 2012 1:07 pm
by Reider
I`d love to see one. I`m learning Python too and seeing something useful at the end of it and how it all works is really good. I have meds for severe pain and they kill short term memory and some thought control so this would help to get it set in my mind. Basically like skipping a chapter or page of a book every so often then you cannot make sense out of the story. But this is real life like leaving the cooker on, doors unlocked etc and having a brick wall in your head when trying to recall. Makes learning much harder, lol. Got to laugh really......

Steve

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Sun Jun 10, 2012 11:50 am
by Skrotus
do it!

Re: Potential Python/Pygame Jetpac Tutorial

Posted: Sun Jun 10, 2012 8:57 pm
by Crook
An excellent port there. I'd love to see a writeup as well. All I have going in pygame at the moment is a screen and keyboard controllable sprite, which blits the background where the sprite is instead of the entire background for speed. This is still slow for my liking on my RPi (lightning on the PC without FPS control). I'd like to see optimisations you've achieved to make it run this fast.