Update 0.12 – More Language Updates

I made another pass through the game looking for improvements to be made, quite a few things got touched up in the process. Here are the details:

Language Changes

  • New thread operator – works like fork to start parallel execution, but only requires one label. No more CONTINUE_FROM_FORK labels!
  • New log operator – prints out the name and value of top item on the stack, if its a valid item leaves it on the stack. So, you can print out strings by logging a unknown read value name and it will safely be removed from the stack, but if its a complex value you just calculated, you don’t have to store it off into a variable to keep it after its logged.
  • Combined if operator – removed ifstack ifelsestack ifgoto and ifelsegoto in favor a single if operator that handles block logic similarly to C except the blocks are required. Blocks are denoted by { and } respectively. Else is also supported and works as else does in pretty much any other language.

Balance Changes

  • Split energy build attribute into battery and generator. Battery works as energy did, increasing your maximum stable energy limit. Generator allows you to produce more energy per round. So you can now have a bot that generates a lot of energy per round, or a bot that can charge up slowly to release large bursts all at once.
  • Reduced all build attributes to range from 0-5.
  • CPU build attribute doubled in per point effectiveness (now 10 operations per round)
  • Shields build attribute reduced to 1 maximum shield limit per point spent. The aim is to make shields a damage reducing feature, not a impenetrable recharging barrier.

I’ve posted a demo bot using the new features if your interested to see how everything comes together. It is a fully functional bot so download the source and see if you can beat it 🙂

http://procrastinationsoftworks.com/Files/pyRoBeta_0_12.zip

Update 0.11 – Language Updates

http://procrastinationsoftworks.com/Files/pyRoBeta_0_11.zip

This update was intended to be building decision trees into the language. I coded up some basic decision tree logic and looked at what I could improve to make my life easier. There was not much, so instead I turned towards making the language easier in general and here is what I changed:

New Operators:

ifstack ifelsestack – new logic operators, work just like ifgoto and ifelsegoto but instead of going to the selected label, they leave the selected item on the stack. So in practice:

FUNCTION:
 IF_TRUE condtion ifgoto
 B return
 IF_TRUE:
  A return

Can now be simplified to:

FUNCTION:
 A B condition ifelsestack return

This allows easy branching return structures without a ton of extra labels. I found it quite useful to make a function that returns either A or B, this used to be a hard to read goto block 4 lines long, now all easily done with one operator.

 > (file insertion instruction) – this instruction will cause a file to be loaded in place in the instruction block. This allows for library creation and easier support code sharing across the boards. Usage is simple:

instructions:
...
>import_library.il
...

var – Now that we have import libraries, we could end up with unintended naming collisions! So, to mitigate that issue, I have introduced var. Var works just like store, but creates the storage area in the local call stack created by using the call operator. Once the local call stack is removed via its matching return statement the variables will be removed.

New language Options

To help with readability, label names now allow underscores such as in: A_LABEL_NAME.

I have also added white space characters that will be ignored during parsing that you can use to meaningfully mark up your code. The current characters in the white space list are parenthesis () and commas , .

 

All Together Now

Overall I am quite happy with the new look of the language, its much more usable overall and is starting to look like a full language. Consider this importable library snippet as an example:

SPREAD_SHOT: (power var)
 (power 3 div) dupe dupe dupe #split shot power into 3 sections
 (aiming -1 add) aim
 fire
 (aiming 2 add) aim
 fire
 (aiming -1 add) aim
 fire
 SPREAD_SHOT DECSICION_ROOT (energy power >) ifelsestack
 return

We can now have functions that read like they have true function signatures, and group logically connected instructions into groups in complicated lines. We can also have locally named variables, and more efficiently build logical operations.

 

Update 0.10 – Function Calls

I have been quite busy lately and I have not gotten to work on this project as much as I would have liked. Minor things keep coming up. Like getting married, or needing my utility room ceiling replaced.

Anyway, I did have some time to add in proper function calls.

New Operators:

Call – like jump, but internally stores the location of the next instruction for return to jump back to automagically.

Return – jumps to the latest entry in the internal call-stack.

I will be looking to focus on the langue aspects of pyRoBeta in the near future as they are much easier to implement in one sitting. I may also dabble in a proper render engine. Game Maker is nice and all, but I was primarily using it for HTML5 support.

http://procrastinationsoftworks.com/Files/pyRoBeta_0_10.zip

Update 0.9 – Team Deathmatch

Added in support for team death match and related support features! Now you can make Voltron style group bots that only end up working together in the last 5 minutes of an episode.

http://procrastinationsoftworks.com/Files/pyRoBeta_0_9.zip

Add -t to the run line to enable team matches, example:

pyRoBeta.py team1bot otherteam1bot team2bot otherteam2bot -t

This will spawn all of the bots on the outer walls of the arena with their teammates. When a bot dies the bot will respawn back on its team’s side and reduce the team’s respawn count. First team out of respawns looses. There are of course some nifty new hardware and interpreter options to take advantage of:

  • Broadcastdish – lets you send variables to all bots on your team
  • Repairshot – short range healing gun to fix up teammates
  • team register – returns your current team id ( use with scanner for friend vs foe)
  • available operator – returns if the named value is available – useful for checking if a broadcast has occurred yet before blowing up trying to read a bad value.

There have also been some visual tweaks so you can tell whats going on

Update 0.8

Yes, yes. I know. It wasn’t weekly.

Went back to working on the game itself, but kept to the theme of reducing barriers to entry. Specifically I focused on usability during bot creation. This weeks update contains some very powerful, but very simple improvements to the code monkeying section of the game.

  • Bots now die when they throw an exception (this used to crash the simulation…)
  • All exceptions now display the current location in code including label, instruction, and instruction offset indexes(if you see any raw python exceptions point me to them and I will get them properly wrapped!)
  • Minor bug fixes

I also spent a good deal of time testing the game to find the best ways to improve the experience. By testing I of course mean ‘testing’, which of course means playing. I have created a new bot the shows off some of the more powerful uses of the scan operator and has basic circling, distance adjustment, and target following algorithms. It is available in the forums, and is distributed with the games starter bots as well. Its name is Tracker. I demand you kill it and send me the bot that did it!

http://procrastinationsoftworks.com/Files/pyRoBeta_0_8.zip

Weekly Update 0.7

This weeks update is both small and awesome. It is a precursor to getting the game to be a web app instead of something you download. The intent being to lower the barrier to entry for new players. The basic plan is to get the game up and running in a HTML5 friendly way, then slap some basic website goodness around uploading and sharing bots. In the processes though I still squeezed in some new features.

In this case a picture is worth a thousand words, especially since all of this weeks update is visually noticeable! However, I have a demo as well, and I would venture it is worth at least a thousand pictures.

Interactive Demo:procrastinationsoftworks.com/RoBeta/index.html?source=statelog.txt 

Picture for good measure:

Picture of new side bar sexy-ness

Side Bars!

Weekly Update 0.6

Wait what, where did weekly Update 0.1-0.5 go? Good question. I have decided to start posting updates on the blog instead of just updating the readme file and emailing everyone. So for a brief summary of all the updates not posted(full change log in the readme):

0.0 – First playable

0.1 – Random starting locations so two bots don’t always fight the same way

0.2 – Arena boundaries and bot state inspection registers

0.3 – Better flow control operators and radar

0.4 – Scanner and various bug fixes

0.5 – Missiles and optimization

Now the moment you all didn’t know you were waiting for: 0.6 ! This week I have added hardware build options. The intent being to support a wide range of very powerful weapons and operators that can be so awesome because they require you to spend build points to turn them on. Currently missiles, scanners, radar, and explosive shots are hardware options.

Explosive shots? Yeah, I added those this week as well in my push for getting a base set of interesting weapons in. Same as normal shots except they explode on impact with a bot, dealing 1.5*power in damage in a 36 unit radius.

Not sure how far I will get in 0.6 but my goals for now are as follows:

  1. Finish weapon spread (lasers, healing shots, explosive shot weapon interactions)
  2. Add status panel to the battle viewing window so you have some idea of current state of the bots
  3. Debugger!
  4. Team communication operators and team death-match
  5. Non command line way of browsing and picking bots for a match

Once those are implemented I will proudly stamp the game as alpha and move on to even more crazy ideas I have.

Where do you download the game? Well, EA is still considering whether I am a threat to there economic well being. So, I am still on private distribution only. That said if you want a link ask, and if you have an old link to the Files directory just change pyRoBeta_0_X.zip to the correct version and it will be there.