User avatar
stevo_300
Posts: 33
Joined: Thu Jan 26, 2012 9:38 am
Contact: Website

Re: Projects To Try

Wed Feb 08, 2012 1:52 pm

Hello All,

I am fairly new to programming. Learnt a bit of Java at Uni which gave me a base understanding of control structures/reusable code etc. Since then I have have dabbled in VB.NET, php, html, asp/x and jquery.

Although the web languages are somewhat useful when it comes to sharing stuff with the world. Programs are the things that really interest me.

here comes my dilemma, I look at the RaspberryPi as a kick start into all things Linux and also programming.

I have looked and the tutorials from @FraserLiam and like what I see with Python.

I am definitely a learn by doing type of guy. My problem is coming up with a project to try... That is why I am here, I have a VM set up with similar specs to the RPi, Python installed with Geany, and was wondering if someone could suggest a program/game that I could try to build that would make me have to go out and read the reference sheets and learn the language in an interesting but directed manner...

All progress to be updated here, I will also post files on my website for others to look over with explanations of the code...

Thanks all!


nmahoney
Posts: 9
Joined: Mon Feb 06, 2012 9:48 am

Re: Projects To Try

Wed Feb 08, 2012 4:38 pm

You could pick a card game you know well.

Writing code to represent a deck of cards is normally simple enough in any language and should get you thinking about code reuse pretty early on.

It's also the kind of thing that you can make quite simple then build up in stages. eg:


start with command line interface, move up to graphical
add sound effects/animation to the graphical interface
add automated computer opponent players in the game
add network communication to allow players to be on different machines


That the sort of project idea you're after?

User avatar
stevo_300
Posts: 33
Joined: Thu Jan 26, 2012 9:38 am
Contact: Website

Re: Projects To Try

Wed Feb 08, 2012 7:06 pm

That's perfect.

I had also thought about a 'keepy uppy' style game... but this sounds good too.

I will post my progress for anyone that wants to read it.

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

Re: Projects To Try

Wed Feb 08, 2012 7:33 pm

I would like to see a program that emulates the Playstation 3 Xross Media Bar, if you fancy something different.

User avatar
johnbeetem
Posts: 945
Joined: Mon Oct 17, 2011 11:18 pm
Location: The Mountains
Contact: Website

Re: Projects To Try

Wed Feb 08, 2012 8:36 pm

I recommend "Hunt the Wumpus" in text form as a good non-trivial programming exercise.  IIRC it's about 4 pages of Basic, but much cleaner in a language with good data structure support like C or Pascal.  Very high fun-per-SLoC ratio IMO.

Here's the Wikipedia article: http://en.wikipedia.org/wiki/H.....the_wumpus

User avatar
stevo_300
Posts: 33
Joined: Thu Jan 26, 2012 9:38 am
Contact: Website

Re: Projects To Try

Wed Feb 08, 2012 10:11 pm

Some Exellen suggestions here guys thankyou very much!

I would like to have a crack at most of these.

I think my projet list (for now at least) will be:

Keepy Uppy (have already made good progress on this...)

Single Player Black Jack

Hunt The Wumpus

As for the XMB I could try to get the structure within a python surface for later porting to a proper desktop environment... i feel this will require a greater foundational knowledge of linux that at the moment I just dont have. I am wanting to learn this however I have 3 courses booked this year for my day job that require serious attention (MS Lync, MS SQL and ITILv3).

I will post mu updates/musings on structures etc on an area of my website (will try and get this created tomorrow and post the location)

Thanks all who have posted

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

Re: Projects To Try

Thu Feb 09, 2012 9:34 am

If you come up with some good stuff, please feel free to link in the wiki!

Good luck.
______________
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

Bakul Shah
Posts: 321
Joined: Sun Sep 25, 2011 1:25 am

Re: Projects To Try

Thu Feb 09, 2012 9:43 am

Several game suggestions:

Strategy games:

* nim

* tic-tac-toe

* 3D tic-tac-toe (played on a stack of four 4x4 grids)

Computer vs Human. These can be simple to program (no strategy) to complex (deploying smart strategy in a given time) and teach about how to evolve code.

Other games:

* Hangman

* 20 questions

* A simple Adventure game(player moves about on a grid and can fight hidden monsters & finds treature and food, can be multi level)

* Multi-player adventure

This last game can be evolved in many different directions -- graphics, sounds, physics simulation, concurrent programming, strategy, ...

mooncrater
Posts: 3
Joined: Thu Feb 09, 2012 10:49 am

Re: Projects To Try

Thu Feb 09, 2012 11:14 am

The "15 Puzzle" is a nice one to do, and doesn't need a fancy user interface. You can do it in stages, e.g.:

1. Write some code to represent and display the game board

2. Add "move one piece" code

3. Add "detect when finished" code

4. Add code to randomize the board for the start

With all that done you can jazz up the user interface, e.g. animation, cursor, colour etc. An interesting final challenge is to write the code to solve the puzzle - then you can watch the computer solve it on screen.

paulie
Posts: 263
Joined: Thu Jan 19, 2012 6:51 pm

Re: Projects To Try

Thu Feb 09, 2012 11:48 am

I can remember the text-based version of "Star Trek", and someone hacking it to change "Warp or Ion drive?" to ask "Whoosh or Wimp drive?".....

http://en.m.wikipedia.org/wiki.....text_game)
It has been my custom to use Xeyes

Jawloms
Posts: 16
Joined: Wed Dec 28, 2011 2:11 pm

Re: Projects To Try

Thu Feb 09, 2012 12:19 pm

Sudoku Solver?

davidmam
Posts: 101
Joined: Tue Dec 06, 2011 4:13 pm

Re: Projects To Try

Fri Feb 10, 2012 12:08 pm

Once you have a simple game code working, it is time to start the wonderful world of hardware hacking. The joy of the Pi for me is that it is able to interface to hardware. I've just started dabbling in the electronics side of things (I got an arduino kit a month ago and am amazed by how easy it is to build stuff that just works which has led to increasingly advanced projects and following my curiosity.

I'd take something like Hunt the Wumpus and make a simple hardware controller for it. Left/right/Forwards etc. Maybe a Wii Nunchuch could be used.

Once we can get people into the 'I can build a beam splitter that will count how many times the bird goes into the box' or similar, then real physical things become far more enticing than virtual ones. And modern semiconductors are really cheap.

the Uni at which I work has a quote from one of it's fomer principles - "By creating we think, by living we learn". Taking what we see and copying, then extending. By doing, failing, repeating, succeeding we learn.

If the RPi can encourage that kind of curiosity in kids and adults, the 'I can do it' attitude, then it will be a resounding success.

User avatar
stevo_300
Posts: 33
Joined: Thu Jan 26, 2012 9:38 am
Contact: Website

Re: Projects To Try

Sat Feb 11, 2012 2:53 pm

I have roughly put together the website raspberrypi.stevo300.co.uk if anyone wants to follow my progress.

User avatar
liz
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 5202
Joined: Thu Jul 28, 2011 7:22 pm
Contact: Website

Re: Projects To Try

Sat Feb 11, 2012 6:44 pm

A Tetris clone is an exercise that's really good fun, and you'll learn a lot while you're at it. And what about Conway's Game of Life?
Director of Communications, Raspberry Pi

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

Re: Projects To Try

Mon Feb 13, 2012 11:22 am

liz said:


A Tetris clone is an exercise that's really good fun, and you'll learn a lot while you're at it. And what about Conway's Game of Life?


Yes, Conway's Game of Life is an excellent exercise - my initial version of the program was fairly simple (written in Python with Pygame), but the hard bit was speeding it up in order to keep the frame rate at a decent level.  This game, with its very simple mathematical rules, produces very surprising results.

http://www.bitstorm.org/gameoflife/

http://www.math.com/students/w...../life.html

Other ideas are a snake game (which grows as it eats a fruit item on the screen and dies if it hits itself) and minesweeper.

Return to “Staffroom, classroom and projects”