Battle Chips Beta

I don’t think I’ve taken advantage of thing 1 in the beta… But I did take advantage of the export.

http://devilstower.posterous.com/battle-chips-01

Still many, MANY, bugs and the tourney section is missing. So it’s less a game than a proof of concept.

I was playing this today and it’s really good. The programming it a lot more intuitive than I was expecting - and some of your UI ideas are brilliant, like the way you change the instruction parameter on a command.

Note that the Cargo-Bot sprites are only available in the beta so your graphics might look different to non-beta users. I am thinking of including the game and sprite pack in a future update.

Mark, when you update the code please remember to repost the codea export. It’s a really useful shortcut.

Updated code…

http://devilstower.posterous.com/battle-chips-02

@Simeon, I changed the version in general release to use generated backgrounds and dropped the Cargo-Bot sprites. Thanks for alerting me!

how about teams of bots? Like a red team vs a blue team and you each can code up to five different bots (or for that matter, 100 bots vs 100 bots).

Would allow for more complexity.

@ruilov, sounds neat… but man, I’m still coming up with the structures to support the tourney page, and that’s just a four bot brawl.

I like the idea of giving the bots a series of challenges. How about this: the bots are probes being landed on a strange planet. You must teach them to navigate, collect minerals, avoid dangers, and search for alien life. (that said, I’ll probably clean up the battling bots idea first)

That sounds really awesome, @Mark. Exploring a strange planet with programmable robots is really appealing. Especially if the planet(s) are procedurally generated (reminding me of your Flight Simulator project).

I’m having a lot of fun playing this! I noticed a bug where a radar call to shoot the laser is happening too late, after the bit has turned again. See the smart spinning bot - it detects a bot but fires 90 off :slight_smile: sorry I haven’t looked through the code yet, it’s so playable.

@Mark Sounds good - I remember playing Starwars Droidworks back in the day which was kind of similar. You built robots, collected parts, and in each level you sent out one of your robots to complete a mission. The difference there was that you directly controlled your robot, but their mobility / abilities changed depending on the parts you put together.

New version up on posterous.

o Fixes order of execution issues

o Adds a “random” chip that fires 50% of the time

o Four way melee tourney enabled

o Misc. bug fixes, minor changes and UI polishing

From here, my major goals are enabling the one on one tourney and refactoring the code. I’m still planning to tone down laser damage, and reversing out of the arena is still possible.

After this is nailed down, I’ll look at applying the same engine to Space Chips.

http://devilstower.posterous.com/battle-chips-03

“space chips”?

I’m already interested.

Please say its Battle Chips but with spaceships.

I have ulterior motives. Such a beast might mesh nicely with a project I’ve been working on…

http://pic.twitter.com/bkZIo4uO

This is basically a networked multiplayer space explore/combat game (in progress, very early). One thing missing (as of right now) is ship combat - the idea being ships fight each other based on your preset commands - and your job on a strategic level is to get your ships into combats they’ll win based on the orders you’ve given. I really hadn’t decided how to work the combat AI - but battle chips (or a space variant) may be perfect. I love the concept of programming behaviors in based on the role you want the ship to play (unarmed freighter? Run! Fighters? Swarm the capital ship, and so on).

Edit: ah, I see it above. That sounds fun TOO. :slight_smile:

@Bortels, I love space strategy games in the Spaceward Ho! / Master of Orion 4x area. It would be great to find a way to merge that sort of play with simple programming. Maybe replace micromanagement with microcode.

@Bortels, so you’d program bots ahead of battle and then during battle you choose which bots to use? I don’t think I heard anything like that before, sounds very cool

Wonder if you could borrow some of the mechanics of a trading card game? Maybe even get the code elements themselves as resources that would allow you to build better, more complex ships.

@Mark that would be excellent… If the chips were finite resources that would add to the challenge. I wonder if we run the risk of quickly coming to an optimised set of bots that everyone will use, unless the complexity is broadened with more options or program length.

The game is like an old play-by-mail or bbs game - everyone gives orders using the client: build factories, move this ship there, transfer cargo, and so on. Then, the server-side code resolves the results of all of this simultaneously at some known time - planetary population grows, taxes are collected, factories actually get built, crops grow, ships move, and where hostile forces are in the same area, combat is resolved.

You don’t actually control combat, any more than you control a football game you watch (or, more to the point, battle chips). But you control, or try to, the circumstances of combat - you want to avoid fights you can’t win, and engage with inferior forces.

I was going to give ships a simple “stance” - attack, or escort, or defensive, or flee - but I love the concept of letting you program your own behaviors with a battle chips type of interface. I also dig the concept that you might have to build your own chips - so simple behaviors are cheap, but a complex or large battle program might be harder to build, or have more difficult-to-obtain chips. This is the case already for engines/weapons and so on, or was - moving the concept to chips seems logical. Indeed - the “fire laser” chip might be the actual laser represented, and part of the coding might be dragging around components. The possibilities are endless.

I’m very open to suggestions - right now, I’m still doing infrastructure things like making time pass and ships move. I’ve used lua both client-side (obviously) and server-side, with the intent that the actual battle-resolution code (when it exists - right now it’s “bigger total mass wins”) be used on the server for actual combat resolution, and on the client side for both battle simulation and displaying the actual combats (each battle gets a seed for the RNG, so you can replay them).

Talk about thread hijack! My apologies I’ve been keeping mum on this because it uses features of the beta (http.get, for both graphics fetch and turns) heavily - no point in being public about something that might never see the light of day. But sometimes I just gotta share.

The server side code is up on github already - ill put the client up soon (identity is hardcoded - need to fix that first so I can share)

Back to Battle Chips - I’m seeing different behavior of a bot I wrote in tourney mode than I do normally.


1 forward
2 bump 4
3 goto 1
4 turn left
5 forward
6 bump 8
7 goto 5
8 turn left
9 fire laser
10 turn left
11 fire laser
12 turn right
13 goto 9

1-3 seek the wall, then it turns and 5-7 seek a wall, ie now a corner. we then turn out of the corner, and swap left/right, firing a laser down both walls.

This works when I try it out normally - but in tourney mode, it seeks the first wall - then goes to it’s firing animation. (I see bump also happens when you bump a bot - but this happens when no other bots are near)

PS. it might be nice to be able to differentiate bumping a bot (Fire!) or bumping the wall.

@Bortels, your game sounds great. I realize the code for Battle Chips is currently pretty shaggy, but feel free to grab anything that might help.

I coded up your bot and I’m seeing exactly the same issue you are. So… Hmmm. No idea why this is happening. Time to find out.

BTW, since I’m sure that 1.4 will be ready before I knock the kinks out of this, I’m planning on letting people save their bots as little card-style images which can be exchanged, with the program for the bot encoded in the graphic.