Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1291931 Posts in 57327 Topics- by 48360 Members - Latest Member: laingsoft

April 23, 2017, 03:36:31 pm

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsFeedbackDevLogsLiberation Circuit: Rogue AI Simulator (version 1.3 - 15 April 2017)
Pages: [1] 2 3
Print
Author Topic: Liberation Circuit: Rogue AI Simulator (version 1.3 - 15 April 2017)  (Read 5088 times)
linley
Level 0
***



View Profile Email
« on: June 10, 2015, 03:43:03 am »

UPDATE (15 April 2017) - version 1.3 adds an integrated debugger: here.

UPDATE (31 March 2017) - time for version 1.2! See here.

UPDATE (11 March 2017) - version 1.0 is up! See here.

UPDATE (3 March 2017) - A new beta release! See this post.

UPDATE (17 February 2017) - A beta release! And a trailer! The post.

UPDATE (4 August 2016) - I've uploaded a new release. Here's the post.

UPDATE (5 July 2016) - I've uploaded a work-in-progress release and a video. See this post.







...

Liberation Circuit is a real-time strategy game about processes battling for control of a computer system. At this stage of development it looks like this:



and this:



As well as being a unit in the RTS each process is also an actual program, written in a (very) simplified version of C and running as bytecode in a simple virtual machine. The game has a graphical process designer that lets you design processes by putting them together, piece by piece, and then automatically generates code to run the processes you design. But if you want to fine-tune your units you can use the game's built-in code editor and compiler to change the way they respond to your commands or give them completely autonomous AI.

So it's basically an RTS that you can also play as a programming game.

Liberation Circuit is based on my previous project Invincible Countermeasure:



IC was a fascinating development project but unfortunately didn't really work as a game - the RTS part was too drifty and slow and the programming part was impossibly complicated. LC should fix both of those problems: the action will be much faster and more exciting (and at 60fps instead of 30) and the API is vastly simpler and easier to use (as well as being optional if you want to use the designer instead of hand-coding everything).

It will be released under the GPL and since it uses Allegro it will run on various platforms (at least Windows, Linux and Mac).

Progress: the basic game engine, bytecode interpreter, compiler, process designer, and code editor are working, although they'll all get some more polish. You can put together a process in the designer, auto-generate code to run it, compile the code, create the process in the game-world then tell it to move around and attack another process.

Still to do:
- adding more "objects" (the bits attached to processes that let them do things, like move and attack)
- visual effects like explosions (the effects in Invincible Countermeasure left plenty of scope for improvement)
- sound effects and music. If I have time I'd like to write my own software synth
- better backgrounds
- some kind of multiplayer
- many other things!

I'll also try to keep this devlog up to date...
« Last Edit: April 15, 2017, 05:13:23 am by linley » Logged

linley
Level 0
***



View Profile Email
« Reply #1 on: September 18, 2015, 07:20:16 am »

Some progress:



The graphics have been overhauled and everything looks much better now. The game is in an almost playable state (although far from finished), and fixing up the user interface is my next job. The unit AI generator is working properly now and produces AI capable of accepting various commands and doing a few things by itself, like acquiring targets for defensive weapons and aiming them, but things like selection and target indicator graphics need work. More soon!
Logged

linley
Level 0
***



View Profile Email
« Reply #2 on: October 01, 2015, 04:03:29 am »

I was originally going to let the player see the entire map and everything going on in the game, but now I'm thinking that some kind of fog of war might make the game more interesting - scouting and information-gathering will become important and you never know exactly what's going on.

The obvious way to implement it is to prepare a display-sized bitmap filled with solid black, then cut holes in it around each unit with some alpha blending around the edges, then blit it over the display like so:



The map down the bottom right works in a similar way.

I thought this would slow things down a lot, but even with lots of things on a zoomed-out screen it doesn't make a huge difference to the framerate. Nice!

The problem with doing fog of war like this is that it doesn't give a direct way to work out whether any particular enemy unit is visible, e.g. if you click on it. I'll probably deal with this by splitting the map into blocks then, each tick/frame, updating the blocks in a circle around each unit with a timestamp indicating that anything in the block is currently visible.
Logged

marcgfx
Level 5
*****


if you don't comment, who will?


View Profile WWW
« Reply #3 on: October 01, 2015, 05:57:02 am »

looks and sounds pretty cool. will this be Player vs AI only or also Player vs Player?
I'm currently looking into networking myself and some things can be a real pain :I, was just wondering how this could work with custom unit code.
Logged

@falkenbrew
linley
Level 0
***



View Profile Email
« Reply #4 on: October 01, 2015, 06:27:19 am »

Thanks!

The RTS part of the game (where the player designs and directly controls the units) will just be Player vs AI, at least at first.

The pure coding part of the game (where the player designs units and gives them AI, but doesn't control them directly after the game starts) will be both Player vs AI and Player vs Player - PvP will involve loading your units and someone else's units into a game and seeing who wins.

It should be possible to network the RTS part as well, but the last networked game I wrote used libnet to play over serial cable in DOS and I don't really have the skills to do the same kind of thing with modern technology...
Logged

Dacke
Level 10
*****



View Profile
« Reply #5 on: October 01, 2015, 08:18:22 am »

I love foss games and adore games with programming in them. Looking forward to trying this!
Logged

programming • veganism • feminism • free software
lithander
Level 3
***



View Profile WWW Email
« Reply #6 on: October 01, 2015, 08:33:26 am »

I like the polygon aesthetics and the code-based gameplay sounds very interesting. I'd consider to make the Fog-of-war by fading the background polys to black. That fuzzy black overlay looks off.

Could you post a screenshot where the code is readable? Can you script only the behavior but also the form and capabilites of ships?
Logged

@pixelpracht | Codemonkey at KING Art Games | Active Devlog: HORDE
linley
Level 0
***



View Profile Email
« Reply #7 on: October 01, 2015, 03:54:59 pm »

I'd consider to make the Fog-of-war by fading the background polys to black. That fuzzy black overlay looks off.

Yeah, I was thinking of something like that but the fuzzy overlay thing was easier to implement. I might try a few other approaches and see how they look.

Quote
Could you post a screenshot where the code is readable? Can you script only the behavior but also the form and capabilites of ships?

Here's a screenshot of the unit designer and the code editor, with a basic process loaded in:



Unit form and capability is coded in the header between the #process and #code lines, and you can design anything you like within the game's rules about cost, weight, maximum number of components etc. The header can be hand-edited, but it's much easier to use the designer and get it to automatically generate the header for you.

The rest of the code is most of the AI for a simple unit that wanders randomly around the map looking for something to attack.

(edit: I should mention that you can play without touching a line of code - the game can generate it for you based on the unit design)

I love foss games and adore games with programming in them. Looking forward to trying this!

It's *almost* playable!
« Last Edit: October 01, 2015, 04:02:31 pm by linley » Logged

linley
Level 0
***



View Profile Email
« Reply #8 on: October 03, 2015, 05:52:12 am »

Okay, here's another shot at the fog of war effect. Instead of an alpha blend, the hidden part breaks up as a unit approaches and reforms as the unit leaves. The visible area is square, which reflects the way units see the world:

« Last Edit: October 03, 2015, 06:06:23 am by linley » Logged

lithander
Level 3
***



View Profile WWW Email
« Reply #9 on: October 05, 2015, 02:48:17 am »

that api looks straight forward enough to not scare me away Smiley there are not enough good coding games.^^

I like the new shot at the fog of war a lot better. I'm sure you could leave it that way but if I were asked to implement this (no time constraints and all) I'd probably experiment with animated voronoi. have a a bunch of swirly swarming particles to form the base of a fullscreen voronoi diagram (

) for all particles outside the radius where the fading happens the resulting shapes are all black, inside they are all transparent and between they fade basedon the center position... if you won't try it I might have to hack something together because in my head this looks way cool. =)
« Last Edit: October 05, 2015, 02:57:16 am by lithander » Logged

@pixelpracht | Codemonkey at KING Art Games | Active Devlog: HORDE
marcgfx
Level 5
*****


if you don't comment, who will?


View Profile WWW
« Reply #10 on: October 05, 2015, 06:31:37 am »

the fog of war looks cool, nice idea. makes it look more abstract/technical, that suits your project very well.

do you have any debugging aids for the player? my own project used to be a code-game too, I just added simple text-output and basic shapes that overlay the view. now its a racing game, but I still have the editor stuff  Roll Eyes and plan to get back to it some time.
Logged

@falkenbrew
linley
Level 0
***



View Profile Email
« Reply #11 on: October 06, 2015, 05:41:42 am »

I like the new shot at the fog of war a lot better. I'm sure you could leave it that way but if I were asked to implement this (no time constraints and all) I'd probably experiment with animated voronoi.

I love the look of voronoi patterns (I didn't know what these were called before - thanks!) but I think even the optimised algorithms to generate them will be too complex and expensive to use them as animations. However, I'm experimenting with improvements that should allow non-rectangular bits of shadow without the smooth horizontal and vertical lines in the version I posted, and this might make voronoi-like patterns with fixed points/borders possible.

do you have any debugging aids for the player?

Processes can use printf() to send formatted text to a console on the display, and there'll be a verbose-error mode which will automatically inform the player of execution errors like out-of-bounds memory access (all memory access by in-game programs is rigorously bounds-checked, so these should always be caught), or specific errors in calls to built-in functions/methods. These error messages will probably mention which line of the source code the error occurred on.

Eventually there'll also be a way to generate a readable asm-like representation of the bytecode that the compiler produces, as well as an inline assembler and (maybe) dissassembler.

Other than that, I'm not sure - I'm not very familiar with other kinds of debugging tools, and writing decent user interfaces for things like that is really hard!

my own project used to be a code-game too, I just added simple text-output and basic shapes that overlay the view. now its a racing game, but I still have the editor stuff  Roll Eyes and plan to get back to it some time.

What kind of code did it use? I've been looking for a good programming game ever since I tried to work out PCRobots in DOS many years ago, but haven't had much luck (thus this project).
Logged

lithander
Level 3
***



View Profile WWW Email
« Reply #12 on: October 06, 2015, 06:48:37 am »

What kind of code did it use? I've been looking for a good programming game ever since I tried to work out PCRobots in DOS many years ago, but haven't had much luck (thus this project).

I made something like a programming game a while ago: http://forums.tigsource.com/index.php?topic=37355.0

Also your's reminded me of http://tpoindex.github.io/crobots/ because it uses a C like language too but of course its 30 years old just like the classics https://en.wikipedia.org/wiki/RobotWar and https://en.wikipedia.org/wiki/Core_War
I don't know any supercool contemporary programming games if those exist.
Logged

@pixelpracht | Codemonkey at KING Art Games | Active Devlog: HORDE
Dacke
Level 10
*****



View Profile
« Reply #13 on: October 06, 2015, 07:12:29 am »

Core War thread: http://forums.tigsource.com/index.php?topic=9432.0

I tried playing robocode a bit, but the best robots were too good and I didn't have any friends to compete with.

The modern master is Zachtronics. Most of his games are sort of engineering/programming hybrids. Like SpaceChem and InfiniFactory.

But currently I'm playing and loving his ASM puzzle game TIS-100:

Logged

programming • veganism • feminism • free software
marcgfx
Level 5
*****


if you don't comment, who will?


View Profile WWW
« Reply #14 on: October 06, 2015, 07:31:30 am »


my own project used to be a code-game too, I just added simple text-output and basic shapes that overlay the view. now its a racing game, but I still have the editor stuff  Roll Eyes and plan to get back to it some time.

What kind of code did it use? I've been looking for a good programming game ever since I tried to work out PCRobots in DOS many years ago, but haven't had much luck (thus this project).

it uses javascript, the whole project does, to be exact. you can find it in my signature Smiley but the programming part is currently on hold, the current tool is just used by me when I make AI. the current AI is struggling with new features, so I might have to make some adaptations.
Logged

@falkenbrew
lithander
Level 3
***



View Profile WWW Email
« Reply #15 on: October 07, 2015, 12:33:55 am »

TIS-100 is great fun! So much that I got the 100% achievement^^ Spacechem too. But those are more like puzzle games and not about scripting agents like Liberation Circuit seems to be.
Logged

@pixelpracht | Codemonkey at KING Art Games | Active Devlog: HORDE
Samson
Level 0
**


View Profile Email
« Reply #16 on: October 07, 2015, 01:55:37 am »

Programming games are always such a joy.

Just looking, this reminds me of Battleships Forever (and Warning Forever, Captain Forever, etc). The component-based spaceships were a blast there, and no doubt here too; It may be worth a gander. The idea of being able to code completely AI-controlled ships is intriguing and could go a long way towards combating some of the problems BF ran into when you had too many units.

Good luck!
Logged
linley
Level 0
***



View Profile Email
« Reply #17 on: October 07, 2015, 07:03:09 am »

Just looking, this reminds me of Battleships Forever (and Warning Forever, Captain Forever, etc).

Yep, I love the visual style of Warning Forever! The structure of a process in this game (a core with trees of linked components, each with weapons etc attached to points around the edge) is similar to the structure of a WF boss as well.

I've been meaning to try TIS-100 as well. Looks like it's on GOG, so I have no excuse...

TIS-100 is great fun! So much that I got the 100% achievement^^ Spacechem too. But those are more like puzzle games and not about scripting agents like Liberation Circuit seems to be.

Yes.

I always liked the idea of Core Wars, but its hardcore asm-like nature kept me away (although I had to learn some of the basic ideas behind asm to write a compiler for this game, so I should probably try it sometime). I did look at a few of the agent-combat-based games like PCRobots, Robocode etc as well, but while the concept was fascinating in theory, in practice I didn't find the focus on maximising the performance of a single robot or whatever against other identical robots all that interesting.

Since I started working on this game new kinds of programming games have come out, like Code Combat and Else Heart.Break(). But I don't think there's anything else quite like Liberation Circuit yet.
Logged

linley
Level 0
***



View Profile Email
« Reply #18 on: October 08, 2015, 04:58:54 am »

Okay, third try at the fog of war effect:



This one's my favourite so far.
Logged

marcgfx
Level 5
*****


if you don't comment, who will?


View Profile WWW
« Reply #19 on: October 08, 2015, 07:09:26 am »

looks cool, matches better to the background than the last version. although I liked the old one too. If you make two different races, maybe you could also use both fow types Smiley

the pentagonal selection looks nice too!
Logged

@falkenbrew
Pages: [1] 2 3
Print
Jump to:  

Theme orange-lt created by panic