
Show HN: Byte Arena – Code Your Fighter Bot - netgusto
https://doc.bytearena.com
======
Gracana
Back in the day I really enjoyed RoboWar on the macintosh:
[https://www.macintoshrepository.org/3842-robowar](https://www.macintoshrepository.org/3842-robowar)

I've seen other robot fighting games, but I always liked the low-level-
programming aspect of Robowar. It used a stack-based machine language with IO
via register accesses, and it had some instructions for complex functions like
trigonometry, which still only took a single cycle, so it was easy to reason
about performance. I guess what I liked about it was that you had to be
clever, and it gave you the right tools to be clever.

Unfortunately, while RoboWar is a lot of fun, after many tournaments it is
somewhat played out. Just about every paradigm and technique has been
extensively tested, so it's hard to come up with a surprising or exciting new
idea. A successor that stuck to the simple low level machine programming
concept but introduced new concepts would help.

~~~
netgusto
> A successor that stuck to the simple low level machine programming concept
> but introduced new concepts would help.

Byte Arena is structured in such a way that we can plug in entirely new Game
Modes with gameplays (and vizualizations) radicaly different of deathmatch.

So I can totally see such a gamemode happen, not based on physical movements
but for instance on resource management.

------
andrewflnr
See also RoboCode:
[http://robowiki.net/wiki/Robocode/My_First_Robot](http://robowiki.net/wiki/Robocode/My_First_Robot)

I like that ByteArena is language-independent. That's a pretty uncommon
feature, in my limited understanding. Good luck, folks!

~~~
plopz
Robocode was my introduction to Java in highschool. I attribute a lot of what
drove me to programming from trying to figure out how the wave surfers worked.

------
drusepth
I love projects like this, and I'm probably off to go code an agent after this
comment.

I've also been thinking about building one of these based on killing the
barrier of entry inherent in telling people "you can play, but you need to
code a bot -- here's a tutorial". Perhaps it's just me itching for a fun
little side project, but I've always wanted to code up a server and client as
projects on github that could just be cloned, and use GitHub's API to e.g.
automatically detect all repos forked from the client repo and run them in a
persistent world -- and then also detect all servers forked from the server
repo and run all clients across all worlds with some free hosting.

Obviously, there's a lot of security and stability concerns with hosting
arbitrary code and effectively spinning up free instances for anyone who just
clones a repo, but I think it'd be a super-simple entry for this kind of game
that really benefits from having more players (especially when you bundle in
some kind of skill-based matchmaking so newer players are often matched with
players of their own skill and "move up" instead of just going against the top
players all the time).

Is there any reason something like the above wouldn't work? I'm honestly
surprised I haven't seen many "just clone this repo and it's automatically
synced to your client hosted here" AI games.

------
kolar
Games like this one seems to be soo fun but when I'm back home after a whole
day of coding I just can't find energy to write any more. I thought: why not
create a game where you show examples of 'good' moves to your bot instead of
coding them? So I've implemented my idea in [https://top-
tactic.com/en](https://top-tactic.com/en) where you can teach bots to play
soccer just by showing examples of good moves. Noone plays it, but it was fun
to create :) and great way to gain some experience with neural networks.

------
netgusto
OP here. The project is beta, we need feedback from the HN community to
improve things and make it to public release!

~~~
vetm
Shouldn't this be in Show HN then?

~~~
netgusto
It should, and now it is, thanks!

------
xtuc
It's open-source here
[https://github.com/byteArena](https://github.com/byteArena), if you guys want
to look at the source code.

~~~
netgusto
The two main repos are:

* [1] ba: The CLI

* [2] core: The lib containing the bulk of the implementation

To make Byte Arena, we made also made these projects:

* [3] Box2D for Go: Box2D 1:1 port to Go

* [4] ECS: An efficient and easy to use Entity Component System for Go

* [5] Schnapps: KVM tooling and API

[1]: [https://github.com/ByteArena/ba](https://github.com/ByteArena/ba)

[2]: [https://github.com/ByteArena/core](https://github.com/ByteArena/core)

[3]: [https://github.com/ByteArena/box2d](https://github.com/ByteArena/box2d)

[4]: [https://github.com/ByteArena/ecs](https://github.com/ByteArena/ecs)

[5]:
[https://github.com/ByteArena/schnapps](https://github.com/ByteArena/schnapps)

------
nods
I love the idea! Congratulations and good luck for the project.

It's cool that people are sharing other projects alike, there is some kind of
curated list of this games/playgrounds?

~~~
xtuc
Thanks, that's highly appreciated.

Currently we don't have enough material for such a list tho but we can create
an awesome-bytearena list.

------
johnnylambada
Reminds me of crobots
([http://tpoindex.github.io/crobots/](http://tpoindex.github.io/crobots/)) a
great little game I played many years ago. In it you program your robot in a C
like language and watch them compete in a curses based command line arena.

~~~
contingencies
Came to mention the same. However, Wikipedia[0] says _crobots_ borrowed the
concept from _RobotWar_ [1] on the Apple ][, but "originally developed in the
TUTOR programming language on the PLATO system in the 1970s". It's a whole
genre... the young'uns just haven't seen it yet! Everything old is new again!

I'd like to see a twist where you could actually engineer your own weaponry
using simplified physics, sort of like a cross between _Kerbal Space Program_
and _crobots_ , but with WebGL. I once coded a two player button bashing
QBasic[2] snake version something like that, where you had competitive
weaponry like flamethrowers and manually future-operable mine deployment. It
was popular in our school for a few weeks.

[0]
[https://en.wikipedia.org/wiki/Crobots](https://en.wikipedia.org/wiki/Crobots)

[1]
[https://en.wikipedia.org/wiki/RobotWar](https://en.wikipedia.org/wiki/RobotWar)

[2]
[https://en.wikipedia.org/wiki/QBasic](https://en.wikipedia.org/wiki/QBasic)

------
imhoguy
Cool project. As noticed by somebody I think visualization side would need
some polishing too. Maybe pair with Airmash[1] creator - merged together would
be the killer app! ;)

[1]
[https://news.ycombinator.com/item?id=15892066](https://news.ycombinator.com/item?id=15892066)

~~~
xtuc
Thanks, our project is still very beta and the visualization need indeed some
polishing.

Airmash is looking really cool, we'll definitely take a look at it.

~~~
netgusto
I played it and it's awesome. Loads instantly, gameplay is a no-brainer, and
action is fast :)

------
MattRix
Why is the visualization of the battle so boring? Unless I'm missing
something, it looks like the projectiles look the same as the agents.

~~~
netgusto
Yes, design sucks a bit right now.

Major improvement is on the way as we've worked with game artists to make up
colorful worlds and agents specificaly for Byte Arena.

It's gonna look like this: [1] (actual rendering of the visualization)

[1]:
[https://www.facebook.com/jerome.schneider.officiel/videos/19...](https://www.facebook.com/jerome.schneider.officiel/videos/1987901168118447/)

------
msla
Like a 3D version of Core Wars

[http://www.corewars.org/](http://www.corewars.org/)

------
julianwachholz
Have you heard of Screeps[1]? It's kind of similar in that you have to program
your units to play the game. Can you tell us if it's comparable in any way?

[1] [https://screeps.com](https://screeps.com) (I'm not affiliated with it)

~~~
netgusto
Yes we know Screeps, it's awesome :)

Byte Arena is similar in that you're expected to code agent behaviours to get
it in the game.

What's different though:

* we support every programming language that has networking features

* in BA, you define behaviour for a single agent and not for a swarm

* we will support multiple game modes (deathmatch, CTF, speed racing) for agents that'll specialize in these game modes

* the perceptions in BA are very low level, and thus if your actions are within physical contraints, you may do things we have never imagined possible (it's sugarcoated by SDKs wrapping things for you if you don't want/care to make sense of the perceptions yourself)

~~~
rplnt
> we support every programming language that has networking features

If that's the case it should be highlighted in the docs, a short guide would
help as well I guess. Just by quickly looking at the docs I assumed it's
javascript only.

Having example bots in other popular languages would be perfect. People could
focus on what's important and don't worry about integration details.

~~~
netgusto
Thanks for the suggestions!

> it should be highlighted in the docs, a short guide would help as well I
> guess

I had the feeling these points were adressed already in [1]; are you thinking
about something more prominent in the documentation ?

> having example bots in other popular languages would be perfect

You're right; we're definitely going to focus on this

[1] [https://doc.bytearena.com/#getting-started-guides-getting-
st...](https://doc.bytearena.com/#getting-started-guides-getting-started)

~~~
rplnt
You are right, I missed that, sorry about that. After quickly skimming through
the main page I went to getting started, skipped first paragraph where it's
written AGAIN and red just this [https://doc.bytearena.com/guides/getting-
started/#prerequisi...](https://doc.bytearena.com/guides/getting-
started/#prerequisites) :)

------
sli
These things always remind me of brains and borgs for Bolo, and the AI
competitions people would have between brains.

Wish I'd gotten in on that, but Bolo still exists, so I suppose I still can.

------
ivo-georgiev
Seems like Robocode
([http://robocode.sourceforge.net/](http://robocode.sourceforge.net/)) but is
language independent.

------
ishitatsuyuki
Wasn't this kind of game in ICFPC[1]?

[1]: [https://icfpcontest2017.github.io/](https://icfpcontest2017.github.io/)

~~~
narag
This kind of game is old. I remember I saw something very similar called "red
code", about twenty years ago.

~~~
JoeDaDude
Yes, Corewar! A programming game going back to ancient times [1]. Corewar had
as inspiration the apocryphal story of the Creeper and the Reaper. The Creeper
was a real program that would copy itself to other computers. It was probably
the first computer worm [2]. The Reaper was then created to also move across
computers and delete the Creeper when it was found [3].

[1]
[https://en.wikipedia.org/wiki/Core_War](https://en.wikipedia.org/wiki/Core_War)

[2]
[https://en.wikipedia.org/wiki/Creeper_(program)](https://en.wikipedia.org/wiki/Creeper_\(program\))

[3] [http://corewar.co.uk/creeper.htm](http://corewar.co.uk/creeper.htm)

------
eat_veggies
Robocode meets Halite? I love this!

However, more dramatic camera angles and close-ups of the action would be
awesome!

~~~
xtuc
Thanks, we'll add more drama to the game soon-ish :)

------
nekopa
This brought back memories of Omega for the commodore Amiga I had way back in
the day.

