linleyh / liberation-circuit

Trapped in a hostile computer system, you must make a way out - RTS/coding game
GNU General Public License v3.0
382 stars 39 forks source link

Some GUI issues #33

Open KeronCyst opened 7 years ago

KeronCyst commented 7 years ago
  1. 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.

  2. 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.

  3. 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.

  4. 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!

linleyh commented 7 years ago

Thanks for the comments!

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.

You're right; I should fix this. I'll have a look.

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.

This is intended; it's supposed to be possible to assign a unit to more than one group at once. The control group commands are based on Starcraft 2... although I just looked this up and it turns out that Legacy of the Void (which I haven't played) adds an extra control group function to create a new control group while removing selected units from existing groups. Maybe I should add something like that.

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.

I don't think there's a keyboard shortcut that can do that. I think this only happens if you save a template file, which can only be done by mouse.

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.

I haven't seen this happen - are you sure that you were using write header or autocode after making the change?

linleyh commented 7 years ago

Okay, I've fixed the first two issues in the repository. I should do another proper release in the next few days...

linleyh commented 7 years ago

(I should have mentioned - the command to set a control group while removing its members from all other control groups is control+shift+z,x,c,v,b,n,m)

KeronCyst commented 7 years ago

Okay, great. Thanks so much for looking into this so promptly! I had not played SC2, only mainly Total Annihilation and the Command & Conquer series which didn't allow units assigned to multiple groups.

Also, you're right about #4; I may have forgotten to write the code. Maybe the reminder text in the upper-right corner of Design could be bigger/brighter/in bold; I didn't even notice it at first until I looked around.

I don't think there's a keyboard shortcut that can do that. I think this only happens if you save a template file, which can only be done by mouse.

Right; what I mean is an "Unlock All" button would be nice, for example (or hotkeys, like "U" to "Unlock" when the design pane is open but while the editor pane is closed).

On that note, there are some more matters that I've found cropping up:


  1. When I try to type into the compiler for the first time in a while (say, just to rename a process), the first letter does not get typed, at least if it's capital (or so it seems); I very often have to retype it and I figured it'd be convenient if this could be fixed.
  2. When the game is in "fake" full-screen on one monitor and I'm using dual monitors, my mouse can still go off the edge to the other monitor. That can be a bit vexing when trying to scroll, but there are a few ideas to solve this matter:

When saving a template file, it would be helpful to have ".tf" already put in the template filename or ".c" in the code filename. (I was completely lost there when first trying to save and load files!)

Here's another issue I'm getting: when I save a template after creating a new unit, it seems all of the units' source codes (even the default ones like the base) sometimes get wiped out, including the one to the new unit I just made. I'm not sure of what's causing this. I then have to go through every single one and manually re-pick the best source code for their objects. They all display:

// this file was loaded from a template file, // and does not have source code.

EDIT: Just learned that .c is for individual units (including the body), so never mind; I may be going about this all wrong!


  1. Have the option to auto-start new levels with a given X.tf already loaded, maybe to also be specified in init.txt.
  2. Be able to silence the audio in-game (for example, if something comes up, but I want to keep playing yet need to be able to clearly hear other audio playing from the same computer), unless changes to init.txt are processed in real time!
  3. Even with init.txt fit correctly to monitor dimensions, or even in windowed mode with no dimensions set, I'm finding that the description text in the panes gets cut off like so (it shows the code editor to the right but even with no pane open on the right side, the text would then just go off the end of the window):

image


  1. I tried adding a repair_other to one of the default tri_base's empty object points and left everything else about it unchanged, and it didn't seem to do any repairs to units, but I'll try this out again.
linleyh commented 7 years ago

Okay, great. Thanks so much for looking into this so promptly! I had not played SC2, only mainly Total Annihilation and the Command & Conquer series which didn't allow units assigned to multiple groups.

I have fond memories of Total Annihilation. It's control system was excellent, but probably beyond my ability to implement!

Right; what I mean is an "Unlock All" button would be nice, for example (or hotkeys, like "U" to "Unlock" when the design pane is open but while the editor pane is closed).

I've made some changes which should make an "unlock all" button less necessary - templates now unlock themselves at the end of each mission, and also see below about template files. I'd prefer to avoid keyboard shortcuts that do different things depending on which panels are open, though.

When I try to type into the compiler for the first time in a while (say, just to rename a process), the first letter does not get typed, at least if it's capital (or so it seems); I very often have to retype it and I figured it'd be convenient if this could be fixed.

I haven't been able to reproduce this, or work out what could be causing it. What OS are you using?

When the game is in "fake" full-screen on one monitor and I'm using dual monitors, my mouse can still go off the edge to the other monitor. That can be a bit vexing when trying to scroll, but there are a few ideas to solve this matter:

Version 1.1 has an option (capture_mouse) in the init.txt file to capture the mouse in the window while playing a mission (unless the game is paused).

More hotkeys may be nice, like an Esc option to return to the main menu (like Esc and then Z), and/or Space Bar to cycle the camera to locations currently undergoing conflict.

I've added a "quit game" button to the box that comes up if you press escape, with a shortcut (Q). I'll think about the space bar thing.

When saving a template file, it would be helpful to have ".tf" already put in the template filename or ".c" in the code filename. (I was completely lost there when first trying to save and load files!)

I'll see if Allegro's native file functions support this, although I don't think they do.

Here's another issue I'm getting: when I save a template after creating a new unit, it seems all of the units' source codes (even the default ones like the base) sometimes get wiped out, including the one to the new unit I just made. I'm not sure of what's causing this. I then have to go through every single one and manually re-pick the best source code for their objects. They all display:

I think I made a terrible mistake by calling these "template files"! They're a collation of all of the templates in a binary format which is only meant for multiplayer. I'm going to rename them in the next release.

EDIT: Just learned that .c is for individual units (including the body), so never mind; I may be going about this all wrong!

Yeah, saving and loading individual processes is all supposed to be done through the file menu in the editor.

Have the option to auto-start new levels with a given X.tf already loaded, maybe to also be specified in init.txt.

You can specify individual source files in init.txt, but not the .tf files.

Be able to silence the audio in-game (for example, if something comes up, but I want to keep playing yet need to be able to clearly hear other audio playing from the same computer), unless changes to init.txt are processed in real time!

Hm. I've never got around to doing in-game volume controls because the interface would be a bit of a pain, but it may make sense to pause the music while the "exit game" box is open.

Even with init.txt fit correctly to monitor dimensions, or even in windowed mode with no dimensions set, I'm finding that the description text in the panes gets cut off like so (it shows the code editor to the right but even with no pane open on the right side, the text would then just go off the end of the window):

You can drag the edges of the panels (except the template panel) to resize them, which lets you see all of this text.

I tried adding a repair_other to one of the default tri_base's empty object points and left everything else about it unchanged, and it didn't seem to do any repairs to units, but I'll try this out again.

Yes, you'll need to run the autocoder again as repair_other needs to be called in a different way. Or you could add: restore_scan(0,0); repair_scan(0,0); somewhere in the source code.

Thanks for the comments!

linleyh commented 7 years ago

... and I've just released v1.2 with these changes (and many others). I did end up putting in the space-bar command (to cycle between "under attack" alerts).

KeronCyst commented 7 years ago

Sssssweet, and you are an awesome dev for being so responsive. I will get to all the other topics mentioned above later on, but for now, how do I carry my mission progress over across versions? I can't immediately find in the manual which file(s) contain(s) it.

I have fond memories of Total Annihilation.

Have you tried Warzone 2100, too? It's an abandonware-turned-free RTS, which like LC focuses on entirely user-designed units, but is even more hardcore in [i]forcing[/i] you to build from scratch: it gives zero preset templates!

linleyh commented 7 years ago

It's msn.dat. There shouldn't be any problems with carrying it over to 1.2.

I haven't tried Warzone 2100! I'll have a look, thanks.

KeronCyst commented 7 years ago

Liberation Circuit sports a few elements that are mind-blowingly incredible here in their natural establishment of balance:

Figured I'd number these issues for easier tracking:

  1. The tutorial for Autonomous Mode is identical to the control tutorial; that was actually the first mode I tried for kicks, so I got completely lost when I couldn't do anything, lol. Will a basic tutorial on autonomous coding be put together for its own tutorial? That would be great!

  2. Speaking of TA qualities, what about LC having data wreckage (unit corpses)? After the core of a process is ruined, I imagine that the surviving components would not suddenly self-delete, but then just sit there inert on the field (and maybe—as an obstacle—even get used up by slightly damaging other units on contact, as other units' data gets corrupted while trying to pass through it). Maybe even a Harvester could come by and retrieve their partial data, like TA-reclaiming. The wrecks would have to convert into a "wreckage" process, though (kind of like TA's .3DO files), to allow unlocking of their original processes for editing.

  3. Also, no suppressing fire (especially for long-range armaments)? :P

  4. What OS are you using?

Windows 10 Home, and it continues to happen. If I build a new unit from scratch, write the autocode, and then click once in the process name space and move the cursor around to highlight and delete the text and then type, the first capital letter doesn't input at all (so if I'm not paying attention, I'd end up typing "epair" and have to add the "R" at the front).

  1. I also saw that when I click the drop-down menu (like to save a source code), and leave the menu hanging down while I click elsewhere (like in the Designer panel), it still stays down instead of retracting.

  2. Version 1.1 has an option (capture_mouse) in the init.txt file to capture the mouse in the window while playing a mission (unless the game is paused).

Oh, capture_mouse doesn't seem to do anything (give it a separate line of its own, right? Don't put it after "fullscreen" or something?). I'm playing on monitor 2 of my Windows 10 Home setup.

  1. Yeah, saving and loading individual processes is all supposed to be done through the file menu in the editor.

Source files don't have the polygonal parts though, huh? I tried loading a source file and it didn't assemble the unit's structure.

  1. I've never got around to doing in-game volume controls because the interface would be a bit of a pain, but it may make sense to pause the music while the "exit game" box is open.

LOL, just thought in response to that: it'd be hilarious if the music stepped with frame-by-frame control or sped up with faster game speeds, too. Speaking of which, I'm completely blown away by how the music is literal Allegro code instead of WAVs or MP3s!

  1. You can drag the edges of the panels (except the template panel) to resize them, which lets you see all of this text.

It's showing correctly for 1.2 now anyway but thanks—must've missed that about edge-dragging!

  1. Yeah, saving and loading individual processes is all supposed to be done through the file menu in the editor.

How do we move templates to different spaces easily, if it's possible? I deleted Attacker, which left Template 3 blank, but I couldn't find an easy way to move another template over to its template number (just so my lineup of templates wouldn't have a blank space). Moving over the source code didn't seem to move the ship design.

  1. I can't seem to replicate guard-queueing after temporarily deselecting a unit: A) select unit B) Shift+right-click on multiple other units (my aim is to have it guard them in succession of their destruction so they don't idle if their target-to-guard dies) C) Deselect the guard D) Repeat steps A and B and you'll find that you can't do add more to that same unit's guard queue

  2. Another potential issue: A) Double-left-click on a unit to select all of its type on screen. Then: B) Shift+double-left-click on a unit of a different type. It won't redo step A, even if you click very fast. But maybe Starcraft doesn't do this either (can't remember).

  3. Maybe there could be an alternate, super-ugly binary mode in which all processes are represented by diagonal, constantly running Matrix-like 0s and 1s, lol. Definitely not a priority though.

Really diggin' the space bar alert! 😎

linleyh commented 7 years ago

The tutorial for Autonomous Mode is identical to the control tutorial; that was actually the first mode I tried for kicks, so I got completely lost when I couldn't do anything, lol. Will a basic tutorial on autonomous coding be put together for its own tutorial? That would be great!

Yes, there's no proper tutorial for Autonomous Mode (which is why you can skip the tutorial entirely). I should at least add a note about that. Having a separate tutorial for autonomous mode would be great, but also a lot of work!

Windows 10 Home, and it continues to happen. If I build a new unit from scratch, write the autocode, and then click once in the process name space and move the cursor around to highlight and delete the text and then type, the first capital letter doesn't input at all (so if I'm not paying attention, I'd end up typing "epair" and have to add the "R" at the front).

I'm using Windows 7 and this works correctly for me. This may be a problem with Allegro's keyboard input code on Windows 10 specifically.

Oh, capture_mouse doesn't seem to do anything (give it a separate line of its own, right? Don't put it after "fullscreen" or something?). I'm playing on monitor 2 of my Windows 10 Home setup.

It's possible that this Allegro function doesn't work properly on Windows 10 either. Unfortunately I only have one monitor, so I haven't been able to test this properly.

Source files don't have the polygonal parts though, huh? I tried loading a source file and it didn't assemble the unit's structure.

Yes, they have the full design in the header at the start of the file (the part between the #process line and the #code line). This gets written to the designer when the source file is compiled, which you can do using the compile function in the Compile menu.

How do we move templates to different spaces easily, if it's possible? I deleted Attacker, which left Template 3 blank, but I couldn't find an easy way to move another template over to its template number (just so my lineup of templates wouldn't have a blank space). Moving over the source code didn't seem to move the ship design.

If you move the source code (e.g. by cutting and pasting it) then compile it, it should update the design.

I can't seem to replicate guard-queueing after temporarily deselecting a unit:

Hm... I tested this and it worked for me. However, there is a limit of 4 queued commands per unit at any time; were you trying to add more than 4?

Another potential issue: A) Double-left-click on a unit to select all of its type on screen. Then: B) Shift+double-left-click on a unit of a different type. It won't redo step A, even if you click very fast.

Yes, the unit selection code can't really handle this at the moment.

Maybe there could be an alternate, super-ugly binary mode in which all processes are represented by diagonal, constantly running Matrix-like 0s and 1s, lol. Definitely not a priority though.

Ha. The next version will have an integrated debugger than will let you look at the code directly while the game is running, but it won't be quite like that...

KeronCyst commented 7 years ago

Gotcha, thanks for all the info. Too bad about the Win10 incompatibility.

Hm... I tested this and it worked for me. However, there is a limit of 4 queued commands per unit at any time; were you trying to add more than 4?

Ohhhh, that may have been it. Maybe a brief popup/toaster message saying "Cannot remember <4 commands" appearing next to the cursor upon attempting a fifth one would be good.