Search Unity

WIP: Light of the Galaxy

Discussion in 'Works In Progress - Archive' started by MV10, Oct 20, 2016.

  1. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    I started this a couple weeks ago so it's just now getting out of the very early mockup phase, although the rules and gameplay are mostly worked out and documented. It is effectively two games in one. The scenario-driven turn-based strategy level is played on the galactic map in the attached picture. Units in the same sector engage in turn-based tactical combat (the other "level" of gameplay) on different screen which hasn't been designed yet.

    The player is the Light of the galaxy, the title given to the nearly-immortal emperor of a mature and benevolent empire that spans the galaxy. Each generation (turn) various forces and events threaten the peace and order in the galaxy, and no surprise, it's your job to do something about it.

    The screen shot below is actually running in Unity now, the galactic map is drawn on the fly (FastLineRenderer and TextMesh Pro), the HUD is a static overlay. This is a mockup project so the text in the boxes is just hardcoded to get a feel for the layout, and there are indicators and animated UI eye-candy that will come later.

    (Thanks to @GarBenjamin for inspiring me to work on the two-in-one idea, and for putting up with a minor hijack of his thread while I was getting started.)

    1.jpg
     
    Last edited: Oct 20, 2016
  2. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Friday afternoon's progress was converting my mockup project to a real project structure -- separating the routine calcs from the game-specific data, doing the high-level state machine, and writing a series of fade in/out loops for the title screen and drawing the map in interesting ways (instead of "click run, BAM, everything is on-screen"). Nothing that makes a good screen shot though, unfortunately.

    I've given up and admitted I loathe Unity's UI system, so I'm going all old-school and building that myself, too. TextMesh Pro has been a lifesaver there. Mostly it'll be lists so nothing too seriously stressful. Saturday is going to be a solid five or six hours of work and it should be ready for some basic gameplay by the end of the day. I also need to get Rewired set up as I want to support Xbox controllers as well as mouse control.

    I probably have around 30 hours in the project so far, including a great deal of fiddling with graphics in PS and Visio.

    My wife and I decided even though the tactical game will play out in 2D, she's going to create some 3D models so the visuals will actually be a sort of 3/4 view. That'll complicate the project somewhat, but I have a long standing love for the crazy 70s and 80s sci-fi novel artwork of guys like John Berkey and John Harris ,and that's the general style she's going to try for. Should be interesting...

     
  3. Dave-Carlile

    Dave-Carlile

    Joined:
    Sep 16, 2012
    Posts:
    967
    It is awful.
     
    Deleted User and MV10 like this.
  4. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Spent about a week working on everything except the game ... then went to Unite ... so that's two weeks with little-or-nothing done. Today I knocked out much of the Not-Unity-GUI today. Most of the work was a list box graphics and prefab and getting started writing the supporting code, that sort of thing. I had some hacked-up stuff in there temporarily, but it was getting in the way of making progress on real gameplay so I had to back up and just buckle down and write the code.

    Not much to show in terms of posting pictures. Maybe later in the week (although it'll just be GUI stuff that won't be very interesting to look at).

    Edit: Actually I take that back ... that first week I did write a fair amount of documentation describing how I envision the tactical gameplay working. It's what the miniatures tabletop-gaming starship combat guys refer to as a vector-thrust system, meaning it isn't a grid or hex setup, anyone can be moving at any speed and any orientation (on a 2D plane). There are a lot of gaps to fill in, but I'm old-school waterfall method, I like a written plan...
     
    Dave-Carlile likes this.
  5. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Added some Extremely Dramatic intro music by @Eric-Matyas ... check out his free music thread. Gives the whole startup sequence a kind of Carl Sagan "the galaxy is really, really gigantic" feel. Did a bunch of additional fine-tuning on the intro sequence -- all the while thinking about how much easier it would be if the new Timeline feature coming in Unity 5.6 were already available. :)

    Knocking out a few more UI prefabs, then it's just a matter of gameplay. Since one of the options is to resolve tactical combat "automatically" (e.g. you skip the turn-based tactical game altogether), technically this can be played as a strategy-level-only game as soon as that part of it is completed.
     
    theANMATOR2b likes this.
  6. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Added unit-buying functionality and greatly improved the look of the economics and sector data displays.

    With some careful placement of box colliders and learning to love editor-placement and prefabs, fully-custom UI really isn't all that much effort. I'm a bit embarassed to admit that for awhile I was doing it the hard way -- one giant collider to get mouse position then trying to work out what the pointer is above... side-effect of having written custom GUIs over the years without any engine at all. Although I have no choice when it comes to map-sector selection. Fortunately rectangular-to-polar is pretty simple.

    1.jpg
     
    Dave-Carlile likes this.
  7. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    @MV10 is this a 'new' suggested workflow process with the new UI? I haven't gotten into UI stuff much so far so thanks for any point in the right direction that will ease any future work.

    The vector thrust system you explained above sounds interesting. Looking forward to reading more about this - and seeing how the tactical gameplay/controls pan out.
     
  8. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    I'm not using Unity's GUI at all. I'm just texturing quads and placing TextMeshPro objects in the scene and handling mouse events myself. On a couple other projects I worked with Unity's GUI stuff and it reminded me of the bad old days of trying to wrestle Java Swing layouts into shape. It's also extremely difficult to make UGUI elements line up with anything in the 3D scene. Just not worth the effort, in my opinion. (I don't have any text input, though -- that can get a little more tricky if you want modern-style selection highlighting, clipboard, etc.)

    On recent projects I'd been using the editor less and less, but in a turn-based game like this much of the screen is very static and it's a lot faster and easier to just do visual layout. There again, old habits getting in the way of progress. The prefabs are just those "dialog" layouts and scripts -- a listbox, scrollable text box, etc.

    Nothing complicated about vector/thrust in tabletop gaming. Each ship has a direction and velocity, and there are a few rules that take into account how you change direction (some systems do a calc with mass and thrust, etc). Tabletop gamers tend to be very divided about whether or not they like it. It's usually a bit more complicated to deal with in tabletop gaming format than the simple "move N hexes" or other similar movement rules.
     
  9. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Got all the map sector-selection stuff working. More UI tweaks to improve reusability. Scenario system up and running. Most of the strategic game is already there behind the scenes, from here it's just a matter of adding a few more display updates, then prompting the user through each phase of each turn.

    Let's see how badly YouTube mangled my video. (Huh, not too bad. This time I used nVidia Shadowplay on my wife's monster desktop machine. Audio got a bit glitched.)

     
  10. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Scenarios are now 100% functional, the whole setup of a new game is working. Initial unit placement is all there. I love making up and writing random events in turn-based games -- the underlying system is there and working, and several of them are already functional. Some are one-offs, some persist over a few turns, and they can hook into all sorts of systems throughout the game. Lots more cool UI stuff going on everywhere.

    Roughly speaking, the turn sequence is:
    • Review new events that will impact the next turn
    • Enemy ops (each of the four types of enemies move and attack differently)
    • Overthrow tests (if enemies have reached The Core; non-fatal even if they succeed)
    • Enemy colonization
    • Independent State recruiting (adding units)
    • Imperial resource collection
    • Imperial maintenance and purchases
    • Imperial colonization
    • Imperial movement
    • Imperial combat
    • End of turn review
    Because I invested so much up-front time in a fairly flexible UI I can knock out many of those in a few hours each. They're mostly sequences of of "dialog" options and messages. Rounding out the remaining place-holder scenarios and random events, and getting combat going (non-tactical, for now) are the only major-effort items.

    Probably up to about 70-80 hours in this now.

    1.jpg
     
    GarBenjamin likes this.
  11. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Probably around 100 hours in it now. Still not much to actually show, visually, but Random Event generation and processing is working, the handful of events that create persistent enemy factions are working, and a few of the other "flavor" events are partly working. The enemy ops system is partially implemented (the enemy factions can move around and decide whether to attack), although now I need to do some presentation / UI sequencing, current code is just setup for that. Based on the Object.Destroy weirdness I ran into, I completely changed how I'm managing a lot of the text objects in the scene to work around whatever was going on there.

    A lot of the items in the turn sequence listed above will be implemented pretty quickly, so progress is quite good. Once I can get all the way through a single turn, I plan to shift gears for awhile and treat myself to some graphics work and try to add some interest and polish, and at that point I'll probably throw out another video.

    I do have to admit, 99% of the time I'm doing test-runs in a window, but when I run it full screen I re-discover that I'm pretty pleased with the way it looks so far. In one of the "motivation" threads somebody else commented that they need for their game to look good to help keep them motivated, and I'm finding I'm the same way. I figure it all has to be written sooner or later.

    Since I don't expect this to generate vast income, I'm considering donating any proceeds to Learn to Read. I need to call my CPA and make sure I can do that in some way that doesn't require me to still dork around with taxes and creating a business entity and all that mess.

    Still convinced Unity GUI is about 99% not worth the effort. Pretty happy with DIY.
     
  12. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Spent the past two days getting my tutorial system up and running. Mostly it's a variation on the IScenario interface, but I've also set up the state machine so that the tutorial can suspend it to run through a series of tutorial presentations. I'll do a video later on, the tutorial dialog moves from place to place and the pointer ring rotates to indicate the area of interest. It's sort of cool looking.

    The tutorial overlay thing is at the top right in this screen shot.

    1.jpg
     
    Dave-Carlile likes this.
  13. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    "My God, it's full of greeble."
    -- nobody, 2001: A Space Odyssey

    Raw models for the tactical game. Military in front (battleship, cruiser, fighter), diplomatic in the middle (ambassador, envoy, spy), civilian in the back (world-ship, colony, merchant). Totally hijacked freebies from solcommand.com. My wife is attacking them with Substance Painter as I write this. Now all I have to do is everything. :D

    1.jpg
     
    Last edited: Nov 20, 2016
    theANMATOR2b and Billy4184 like this.
  14. Dave-Carlile

    Dave-Carlile

    Joined:
    Sep 16, 2012
    Posts:
    967
    Hmmm, are you sure the ship in the upper left isn't from EVE Online? I guess it's not quite the same, but definitely was inspired by.

     
  15. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Yeah, Eve's Amarr Titan-class. But as you say, at worst it's "inspired" by that one, and besides, "mushroom" designs have been around a lot longer than Eve (pretty much since somebody in the 60s realized a giant ice-cap would make a great-but-cheap heavy-particle shield at very high speeds). The SolCommand.com guy was working on a facelift for Freelancer, but gave up and decided to give away his models for free.
     
    Dave-Carlile likes this.
  16. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    I suppose I should also clarify why I'm using those models. Earlier I'd said we were planning to create models similar to the art style of John Berkey and other 70s/80s artists... after several attempts, it became clear it would be pretty difficult to stick with that style but also differentiate between the three classes of ships. It's a cool art style, but they all tend to look sort of the same.

    I stumbled across SolCommand completely at random, but since the point of this exercise was (is) to actually finish a game in a relatively short period of time, and I was able to find nine models that I thought worked well for our purposes, I figured it was the type of shortcut appropriate to the goal.

    And, I suppose, there's nothing stopping us from eventually doing our own models.
     
    Billy4184 and Dave-Carlile like this.
  17. ToshoDaimos

    ToshoDaimos

    Joined:
    Jan 30, 2013
    Posts:
    679
    It's so cool that your work with your wife. You have very nice spacey music in that video you posted. It gives me some Carl Sagan/Jean M. Jarre vibes. :) The UI color seems odd.
     
    aer0ace and MV10 like this.
  18. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Thanks, I was going for a Sagan-like "the galaxy is really gigantic" sort of feel with the music. A friend of mine who messes around with music on the side saw something I posted to FB about this and has offered to help with additional music, and he's done some things along the same lines, so there may be more. But I'm glad you got the impression I was going for.

    The UI... well, my wife likes purple, and I wanted to keep it fairly dark. Maybe I'm rebelling against the non-pro Unity UI color. :D
     
  19. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Brief update, mostly I've been further refining the random event system (loosely categorized as instant effect, persistent effect, and ones that generate new enemies). The enemy factions took a lot of effort but they're finally getting into shape -- different movement rules, different rules about who they attack, and so on. The automatic combat system is just about up and running -- e.g. enemy vs enemy, "diplomatic" combat (think espionage and such), and enemy vs. player when the player elects to skip the tactical game. A full turn loop works now, though several more steps remain to be written.

    It's a text-heavy game and a lot of the dialog stuff is very "get it working" quality and will need polish. At just a little over one month, though, I'm still pleased with the progress. Sometime in December I should be at a point where I'll feel like making another video. Starting a couple weeks ago and lasting through December, holiday stuff will put a big dent in my Unity OCD Time, sadly.
     
    RavenOfCode likes this.
  20. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Revised the input events today so I can support both mouse and Xbox controllers (360 or One). I like to imagine that one day I can interest MS in letting this deploy to XBone.

    From the start I was using delegates instead of Unity Magic Methods, so anything needing event notification registered for Start and/or Update events in Awake. I expanded the available events to add pointer movement and button click events and added some utility functions for raycasting against colliders (which is how my non-UGUI-UI works) and it actually simplified the code. Nothing but the event manager is running Update, and only the listbox highlighting looks for mouse movement. Everything else only looks for clicks. Frame rate isn't exactly an issue in a game like this but the amount of work being done per frame just fell to nearly nothing.

    Even better, I got rid of a bunch of state flags. For example, that little tutorial box moves around the screen, so I only subscribe to the update events when movement is needed -- and the same process subscribes or removes click events during movement. Previously it was a lot of if(moving) flags and so on. It's all very clean.
     
    RavenOfCode likes this.
  21. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
  22. salex100m

    salex100m

    Joined:
    Mar 13, 2013
    Posts:
    103
    Love it... and the best part of this thread is...

    "My wife and I decided even though the tactical game will play out in 2D, she's going to create some 3D models..."

    Sounds like a keeper to me :D
     
    Dave-Carlile, MV10 and PhilippG like this.
  23. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    All that random event stuff I was revising awhile back is completely written. I do intend to go back and add more, but the existing events and enemies work well enough now that I don't expect to put much time into them until much later in the project. I completely redesigned the automated combat system (enemy vs enemy, and non-tactical combat involving the player) into a stand-alone class since it was growing too complicated to make sense as a bunch of subroutines driven by state changes.

    The past few days I've been tweaking and fixing every little minor thing that I've been ignoring while I focused on major functionality. It isn't really cheating by sneaking into the "polish" stage, many were legitimate minor bugs. I did completely revise the random name generator using a Markov-style randomizer based on the 1000 most common US surnames. The results are pretty good. It's sort of funny how much more engaging the game seems when the enemies have "realistic" names instead of "Pirate 3" (or worse, "TODO - generate names").

    I'm definitely in the final push to get all phases of a single turn completed. Imperial (player) movement and combat are the two big ones and I mostly have that code written elsewhere already (movement is similar to initial unit placement, and non-tactical combat is like enemy vs enemy, except target selection).
     
    rogueknight likes this.
  24. ToshoDaimos

    ToshoDaimos

    Joined:
    Jan 30, 2013
    Posts:
    679
    Don't hesitate to post some YT videos with a commentary! :)
     
    MV10 likes this.
  25. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    I'm not even sure we own a mic at this point... I guess I could do the text-overlay thing, hadn't thought about it much. But the commentary might make sense, one of the reasons I haven't done another video (apart from having to hijack my wife's Super Amazeballs PC instead of using my laptop) is there isn't much new, visually, since it's such a text-heavy game (and I've pretty much tabled sound effects and/or music as a "polish" item for later). It's all minor map updates and lots of dialogs.

    Buuuuuut... I might get bored one afternoon.
     
  26. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Fun milestone today: it is now possible to play through the entire strategic game, start to finish. I have a few minor bugs to track down but generally everything works.

    Being able to actually play it through has exposed certain presentation problems. I expected this, but I also knew there wasn't much point in trying to dream up fixes until I could run real tests to see what works and what doesn't. My wife and I have brainstormed some interesting alternatives. In general the biggest problem is that it's pretty hard to keep track of where all your units are deployed. The icon-based system I'm using doesn't convey enough at-a-glance information, but I think we have some good solutions in mind.

    My wife had some very interesting ideas for real 3D models for the tactical game, too. I'll still build with the placeholders I posted earlier but if her plans work out, I think the overall effect will be very cool.
     
  27. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Layout mockup and shader-testiing project for the tactical game. The real skybox will be much less psychedelic. :D

    Dorking around with the always-maddening chore of devising a sensible camera-control script...

    1.jpg
     
    Dave-Carlile likes this.
  28. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Got a pretty good navigation/picker control scheme worked out, so it was time to put down the Fun Toys again and do some writing. Today I wrote about 7 pages of rules and charts defining the Tactical Game, so after the holidays it'll be time to do some real coding...
     
  29. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Refactor day ... I'd gotten a little sloppy with my UI class and it slowly morphed into "ignore the state machine", so I chopped about 1800 lines of code that ran the turn-phases into 17 classes. Each class is dedicated to processing one turn-phase and is totally stand-alone as The Lords of OOP intended. Now the UI class is back to the simple utility-helper it was meant to be, and the state machine is fully back in control. Always nice when a massive refactoring goes smoothly and quickly.

    I've decided the game will be the sort that automatically saves as you go, though I'm not sure at what granularity yet. Except for tactical combat, each turn-phase happens pretty quickly so it'll probably be at that level, with some special-case handling to save again after each tactical combat incident is completed.

    I also brought all of the tactical game mockup code into this main project. Getting started on the tactical game will be the major push next week after the holiday hangovers wear off.
     
  30. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    Nice ships.

    @Steve-Tack likes space related games too.
     
    Last edited: Dec 21, 2016
  31. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Getting back into the groove of things; fortunately I took this week off. The tactical combat system is now correctly translating the strategic game's units (formations) into ships and building and placing the models. Models are very placeholder-quality. This strategy-to-tactical thing is not as simple as a 1:1 correspondence. For civilian and diplomatic unit markers in the strategic game, there is one ship added to the strategic map. But each military unit marker at the strategic level translates into multiple ships at the tactical level -- how many and what kind depends on whether the player chooses "normal" or "epic" tactical battles.

    Here a small Imperial group is taking on a pretty large enemy force. Lots of polish to be done. As usual, I'm focusing on making gameplay work first, but there is a "playing surface" selection cursor that works, although I need to integrate it into the overall event-manager system, it's still running raw LateUpdate calls using code from the stand-alone test project for developing tactical map navigation.

    1.jpg
     
  32. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Obviously these are debug/test controls but you can see how movement orders work here. The ships have a velocity at the start of the turn. They have a maximum thrust capability and a maximum turn rate. More thrust for sharper turns reduces thrust available to speed up or slow down. This plots the current combination of velocity, additional thrust, and turning thrust, to show final position at the end of the next turn.

    I experimented with arrows as in the mockup from a few days ago, but it's too hard to figure out what's going on if there are several ships with overlapping indicators. Simple lines work much better.

    And if the game is a flop, I guess I can always turn the code into a football coaching sim.

    1.jpg
     
    rogueknight and theANMATOR2b like this.
  33. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    Looks like some nice vector graphics there. A two player football game would be a cool mini-game to include in your game too. Have the best of both worlds. :)
     
    MV10 likes this.
  34. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Got the move-orders and combat-orders UI and the general ship-info displays mocked up. Time to write more of that Non-UGUI-GUI code.

    1.jpg 2.jpg
     
  35. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    I just stumbled upon this thread, and I have to say that this game is turning out to look really great, especially for only 3 months that you two have spent on it thus far. Keep it up!
     
  36. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Thanks. We're pretty happy with the progress. We have tons of "polish" stuff planned but it should be fully playable Real Soon Now. The next real hurdle on the horizon is figuring out how to write the enemy AI for the tactical game. I have a feeling the frustration levels are going to spike!
     
  37. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    The tactical combat order-issuing system was a bit concerning because it's potentially complex, but now it's all up and working and I think it is coming together nicely. This screen shot doesn't really illustrate it well because the player only has simple fighters. Fighters only have one Fire Control System, which means they each target just one ship, whereas a battleship has three FCS and far more weaponry. Each FCS can be assigned to fire any weapon on the ship; the target must end up in the weapon's firing-arc at the end of the turn, which is why the yellow targeting lines are drawn between the endpoints. (This concept of using FCS and assigning weapons is also pretty common in tabletop space warfare games.)

    1.jpg
     
  38. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    A few more FX tweaks to aid player visualization. Clear = unassigned weapon battery, green = assigned, red = assigned to active fire control system.

    1.jpg
     
  39. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Visualization of firing arcs with short, medium, and long ranges.

    1.jpg
     
  40. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    In preparation for writing and debugging the actual movement, combat, and AI portions of the tactical game, I decided to get the main menu "Skirmish" option working (straight to tactical, no strategic game). Bonus -- ship model preview. (Still placeholder models, obviously.)

    1.jpg
     
  41. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    The skybox banding was starting to get on my nerves, so I went to a mostly-basic-black starfield, then added some skybox animation tricks to keep the background interesting. Execution of the tactical game orders is mostly working, my focus right now is finding a good want to present the results to the player.

    1.jpg
     
  42. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Had a friend comment on my UI: no, I don't plan to leave everything "all numbers," this is definitely MVP-UI for now. I hope to dress it up a lot with gauges or other graphics of some type. Lately I've been thinking the "polish" work could take longer than writing the functional game itself is taking. Though I suspect writing a worthwhile tactical AI could very well make a liar of me!

    1.jpg
     
  43. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Looks quite nice in layout, only thing I'd question is the color and possibly the style of the purple background - it makes the whole screen feel a bit dark.
     
  44. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Movement and point-defense (which only targets missiles and fighters) is working, and I have to say, even though it's turn based, the very fast and agile fighter movement "feels" like a twisting, turning dogfight. Hopefully I'll be able to write an AI that does it some justice. Nothing to show though, movement is instantaneous right now, animation will be a polish-item later on.

    1.jpg
     
  45. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    I probably need to look at this on other monitors. I have a large, expensive monitor and my laptop has an insanely good display. But in general it'll be a lot less empty during the polish phase. UI-greeble is planned, and my wife (dual master's degrees in graphic design and motion graphics, score!) tells me gold is a complimentary color for royal purple, so probably a lot of the UI elements will end up with gold highlights. Trying for a vaguely art-deco "imperial" feel.

    Right now the "HUD frame," as I call it, is just a textured quad. I drew it in Visio and exported it to PS. However, we're going to experiment with exporting it to EPS so she can load it into Maya to turn it into a mesh. We want to see if it looks any better with subtle highlights from moving lights. Only the ship models and the planet background stuff in the tactical map uses lights now, so the GPU cost shouldn't be a problem.
     
    Last edited: Jan 7, 2017
    Billy4184 likes this.
  46. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Missiles and particle beams are working, but need a LOT of tweaking (ranges, speeds, turn rates, damage, etc) ... which I will do later. Time to take the AI-plunge...
     
  47. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    I now have a high-level plan documented for the tactical game AI.

    Briefly, a high-level planner will occasionally review the situation and decide how to allocate its ships into groups with specific tasks. The groups will implement a blackboard AI scheme. Each group has a certain behavior (the basic TacticalGroupAI is an abstract class), such as NonCombatant, DefensiveEscort, Harassment, PinpointAttack. The groups receive high-level goals from the planner and issue orders to the ship-level AIs. The ship-level AIs have a short hierarchy of concerns starting with collision avoidance and ending up with seeking the group goal positioning and/or attacking the group target(s).

    I've written a few AIs in the past that work in a similar way, though they're usually two-level instead of three. I have a feeling that very little code will be needed to still "feel" like somewhat intelligent gameplay given what I wrote earlier about how simple dogfights (even with an enemy that only moves straight ahead, right now) sort of "feels" like the proverbial furball.

    Given the way the game is heavily componentized, it should also be possible to plug the AI into both sides of the battle. In fact, one of the strategic-game options is to skip the tactical battles, so I may have the automated battles play out visibly through AI-on-AI fights if the outcomes "feel" fair enough to represent the player's interests given different force compositions.

    Tactical combat can be ended through simply annihilating the enemy, an attempt to retreat if the group has any military units remaining, an offer to surrender, or an attempt to escape. The planner AI can signal any of these, and since I allow for collisions (sorry @Billy4184, lol), if the AI can't escape or surrender and only has non-military units remaining, they can be assigned to a Kamikaze group behavior...
     
  48. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Sounds good! Looking forward to seeing it.
     
  49. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    After a long hiatus (Real Job and Real Life is keepin' me down), I added a main menu option to launch an external documentation PDF.

    Progress! lol

    I think you can definitely just jump into this game and start playing, and the tutorial will definitely hit the high-level concepts and explains the interface. However, the rules and systems are very much in the tradition of tabletop gaming, and, if the game attracts anyone at all :), I think it will be the type of player who is willing to do a little reading to better understand how things work under the hood.
     
  50. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    Wow, a 9 month hiatus, but I'm back. My wife and I cooked up a long-term early retirement plan that begins with selling The Dream Home and doing some major downsizing(still for sale if anybody wants to retire to Florida with some acreage!), and after several months of dealing with that planning and stress and open houses etc, it just became increasingly difficult to get back into the game dev swing. But I've been missing it.

    As I feared, back in Jan/Feb my tactical AI progress was slow and difficult. The code didn't feel right. That was discouraging. For the past month or so, I've really been wanting to get back to work on this, so for warm-up I spent a few days on another Google-run of game AI talks, blogs, papers and so on. And this time around, I stumbled upon an amazing GDC talk by Dave Mark that really clicked with me. It is easily the best practical game AI architecture presentation I have ever seen.

    http://www.gdcvault.com/play/1021848/Building-a-Better-Centaur-AI

    Many of the elements directly relate to what I was trying to do, but more importantly this architecture provides a separation between the core implementation and many tuneable parameters that should allow me to add significant new, interesting behaviors that go far beyond my original plan. All with less coding effort. That probably sounds like scope-creep but I can't overstate how this actually simplifies the AI compared to the direction I was taking. I won't need anything close to the 3D MMO complexity they demonstrate, of course, but the basic concept was the kick in the pants I needed to fire up Unity and get back in the groove.

    I highly recommend committing an hour of your time to the video if you have any interest in game AI programming whatsoever.