Tutorial 3

Programmable war

Cool drinkable team containing only me and some radioactive materials, like pancakes, their terms of use and Nuclear soda 3. Anyone who might be alien or radioactive may join the team, other may join only if they can write exclamation point and drink water!


Turing Complete Game Mechanic
Presented by assertivist

Give this entry an award


Ratings (show detail)

Overall: 2.1
Fun: 1.6
Production: 2
Innovation: 2.8

50% respondents marked the game as not working.
Respondents: 5


File Size Uploader Date
Tutorial 3
27.8 KB knowledge 2015/08/16 12:55
Programmable war.zipfinal
124.7 KB knowledge 2015/08/16 12:51
program for robot, robot moves right if it's on ground
2.9 MB knowledge 2015/08/10 23:05
first program
2.9 MB knowledge 2015/08/09 13:44

Diary Entries

Help they said


Example 1 [doc/art/sav/2.txt]:
First two exclamation points means between them you need to describe commands.
There is one description: _<.> which means that command _ is binded to first command (which is moving left/right)
~ means next part these two question points mean between them you need to describe scans.
There are no scans described.
~ means next part rest of it is real code
these two exclamation points indicate that between it's command between them, command is _ (which we binded to first command in command section).
there is parameter in [] it's two (..) and that means that robot will go right (or turn right if it's flying robot).
When code execution ends it repeats.

Example 2 [doc/art/sav/1.txt]:
Command section is: _<.>:<..>-<...> which means _ is binded to first command, : to second and - to third.
Scan section is: .<..> which means . is binded to second scan.
Code section is: (<?.[..]?>||..)<!:!>:(<?.[..]?>||...)<!-!>!_[..]!
We have if at beginning. Condition is in ():
<?.[..]?>||.. <??> means between them is scan. It's . (which we binded to second scan in scans section and it scans things in front of robot).
there is parameter in [] it's two (..) and that means that it will return 1 if nothing is in front of robot, 2 if there is wall, 3 if there is enemy.
|| means ==, so if scan return 2 (..) it will be true that means if it's wall in front of robot.
If condition is true code between <> executes, so command : executes (command binded to second command - jump).
: means else and () is another condition (so it's actually elif)
In condition there is: <?.[..]?>||... which is like previous condition but has 3 on end so if in front of robot is enemy it will be true.
If condition is true code between <> executes, so command - executes (command binded to third command - fire).
After it there is command (note: that command will alway be executed):
_[..] command _ executes (command binded to first command - walk). It has parameter 2 (..) so robt will go right.



We'll pretend it's finished.
And that we know how to program robots in game.

I've decided not to use CC licence this time (It's written that it shouldn't be used for software) so I choose you Apache 2.0
I'm not familiar with Apache so if you want some right that outside Apache licence contact me and I might give you right.
Copyright 2015 Jakov Manjkas

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.


Days 3 and 4

So, I created a bit of everything (levels, art, sprites...) but nothing significant.
Hoping to make more stuff today.

Add a comment

Day 2

So this is progress I did today:
  • I made laser
  • I drew character (yesterday I used image from last PyWeek)
  • I made character animation having image for each direction
  • I drew level art and made 1 level
  • I improved language a lot
Have you seen the screenshot?
It's new program which tells robot to move right if it's on ground and it works.
What took my time today:
WhatHow much
Non PyWeek stuff1 hour
Art and level making2 hours
Improving language5 hours
Improving robot2 hours
Dealing with Mind issues3 hours
Dealing with python re3 hours
Note that I didn't measured time and it's all subjectively
You might thought that I'm changing Mind but I didn't inherit Mind classes, I decided to solve it on other way.
And for Regular Expression, well I tried splitting string by | or & but not by || and answer is: re.split("(?<!\|)[|&](?!\|)", s)
I didn't use re besides that.
Don't deal with languages if you don't know re and if you want to make programming game for PyWeek you better know re unless you have a lot of time

Add a comment

Day 1

Yeah, I know it's just half of Day 1, but I'll tell you my plan:
You program your soldiers!
I've posted small program image (currently doesn't work) but I'm working on it.

Add a comment

Day 0

Going to bed in 19:32 just to wake up in 2:00 for PyWeek.
Installing Mind 0.3 again.
And seeing my evil plan again. Take a look.
PyWeek 20 theme plans
1 Data data data
2 Discombobulate
3 Is it poison?
4 Purification
5 Sheer bloody panic
Kolmogorov complexity [1]
Testing is chemical dangourus on molecular level [3]
Testing is chemical dangourus with wierd data [1] [3]
Hacking into someone brain and trying to confuse him by making mess and panic [2] [5]
Changing some values in brain so it confuses him [1] [2] [5]
Lucid game when you try to intoxicate yourself [2] [3] [4] [5]
And finally shutting my computer down
See you in 6 hours!

Add a comment