Harris, strategy game

Re: Harris, strategy game

Postby ec429 » 10 May 2013, 00:41

I've just pushed some commits which (a) drastically affect balance and (b) break save compat.
Balancewise: flak and fighters have been made much more deadly. Loss rates will now be higher; to balance this, the budget will also be higher. This should now produce more realistic loss rates (though without Tame Boar, we still can't reproduce the likes of the Nuremburg Raid with its 95 bombers lost).
Compat-wise: a fighter base was added. You can manually up-convert old savegames by changing the line 'FBases:11' to 'FBases:12'. (Strictly speaking, this will leave fighters on different bases to the ones they were on before, but that probably doesn't matter. If it matters to you, increment the current base (so Type 0:1,ac1dac1d -> Type 0:2,ac1dac1d) for each fighter.)

Go forth and test! And then send me your savegames so I can analyse balance. (Or at least generate a stats/valuegraph with --project and send me that.)
User avatar
ec429
 
Posts: 30
Joined: 27 Dec 2012, 06:53
Location: Cambridge, UK

Re: Harris, strategy game

Postby ec429 » 01 Jul 2013, 00:43

The latest commits (8381a85, 4088ee3), which make the window resizeable, require an updated version of libatg (commit a2abe00 or later) to function correctly.
User avatar
ec429
 
Posts: 30
Joined: 27 Dec 2012, 06:53
Location: Cambridge, UK

Re: Harris, strategy game

Postby charlie » 01 Jul 2013, 10:58

Any plans for posting a binary? I'm not in a position to build it atm.
Free Gamer - it's the dogz
Vexi - web UI platform
User avatar
charlie
Site Admin
 
Posts: 1529
Joined: 02 Dec 2009, 11:56
Location: Manchester, UK

Re: Harris, strategy game

Postby ec429 » 02 Jul 2013, 00:59

charlie wrote:Any plans for posting a binary? I'm not in a position to build it atm.

Try this binary tarball. Built on x86_64; several libraries bundled. Let me know if it works. (If not, poke me on IRC; I'm soundnfury in #freegamer.)
User avatar
ec429
 
Posts: 30
Joined: 27 Dec 2012, 06:53
Location: Cambridge, UK

Re: Harris, strategy game

Postby charlie » 02 Jul 2013, 03:02

After said poking, it now works! (Confirmed Fedora 18 on 64bit)
Free Gamer - it's the dogz
Vexi - web UI platform
User avatar
charlie
Site Admin
 
Posts: 1529
Joined: 02 Dec 2009, 11:56
Location: Manchester, UK

Re: Harris, strategy game

Postby ec429 » 09 Jul 2013, 00:12

I've added a few more targets, which breaks save compatibility. I think these'll probably be the last ones until I start adding whole new target classes (for things like post-Invasion attacks on communications, V1 launch sites, and Operation Manna), which is probably a long way off yet.

Here's a fresh binary tarball.
User avatar
ec429
 
Posts: 30
Joined: 27 Dec 2012, 06:53
Location: Cambridge, UK

Re: Harris, strategy game

Postby vonlolzor » 16 Jul 2013, 22:29

What the hell is going on
Why do people leave projects as bare bones code? I want to play a game, not debug code

root@salyut2:/home/commander/Downloads/harris-master# make
gcc -Wall -Wextra -Werror -pedantic --std=gnu99 -g `sdl-config --cflags` -o harris.o -c harris.c
In file included from harris.c:32:0:
events.h:10:13: error: ISO C forbids zero-size array ‘event_names’ [-Werror=edantic]
events.h:10:28: error: ISO C forbids empty initializer braces [-Werror=edantic]
harris.c:60:34: error: ‘EVENT_GEE’ undeclared here (not in a function)
harris.c:60:45: error: ‘EVENT_H2S’ undeclared here (not in a function)
harris.c:60:56: error: ‘EVENT_OBOE’ undeclared here (not in a function)
harris.c:60:68: error: ‘EVENT_GH’ undeclared here (not in a function)
harris.c:157:6: error: ISO C forbids zero-size array ‘event’ [-Werror=edantic]
harris.c:158:7: error: ISO C forbids zero-size array ‘evtext’ [-Werror=edantic]
harris.c: In function ‘main’:
harris.c:870:5: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
harris.c:872:5: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
harris.c:3043:46: error: ‘EVENT_CIV’ undeclared (first use in this function)
harris.c:3043:46: note: each undeclared identifier is reported only once for each function it appears in
harris.c:3625:67: error: ‘EVENT_L_BC’ undeclared (first use in this function)
harris.c:3647:132: error: ‘EVENT_GEEJAM’ undeclared (first use in this function)
harris.c:3790:38: error: ‘EVENT_WINDOW’ undeclared (first use in this function)
harris.c:3927:35: error: ‘EVENT_TAMEBOAR’ undeclared (first use in this function)
harris.c:3927:82: error: ‘EVENT_WURZBURG’ undeclared (first use in this function)
harris.c:4788:36: error: ‘EVENT_ALLGEE’ undeclared (first use in this function)
harris.c:4820:34: error: ‘EVENT_PFF’ undeclared (first use in this function)
harris.c:4852:33: error: ‘EVENT_ABD’ undeclared (first use in this function)
harris.c:4976:2: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
cc1: all warnings being treated as errors
make: *** [harris.o] Error 1
vonlolzor
 
Posts: 1
Joined: 16 Jul 2013, 22:27

Re: Harris, strategy game

Postby ec429 » 16 Jul 2013, 23:36

While altering navaid production, I managed to introduce an infinite loop, which kicks in when the first navaid is invented (OBOE, 20-11-1941), and locks up the game. Now fixed.

New binary tarball.
User avatar
ec429
 
Posts: 30
Joined: 27 Dec 2012, 06:53
Location: Cambridge, UK

Re: Harris, strategy game

Postby charlie » 17 Jul 2013, 02:11

vonlolzor wrote:What the hell is going on
Why do people leave projects as bare bones code? I want to play a game, not debug code

Please be more respectful.
Free Gamer - it's the dogz
Vexi - web UI platform
User avatar
charlie
Site Admin
 
Posts: 1529
Joined: 02 Dec 2009, 11:56
Location: Manchester, UK

Re: Harris, strategy game

Postby ec429 » 17 Jul 2013, 22:37

vonlolzor wrote:What the hell is going on
Why do people leave projects as bare bones code? I want to play a game, not debug code

I don't know what you mean by "bare bones code", but (a) I distribute a binary tarball too, and (b) I can't fix bugs that workforme until someone reports them.

Moving on to the bug itself (and thank you, anyway, for reporting it at all), it looks like the generation of events.h is broken. This is done in two stages, an awk script followed by a shell script. (It's a kludge; I'm considering a Python rewrite.)
The intermediate form is the file 'evh'.
So can you post, attach, or PM the 'evh' and 'events.h' files.
Also, do check that you have awk installed on your system. It's getting less common these days now that Perl's around.

(Other things to try: pull latest, 'make realclean; make'.)
User avatar
ec429
 
Posts: 30
Joined: 27 Dec 2012, 06:53
Location: Cambridge, UK

Re: Harris, strategy game

Postby ec429 » 07 Aug 2013, 02:23

ec429 wrote:...generation of events.h... This is done in two stages, an awk script followed by a shell script. (It's a kludge; I'm considering a Python rewrite.)

I've now done said Python rewrite, which means that there is now no awk code left in Harris. Hopefully vonlolzor should be able to build it now.

More significantly perhaps, I've finally implemented Tame Boar fighter control. (See bottom of post for technical explanation of how it works.) So now, after 11th October 1943, enemy nightfighters intercept the bomber stream en masse, which can cause fairly heavy losses (especially after the Window-resistant Liechtenstein SN radar comes along in December). The usual way to deal with this would be to launch diversionary raids to make the enemy commit their fighters too early in the wrong place; but as I haven't yet implemented a way to tell a diversion to Window more heavily, the difficulty balance post-1943 is rather skewed.

There are a couple of other changes, such as various 'flavour' event messages with general war news, but Tame Boar is definitely the big feature of this update.

Here's the binary tarball of harris-git#86f2517. Alternatively, pull from the usual place and compile.

Boring technical stuff
After covering several sheets of paper with vector algebra and quadratic formulae, I derived the intercept equation - "If I fly at speed v, he's at displacement d and has velocity u, what course should I steer to catch him?" - as follows: first find the time to intercept, t = (u·d + sqrt((u·d)² + d²(v² - u²)))/(v² - u²). Then the course to steer, expressed as a vector of length v, is v = d/t + u. (There's a single-step solution that doesn't involve t - involving trigonometry and the sine law - but the fighters use t to decide whether to take off: if they haven't the range to reach the intercept point (with enough fuel left for combat), they should wait for it to get closer.)
The clever bit, however, is how it decides which bomber to chase - or rather, how it decides where the 'bomber stream' is: it divides the map into a grid of boxes, and counts the bombers in each. Then it takes the mean location and velocity of all the bombers in the fullest box. Thus, if there's a large force heading for, say, Hamburg, and a smaller one threatening Stuttgart, the fighters can ignore the latter and head straight for the Hamburg raiders.
One thing to note is that, at present, the controller doesn't look at the targets to try and guess future course changes; he just assumes that the bombers will fly in a straight line long enough to make the interception. If not, the fighters can always change course to intercept the bombers' new track - though a sharp turn or two may delay the interception and reduce losses. A diversionary raid which follows the same route initially but then splits off is also likely to be effective, as (during the split, while both streams are in the same box) the apparent mean course of the bomber stream will be in between the two forces.
User avatar
ec429
 
Posts: 30
Joined: 27 Dec 2012, 06:53
Location: Cambridge, UK

Re: Harris, strategy game

Postby dandennison84 » 12 Oct 2013, 22:26

Hi, I registered so I could provide feedback o this game. It looks really interesting and I would really like to play it, BUT the windows and graphics are too small, it is impossible for me to play. None of the windows seem resizable and I really don't understand why the windows are so miniscule. I can't read the text, many of the buttons are dark colors on a dark background meaning that I can't read those either.

In complete disagreement with many of the earlier posters, PLEASE take a few days and do something with the UI to allow resizing, picking font sizes, maybe even picking colors of screen elements.
dandennison84
 
Posts: 1
Joined: 12 Oct 2013, 22:17

Re: Harris, strategy game

Postby ec429 » 25 Oct 2013, 00:19

dandennison84 wrote:Hi, I registered so I could provide feedback o this game. It looks really interesting and I would really like to play it, BUT the windows and graphics are too small, it is impossible for me to play. None of the windows seem resizable and I really don't understand why the windows are so miniscule. I can't read the text, many of the buttons are dark colors on a dark background meaning that I can't read those either.

In complete disagreement with many of the earlier posters, PLEASE take a few days and do something with the UI to allow resizing, picking font sizes, maybe even picking colors of screen elements.


Thank you for your feedback :)
I'm afraid that some of those things would be rather difficult, as the GUI framework is really quite primitive. In particular the font sizes could be tricky as the layout is fairly static.
I'm also surprised that you're finding things "miniscule"; the game window is 800x720 pixels (and it can be resized; the items within it flow but don't get bigger). Possibly your screen DPI is really high; one possible workaround might be a full-screen mode (SDL, iirc, stretches the pixels). I'll look into adding that.
I'll also try to add options for bigger font size and higher-contrast colours, but I'm currently deep in game balance changes, and I don't have that much free time (I have a day job too ;) ) so it might be a while before I get to any of this.

But as I said, thanks for drawing my attention to this.
User avatar
ec429
 
Posts: 30
Joined: 27 Dec 2012, 06:53
Location: Cambridge, UK

Re: Harris, strategy game

Postby ec429 » 26 Oct 2013, 23:54

ec429 wrote:
dandennison84 wrote:the windows and graphics are too small

one possible workaround might be a full-screen mode (SDL, iirc, stretches the pixels). I'll look into adding that.


I've now added fullscreen mode; turn it on with the little blue monitor icon.
It's in the new binary tarball of harris-git#84d2635 (or pull and compile).

This version also includes the fairly large balance changes I've been making lately; they're still not entirely done, but I think it's good enough to work with. Bottom line: 1941 might be too hard
User avatar
ec429
 
Posts: 30
Joined: 27 Dec 2012, 06:53
Location: Cambridge, UK

Re: Harris, strategy game

Postby Egg » 10 Dec 2013, 14:49

This is a new approach to WW2 gaming. At this stage, I can see that much work is to be done, but I hope you have the time, imagination, and stamina to continue. A very worthwhile project- congratulations!
Egg
 
Posts: 1
Joined: 10 Dec 2013, 13:49

Re: Harris, strategy game

Postby ec429 » 20 Apr 2014, 23:53

Harris 0.2.0 is now out; download the binary tarball of harris-0.2.0 for x86_64 or pull from github and compile.
New in this release:
  • Bombloads - choose between general purpose bombs, incendiaries, and high explosive 'cookies'
    • PFF Mosquitoes can carry Target Indicator ('TI') flares
    • PFF aircraft also drop Release-Point Flares ('skymarkers') over cloud-covered targets
    • 'Cookies' (4,000lb High Capacity blockbusters) increase the flammability of cities
    • Incendiaries are bulky, so a full load weighs less than a full load of HE
  • Industries - track specific types of German production
    • Aircraft factories build fighters, and require ball-bearings
    • Armament factories build flak guns, and require steel
    • Oil refineries provide fuel for fighters
    • Radar factories provide airborne radar sets for nightfighters (but not, currently, Würzburgs for flak and GCI)
    • Railyards contribute to all other production
    • Attacks on U-boat factories earn 20% extra budget
    • After event ABD, industries' production depends on damage to the nearest city
    • Track production with new graph 'stats/gprodgraph.py [--dprod]'
  • Added some new targets (since save-compat was getting broken anyway)
    • Wilhelmshaven, a port city in Niedersachsen
    • Turin and Milan, Italian cities - distant but poorly-defended
    • Telefunken, Berlin - a radar factory
    • Zollern Colliery (Dortmund) and Bochumer Verein (Bochum) - steel production
  • Manually drawn city maps rather than procedurally generated
  • Target intel: brief textual descriptions of targets - click the blue 'i' in the targets list. Not all targets have intel text yet (you can help!)
  • Bomber filters - assign only PFF, or bombers having a certain navaid, to a raid
  • Weaken German flak at event BARBAROSSA
  • Added artwork for fighters do17z, do217j, ju88c (not used yet)
  • Stats improvements:
    • gprodgraph - German production by industry
    • fkmonthgraph - Fighter kills & losses by month
    • added -a/-b (after/before) to several more graphs
    • on fightersgraph, indicate radar sets with paler lines
  • Started writing a strategy guide
  • Miscellaneous bugfixes and balance tweaks

This release completely and utterly breaks save-compat - far too much has changed for savefile conversion to be feasible.
User avatar
ec429
 
Posts: 30
Joined: 27 Dec 2012, 06:53
Location: Cambridge, UK

Re: Harris, strategy game

Postby charlie » 21 Apr 2014, 11:50

Any chance of a Windows build?

Nice changelog - lots of new features!
Free Gamer - it's the dogz
Vexi - web UI platform
User avatar
charlie
Site Admin
 
Posts: 1529
Joined: 02 Dec 2009, 11:56
Location: Manchester, UK

Re: Harris, strategy game

Postby farcodev » 08 May 2014, 02:35

That goes pretty well :)
Yep a Windows build cool be cool.
FAR Colony dev blog: http://farcolony.blogspot.ca/
User avatar
farcodev
 
Posts: 143
Joined: 09 Feb 2011, 02:52
Location: Canada

Re: Harris, strategy game

Postby ashdnazg » 14 May 2014, 12:34

Took me a while to find out what is portable to windows, and what has to be changed (it seems C99 format strings aren't well supported, so had to ditch all %la and %zu) and this is what happened:
https://dl.dropboxusercontent.com/u/204 ... is-win.zip
Source is inside.
Saving barely works because the GUI lib doesn't support loading. To circumvent this, overwrite saves/qstart.sav with your save file and quick start a game.
You might prefer to refrain from vla's, memory isn't scarce nowadays so just use a char[BUFFER_SIZE] (set BUFFER_SIZE to 128/256 or similar) for string buffers.
My build actually encountered a segfault due to one of the vla's, it was probably trying to write past the end.
ashdnazg
 
Posts: 3
Joined: 30 Apr 2014, 22:36

Re: Harris, strategy game

Postby ec429 » 16 May 2014, 20:46

ashdnazg wrote:Took me a while to find out what is portable to windows, and what has to be changed (it seems C99 format strings aren't well supported, so had to ditch all %la and %zu) and this is what happened:
https://dl.dropboxusercontent.com/u/204 ... is-win.zip
Source is inside.

Thanks, I'll take a look at it and see if I can patch it into the upstream with some #ifdeffery.
Saving barely works because the GUI lib doesn't support loading.

Yes, known deficiency which I'll fix when my todo list gets a bit shorter.
To circumvent this, overwrite saves/qstart.sav with your save file and quick start a game.

While that works, it will break the stats graphs since they need a copy of the initial state.
You might prefer to refrain from vla's, memory isn't scarce nowadays so just use a char[BUFFER_SIZE] (set BUFFER_SIZE to 128/256 or similar) for string buffers.
My build actually encountered a segfault due to one of the vla's, it was probably trying to write past the end.

Was it pn and/or sn in load_data.c? Those are the only VLAs I can find with a quick grep "char [[:alpha:]_]*\[[^]]*[[:alpha:]]" *.c
I don't like the idea of using a fixed buffer size there because there's no upper bound on how long this.name might be. Using snprintf would prevent buffer overflows but it could still truncate. However, I might conceivably change my mind about that.
User avatar
ec429
 
Posts: 30
Joined: 27 Dec 2012, 06:53
Location: Cambridge, UK

Re: Harris, strategy game

Postby ashdnazg » 17 May 2014, 11:16

ec429 wrote:Thanks, I'll take a look at it and see if I can patch it into the upstream with some #ifdeffery.

If you had taken a look by now you'd see the solution isn't well coded but hackish at best. Probably you'd like to diff in order to see where I had changed things, and then decide how to handle/not handle these issues.

ec429 wrote:Was it pn and/or sn in load_data.c? Those are the only VLAs I can find with a quick grep "char [[:alpha:]_]*\[[^]]*[[:alpha:]]" *.c
I don't like the idea of using a fixed buffer size there because there's no upper bound on how long this.name might be. Using snprintf would prevent buffer overflows but it could still truncate. However, I might conceivably change my mind about that.

Indeed it was one of them. Are files really prone to having 256 characters long relative path? If so, you can always use 512 etc. :)
And using strn* functions wherever possible is always a good idea.

I noticed I haven't said a word about the game :D , so I think the idea is quite good and it has great potential! The main thing you wish to battle gameplay-wise is the repetition. Most nights I did more or less the same things over and over. I thought of more events, or changes in political priorities (i.e. this week/month you get more budget for doing x).
Thanks for making this game!
ashdnazg
 
Posts: 3
Joined: 30 Apr 2014, 22:36

Re: Harris, strategy game

Postby ec429 » 24 May 2014, 16:11

ashdnazg wrote:Saving barely works because the GUI lib doesn't support loading. To circumvent this, overwrite saves/qstart.sav with your save file and quick start a game.

The good news: the latest version of libatg supports the filepicker widget on Windows (at least in theory; I haven't been able to test it) thanks to some code borrowed from the Cygwin project.
The bad news: Recent changes to make the game install to the proper locations on Linux (e.g. data files in /usr/local/share/games/) will cause another set of problems for Windows. (These changes were necessitated by some unrelated good news that Harris is being packaged for the Mageia distro by someone called akien.)
The further good news: it should be able to work around these changes by enabling the '--local' option which tells Harris to look in the cwd, rather than the proper install locations, for its data files and art assets.

So hopefully the next version will be significantly easier to build for Windows.
User avatar
ec429
 
Posts: 30
Joined: 27 Dec 2012, 06:53
Location: Cambridge, UK

Re: Harris, strategy game

Postby farcodev » 14 Jun 2014, 16:21

Keep it up! :)
FAR Colony dev blog: http://farcolony.blogspot.ca/
User avatar
farcodev
 
Posts: 143
Joined: 09 Feb 2011, 02:52
Location: Canada

Re: Harris, strategy game

Postby ec429 » 18 Jul 2014, 00:28

Harris 0.2.1 is now out. Download for Linux x86_64 or for Windows, or pull from github and compile.
(Note: Windows build has only been tested in WINE, and only very shallowly at that. Also, it has a known bug that during a raid, the display freezes until the Raid Results Screen.)
(Note also that savefiles from Windows won't work on Linux, and vice-versa.)
(Note: if building from source, make sure you have at least libatg tag "lv2.0.1" (libatg.so.1.1.0))

New in this release:
  • Intel screens for Bomber and Fighter types, plus revamped Targets intel
    • Side-view line-art for all the aircraft
    • Top-view pixel-art for those fighters that were still missing it
    • Target-type icons
    • Stat summaries on all the intel pages
    • Added some more targets intel text (there's still a lot to do, though)
    • Greyed out the intel buttons when there's no intel text. (But you can still click them and see the stats.)
  • FHS compliance: you can now 'make install' the game to proper locations in /usr/local/games/harris (binary) and /usr/local/share/games/harris (data)
    • This should make packaging for distributions easier
    • Also save games are stored in ~/.local/share/harris/
  • Fixed bug in the Plumduff and Usual bombloads where if capacity was under 4000 (eg. due to a heavy fuel load) no bombs would be loaded at all
  • Startpoints - you can now choose to start your game from 15-05-1940, 14-02-1942 or 04-03-1943 instead of 03-09-1939
  • Difficulty settings - when using Set Up New Game you can set seven different difficulty parameters
  • Balance: made the Barges targets more profitable by making them easier to hit
  • And of course a lot of little bugfixes, big refactoring, and Makefile mangling.

Savegames from 0.2.0 should work without modification. (The same is not true of all intermediate commits, so if you've been building some random version you might see breakage.)

Here's a screenshot of the new intel screen:
Image
User avatar
ec429
 
Posts: 30
Joined: 27 Dec 2012, 06:53
Location: Cambridge, UK

Re: Harris, strategy game

Postby Akien » 18 Jul 2014, 09:50

Those are some nice changes!
I'll update my WIP Mageia package with the new release and push it to Mageia's repositories :-)
Akien
 
Posts: 244
Joined: 22 Feb 2014, 13:14

Who is online

Users browsing this forum: No registered users and 3 guests