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.)
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…
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…
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.
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.
@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.
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.
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.)
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 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.
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.
“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.
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.
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.
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.
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.
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.
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.