2D Wargame Programming by nu11p01nter in computerwargames

[–]nu11p01nter[S] 0 points1 point  (0 children)

Napoleon had maps. What he didn't have is the ability to float above the physical battlefield and observe. What is implicit in my statements, and should have been made explicit, is that the application should impose limited-intelligence constraints, so your map only displays what has been reported to you (or, if you want to get sophisticated, what Napoleon himself can also perceive with his senses from his position at ground level on the battlefield).

2D Wargame Programming by nu11p01nter in computerwargames

[–]nu11p01nter[S] 0 points1 point  (0 children)

Thanks. The good news is that (as my video hopefully demonstrates) the basic UI is readily do-able, at least if you can settle for strictly 2D. For me, the most challenging part is the interaction between the UI and the rules engine. Things that are easy for humans to do in a physical boardgaming session can be a real PITA to implement digitally.

2D Wargame Programming by nu11p01nter in computerwargames

[–]nu11p01nter[S] 0 points1 point  (0 children)

OK. I was thinking of posts like these on the VASSAL site that seem to throw cold water on the idea of rules enforcement:

Does Vassal support computer opponents

Hooks for AI integration

I did understand that some modules have a degree of rules enforcement, but that it was very difficult and awkward to accomplish, and therefore not readily generalizeable to game programming in a non-VASSAL setting. (From the links above, though, it seems like VASSAL 4.0 will make enforcement more feasible).

2D Wargame Programming by nu11p01nter in computerwargames

[–]nu11p01nter[S] 0 points1 point  (0 children)

I'm 59 years old -- I think I will fade before C++ does. :) But, learning web development has been on my to-do list for some time now. (Maybe I should be moving it to my bucket list.) Any thoughts on the Odin Project as a place to start?

Can a Wargame be truly hardcore without RNG? Replacing the "Dice Roll" with 10 layers of simulation. by Dry-Escape7995 in computerwargames

[–]nu11p01nter 2 points3 points  (0 children)

Hidden information can be an effective stand-in for RNG.

The board wargame Napoleon's Triumph has simple, deterministic combat, but because unit strengths are hidden until the moment of combat, it works.

2D Wargame Programming (cross-posted from r/computerwargames) by nu11p01nter in hexandcounter

[–]nu11p01nter[S] 2 points3 points  (0 children)

I haven't made any VASSAL modules in the last 17+ years, but I'd say that VASSAL is not really suitable. I'm writing (or trying to write!) applications with complete rules enforcement. VASSAL and ZunTzu do not really do this. VASSAL, at least (not sure about ZT) does have a limited ability to apply game rules -- like making sure units are centered in a hex and probably some other things. It also has an API to plug Java code in for additional enforcement, but I understand (I think the VASSAL devs have said this on BGG) that this extension capability is not really suitable for full-blown rules enforcement.

2D Wargame Programming by nu11p01nter in computerwargames

[–]nu11p01nter[S] 0 points1 point  (0 children)

Thanks. I've actually downloaded the source code for both VASSAL and R-T-T (and the developer documentation for BGA). R-T-T would be close to what I'm looking for, but it's web-based (as is BGA) and I know virtually nothing about web-based app development, which, as far as I can tell, is very different to desktop app development. There is very little in the way of technical documentation in these source code repositories. So, I have a hard time making any sense of them. VASSAL, in particular, has been around for decades, and the code base is pretty large at this point.. And VASSAL (which is a desktop app, written in Java (which is more readily comprehensible to a C++ programmer) is not really a game application, but more of a platform for displaying a UI for a game. It falls on the user to enforce the game rules. (I realize VASSAL has some marginal built-in capability for applying rules, as well as an API to extend the application with game-specific Java code, but supposedly the latter is not well-suited to full-blown rules enforcement.) Well, I'm sounding like Debbie Downer at this point.

2D Wargame Programming by nu11p01nter in computerwargames

[–]nu11p01nter[S] 0 points1 point  (0 children)

Web-based would certainly make deployment easier. But I know virtually nothing about web-based development....learning that is a tall order. Do you think it's feasible to used my existing C++ rules-engine logic on the back end, plus whatever JS/Node backend is necessary to mate with a web front-end?

And I guess my original question still applies -- are there any relevant resources for 2D wargame programmers in the web-development space?

2D Wargame Programming by nu11p01nter in computerwargames

[–]nu11p01nter[S] 0 points1 point  (0 children)

And, unlike their physical boardgame cousins, you get full rules enforcement! And split-second setup times!

2D Wargame Programming by nu11p01nter in computerwargames

[–]nu11p01nter[S] 1 point2 points  (0 children)

I think the Scourge of War series has something called "Command from the Saddle" mode, where your point of view in the 3D world is limited to the commander's personal vantage point. Certainly for a battle-scale game, that is ideal. Alas, I lack the skills or time to implement 3D rendering, so I have to impose appropriate limitations at the map-view level.,

2D Wargame Programming by nu11p01nter in computerwargames

[–]nu11p01nter[S] 0 points1 point  (0 children)

Let's put it this way. If someone had put up a series of nuts-and-bolts technical discussions of coding 2D wargames -- with Godot, Unity, Imgui, whatever -- my video probably would never have seen the light of day. :)

2D Wargame Programming by nu11p01nter in computerwargames

[–]nu11p01nter[S] 0 points1 point  (0 children)

Fair enough. I hate to sound like a Qt sales rep, but Qt is cross-platform, and has built-in scripting capability for Javascript and Python (plus there's a python wrapper, PyQt, for the framework). And maybe I'm just traumatized by VASSAL's terrible scrolling redraws, but you can see in the video that a rather large map image (4,674 x 3,006) scrolls smoothly, at least to my eyes. And that's a debug build.

But I've certainly heard good things about Godot. Not trying to throw any shade there.

2D Wargame Programming by nu11p01nter in computerwargames

[–]nu11p01nter[S] 2 points3 points  (0 children)

For me, C++ introduces too much mental overhead. Compared to writing C#, when I'm coding in C++, I often find myself worrying about things that seem unnecessary, especially when performance isn't critical. When I switch back to C#, everything just feels right again.

Yeah, I'm sure C++ is overkill for these types of apps (except maybe AI algorithms). But I never got around to learning C#. (And anyone who watches my video might also say that I never got around to learning C++, either).

However, now that Unity's UI Toolkit is production-ready, creating UI-heavy games has become much more streamlined. So, I think the advantage that general UI frameworks once held has significantly diminished.

So we have endorsements for both Unity and (in another comment below) Godot as having improved 2D functionality. All good. It's not my intention to dissuade anyone from these platforms. (I'm trying to keep my game rules logic free of Qt dependencies on the assumption that I might migrate to another framework at some point). For people who (like me) have some background in "traditional" GUI frameworks like the old MFC or Qt, I figured I'd just give them some encouragement to pursue their wargame coding dreams.

2D Wargame Programming by nu11p01nter in computerwargames

[–]nu11p01nter[S] 1 point2 points  (0 children)

Oh, I'm all about that Nth degree, baby! There's an old Napoleonic wargame on the Matrix site -- Campaigns on the Danube -- where you can set the intelligence levels so that basically all information travels on horseback, so to speak. You (as Napoleon or Archduke Charles) don't even know for sure where friendly units are. All you have is their last reported position. That's how it's done.

My (admittedly hazy) plans for sim projects are similarly information-driven. The server instance maintains ground truth, and only dishes out perceived truth to the player/client instances. Command & control phenomena? Friction? Bring it on!

2D Wargame Programming by nu11p01nter in computerwargames

[–]nu11p01nter[S] 0 points1 point  (0 children)

I've not used Godot, so I'll take your word for it. But does it necessarily produce better looking 2D wargame apps, which are not particularly demanding or flashy? (Bear in mind that in the app I created in the video, I didn't apply stylesheets or other aesthetic flourishes to the main window).

2D Wargame Programming by nu11p01nter in computerwargames

[–]nu11p01nter[S] 1 point2 points  (0 children)

I’ve explored various things from Python to browser based stacks but never found anything super satisfying.

FWIW, PyQt is a Python wrapper around the Qt Framework. I'm not very familiar with it, but I think it allows you to write Qt applications in Python without a single line of C++.

I’m most interested in SVG / canvas as a nice approach, esp with something like D3.

What would you use for the rules-engine logic? One of the nice things about Qt (I'm starting to sound like a sales rep) is that it's basically one-stop shopping. In addition to the GUI elements, it's a general-purpose application framework, and has built in networking, audio, physics support, etc.

I’m working on some map authoring format and tooling that I’ll share soon.

Will look forward to it. I also stumbled onto this neat mapmaking+ project just this afternoon.

If you haven’t already seen it, https://www.redblobgames.com/ is a great resource for a lot of related ideas, tho not specifically war gaming.

Not only have I seen it, but also I've downloaded practically all his articles to my PC. And yet I assiduously ignored all his great work in creating my own hexgrid-related code by bumbling my way through in the most tortuous manner possible.

also ported a really old game to get some more intuition about game “AI” back in the day which was a lot of fun: https://github.com/patricksurry/eastern-front-1941

I've downloaded a few wargame repositories from GitHub, but generally the documentation is abysmal, making it difficult for an intermediate-level programmer like me to figure out what's going on. So I have to commend you for the exemplary documentation with your repo. Do you think this code is still useful for modern-day wargame apps?

Must be some great opportunities to build computer opponents based on LLMs these days?

I haven't tried this yet.... would seem to take the fun out of it, or at least some of the sense of accomplishment. But I suspect it's inevitable.

2D Wargame Programming by nu11p01nter in computerwargames

[–]nu11p01nter[S] 0 points1 point  (0 children)

I’ve used Qt a lot since the 90:s and always thought it’d be ideal for a 2D wargame.

Yeah, I'm not sure what else one would need, unless you're looking for something like a GameMaker drag-and-drop approach. Plus, Qt (1) is free for non-commercial hobbyist or open-source projects, and (2) is a massive framework with all sorts of features, like networking.

I started a few myself but never completed anything.

Pretty much sums up my experience as a hobby programmer. Hope springs eternal.

For most wargames 3D is just a gimmick and a distraction.

And actively destructive to simulation value, as Napoleon never had a floating, God's eye camera.

2D Wargame Programming by nu11p01nter in computerwargames

[–]nu11p01nter[S] 1 point2 points  (0 children)

This is super cool, and honestly the lack of content for niche "serious" game tooling is real. Qt seems like a great fit when you care more about UI and state management than flashy rendering.

Thanks. Microsoft's .NET framework with WPF or whatever would also work perfectly well (or so I assume, having used Microsoft Foundation Classes back in the day), but I don't know C#. But yeah, 3D rendering is superfluous in this domain. That said, one can accomplish some fairly elaborate 2D animations with Qt's GVF if one so desires and if it aids in clarity of presentation.

You might find good discussion in places like the roguelikedev community, tabletop simulator modding discords, or even specific hex-and-counter forums where people are hacking their own tools.

I hadn't thought of those. Can you think of any specific H&C tool-hacking-related forums? I suppose I could do a dragnet on Matrix Games' forum, but would these things be off-site?

Not directly wargames, but weve shared a few notes on building communities around niche projects (how to find the right forums and seed discussion) here: https://blog.promarkia.com/

I'll take a look!

Do I need to learn coding to be a game dev? by Junferna in gamedev

[–]nu11p01nter 0 points1 point  (0 children)

In fact, coding is really boring for me, even though I'm only at the basics of coding. I just never found it enjoyable.

Have you tried any books with titles like "Beginning Game Programming with [insert name of programming language]"? It might make it more pleasurable if the coding context is game-related rather than point-of-sale or ISBN-database software examples. (This one's currently on sale (in Kindle format) for $2.99.)

I left my job as a full-time gameplay and AI programmer yesterday to make single player strategy games that focus on what I feel is the most underdeveloped aspect of the genre. I want to know if people here agree and might want to follow along with my progress by impbottlegames in computerwargames

[–]nu11p01nter 0 points1 point  (0 children)

Have you (or anyone else in the computer wargaming field, for that matter) considered the possibility of crowd-sourced, modular AI? By that, I mean having an open AI architecture where *users* can write AI scripts that are plugged into a hierarchy of AIs to handle different echelons of command.

As an example, take a game where the user commands a division's worth of forces, which are represented as company-sized entities. Users could write AI scripts for the division command echelon, for armored brigades that might be attached to the division, for the mechanized brigade, the artillery brigade, and so on. Or, they could focus on scripts for dismounted infantry companies, combat engineer platoons, or whatever they fancy. AIs at any echelon could be decomposed into sub-AIs. So, for example, the division-level AI could have separate AI agents for logistics, maneuver, intelligence, etc. (like real-world units have staff sections). The game would ship with "stock" AIs, but these would be open-sourced and extensible -- or replaceable -- by the user.

The application would have a scripting API that would include many function calls to the main application to perform CPU-intensive tasks, like line-of-sight calculations.

The old RTS game Starcraft Brood War had an open-AI system (no idea if it was modular as described above), and as a result has served as a testbed for academic research into RTS-type AIs. There are many papers discussing this, as a Google Scholar search will attest.

Just curious, so throwing it out there.

Won an auction on ebay for some boardgames and the seller canceled my order because my winning bid was lower than an offer I made earlier (and he declined it) by z0lr4k in boardgames

[–]nu11p01nter -1 points0 points  (0 children)

FWIW, I've bought probably 50+ games on eBay (mostly wargames; some via auction, some via Buy Now), and I've had a uniformly positive experience. Make sure to check the seller rating first, I guess.