Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1327956 Posts in 60042 Topics- by 51313 Members - Latest Member: kretz32

January 18, 2018, 11:22:52 pm

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsCorruption (working title) - Pausable real-time tactics (Project 1, 2018)
Pages: [1]
Print
Author Topic: Corruption (working title) - Pausable real-time tactics (Project 1, 2018)  (Read 695 times)
HuvaaKoodia
Level 0
**



View Profile WWW
« on: January 04, 2018, 02:42:57 pm »

The first project out of five is a go.

Shaping up to be a pausable real-time tactics game with a reactive story to boot (which is still a pipe dream).



Play the prototype here!

Day 0 - Design stream

Here's the design stream in case you missed it.






There'll be daily posts for the 3-day prototype and then whenever something worthwhile happens. The whole project should only take 2 months so expect that progress bar to move on all snappy like.
« Last Edit: January 12, 2018, 09:14:01 am by HuvaaKoodia » Logged
HuvaaKoodia
Level 0
**



View Profile WWW
« Reply #1 on: January 04, 2018, 02:51:07 pm »



The corruption mechanic and basic unit movement are in. The design has become more focused; might go with units mostly and few, if any, buildings. Had an idea for the setting and visuals too, but more on that later.

Using A* for pathfinding as usual. Amit explains A* much better than I would so give that a read if interested.

Something I will touch on is the architecture behind all of the above. Usually for 3 day jams I don't bother with anything fancy, but here a solid foundation is needed for future proofing.

Model-View-Controller (MVC) is my answer. The quick way of programming in Unity (or any similar engine) results in data, logic and visuals all bundled together in the same scene objects. This can be quite limiting and a hassle. With MVC the data is contained in a model database, the visuals in view objects and all (or most) logic is done via controller classes.  

In Unity models are basic C# objects (or plain arrays for data-driven programmers!), views are standard component based MonoBehaviours in the scene and controllers are singleton classes which set up the scene, models, views and run the logic and input.

One of the key concepts of MVS is that the views only know of the models, but cannot modify them; the models only know of themselves; and the controllers know of everything. This way the views can be removed altogether and the program still works.

Why go through all this trouble? A handful of reasons:

  • State saving. It is easy to serialize the model database into a file and deserialize it later. JSON is a good fit for this.
  • Cleaner code, even if somewhat more verbose. A trade off well worth it in a longer project.
  • Running the data and logic without the visuals. Useful for AI testing and simulations.
  • Netcode. Only sending the data over the internet. I'm not going this far in these projects, but it is good to know.

That's it for day 1. Should get into prototyping mechanics tomorrow.

Cheers
« Last Edit: Today at 11:09:27 am by HuvaaKoodia » Logged
HuvaaKoodia
Level 0
**



View Profile WWW
« Reply #2 on: January 05, 2018, 01:05:44 pm »


(Fixed the GIF with ffmpeg palettes. Did forget to change the Unity blue background though...)

Mechanics prototyping! Implemented four different character types.    

  • Orange "Wall". Stops corruption from overflowing and slows it down.
  • Blue "Melee". Destroys corruption at a single node. Powerful attack.
  • Green "Ranged". Can attack one node away and has a weak melee attack too.
  • Cyan "Artillery". Can attack two nodes away, but has no melee attack.

I do have other ideas too, but these are the bog-standard characters. Each character could have multiple abilities too. We'll see if that is needed.

One design choice I had to make was how many characters each node supports. At first I thought one character per node would work, but upon further pondering it resulted in ample problems. For instance swapping two characters between nodes would become needlessly complicated or require an extra command.

I'd much rather have a simple user interface and robust mechanics. So now up to four characters can reside on the same node.

Additionally wrote down some ideas for the campaign and the personalities of each character. I'd like to implement some reactivity in the campaign, not necessarily non-linearity, as in the characters saying different things based on what has happened in the past and who is still alive!

Didn't get to implementing the objective yet. Thematically it will be about rescuing "civilians" from the nodes, which mechanically equates to sending a character to a node, holding them there for a certain amount of time and defending the node.

Should do that tomorrow then, will not take too long. Would also like to put in simple graphics using the minimalistic guidelines. Unfortunately the jam itself has already ended, a bit of a mistake in the design stream, but I still dig the limitations.

Cheers
« Last Edit: January 10, 2018, 01:32:17 am by HuvaaKoodia » Logged
HuvaaKoodia
Level 0
**



View Profile WWW
« Reply #3 on: January 06, 2018, 03:50:12 pm »



Well It did turn into an authentic jam session in the end. Stayed up for way too long. Anyways...

The prototype is finished! Didn't quite get everything in yet, but it is playable.

Try it here!  

I'll need to rest properly tomorrow, so the second design livestream is pushed to Monday. Will have it at 16.00 UTC again on Twitch, do join if at all interested. This also gives me a bit of time to add in a few more things come Monday.

Tired, but happy. This will become a proper project, no doubt about it anymore.

Cheers!
« Last Edit: January 10, 2018, 01:33:15 am by HuvaaKoodia » Logged
HuvaaKoodia
Level 0
**



View Profile WWW
« Reply #4 on: January 08, 2018, 12:13:18 pm »



One more day for the prototype. Got animations in as well as some small tweaks here and there.

Also did the prototype showcase and scheduling stream. Have a gander:




Will reduce the amount of devlog updates from now on. Once a week at least, that's a promise!

Cheers.
« Last Edit: January 10, 2018, 01:35:22 am by HuvaaKoodia » Logged
HuvaaKoodia
Level 0
**



View Profile WWW
« Reply #5 on: January 09, 2018, 01:16:09 pm »

Plotted out the level progression and did a bit of writing too. Realized that I'd forgotten one important set of tasks from the schedule: audio! Well, better break out that extra week already and assign it for audio implementation. As a bonus there are 10 weeks allocated for the whole project now, which makes using the progress icon even easier.

Could not think of more design or scheduling so after lunch went back to coding. Tweaked the animations and added an effect for the mage's staff. Also updated the prototype. Might as well keep doing that when there is something new to show.



Then improved the level editor workflow. Here's how it looks like now:



Drawing the wireframe and stats for the nodes is easy enough using Gizmos and Handles. Adding in a few buttons ("Remove node", "Connect nodes") was a sour reminder of the convoluted Unity editor codebase. I hadn't made any tools with it in about a year so I'd totally forgotten many key things such as SerializedObject.

Here's an example of the madness:

Code:
//This is all I want to do.
target1.connectionsUpstream.Add(target2);

//And this is how you have to do it for undo and scene saving to work!
var target1SerializedObject = new SerializedObject(target1);
var connectionsProperty = target1SerializedObject.FindProperty("connectionsUpstream");
int index = connectionsProperty.arraySize;
connectionsProperty.InsertArrayElementAtIndex(index);
var newConnection = connectionsProperty.GetArrayElementAtIndex(index);
newConnection.objectReferenceValue = target2;
target1SerializedObject.ApplyModifiedProperties();

Urgh.

That's it for today. Level design proper tomorrow. Will try to maximise the amount of decisions and/or chaos in each level.

Cheers!
« Last Edit: Today at 11:14:56 am by HuvaaKoodia » Logged
HuvaaKoodia
Level 0
**



View Profile WWW
« Reply #6 on: January 10, 2018, 11:09:09 am »

Got 4 more levels done. They are all fun to play and figure out, but then again I know all the mechanics by heart now so might be too difficult for anyone else? Will need to find some testers.









Still need to pump out the tutorial levels. Might as well implement some tutorializing too while I'm at it.

Tweaked the level editor. Added a few functions, not a big deal now that I've been reacquainted with editor coding. Implemented additive level loading so that each level is in its own scene and loaded one at a time into the main scene. Used a similar system in One Final Task and it worked so well that decided to go with it again.

Hatched up a lot of small ideas throughout the day, simply wrote them down in a TODO/Ideas doc. Will consider those later when the time is right.

Cheers.
« Last Edit: January 10, 2018, 11:17:06 am by HuvaaKoodia » Logged
danovo
Level 0
**


(Not an actual photograph)


View Profile
« Reply #7 on: January 10, 2018, 02:09:32 pm »

Not only this is an interesting concept, but the execution is clear, fast, and all-around great. The online demo already has potential to get me thinking and interested. Not a huge fan of strategy games, but this has all the elements they need to shine without any of the number-crunching hassles.  Smiley
Logged
HuvaaKoodia
Level 0
**



View Profile WWW
« Reply #8 on: January 11, 2018, 05:59:06 am »

Not only this is an interesting concept, but the execution is clear, fast, and all-around great. The online demo already has potential to get me thinking and interested. Not a huge fan of strategy games, but this has all the elements they need to shine without any of the number-crunching hassles.  Smiley

Thanks! I'll try to keep the mechanics and UI as simple and clean as possible. Not enough time for complexity; it helps to have a deadline.
Logged
HuvaaKoodia
Level 0
**



View Profile WWW
« Reply #9 on: January 12, 2018, 09:13:41 am »



Spent yesterday and today on the tutorials. 4 characters, 4 levels; makes sense? That's what I ended up with anyways. There's still one mechanic I might add later, so will incorporate that to the third level if it turns out to be a needed.

Added the tutorials and two more levels to the prototype.
Give it a go?

Not a lot more to show. Tweaks and fixes as well as some refactoring. The main controller had grown to five hundred lines of code already so moved the input parts of it into a new controller and the level loading parts into a new script, respectively called InputController and LevelLoader. That's fool proof naming conventions for you.

20% of the project over already. Initial graphics are next, this is where things start getting tricky!

Cheers.
« Last Edit: January 15, 2018, 04:37:27 am by HuvaaKoodia » Logged
HuvaaKoodia
Level 0
**



View Profile WWW
« Reply #10 on: January 16, 2018, 12:42:30 pm »



Had to take care of a few RL things in the past two days, but did manage to put in enough hours to kickstart the graphics implementation, codewise at least.


The visuals are not there yet. More animations and detail are needed. Luckily there are still three full days to hone the assets, animations especially. I'm more than ok going with flat shaded graphics yet I do need to think of something for the background.


Cheers.
Logged
HuvaaKoodia
Level 0
**



View Profile WWW
« Reply #11 on: January 17, 2018, 10:14:06 am »

First time using Krita 3.0 animator feature. It's not bad overall. Does have an annoying issue with the arrow keys always scrolling the frames even if another tool is using them, but that's minor.
Already made the corruptor yesterday, here's a closer look:



Also animated the portal effect. It rotates in Unity, but got this GIF directly from Krita so you just have to imagine that.



Lastly the node destruction animation. Simple and ok at a distance... Well, everything is pretty small so I can get away with some one pass assets I think.



Implemented these already in the graphics test level. Not showing more of that before Friday. Should look spiffy at that point. A lot hangs on the background, I don't even have an idea for it yet...

Cheers.

Logged
HuvaaKoodia
Level 0
**



View Profile WWW
« Reply #12 on: Today at 11:07:20 am »

One more animation.



It's for the ghosts. Replaced the plain corruption number with a bunch of ghosts circling the nodes. Looks swell and doesn't really affect the UI. You don't need to know the specific number after all, "loads of big ghosts is bad" serves the same purpose.

Nearly forgot, but the other task for this week was serialization. Not a big deal, but did take the usual wrangling with the odd deserialization glitch. Didn't quite get them all out, for instance, nodes still play the corruption animation when loading the state. I'll be adding more graphics later, so those fixes can wait.

I hadn't used Json.net in a while and was surprised how eager it is. By default it serializes public variables, properties and even delegates! Those last two were too much. It kept complaining about Unity sprites... My models don't have sprites! Apparently it tried to serialize some views too via the events. Yeah... Luckily the [JsonIgnore] attribute does the trick. [JsonProperty] on the other hand can be used to add private members to the party.

I really like how Json.net handles object references. The first time around it serializes the whole object and later only writes {"$ref":"52"}. Neato! Saves me a lot of hassle messing with manual object indices or something silly like that. Vector3's worked out of the box too!

Visually the test level is looking quite clean now. The last visible number is the civilian count which will most probably stay as it is. I can live with it. Tomorrow is finally for the background then, can't put it off any longer. Will need to find some inspiration

Cheers.
« Last Edit: Today at 11:19:29 am by HuvaaKoodia » Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic