Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 3 [4] 5

Author Topic: LCS Compiling Issues  (Read 27105 times)

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re: LCS Compiling Issues
« Reply #45 on: June 06, 2017, 03:15:19 pm »

Is there ANYWHERE I can get a pre-compiled download of the latest GitHub version?
For Windows?
http://www.mediafire.com/file/8d6cji4r8djrqd3/Liberal+Crime+Squad+4.11.zip
If you just want to play it, this has no gameplay differences from the GitHub version.

There's a bug that causes some values to be changed upon reloading a game.  If you start on nightmare mode, save the game, and reload it, the issues will shift and some supreme court justices will shift alignment.  Gun control shifts one point and become conservative, Civil Rights will shift 3 and become liberal, election reform will shift 2 and become moderate, Human rights will shift one point and become conservative, Tax structure becomes moderate, Drug laws are conservative, and Military Spending becomes conservative, Flag Burning and Women's Right's become Liberal, Immigration and Prison regulation become moderate.  2 Conservative Justices and one moderate justice will become liberal.

The values are over-written every time you reload the game it seems, at least the political issues affected are.  You can advance a month and let the issues change, to the point where they glitch out, because they moved off the chart, and upon reloading, the issues will be reset.

Huh.  I'm going to have to look into that.

Yeah same thing here. Also isn't that 4.10? Didn't know there was a 4.11 release.
The last official release is 4.07, but Fox hasn't been seen in forever, so KamelSadek worked to update it by adding Liberal Augmentation.  I don't know precisely how much is his work, but he included updates to allow mucalitiple saves and several quality of life changes.  KamelSadek calls his version 4.10.  I used this version as a starting point for improved procedural string support, moving most of the in game text to external files, specifically pickup lines and battle text.  I spoke with KamelSadek, and since we don't really know one another, and since neither of us is sure I didn't introduce a bunch of new bugs he has decided not to merge my changes into version 4.10.  Eventually I made enough changes that I felt the need to differentiate my release from 4.10 so I renamed my version 4.11, and later renamed it 4.12.

tldr;
Fox released 4.07.  Hasn't been updated since before KamelSadek worked on it.
KamelSadek fixed up 4.07 and released 4.10.  Hasn't been updated since before IsaacG worked on it.
IsaacG fixed up 4.10 and released 4.12.
Koorba, Taberone, and randseed worked at translating 4.12 into Russian.
Schmel924 did work on 4.10, starting a fork of their own.
These people aren't really working together, but the higher numbers mostly mean advancement.
Also, http://www.mediafire.com/file/hw6gkrbmktvof53/LCS+v4.12+STABLE.zip
4.11 was buggy as hell, so I removed all my experimental changes and released 4.12
I haven't changed it much in the last six months, so this release is still current.
Logged
LCS 4.12 Thread
https://discord.gg/HYbss8eswM
Quote
Many people, meeting Aziraphale for the first time, formed three impressions: that he was English, that he was intelligent, and that he was gayer than a tree full of monkeys on nitrous oxide.
Constitution of the Confederate States
Article I Sec. 9 4
No bill of attainder, ex post facto law, or law denying or impairing the right of property in negro slaves shall be passe

Schmel

  • Escaped Lunatic
    • View Profile
Re: LCS Compiling Issues
« Reply #46 on: August 17, 2017, 08:40:46 am »

Quote
Schmel924 did work on 4.10, starting a fork of their own.

Woo-Hoo, somebody noticed!
Actually i'm really sorry, no real work was done there. I used it mostly as training to git. And failed. Maybe i delete repo someday.
And i really like to put my hands on this 4.12 you talking about.
Is it anywhere on public git servers?
Okay, i parsed all your messages on this forum and found out that instead of IsaacG (which is already present on github) you put LCS 4.12 as King-Drake. Okay, here i GOFORK!
Also, Russian: i can help with that.
« Last Edit: August 17, 2017, 08:50:51 am by Schmel »
Logged
------------------
No signature, yet

Schmel

  • Escaped Lunatic
    • View Profile
Re: LCS Compiling Issues
« Reply #47 on: August 18, 2017, 05:40:20 am »

He-he. Managed to compile it! It wasn't an easy journey.
Mostly because i did it on my dayjob PC, where i'm no admin. So no installation of any program in usual way.
I downloaded and unpacked MiniGW and GnuMake.
After this, i indexed in makeshift makefile all cpp files from src folder.
After several more error-inducing changes (disable SDL and weird mingw #define), it worked.
My changes are on Github as of right now.
https://github.com/Schmel924/Liberal-Crime-Squad/tree/Dayjob
Logged
------------------
No signature, yet

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re: LCS Compiling Issues
« Reply #48 on: August 19, 2017, 11:55:47 am »

Okay, i parsed all your messages on this forum and found out that instead of IsaacG (which is already present on github) you put LCS 4.12 as King-Drake.
It's just the price I pay for having usernames easily pronounced and spelled.
I've decided to feel flattered by the people who painstakingly track me down rather than ask me directly.

He-he. Managed to compile it! It wasn't an easy journey.
Mostly because i did it on my dayjob PC, where i'm no admin. So no installation of any program in usual way.
I downloaded and unpacked MiniGW and GnuMake.
After this, i indexed in makeshift makefile all cpp files from src folder.
After several more error-inducing changes (disable SDL and weird mingw #define), it worked.
My changes are on Github as of right now.
https://github.com/Schmel924/Liberal-Crime-Squad/tree/Dayjob
The problems ultimately stem from "includes.h" (and "externs.h").  My computer can compile the code for crimesquad.exe in about thirty seconds, but it takes 4~5 seconds to parse through and recompile includes.h.  Since it's included in every single file, that adds about five minutes to the compile time.  Being able to recompile in thirty seconds makes changes easier, safer, and better.
The problem is that now it has about twenty "includes.h" files instead of one (with names like "includesAltComplex01Redux02.h" because new ones are created and destroyed like fruit flies in pursuit of reduced interdependence).
I've been working on it for six months, but still it remains in a primordial state.

Edit: It's also driving me insane; I don't even know what I just wrote.
« Last Edit: August 19, 2017, 11:59:20 am by IsaacG »
Logged
LCS 4.12 Thread
https://discord.gg/HYbss8eswM
Quote
Many people, meeting Aziraphale for the first time, formed three impressions: that he was English, that he was intelligent, and that he was gayer than a tree full of monkeys on nitrous oxide.
Constitution of the Confederate States
Article I Sec. 9 4
No bill of attainder, ex post facto law, or law denying or impairing the right of property in negro slaves shall be passe

Schmel

  • Escaped Lunatic
    • View Profile
Re: LCS Compiling Issues
« Reply #49 on: August 21, 2017, 07:15:23 am »

I've decided to feel flattered by the people who painstakingly track me down rather than ask me directly.
Well, You know, You weren't responding in three seconds after my post, and I was pumping adrenaline, so it was easier to act, than think. Also, that part of Your signature doesn't yell out "4.12 LCS IS HERE", so i went my way. Also, did You know, they making TV-series of Good Omens? With David Tennant! OMG!

new ones are created and destroyed like fruit flies in pursuit of reduced interdependence
That's why we use git. It proves to us the lifecycle of such changes.
Also, i think that's the right way, just break it in parts, that seems usable.
I wonder what exactly make it so hard.
Do You happen to have git log regarding this file and his counterparts?
If You don't mind, i will try and do the same in my free time.

Logged
------------------
No signature, yet

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re: LCS Compiling Issues
« Reply #50 on: August 22, 2017, 03:14:19 pm »

I've decided to feel flattered by the people who painstakingly track me down rather than ask me directly.
Well, You know, You weren't responding in three seconds after my post, and I was pumping adrenaline, so it was easier to act, than think. Also, that part of Your signature doesn't yell out "4.12 LCS IS HERE", so i went my way.
That's a good point... I should update that.

Also, did You know, they making TV-series of Good Omens? With David Tennant! OMG!
...
I was unaware of this.
...
<shudders with joy>

new ones are created and destroyed like fruit flies in pursuit of reduced interdependence
That's why we use git. It proves to us the lifecycle of such changes.
Also, i think that's the right way, just break it in parts, that seems usable.
I wonder what exactly make it so hard.
It's not so much hard as it is time consuming.
LCS contains enough code that it qualifies for the old adage that starting over might be easier than maintenance, and while it is split into multiple files, nearly all the code is contained within the same class (at least 80%) making it arguably an example of procedural programming instead of object oriented.

To give an example, the car crash teleportation bug.  Some of the people who die in a car crash are potentially 'teleported' to the safehouse, meaning their dead bodies appear at home for their compatriots to deal with.
Testing to determine if the bug is fixed requires causing a car crash, but a savefile can only exist before the player even goes to a site, meaning the tester has to go to the site, antagonize its inhabitants, enter a car chase with the police, crash the car, and then check back at the safehouse to see whether the bodies were teleported.
The code dealing with car chases is 1800 lines long, and the issue was fixed by adding lines 1556 and 1599.  It is possible that only one of those two additions is necessary, and it is also possible that one of those two changes causes some other problem.  The car chase code is integrated into the main class and cannot be changed or tested on its own.

I once changed the code that displays combat messages, then every month congress started voting unanimously regardless of legislation, and two of the issues in the "status of the liberal agenda" were displayed in flashing red text (which only appears when an obvious error is detected).  I don't know how my changes did that, so I had to revert to an earlier copy and start over.  (I went line by line of the earlier copy to my new version and only included the changes I felt confident about and 4.12 was born.)

Do You happen to have git log regarding this file and his counterparts?
If You don't mind, i will try and do the same in my free time.

I don't have a git log, since I haven't figured out how to get version control software to work offline, so I've just been making copies of the entire project folder.  Crude, but effective.
I'll put together a zip archive.
Logged
LCS 4.12 Thread
https://discord.gg/HYbss8eswM
Quote
Many people, meeting Aziraphale for the first time, formed three impressions: that he was English, that he was intelligent, and that he was gayer than a tree full of monkeys on nitrous oxide.
Constitution of the Confederate States
Article I Sec. 9 4
No bill of attainder, ex post facto law, or law denying or impairing the right of property in negro slaves shall be passe

Azerty

  • Bay Watcher
    • View Profile
Re: LCS Compiling Issues
« Reply #51 on: August 23, 2017, 04:46:15 am »

LCS contains enough code that it qualifies for the old adage that starting over might be easier than maintenance, and while it is split into multiple files, nearly all the code is contained within the same class (at least 80%) making it arguably an example of procedural programming instead of object oriented.

To give an example, the car crash teleportation bug.  Some of the people who die in a car crash are potentially 'teleported' to the safehouse, meaning their dead bodies appear at home for their compatriots to deal with.
Testing to determine if the bug is fixed requires causing a car crash, but a savefile can only exist before the player even goes to a site, meaning the tester has to go to the site, antagonize its inhabitants, enter a car chase with the police, crash the car, and then check back at the safehouse to see whether the bodies were teleported.
The code dealing with car chases is 1800 lines long, and the issue was fixed by adding lines 1556 and 1599.  It is possible that only one of those two additions is necessary, and it is also possible that one of those two changes causes some other problem.  The car chase code is integrated into the main class and cannot be changed or tested on its own.

I once changed the code that displays combat messages, then every month congress started voting unanimously regardless of legislation, and two of the issues in the "status of the liberal agenda" were displayed in flashing red text (which only appears when an obvious error is detected).  I don't know how my changes did that, so I had to revert to an earlier copy and start over.  (I went line by line of the earlier copy to my new version and only included the changes I felt confident about and 4.12 was born.)

OOP would also helping with transfering most item definitions to XML files, along with making development and maintainance easier.
Logged
"Just tell me about the bits with the forest-defending part, the sociopath part is pretty normal dwarf behavior."

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re: LCS Compiling Issues
« Reply #52 on: August 23, 2017, 10:57:09 am »

LCS contains enough code that it qualifies for the old adage that starting over might be easier than maintenance, and while it is split into multiple files, nearly all the code is contained within the same class (at least 80%) making it arguably an example of procedural programming instead of object oriented.

OOP would also helping with transferring most item definitions to XML files, along with making development and maintenance easier.
Oh, absolutely.

Do You happen to have git log regarding this file and his counterparts?
If You don't mind, i will try and do the same in my free time.

http://www.mediafire.com/file/98dg19o0fe9504e/V4.12.2.zip
It's rough, but I like to think it's straightforward.
Files have been renamed and sorted based on dependencies, but the code shouldn't be any harder to compile than vanilla LCS ( and I like to think easier).

Header files are split into three categories.
1: Primitive
These files can be included basically anywhere without issue, no dependencies.  These have a number, but their order can be changed at will.
2: Complex
These files have dependencies.  All complex include files have a number that corresponds to the primitive file that must be included first.  Complex files also require the other complex files with a lower number.
e.g. complex02 requires primitive02 and complex01.  (complex01 requires primitive01 as well)
As I have been working to break the dependencies, some of these files no longer require other includes, but mostly they still do.
3: Extern
extern is a keyword corresponding to variables defined in other files.
Extern files generally require complex04, meaning they also require complex01 ~ complex03 and primitive01 ~ primitive04.  They are the bane of my existence.

cursesAlternative.h is a file I created to replace the curses library from being directly referenced in bulk of the code.  cursesAlternative.cpp mostly just forwards the calls to the curses library, but since only the windows port actually uses pdcurses, the preprocessor lines that determine operating system have to be included in every file that references the curses library.  cursesAlternative.cpp is now one of only two places that reference the curses library directly, reducing how many preprocessor lines have to be used at all, vastly speeding up compile time.
Logged
LCS 4.12 Thread
https://discord.gg/HYbss8eswM
Quote
Many people, meeting Aziraphale for the first time, formed three impressions: that he was English, that he was intelligent, and that he was gayer than a tree full of monkeys on nitrous oxide.
Constitution of the Confederate States
Article I Sec. 9 4
No bill of attainder, ex post facto law, or law denying or impairing the right of property in negro slaves shall be passe

Schmel

  • Escaped Lunatic
    • View Profile
Re: LCS Compiling Issues
« Reply #53 on: August 24, 2017, 03:09:09 am »

and while it is split into multiple files, nearly all the code is contained within the same class (at least 80%) making it arguably an example of procedural programming instead of object oriented.

To give an example .... 

Wowzers. I certainly underestimated this task. It would take much more time and effort. But 30-60 minutes per day I have. And i can spend them here, because my boss is very forgiving. Also, as a person who wants to be a C[++] coder, this will be an interesting training.


I don't have a git log, since I haven't figured out how to get version control software to work offline, so I've just been making copies of the entire project folder.  Crude, but effective.
I'll put together a zip archive.

Thank you for archive, and it's detailed description.
About offline VCS, (or SCM): You should be aware, that first idea behind it was using it offline, and then e-mail patches. Actually Linus and his Linux-core-committers still use this way. They may even think that github as git server is some kind of heretical schism.
But, we are small people, and we just want to use it in friendly way, right? Well, most of the IDE and some of text editors have some git built in. I definitely saw it in Atom, Sublime Text, and VSCode. Maybe with help of plugins.

What i use is Git for windows, which installs simply, has some graphical interface, and easily initiates anywhere with RMB context menu.

And right now it surprises me even more than i imagined.
I run a command, which shows me all changes to code which were made, and suddenly, i get this
Spoiler (click to show/hide)

It hooked all commits from effing 2007

Spoiler (click to show/hide)

I was able to checkout to 2007 version and poke around, but it didn't compile. Probably, because of my dayjob special use of MinGW and gcc, instead of visual studio.
Logged
------------------
No signature, yet

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re: LCS Compiling Issues
« Reply #54 on: August 24, 2017, 10:15:08 am »

And right now it surprises me even more than i imagined.
I run a command, which shows me all changes to code which were made, and suddenly, i get this

...

It hooked all commits from effing 2007


That would be my fault.  I forked from LCS 4.10 Augmentations, which Kamel-Sadek released in 2016, but I somehow convinced gitHub that my version was over five hundred commits behind when I tried to remove a file I had accidentally added to the wrong folder.
C makes it easy to shoot yourself in the foot.  C++ makes it harder, but when you do, you blow your whole leg off.
Logged
LCS 4.12 Thread
https://discord.gg/HYbss8eswM
Quote
Many people, meeting Aziraphale for the first time, formed three impressions: that he was English, that he was intelligent, and that he was gayer than a tree full of monkeys on nitrous oxide.
Constitution of the Confederate States
Article I Sec. 9 4
No bill of attainder, ex post facto law, or law denying or impairing the right of property in negro slaves shall be passe

Schmel

  • Escaped Lunatic
    • View Profile
Re: LCS Compiling Issues
« Reply #55 on: August 25, 2017, 01:38:46 am »

Quote
fault
NO!  I did not mean that!
First of all, if You look into spoiler, You should see that my patches (Dayjob, Schmel924-patch-1) are at top. So this is most recent things happened in repository. About 15 rows in You should see wonderful "0bd15b9 (tag: v4.12.1, origin/master) Updated Readme for 4.12.1", which You must recognise. And about 15 rows further there is  "127d712 (tag: v4.10.0) CodeBlocks now functioning properly", which obviously is Kamal-Sadek's. So, first of all, it is placed right in this timeline.

Secondly, and it is mostly subjective: i don't see it as a flaw. It's beautiful! I feel as Archaeologist (my wish for profession). I was amused, that all this intricate history of changes is here at my fingertips, preserved, contained, and cloned to 23 different forks (according to github), and to three different PCs and a phone (and that's just for me).  As nowadays scientists often find themselves in position, where they have only final stage (take example of any virus, which they "catch"), and they can only make assumptions how it was changing and growing all these years based on timeflow and environment. But here, i can clearly see it myself. Like a timetravel! Heck, i even watched 12 Monkeys yesterday. I only once before witnessed something comparatively monumental that i could sense story of changes through more than 10 years. It was git log of git itself. Yeah, it's there too...

And third, i'm not absolutely sure, but i have feeling that it doesn't depend on Your actions. Github shows that 4.12 and 4.10 are detached, yes. But he also shows that they are commits of one and same repository. Started in 2007 by Jonathan S. Fox. Maybe it is not written in stone, but
Quote from: Linus Torvalds
Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it ;)

PS: Sorry if i got emotional. I just like what happens here, and get attached.
Logged
------------------
No signature, yet

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re: LCS Compiling Issues
« Reply #56 on: August 26, 2017, 12:24:38 pm »

Quote
fault
NO!  I did not mean that!
First of all, if You look into spoiler, You should see that my patches (Dayjob, Schmel924-patch-1) are at top. So this is most recent things happened in repository. About 15 rows in You should see wonderful "0bd15b9 (tag: v4.12.1, origin/master) Updated Readme for 4.12.1", which You must recognize. And about 15 rows further there is  "127d712 (tag: v4.10.0) CodeBlocks now functioning properly", which obviously is Kamal-Sadek's. So, first of all, it is placed right in this timeline.

Secondly, and it is mostly subjective: i don't see it as a flaw. It's beautiful! I feel as Archaeologist (my wish for profession). I was amused, that all this intricate history of changes is here at my fingertips, preserved, contained, and cloned to 23 different forks (according to github), and to three different PCs and a phone (and that's just for me).  As nowadays scientists often find themselves in position, where they have only final stage (take example of any virus, which they "catch"), and they can only make assumptions how it was changing and growing all these years based on timeflow and environment. But here, i can clearly see it myself. Like a timetravel! Heck, i even watched 12 Monkeys yesterday. I only once before witnessed something comparatively monumental that i could sense story of changes through more than 10 years. It was git log of git itself. Yeah, it's there too...

I think that's the nicest thing anyone's ever yelled at me.

Quote from: Linus Torvalds
Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it ;)

PS: Sorry if i got emotional. I just like what happens here, and get attached.
You'll get no complaints from me.  I'm used to being the craziest, creepiest, most emotional person in a conversation, just hesitant to express it.  And the passion I see here makes my heart race.

Programming is my life, and conversations like this are why I get out of bed.
And now to go back to pretending I'm not crazy. <3
Logged
LCS 4.12 Thread
https://discord.gg/HYbss8eswM
Quote
Many people, meeting Aziraphale for the first time, formed three impressions: that he was English, that he was intelligent, and that he was gayer than a tree full of monkeys on nitrous oxide.
Constitution of the Confederate States
Article I Sec. 9 4
No bill of attainder, ex post facto law, or law denying or impairing the right of property in negro slaves shall be passe

Schmel

  • Escaped Lunatic
    • View Profile
Re: LCS Compiling Issues
« Reply #57 on: August 29, 2017, 04:31:52 am »

You'll get no complaints from me. 
Nice!
Also, i failed miserably in my first attempt to untangle includes.h.
It seems some of classes definitions that are in it, use some consts and enums from itself.
Well. As my C intuition says nothing should be defined in H file. Only declarations.
My next attempt consist of thoroughly commenting includes.h to define where every row belongs.
Or should i first understand what parts game consists of, so i will know where every row might belong?
Why not both?
Logged
------------------
No signature, yet

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re: LCS Compiling Issues
« Reply #58 on: August 29, 2017, 03:46:01 pm »

Also, i failed miserably in my first attempt to untangle includes.h.
Took me a couple tries.  It takes some doing.
It seems some of classes definitions that are in it, use some consts and enums from itself.
Well. As my C intuition says nothing should be defined in H file. Only declarations.
I've heard that, but I don't know how to use enums without also having them defined in the file that uses them.  That's why I've been defining enums in header files and keeping the ones already there.
Logged
LCS 4.12 Thread
https://discord.gg/HYbss8eswM
Quote
Many people, meeting Aziraphale for the first time, formed three impressions: that he was English, that he was intelligent, and that he was gayer than a tree full of monkeys on nitrous oxide.
Constitution of the Confederate States
Article I Sec. 9 4
No bill of attainder, ex post facto law, or law denying or impairing the right of property in negro slaves shall be passe

Schmel

  • Escaped Lunatic
    • View Profile
Re: LCS Compiling Issues
« Reply #59 on: August 30, 2017, 04:47:09 am »

I had no problems with enums in header files, actually. I don't think they make very much to stall the compiling. However they are too widely used across different parts of gameplay. I wonder if there is a way to replace them with some classes structure. But it will be afterwards.
I am mostly worried about classes (especially MusicClass) and a ton of others headers includes. Which I didn't even saw yet!
Logged
------------------
No signature, yet
Pages: 1 2 3 [4] 5