linleyh / liberation-circuit Goto Github PK
View Code? Open in Web Editor NEWTrapped in a hostile computer system, you must make a way out - RTS/coding game
License: GNU General Public License v3.0
Trapped in a hostile computer system, you must make a way out - RTS/coding game
License: GNU General Public License v3.0
When you click and drag a selection box, you lose the left-click effectiveness if the mouse goes "off-screen" in the bottom-left area (or over something else), and have to redraw the box.
When you take a unit assigned to Z and want to assign it to X instead, you must make sure to re-select the new Z grouping only, or else the same unit becomes assigned to both Z and X.
There aren't enough keyboard shortcuts for the panels. Some things that I do in the editor ended up automatically locking the entire template of units, and I had to click on "Template 1," "Unlock," "Template 2," "Unlock," all the way through to the bottom to do what was needed.
There seemed to be some glitches in the designer, as I tried to give some weapons a diagonal direction, but every time I clicked compile, they would always point straight to the right. I managed to fix this, but I think only by restarting the game.
This is a really cool game but I think various matters like these are preventing it from being truly great. I hope some of these issues can be resolved!
i can tell harvesters to target a specific data well by moving my view with the mini-map and clicking until i accidentally hit it (guided by the target line on the mini map), and i can use the "can't build so close to the data well" message to figure out where a base could go.
however, it'd be nice if there was some kind of schematic display of a data well (because you can't know how depleted it is until you're up close, right?) on the screen even when it's not in sight
Is there a way to scale out the resolution? The game is tiny on a OSX Retina Screen.
Also trying to quit via ESC seems to crash the game. I can CMD-TAB into the shell and kill the shell process and recover, however it would be nice to cleanly exit the game via ESC/Yes.
In certain file browsers like x2plorer (windows) the default option is not to lock the viewed folder - this means, for example, the folder can be deleted from the tree view without having to changer the folder view.
Unfortunately this means that any application that doesn't check it's own location will not correctly function.
Almost every application does do this however.
Here is a solution for cross-platform executable path detection:
http://stackoverflow.com/questions/933850/how-do-i-find-the-location-of-the-executable-in-c
This might be interessting to just a very few people, but I would personally very much like the ability to view the byte code that is generated from the code. Since its been stated that the compiler is still very
simple, it could help figure out what kind of code that makes it generate badily optimized instructions
and also how expensive certain function calls are.
A side note is that it would also help in the effort to report situations where the compiler could be improved, but I don't know if this is a priorty or not.
Hi. I maintain the liberation-circuit
package in the Fedora Linux distribution. When performing the Mass Rebuild of packages for the upcoming Fedora 32, the liberation-circuit
package failed with the following error:
/usr/bin/ld: CMakeFiles/liberation-circuit.dir/src/i_display.c.o:/builddir/build/BUILD/liberation-circuit-29bc0ce0511b281bce6b272449ef448ff648823c/src/i_display.c:75: multiple definition of `vertex_list'; CMakeFiles/liberation-circuit.dir/src/h_interface.c.o:/builddir/build/BUILD/liberation-circuit-29bc0ce0511b281bce6b272449ef448ff648823c/src/h_interface.c:1116: first defined here
/usr/bin/ld: CMakeFiles/liberation-circuit.dir/src/i_display.c.o:/builddir/build/BUILD/liberation-circuit-29bc0ce0511b281bce6b272449ef448ff648823c/src/i_display.c:188: multiple definition of `font'; CMakeFiles/liberation-circuit.dir/src/e_complete.c.o:/builddir/build/BUILD/liberation-circuit-29bc0ce0511b281bce6b272449ef448ff648823c/src/e_complete.c:43: first defined here
/usr/bin/ld: CMakeFiles/liberation-circuit.dir/src/m_main.c.o:/builddir/build/BUILD/liberation-circuit-29bc0ce0511b281bce6b272449ef448ff648823c/src/m_main.c:285: multiple definition of `font'; CMakeFiles/liberation-circuit.dir/src/e_complete.c.o:/builddir/build/BUILD/liberation-circuit-29bc0ce0511b281bce6b272449ef448ff648823c/src/e_complete.c:43: first defined here
/usr/bin/ld: CMakeFiles/liberation-circuit.dir/src/p_init.c.o:/builddir/build/BUILD/liberation-circuit-29bc0ce0511b281bce6b272449ef448ff648823c/src/p_init.c:63: multiple definition of `mstring'; CMakeFiles/liberation-circuit.dir/src/p_draw.c.o:/builddir/build/BUILD/liberation-circuit-29bc0ce0511b281bce6b272449ef448ff648823c/src/p_draw.c:57: first defined here
/usr/bin/ld: CMakeFiles/liberation-circuit.dir/src/p_panels.c.o:/builddir/build/BUILD/liberation-circuit-29bc0ce0511b281bce6b272449ef448ff648823c/src/p_panels.c:54: multiple definition of `mstring'; CMakeFiles/liberation-circuit.dir/src/p_draw.c.o:/builddir/build/BUILD/liberation-circuit-29bc0ce0511b281bce6b272449ef448ff648823c/src/p_draw.c:57: first defined here
/usr/bin/ld: CMakeFiles/liberation-circuit.dir/src/s_menu.c.o:/builddir/build/BUILD/liberation-circuit-29bc0ce0511b281bce6b272449ef448ff648823c/src/s_menu.c:82: multiple definition of `mstring'; CMakeFiles/liberation-circuit.dir/src/p_draw.c.o:/builddir/build/BUILD/liberation-circuit-29bc0ce0511b281bce6b272449ef448ff648823c/src/p_draw.c:57: first defined here
/usr/bin/ld: CMakeFiles/liberation-circuit.dir/src/x_sound.c.o:/builddir/build/BUILD/liberation-circuit-29bc0ce0511b281bce6b272449ef448ff648823c/src/x_sound.c:29: multiple definition of `tone'; CMakeFiles/liberation-circuit.dir/src/x_music.c.o:/builddir/build/BUILD/liberation-circuit-29bc0ce0511b281bce6b272449ef448ff648823c/src/x_music.c:44: first defined here
collect2: error: ld returned 1 exit status
The compiler used is GCC 10.0.1 and the project's commit used is 29bc0ce.
You can view the full build log here: https://kojipkgs.fedoraproject.org/work/tasks/8291/41188291/build.log
Any help will be much appreciated.
I don't know about others, but for me the most exciting feature of this game is the aspect of being able to automate my "fleet". It is however a little bothersome to play around with the automation part of the game right now, I currently start a custom game and don't bother with the second player, but there are some annoyances with this:
So I would like to make a suggestion for a sandbox mode. Some of the features I can think of off the top of my head is:
My field isen't in game programming, so I wouldn't know how hard it would be to implement some of these, but I would imagen that some of them would be fairly low effort. I will try to help out in any way I can!
Over at the discord, I noticed there is interest in modding the game in various ways. One of them is to add custom missions. There are certain parts of the code that isn't performance sensitive, such as mission setup and I think these parts would benefit from scripting so it can be dynamically changed without recompiling the binary.
In https://github.com/melvinzhang/liberation-circuit/tree/lua I'm experimenting with integrating LuaJIT by converting some of the missions to be created using Lua code. The lua version looks like this: https://github.com/melvinzhang/liberation-circuit/blob/lua/bin/story/green/green2/green2.lua
So far, I've got it working on Linux, requiring the install of libluajit-5.1-dev package and building with -lluajit-5.1
Would this be something that you'd consider merging?
Hello,
This is god damn awesome!!! Please do not stop working on this amazing piece of work!!!
I am super excited and have a ton of questions I will list a few:
Can we start the wiki here?
There are few pages that can be added:
Would you like to create a slack about this?
It will be easier to communicate (I can do it)
How is contributing done?
Edit: See https://www.allegro.cc/manual/5/al_get_standard_path, allegro already provides all the necessary interfaces to properly do system-wide installation for all platforms.
I'd like to package Liberation Circuit for my Linux distro, Mageia.
Currently there are no make install
instructions produced by the CMake script, and from a quick glance at the source there also seems to be no way to specify data installation paths that would not be the same as the game binary. For example image loading seems to use hardcoded paths:
$ rg data/images
src/m_main.c
568: load_font(FONT_BASIC, "data/images/fwss_font.bmp", 12);
569:// load_font(FONT_BASIC_BOLD, "data/images/fwb_font.bmp", 12);
570: load_font(FONT_SQUARE, "data/images/fwt_font.bmp", 16);
571:// load_font(FONT_SQUARE_BOLD, "data/images/fwt_font.bmp", 16); // currently the same as FONT_SQUARE
572: load_font(FONT_SQUARE_LARGE, "data/images/large_font.bmp", 20);
573:// load_font(FONT_SQUARE_LARGE, "data/images/fwt_font.bmp", 16);
614: title_bitmap = al_load_bitmap("data/images/title.bmp");
618: fprintf(stdout, "\nError: failed to load data/images/title.bmp.");
There should be support for looking up data in /usr/{,local/}share/games/liberation-circuit/
or /usr/{,local/}share/liberation-circuit
.
A typical way of doing it would be to add a DATA_DIR
define that would be used in the .c
as a prefix for all data paths. For example "data/images/fwss_font.bmp"
would become DATA_DIR + "/images/fwss_font.bmp"
(or the proper C code that would make this concatenation valid ;)), or better introduce a helper function that would give you this path so that you don't need to hardcoded DATA_DIR
everywhere.
The default value of DATA_DIR
would be ./data
, and it could be overridden via a CMake argument (e.g. cmake -DDATA_DIR=/usr/share/games/liberation-circuit
).
Since the other issue was closed, I just wanted to put a note here that I think there needs to be a solution to the tiny fonts issue.
I need to really squint in order to read the text on a Retina MacBook.
Was trying to compile on the mac and got a few warnings about suspicious code.
set_waveform_square_vib
(x_synth.c) the loop that starts on line 435 doesn't end until line 480 - looks to me like there should be a } on line 442Hope that helps.
This might be hard to implement for the small niche it would cater to, but the ability to set breakpoints in the code and view the machine step through the generated bytecode could help when trying to understand bugs or unexpected behavior.
TL;DR: On linux install liballegro5-dev, go to src/, curl -LO https://github.com/apenwarr/redo/raw/master/minimal/do && chmod +x ./do && ./do
then run g_game
from where you unzipped the release archive to.
I'm on Linux Debian testing and I know nothing about cmake, nor do I want to know. Since you didn't actually provide any compilation instructions I did the old mkcd build && cmake .. and it complained about not being able to find allegro and math. I got as for as commenting out the previous allegro check stuff from CMakeLists.txt and replacing it with
find_package(PkgConfig)
pkg_check_modules (ALLEGRO allegro-5)
target_link_libraries(liberation-circuit ${ALLEGRO_LIBRARIES})
target_include_directories(liberation-circuit PUBLIC ${ALLEGRO_INCLUDE_DIRS})
target_compile_options(liberation-circuit PUBLIC ${ALLEGRO_CFLAGS_OTHER})
because the package liballegro5-dev includes pkg-config info that cmake can use. But it was still complaining about undefined references to al_* functions. Probably because it was only linking the main allegro file and not all the other ones (that package doesn't provide a monolithic build).
Then I looked in the source directory and saw the .do files. Once I rememered what they were from I just grabbed the redo/minimal/do shell script, ran that then ran g_game from where I unzipped the release to.
So that was nice and easy but I wasted an embarresing amount of time googling cmake bullshit.
Also I am not getting any sound, but that seems to be the case with basic allegro sound test programs too. Probably choosing the wrong soundcard with alsa. Ah yup, running it and the aoss script from alsa-oss makes sound work.
Everything else I have tested (just clicking around the first level...) works fine!
Can you explain the file prefixes:
c_
d_
e_
f_
etc..
Just curious.
Hey,
I'd love to throw metaheuristics (genetic algorithms etc.) and machine learning at this but right now that's not really possible. Here's what I think that would require:
a way to start a match non-interactively from the command line, passing…
…which would automatically start a game, run it, then exit
machine-readable output of the match details & results, i.e. a log file containing
(When looking at the network of this repository, I noticed that there's a Lua branch by Melvin Zhang. While I haven't yet looked at that in detail, from a brief look at one of the mission folders, it looks like that might greatly simplify this – just pass the path to such a folder via the command line and then Lua can do all the setup stuff. With a bunch of callbacks into Lua, it could then also do the logging, timeouts, and whatever else one might want to do.)
If that sounds interesting, I'd be happy to help or even do most of this (as time permits). (But right now, I don't really understand how the code works, so I'd need some help at least initially.)
I got syntax errors for using ~, <<, >>, but looking at the table of opcodes in c_compile, they seem to be supported. So I guess the parser messes up here?
I installed allegro using brew
brew install allegro
then ran
sh ./do
and received the following error after 30 seconds:
do z_poly.h exists.
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
(maybe you meant: _menu_list_main, __al_mangled_main , _init_main_loop , _main_game_loop )
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
do: ../src/g_game: got exit code 1
ln: illegal option -- -
usage: ln [-Ffhinsv] source_file [target_file]
ln [-Ffhinsv] source_file ... target_dir
link source_file target_file
do: bin/libcirc: got exit code 1
do: all: got exit code 1
Hello! It's getting pretty tough at a few levels in, either i'm missing something or i'm playing the game wrong. I've played tons of RTS games and I love them. I have at least 7 hours in this one already and it's got me stuck to where I think I can do but, but fail every time. I have designed my own ships but i'd like some tips on building ideas or what kind of designs I should use for each level, or if I should rush the wells. Stuff like that'd you'd expect from almost any game that takes critical thinking. Thanks!
If you are building a new process and the build component breaks, you get an Error,
because the process can't continue building
I am trying to make use of spikes in static units without any success. They never got fired. I have tried the template from g5_spikebase.c with the same result.
Is it a bug or did I miss something?
As a norwegian user, begin unable to use the mentioned keys is something that pops up every so often, I'm looking at you repl.it >:[. It most likley has to do with the fact that we use AltGr for those symbols, but I'm not 100% sure if thats the only issue. I normally just ignore the program that has such problems, but this games seems so awesome, I took the time to write a short AHK script that fixes it. The script kan be found here.
This is obviously only a temporary solution, but I just wanted to share it incase there was any other
users out there which just couldn't wait to play your awesome game!
it says "could not open because of a problem" (yes, very specific) but reason was image not found :
MacBook-Pro-de-Vic:~ vic_hug$ /Applications/LiberationCircuit-1.0.app/Contents/MacOS/LiberationCircuit ; exit;
dyld: Library not loaded: /usr/local/opt/freetype/lib/libfreetype.6.dylib
Referenced from: /Applications/LiberationCircuit-1.0.app/Contents/MacOS/LiberationCircuit
Reason: image not found
Trace/BPT trap: 5
logout
osx is 10.10.5, only tried the compiled build form itch.io
i'm playing the game on my right monitor, so i can't edge-scroll to the left. i'd have to move my hands to the arrow keys ... ugh.
may i suggest dragging with the middle mouse button, or with the left mouse button while holding down the space bar?
thanks
I started a custom game with 2 players but when I clicked on the base (either base) the list of items that could be built (harvester, etc.) didn't appear. Is this expected?
Crashed for me during the first training mission just as I was about to engage the enemy.
The problem is i_display.c:73 - VERTEX_LIST_SIZE
is 24 but later on (line 16232) you've got a loop writing to elements 1..26. In my case this overwrote something vital - I suppose it didn't for you because every compiler lays out memory differently.
VERTEX_LIST_SIZE
needs to be at least 27 (I didn't check all the uses of it)
Currently the only way to modify the program's configuration is to find the config file and edit it by hand. It would be nice to add an options screen where the player could edit the settings via GUI.
Indentation is completely broken right now. There's a weird mix of tabs and spaces, indentation depths differs, … It's bad enough that gcc is confused and (wrongly) complains about unguarded statements all over the place:
src/m_input.c:622:6: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
src/d_code.c:357:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/d_code.c:414:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/m_maths.c:232:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/m_maths.c:284:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/m_maths.c:310:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/i_display.c:3536:6: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/i_display.c:4015:7: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/i_display.c:4298:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/i_display.c:7282:6: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/i_display.c:13572:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/t_template.c:188:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/v_interp.c:1740:1: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/h_story.c:1279:11: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/h_story.c:1284:11: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/g_method_std.c:273:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/e_files.c:596:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/v_draw_panel.c:376:1: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/c_fix.c:540:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/c_fix.c:940:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/g_game.c:503:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/g_world_map_2.c:1675:6: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/t_files.c:195:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/c_compile.c:1305:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/c_compile.c:1367:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/c_compile.c:1425:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/c_compile.c:1464:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/c_compile.c:1536:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/c_compile.c:1631:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/c_compile.c:1638:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
src/c_compile.c:1659:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
It's also really hard to read…
Could you fix this?
Alternatively, I could try to set up and run a code formatter on this and make a pull request – in which case, what should the indentation be?
grep|sed|sort|uniq
chain. (For me, single-space indentation is hard to read – with spaces, I'd suggest at least two per indentation level.)Hello.
So I recently downloaded from itch.io but the game won't launch.
It starts up a console and tries to launch something but it closes out and tries again.
The title really says it all, I think it would be cool to have the ability to use more than 9 templates in a custom game.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.