View Full Version : Learning C++ by playing...?!
DanMarshall
09-02-2005, 07:19 AM
Guys--
This popped into my head the other day, and I can't shake it... I can't help but feel there's a good idea in there somewhere, but it needs refining. Also, it's way beyond my programming skills, so if you want to steal/ adapt it, please feel free.
Basically, I see it as a fully playable platform puzzler. You start off being able to run left and right, and gain more skills like jumping, shooting etc as the game progresses. The crux, however, is that really it's an educational game -- you can see the game code running in a box on screen somewhere. So if you pause the game, it'll say "I'm currently in the "Jump" function: click each line to read about what it does", or something along those lines.
The more code-based puzzles you 'solve', the better your skills and the more you progress. Maybe some system whereby you can only learn to jump once you've worked out which Jump function (from a choice of five) works best.
I know there's no end of teenage boys gagging to learn to write their own games, and sifting through books learning Hello World is a big turnoff when you want to learn about real game code... Unfortunately, I appreciate that the 'simple' run/ jump platformer is really extremely advanced code and there's a hell of a lot to cover before you get even that far. So there's a stumbling block there, to start with...
Anyway -- just thought I'd put it out there. Would love to hear your thoughts...!
All the best,
Dan
Diragor
09-02-2005, 07:33 AM
This idea has kind of a cool, Matrixy feel to me. You're operating in a world based on rules and you get to actually look at the rules and learn how to exploit them and push their boundaries. If you can see the code by which the enemies operate then you can learn their weaknesses, too. Maybe you could also see hidden shortcuts and "cheats" in the code. I don't know exactly how it would work or if it would be any fun, but it's certainly interesting. Very interesting.
aiosup
09-02-2005, 08:29 AM
... earn to write their own games, and sifting through books learning Hello World is a big turnoff when you want to learn about real game code... Unfortunately, I appreciate that the 'simple' run/ jump platformer is really extremely advanced code and there's a hell of a lot to cover before you get even that far. So there's a stumbling block there, to start with...
Dan, you are absolutely right! So right, that the Politehnica University of Bucharest won a Microsoft Research project contest with a proposal very close to yours, back in 2004.
The differences in our approach are that
(1) we are addressing a curricula of general computer algorithms, not a particular 'how to make games' topic;
(2) the whole package is intended for students and not for kids, for obvious reasons -- a full-blown curricula is many times too difficult to follow by kids, even if it is wrapped in the games candy;
(3) we are dealing with more than one game type, instead of focusing on any one game, because students, like kids, need to be entertained with different candies every time.
A link to a web site presenting the project: http://g4k.knowledge.cs.pub.ro/ (needs to be updated, I guess, with more recent results -- many almost ready).
Regards,
Alex
monco
09-02-2005, 08:59 AM
And memory addresses (pointers) could be like doors you open. God forbid you open up one that hasn't been verified safe by your team (uninitialized) and meet the boss to end all bosses: Seg Fault-O-Tron!
ggambett
09-02-2005, 09:08 AM
Funny, I did exactly this yesterday :) It was an event organized by my university where we invited kids finishing high school (16-17 year olds). In my half of the presentation I gave a very quick intro to programming and jumped right into games - with surprisingly good feedback from the kids, who had never programmed before!
I used Python. Way easier to understand the "jump function" (BTW, I had them implement it)!
You can download the examples and my slides from http://www.mysterystudio.com/gabriel/juegos The slides are in spanish but you should be able to figure it out. Most of the code has variables and functions in english.
lakibuk
09-02-2005, 09:32 AM
The game is called Pacoman. :D
lakibuk
09-02-2005, 09:56 AM
Anyone remember the game Omega (Amiga and MS-DOS)?
It was about programming a tank in a BASIC-like language.
(Now that would be a great game for Realarcade :) )
http://www.toadstool.net/games/omega/index.htm
In school i was taught programming with an application where you had to move around a robot with commands like "while free(left) walk left"
aiosup
09-02-2005, 09:56 AM
Funny, I did exactly this yesterday :) It was an event organized by my university [...] You can download the examples and my slides from http://www.mysterystudio.com/gabriel/juegos
Nice! We wanted, however, to ease the pain of learning OOP/algorithms of 1st/2nd/3rd year computer science students, before attracting new students (the Politehnica University of Bucharest is rated as the best CS university in the country, so the latter is taken as granted -- a possible big mistake, time will prove), so we got stuck to larger paste your code and make this game work game code bases.
The slides are in spanish but you should be able to figure it out.
Romanian, Spanish, Portuguese, French, adn, of course, Italian, are all variants of Latin (or at least descendants) :) So I can understand a bit of your language, as much as you can mine. Pe maine! (hasta manana!)
Regards,
Alex
aiosup
09-02-2005, 09:57 AM
And memory addresses (pointers) could be like doors you open. God forbid you open up one that hasn't been verified safe by your team (uninitialized) and meet the boss to end all bosses: Seg Fault-O-Tron! What about languages that manage memory allocation by default. Java, Python, C#, C++ w/ smart pointers :p ... :D
Regards,
Alex
ggambett
09-02-2005, 10:25 AM
The game is called Pacoman. :D
That's a pun practically impossible to understand to anyone outside Uruguay... you see, instead of the Pacman and the Ghosts I used the emblems of the two biggest, and arch-rival, soccer teams here. There's also a high profile guy who manages most of the top players and negotiates their passes with european clubs - he's very good at it, that's why there are so many uruguayan players in spain, italy and england. The guy is called Francisco "Paco" Casal, hence the name Pacoman :)
Martoon
09-02-2005, 11:51 AM
Check out Colobot (http://www.colobot.com). It's basicly a nicely done 3D RTS where you command robots that you build to fight, collect resources, etc. In the missions, the robots are usually given basic behaviour programs. You can modify/write new code for them (it's a sort of Java-esque language). The incentive in the game to write programs is that you can make your robots much more automated. For example, instead of telling a robot to go to another robot who's battery is low, then manually taking control to swap the battery, you can write a program that has a robot scan for the nearest robot with a battery level below some threshold, move to it, swap the battery, then look for the next, etc. It's very cool. As you continue to play missions, you keep seeing more and more things that you'd like to automate. The code editor is integrated into the game, so you can pull up a code window overlay and watch lines highlight as they're executed, or step through one line at a time, etc.
Rod Hyde
09-02-2005, 12:47 PM
Anyone remember the game Omega (Amiga and MS-DOS)?
It was about programming a tank in a BASIC-like language.
More recently IBM had Robocode (http://robowiki.net/cgi-bin/robowiki) which was similar, but taught Java programming. Great fun, particularly the nanobots. There's a repository of bots here (http://www.robocoderepository.com/).
--- Rod
Travis Dorschel
09-02-2005, 01:18 PM
There are quite a few virtual robot programming games out there. Most of these give you a standard API for sensors and movement and then you do the rest. Most revolve around fighting other programmed robots. I made something similar in college where you programmed a robot to move barrels around by clicking together blocks of "code". Maybe I'll post the Java applet online...
Here are some virtual robot programming links:
http://www.roboforge.com
http://www.cs.mcgill.ca/~stever/games//
http://dmoz.org/Games/Video_Games/Simulation/Programming_Games/Robotics/
aiosup
09-03-2005, 02:06 AM
There are quite a few virtual robot programming games out there.
Lol, yeah! Check also The MIT Autonomous Robot Competition (http://web.mit.edu/6.270/), and to the Robocup (http://www.robocup.org/) competition (target goal for the latter: By the year 2050,
develop a team of fully autonomous humanoid robots
that can win against the human world soccer champion team. ).
Regards,
Alex
monco
09-04-2005, 06:59 AM
What about languages that manage memory allocation by default. Java, Python, C#, C++ w/ smart pointers :p ... :D
Regards,
Alex
java.lang.NullPointerException...
Powered by vBulletin™ Version 4.1.3 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.