loonatic
Posts: 3
Joined: Sat Jan 07, 2012 12:08 am
Contact: Website

Re: Potential Python/Pygame Jetpac Tutorial

Sun Feb 19, 2012 12:33 pm

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

toxibunny
Posts: 1382
Joined: Thu Aug 18, 2011 9:21 pm

Re: Potential Python/Pygame Jetpac Tutorial

Sun Feb 19, 2012 4:24 pm

Do it!
note: I may or may not know what I'm talking about...

User avatar
meltwater
Posts: 1014
Joined: Tue Oct 18, 2011 11:38 am

Re: Potential Python/Pygame Jetpac Tutorial

Sun Feb 19, 2012 4:59 pm

That looks great.

Would be good to update the graphics as a modern version too.
______________
http://www.themagpi.com/
A Magazine for Raspberry Pi Users
Read Online or Download for Free.

My new book: goo.gl/dmVtsc

Meltwater's Pi Hardware - pihardware.com

Like the MagPi? @TheMagP1 @TheMagPiTeam

MattyD
Posts: 4
Joined: Tue Jan 31, 2012 5:30 pm

Re: Potential Python/Pygame Jetpac Tutorial

Sun Feb 19, 2012 5:54 pm

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.

User avatar
scep
Posts: 1062
Joined: Sun Nov 20, 2011 8:53 am

Re: Potential Python/Pygame Jetpac Tutorial

Sun Feb 19, 2012 7:09 pm

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

loonatic
Posts: 3
Joined: Sat Jan 07, 2012 12:08 am
Contact: Website

Re: Potential Python/Pygame Jetpac Tutorial

Sun Feb 19, 2012 9:22 pm

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

User avatar
deepthought
Posts: 49
Joined: Sun Jan 29, 2012 7:43 pm
Contact: Website

Re: Potential Python/Pygame Jetpac Tutorial

Sun Feb 19, 2012 9:35 pm

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.

Jaseman
Posts: 302
Joined: Tue Jan 10, 2012 12:59 pm
Contact: Website

Re: Potential Python/Pygame Jetpac Tutorial

Sun Feb 19, 2012 9:37 pm

Oh man! That is BRILLIANT!

Would very much like to see the code.

JoBu
Posts: 3
Joined: Mon Feb 20, 2012 8:31 am

Re: Potential Python/Pygame Jetpac Tutorial

Mon Feb 20, 2012 8:34 am

That's a great idea and would be very much appreciated!

Also, the game looks awesome

JamieR
Posts: 32
Joined: Thu Jan 26, 2012 11:59 am
Contact: Website

Re: Potential Python/Pygame Jetpac Tutorial

Mon Feb 20, 2012 12:15 pm

This would be of strong intrest to me for sure.

MDC
Posts: 167
Joined: Thu Jul 28, 2011 6:27 pm

Re: Potential Python/Pygame Jetpac Tutorial

Wed Feb 22, 2012 3:32 pm

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.

garyk1968
Posts: 16
Joined: Thu Feb 09, 2012 8:50 am
Location: Bedfordshire
Contact: Website

Re: Potential Python/Pygame Jetpac Tutorial

Fri Feb 24, 2012 12:07 pm

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?

loonatic
Posts: 3
Joined: Sat Jan 07, 2012 12:08 am
Contact: Website

Re: Potential Python/Pygame Jetpac Tutorial

Tue Feb 28, 2012 1:35 am

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

flatpack
Posts: 2
Joined: Sat Mar 03, 2012 2:17 pm
Location: Bedale
Contact: Website

Re: Potential Python/Pygame Jetpac Tutorial

Sat Mar 03, 2012 10:55 pm

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

bobba_dwj
Posts: 14
Joined: Sat Jan 21, 2012 6:06 pm

Re: Potential Python/Pygame Jetpac Tutorial

Sun Mar 04, 2012 9:39 pm

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.

boley
Posts: 48
Joined: Wed Nov 30, 2011 9:50 pm

Re: Potential Python/Pygame Jetpac Tutorial

Sun Mar 04, 2012 10:25 pm

toxibunny said:


Do it!


I agree.  Great work!

pugmartin
Posts: 1
Joined: Wed Apr 11, 2012 7:20 am

Re: Potential Python/Pygame Jetpac Tutorial

Wed Apr 11, 2012 8:23 am

Anything happen with this?

Been keenly checking for updates

tsdadam
Posts: 4
Joined: Mon May 21, 2012 12:37 pm

Re: Potential Python/Pygame Jetpac Tutorial

Fri Jun 08, 2012 10:48 am

Likewise, I'd love to have a crack at this :)

Genius23008
Posts: 54
Joined: Sun Jun 03, 2012 6:50 am

Re: Potential Python/Pygame Jetpac Tutorial

Fri Jun 08, 2012 2:47 pm

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?

Reider
Posts: 75
Joined: Sun Mar 04, 2012 12:00 pm

Re: Potential Python/Pygame Jetpac Tutorial

Sat Jun 09, 2012 1:07 pm

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


Crook
Posts: 42
Joined: Mon Jun 04, 2012 5:57 pm

Re: Potential Python/Pygame Jetpac Tutorial

Sun Jun 10, 2012 8:57 pm

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.

Return to “Gaming”