new programming rts: Mutant Marionette

new programming rts: Mutant Marionette

Postby sarato » 15 Dec 2011, 19:38

Hi guys! My husband (cco3) and I are releasing the version 0.2-- code name Basil-- of our game Mutant Marionette, and we're hoping people here might be interested in playing (or helping with development).

Mutant Marionette is an RTS set in a post-apocolyptic environment. You control your swarm of mutants by programming small AI's in python. What distinguishes this game from similar programming games Battle Code, RoboCode, Infon Battle Arena, etc.) is that your character is persistent: you can get xp, level up, and earn new unit types. Currently, there are only two, but we plan on having a functionally diverse set of unit types, which will each warrant writing a new AI.

Our code is under the Apache v2.0 license, and the art is CC by 3.0.

While this project is still in its infant stages, our goal is that it will inspire programmers to hone their skills, and non-programmers to learn the basics of coding. We'll eventually write programming tutorials aimed at non-coders, explaining the basics of coding through our gameplay.

If that sounds like your kind of thing, we'd love it if you checked it out at http://www.mutantmarionette.com.
Attachments
mmshot.png
You can see replays of the games your AI has competed in
sarato
 
Posts: 2
Joined: 15 Dec 2011, 19:12

Re: new programming rts: Mutant Marionette

Postby MCMic » 16 Dec 2011, 09:05

I've done a lot of game programming but I've never played programming games. I'll try and find the time to check it out :-)
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: new programming rts: Mutant Marionette

Postby farcodev » 20 Dec 2011, 18:40

Interesting project i'll try it tonight :)
farcodev
 
Posts: 163
Joined: 09 Feb 2011, 02:52

Re: new programming rts: Mutant Marionette

Postby qubodup » 20 Dec 2011, 22:00

The first thing I thought when reading about this was: "hm... user-uploaded creature sprites..."

... and now I have a quick idea how .. the strongest can be determined:
1. allow users to upload themes (all graphics need to be replaced)
2. display either random or default theme to each.. person (ip/24h?) loading http://www.mutantmarionette.com/
3. have a big 'change look' button at the top
4. if the player presses it, randomly change the theme
5. count amount of time spent with each theme and add the time to the theme's global rating

Sorry for going so off-topic.. :)
User avatar
qubodup
Global Moderator
 
Posts: 1671
Joined: 08 Nov 2009, 22:52
Location: Berlin, Germany

Re: new programming rts: Mutant Marionette

Postby MCMic » 21 Dec 2011, 00:22

Failed to make it work.
log.txt : http://pastebin.com/Ai9QL8M2
I used example code from the website in __init__.py
I did "marionette run . ." from within the folder.

Fatal error message like this should not be in the log, they should show in the terminal and stop the execution.
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: new programming rts: Mutant Marionette

Postby sarato » 21 Dec 2011, 18:58

MCMic: thanks for trying it out!

First, you're right about the traceback that's printing in the log, that should be somewhere else. Second, when I ran the example __init__.py code from the website there *was* an error, but a different one than the one you got.
Line 5, "if self.inventory['grutonium'] > 0" should say "if self.inventory.get('grutonium', 0) > 0". Since your error was a generic "couldn't import Toad", this might fix your problem too.

If you need more help, we also hang out in #inkylabs on irc.freenode.net.
sarato
 
Posts: 2
Joined: 15 Dec 2011, 19:12

Re: new programming rts: Mutant Marionette

Postby cco3 » 22 Dec 2011, 18:23

Hi MCMic, sorry about that. We'll update the docs tonight and let you know when it's fixed. (Also sorry that we've been busy and it's taking a couple of days...we are really excited that someone tried our game and want to fix everything for you, haha.)

Concerning the log visibility, I don't think it's quite as simple as "All fatal errors should be printed to the screen and stop execution". That makes sense when it's you playing against yourself, but what about when you are playing against someone else with bad code, or just playing a bunch of random people against eachother? To clarify, you can do `marionette run 1 2 3 4` where those values are user ids. The program check the website for git urls and then clone the other players.

I was thinking we could log to the terminal by default if the code is local (the argument is a file path as opposed to an id). Then, one could do --log 1,2 to turn on logging to the terminal for 1 and 2 or --nolog 3,4 to turn off logging to the terminal for 3 and 4. Do you think that sounds reasonable?
cco3
 
Posts: 7
Joined: 18 Aug 2011, 05:13

Re: new programming rts: Mutant Marionette

Postby cco3 » 24 Dec 2011, 02:57

The documentation should be fixed. Basically, just don't use the "idle" action for now (we have fixed the issue and will make a bugfix release in the future).

I've also added a --log option that will be available in the future. If you are running code that you have locally, all the logging will be sent to the console. You can change the amount of logging for any player by doing --log 1:NONE,2:INFO which would be for user id 1, turn of logging to the console, for user id 2, log everything >= INFO to the console.

Does it work for you if you change your __init__.py to what is now listed at http://www.mutantmarionette.com/docs/intro/ ?
cco3
 
Posts: 7
Joined: 18 Aug 2011, 05:13

Re: new programming rts: Mutant Marionette

Postby MCMic » 29 Dec 2011, 01:17

cco3 {l Wrote}:I was thinking we could log to the terminal by default if the code is local (the argument is a file path as opposed to an id). Then, one could do --log 1,2 to turn on logging to the terminal for 1 and 2 or --nolog 3,4 to turn off logging to the terminal for 3 and 4. Do you think that sounds reasonable?

Hum, I don't know, maybe a more simple solution like having "marionette" for real match and "marionette-test" for testing (or "marionnette --strict" for instance) would be simpler.
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: new programming rts: Mutant Marionette

Postby MCMic » 29 Dec 2011, 01:25

It still does not work.
See my init and log.txt:
http://pastebin.com/n65dppu5
http://pastebin.com/uturYw8Z
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: new programming rts: Mutant Marionette

Postby cco3 » 31 Dec 2011, 21:10

Hmm...that's surprising. What OS are you on? Maybe it's specific to the version of python or something.

Also, just to clarify, you have an __init__.py and a settings.json in the same directory and from within that directory you run `marionette run . .` correct?
cco3
 
Posts: 7
Joined: 18 Aug 2011, 05:13

Re: new programming rts: Mutant Marionette

Postby MCMic » 02 Jan 2012, 16:51

cco3 {l Wrote}:Hmm...that's surprising. What OS are you on? Maybe it's specific to the version of python or something.

Also, just to clarify, you have an __init__.py and a settings.json in the same directory and from within that directory you run `marionette run . .` correct?

I use ArchLinux.
We've got python3 as "python" and python2 as "python2" commands.

I do exactly this, I attached the folder I use.
Attachments
marionette.tar.gz
The folder
(4.71 KiB) Downloaded 328 times
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: new programming rts: Mutant Marionette

Postby cco3 » 02 Jan 2012, 23:43

Ah, thanks. I've figured out the issue.

We import your directory like a typical python package so using the directory name "marionette" conflicts with the package "marionette".

If you rename your directory to something like "mycode" everything seems to run fine.

I'll come up with some fix for this that we can put in another release.
cco3
 
Posts: 7
Joined: 18 Aug 2011, 05:13

Re: new programming rts: Mutant Marionette

Postby aspidites » 04 Jan 2012, 05:59

I don't think your code should have to check if the imported package is named "marrionette". I think it would suffice that you document that players should not name their ai packages marionette. Otherwise, you'd have to create similar methods for checking if built-in package names were used for ai package.
aspidites
 
Posts: 30
Joined: 19 Jan 2010, 11:49

Re: new programming rts: Mutant Marionette

Postby cco3 » 07 Jan 2012, 03:50

The fix I have in the works is creating a temporary directory with a safely named symlink that points to the users code directory. This would happen regardless of what the directory name is. The actual list of scenarios I'd have to document would be quite hairy.

* You can't name the directory the same as any module/package you have installed, including marionette
* You can't play two different directories against eachother that have the same name
* You can't name your directory u[0-9]+ (because that would interfere with the directories names used for syncing opponents code)
cco3
 
Posts: 7
Joined: 18 Aug 2011, 05:13

Re: new programming rts: Mutant Marionette

Postby aspidites » 11 Jan 2012, 03:44

Clever. You could solve your second point by deriving the temp directory names by using the absolute paths of the imported packages. That is, if I am trying to play one bot, located in ~/bot against one named ~/marionette/bot, then they would be named "home_username_bot" and "home_username_marionette_bot" respectively.

Actually, I'd venture to guess it would solve all three cases. Just a thought.
aspidites
 
Posts: 30
Joined: 19 Jan 2010, 11:49

Re: new programming rts: Mutant Marionette

Postby ctdabomb » 11 Jan 2012, 15:23

This game looks like fun, but I stink at python. :(
Some people are like slinkies... not really good for anything, but you still can't help smiling when you shove them down the stairs.
ctdabomb
 
Posts: 1075
Joined: 13 Dec 2011, 21:21
Location: halfway there

Re: new programming rts: Mutant Marionette

Postby cco3 » 11 Jan 2012, 17:26

aspidites {l Wrote}:Clever. You could solve your second point by deriving the temp directory names by using the absolute paths of the imported packages. That is, if I am trying to play one bot, located in ~/bot against one named ~/marionette/bot, then they would be named "home_username_bot" and "home_username_marionette_bot" respectively.

Actually, I'd venture to guess it would solve all three cases. Just a thought.


Yes, that would solve all 3 cases as long as none of the code directories are in the root path. I've already named the symlinks in the temp directory to "l" + userid. (If the user doesn't have an id, I make one, so there is no issue there).

ctdabomb {l Wrote}:This game looks like fun, but I stink at python.


The goal for the distant future is to have a really nice set of tutorials that teach you python through playing this game.
cco3
 
Posts: 7
Joined: 18 Aug 2011, 05:13

Re: new programming rts: Mutant Marionette

Postby ctdabomb » 11 Jan 2012, 17:30

cco3 {l Wrote}:
ctdabomb {l Wrote}:This game looks like fun, but I stink at python.


The goal for the distant future is to have a really nice set of tutorials that teach you python through playing this game.

Then I hope time speeds up! :?
Some people are like slinkies... not really good for anything, but you still can't help smiling when you shove them down the stairs.
ctdabomb
 
Posts: 1075
Joined: 13 Dec 2011, 21:21
Location: halfway there

Who is online

Users browsing this forum: Bing [Bot] and 1 guest