07-16-2015, 11:19 AM
Let's start by quoting what @Simbax said yesterday:
Because of that, I'd like to start what I've been thinking about for a long time - completly redesigning the programming course in the game.
But why is the current one bad? As @Simbax already mentioned, it's really hard to learn from it without previous expirience with programming.
I've started planning how we could make it better. The current first exercise level starts with learning 3 instructions without explaining the language syntax and HOW it works. What are those numbers inside the braces? Why does the code have to be started with "extern void object:
rogName()"? I think it would be easier to start if it at least explained the basic program structure very briefly.
Besides, what if somebody doesn't know what programming is? There should be some introduction explaining that.
Let's take a look at what I've written. This is just first two chapters, 16 levels.
All exercises take place on some new planet. I have no idea how it will look yet.
1. INTRODUCTION
1.1. First steps
You land on a planet. The mission starts with a cutscene - WheeledShooter and the astronaut get off the spaceship. The robot goes first. Suddenly, two AlienAnts appear and start attacking the shooter (it has magnifyDamage=0.05 so they don't actually destroy it). The astronaut escapes to the spaceship. At this point, the cutscene ends. Robbie appears and displays message "Press F1 or click on your assistant to read instructions on your SatCom".
The player gets some basic informations about what programming is. Then, demonstration time - how programming can be useful? - he is asked to click on the robot and start an already written program that looks something like this:
1.2. Your first program
Starting cutscene: A WheeledGrabber comes out of SpaceShip and stops 5m from a platform.
Task: You have to move your robot 5m forward.
Info in SatCom: How to open program editor, basic program skeleton structure (briefly explaining each of these: extern, void, object::, program name, (), {}), what an instruction is, what a parameter is, move() instruction
TODO: Is that not too much information at once?
1.3. Moving things
Scenery: The robot stands where he ended the last exercise. There is a titanium cube in front of it
Task: Move the titanium cube 5m backwards, to the starting position of previous exercise.
Info in SatCom: Negative numbers to move(), grab() and drop()
1.4. Turning around
Scenery: The robot stands where he finished the last exercise, with a titanium cube in front.
Task: The player has to move the titanium cube to the platform on the left and then come back on the starting platform.
Info in SatCom: turn(), more than one way to do the same thing:
1.5. The other way
Scenery: The robot stands where he finished, there is a titanium cube in front of it.
Task: Move the titanium cube to the platform on the right.
Info in SatCom: negative numbers to turn()
1.6. Help a friend
Scenery: The robots moved to a different place. There is a WheeledShooter with an empty EnergyCell. WheeledGrabber stands behind it with a full EnergyCell on the left. AlienAnts are coming.
Task: Replace the energy cell with a full one. The Shooter is already programmed to kill the ants.
Info in SatCom: This is meant to be a bit of a challenge to the player to see what he learned, so he gets only very general instructions on what needs to be done. There is also a step-by-step algorithm hidden under a link in case he decides that he needs more help.
2. BASIC INSTRUCTIONS AND LOOPS
TODO: The most basic instructions are already covered in the previous chapter. Maybe name this "More basic instructions" or something like that.
2.1. Make some titanium
Scenery: There is a Converter 5m in front and TitaniumOre on a platform 10m behind
Task: Make some Titanium and bring it back to the platform
Info in SatCom: wait(), time needed to make Titanium, move away so that the Converter can work
2.2. Using a radar
Scenery: The same as in the previous exercise, except you don't know anything about positions of the objects
Task: Do the same as in the previous exercise
Info in SatCom: what is a variable, "object" variable type, object categories, radar(), goto(item.position)
2.3. Looping in a loop
Scenery: Three TitaniumOres, no platform this time
Task: Make 3 titanium cubes
Info in SatCom: while(true) {...} (with a quick explanation on what the argument means), space() instruction
NOTE: In this exercise, the program crashes when no more TitaniumOre can be found, that's not a problem. Don't try to fix that, it might be too early for a player to understand everything.
2.4. Patience is a virtue, time is money
Description: Do not wait too long!
Scenery: one TitaniumOre
Task: Make Titanium and deliver to the platform, without using wait()
Info in SatCom: additional arguments to radar(), null if radar not found, using argument of the while() loop
NOTE: If ProhibitedToken from one of the CeeBots still works (I believe it does) we can make sure the player doesn't use wait()
2.5. Under attack!
Scenery: AlienAnts attacking from 4 sides
Task: Kill them all
Info in SatCom: fire()
NOTE: No loop here yet
2.6. Don't repeat yourself
Scenery: The same
Task: The same
Info in SatCom: for() loop, explain the counter variable
2.7. There's more!
Scenery: AlienAnts attacking from 8 sides
Task: Kill them all
Info in SatCom: Copy of the program from previous exercise. Show how easy it is to make this program work with 8 ants thanks to using the loop.
2.8. Aiming is important
Scenery: AlienAnt on a hill
Task: aim() and fire()
Info in SatCom: aim(), aiming angle limitation
2.9 Don't shoot me!
Scenery: AlienAnts on 3 sides, astronaut on the 4th one
Task: for() + fire(), but don't shoot on the 3rd iteration, bacause an astronaut is standing there
Info in SatCom: if() instruction, if(i == 2)
2.10. Helping more friends
This is basically exercise 1.5 from the current game
Scenery: There is 10 WingedShooters without PowerCells programmed to destroy a nest of AlienAnts
Info in SatCom: Again, a challenge level. Only general instructions on what needs to be done.
As you can see, these exercises are designed to learn programming in small steps. This is basically the same knowledge we currently have in the first chapter (7 levels). I believe this is better than putting a ton of new instructions in one exercise. Also, each chapter ends with an challenge levels that encourage players to think like a programmer. Additional help is still available if he needs it.
I'm waiting on any suggestions - do you think doing the programming course in smaller steps is good? Also, I'm waiting on ideas how the planet the exercises take place at could look.
(07-15-2015, 09:36 PM)Simbax Wrote: [ -> ]Nowadays, Colobot isn't even one of a kind, because there is a lot of (good) programming games much better achieving their goals. Colobot doesn't even have a serious programming language, so there is even no motivation to learn from it. In my opinion, this project is already dead for the supposed target audience. It was already dead in 2001, as it was too hard to learn anything from it without previous at least little knowledge about real Computer Science and nearly everyone beat it without any programming, so it missed its main goal.
Because of that, I'd like to start what I've been thinking about for a long time - completly redesigning the programming course in the game.
But why is the current one bad? As @Simbax already mentioned, it's really hard to learn from it without previous expirience with programming.
I've started planning how we could make it better. The current first exercise level starts with learning 3 instructions without explaining the language syntax and HOW it works. What are those numbers inside the braces? Why does the code have to be started with "extern void object:
![Tongue Tongue](https://colobot.info/forum/images/smilies/tongue.png)
Besides, what if somebody doesn't know what programming is? There should be some introduction explaining that.
Let's take a look at what I've written. This is just first two chapters, 16 levels.
All exercises take place on some new planet. I have no idea how it will look yet.
1. INTRODUCTION
1.1. First steps
You land on a planet. The mission starts with a cutscene - WheeledShooter and the astronaut get off the spaceship. The robot goes first. Suddenly, two AlienAnts appear and start attacking the shooter (it has magnifyDamage=0.05 so they don't actually destroy it). The astronaut escapes to the spaceship. At this point, the cutscene ends. Robbie appears and displays message "Press F1 or click on your assistant to read instructions on your SatCom".
The player gets some basic informations about what programming is. Then, demonstration time - how programming can be useful? - he is asked to click on the robot and start an already written program that looks something like this:
Code:
extern void object::KillAnts()
{
turn(90);
fire(1);
turn(-180);
fire(1);
}
1.2. Your first program
Starting cutscene: A WheeledGrabber comes out of SpaceShip and stops 5m from a platform.
Task: You have to move your robot 5m forward.
Info in SatCom: How to open program editor, basic program skeleton structure (briefly explaining each of these: extern, void, object::, program name, (), {}), what an instruction is, what a parameter is, move() instruction
TODO: Is that not too much information at once?
1.3. Moving things
Scenery: The robot stands where he ended the last exercise. There is a titanium cube in front of it
Task: Move the titanium cube 5m backwards, to the starting position of previous exercise.
Info in SatCom: Negative numbers to move(), grab() and drop()
1.4. Turning around
Scenery: The robot stands where he finished the last exercise, with a titanium cube in front.
Task: The player has to move the titanium cube to the platform on the left and then come back on the starting platform.
Info in SatCom: turn(), more than one way to do the same thing:
Code:
extern void object::Method1()
{
grab();
turn(90);
move(5);
drop();
move(-5);
}
extern void object::Method2()
{
grab();
turn(90);
move(5);
drop();
turn(180);
move(5);
}
1.5. The other way
Scenery: The robot stands where he finished, there is a titanium cube in front of it.
Task: Move the titanium cube to the platform on the right.
Info in SatCom: negative numbers to turn()
1.6. Help a friend
Scenery: The robots moved to a different place. There is a WheeledShooter with an empty EnergyCell. WheeledGrabber stands behind it with a full EnergyCell on the left. AlienAnts are coming.
Task: Replace the energy cell with a full one. The Shooter is already programmed to kill the ants.
Info in SatCom: This is meant to be a bit of a challenge to the player to see what he learned, so he gets only very general instructions on what needs to be done. There is also a step-by-step algorithm hidden under a link in case he decides that he needs more help.
2. BASIC INSTRUCTIONS AND LOOPS
TODO: The most basic instructions are already covered in the previous chapter. Maybe name this "More basic instructions" or something like that.
2.1. Make some titanium
Scenery: There is a Converter 5m in front and TitaniumOre on a platform 10m behind
Task: Make some Titanium and bring it back to the platform
Info in SatCom: wait(), time needed to make Titanium, move away so that the Converter can work
2.2. Using a radar
Scenery: The same as in the previous exercise, except you don't know anything about positions of the objects
Task: Do the same as in the previous exercise
Info in SatCom: what is a variable, "object" variable type, object categories, radar(), goto(item.position)
2.3. Looping in a loop
Scenery: Three TitaniumOres, no platform this time
Task: Make 3 titanium cubes
Info in SatCom: while(true) {...} (with a quick explanation on what the argument means), space() instruction
NOTE: In this exercise, the program crashes when no more TitaniumOre can be found, that's not a problem. Don't try to fix that, it might be too early for a player to understand everything.
2.4. Patience is a virtue, time is money
Description: Do not wait too long!
Scenery: one TitaniumOre
Task: Make Titanium and deliver to the platform, without using wait()
Info in SatCom: additional arguments to radar(), null if radar not found, using argument of the while() loop
NOTE: If ProhibitedToken from one of the CeeBots still works (I believe it does) we can make sure the player doesn't use wait()
2.5. Under attack!
Scenery: AlienAnts attacking from 4 sides
Task: Kill them all
Info in SatCom: fire()
NOTE: No loop here yet
2.6. Don't repeat yourself
Scenery: The same
Task: The same
Info in SatCom: for() loop, explain the counter variable
2.7. There's more!
Scenery: AlienAnts attacking from 8 sides
Task: Kill them all
Info in SatCom: Copy of the program from previous exercise. Show how easy it is to make this program work with 8 ants thanks to using the loop.
2.8. Aiming is important
Scenery: AlienAnt on a hill
Task: aim() and fire()
Info in SatCom: aim(), aiming angle limitation
2.9 Don't shoot me!
Scenery: AlienAnts on 3 sides, astronaut on the 4th one
Task: for() + fire(), but don't shoot on the 3rd iteration, bacause an astronaut is standing there
Info in SatCom: if() instruction, if(i == 2)
2.10. Helping more friends
This is basically exercise 1.5 from the current game
Scenery: There is 10 WingedShooters without PowerCells programmed to destroy a nest of AlienAnts
Info in SatCom: Again, a challenge level. Only general instructions on what needs to be done.
As you can see, these exercises are designed to learn programming in small steps. This is basically the same knowledge we currently have in the first chapter (7 levels). I believe this is better than putting a ton of new instructions in one exercise. Also, each chapter ends with an challenge levels that encourage players to think like a programmer. Additional help is still available if he needs it.
I'm waiting on any suggestions - do you think doing the programming course in smaller steps is good? Also, I'm waiting on ideas how the planet the exercises take place at could look.