Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411282 Posts in 69325 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 11:38:49 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsTacticrawl | 2018 progress report
Pages: 1 2 [3] 4 5 ... 9
Print
Author Topic: Tacticrawl | 2018 progress report  (Read 69672 times)
erebusman
Level 2
**


no one of consequence


View Profile WWW
« Reply #40 on: May 29, 2015, 08:09:51 AM »

Quote
Technically I think 'ever' is a more accurate description - the occupants are (in theory) trapped forever.

Now that's funny - somehow I didn't make that connection ; and now it makes a bit more sense and sounds better!
Logged

Infernohawke Entertainment
deab
Level 2
**



View Profile
« Reply #41 on: June 06, 2015, 07:39:01 AM »

Update #17
Mesh walls

I've been working on replacing the flat textured walls with actual meshes. I've received comments that the old painted walls were a little jarring and didn't really fit - and I agreed!



At run time I'm building 1 mesh per tile space, and this can use a different prefab per side. I could also flip/rotate to add more variety.

Floor tiles are still textures. These need to be flat, so if I switch to using geometry to add detail will be an over complex mesh. I'll maybe just restrain myself when texturing floors, will see.

Old (textured) version for comparison:


Logged
deab
Level 2
**



View Profile
« Reply #42 on: June 15, 2015, 04:20:58 AM »

Update #18
Mesh walls - part 2

Unlike most tile based games, I'm not using a simple square shape per tile. There are a couple of reasons for this:

  • Each side of a wall is lit based on the adjoining floor tile light level.
  • As with lighting, each side of a wall maybe shown in grey if not currently in view.
  • Floor height dictates the height for each side of the wall.
  • (To be implemented) I don't want to reveal unseen sides of a wall until the player reveals the area.

This image shows a plan view including two type of wall (purple rock, and blue brick). Note the corners, and particularly the far left where the two wall types meet. (No lighting in this shot so its easier to see.)



To achieve this effect without manually building every possible variation, I create component parts in Blender:



These are (from left to right) - corner right (missing!), flat wall, corner left, corner left+right, and finally an inset piece used for outwards type corners.

The second row is the shapes used for below the floor level - these are coloured and expanded down to cover the floor height (only seen if an adjoining floor isn't yet shown).

The 'corner right' piece is generated at run time by mirroring the corner left (optionally this can be created in Blender).

When the tile is first shown, the mesh is created from these pieces, keeping track of the vertex start for each side (enabling the lighting per side using the vertex colours).

Here's the 2 meshes created for the corner where the wall types join (shown in the plan view above).



You can see with the purple mesh, this is made up from a full wall piece, plus an inset to fill in the gap as the next tile is never seen (walls on all 4 sides). The green mesh collider box shows the bounds of this tile, with the inset extending in to the next tile.


Here's an in game shot showing the walls in action:



Note that to the right of the orc, wall sections have been dropped down to allow the player to see the floor tile beyond.

Here's the 2 wall types joining, also showing the variation in height:



And finally, another example of walls dropped to reveal the floor behind. Also in this shot you can see the Hightlighter System added for outlines whenever a character is behind a wall.


Logged
deab
Level 2
**



View Profile
« Reply #43 on: June 26, 2015, 03:48:12 AM »

Update #19
1st person view test

I'm currently deep into setting up a GOAP (goal oriented action planning) AI system, but to take a break I thought I'd try adding a 1st person view.

This is just a quick hack with a new camera parented to the current character that you can toggle on/off, but works pretty well!



Not much use for tactical play of course, but for looking around and examining monsters, or playing animations (opening a chest maybe) this could be a lot of fun. Also great for screenshots.
Logged
erebusman
Level 2
**


no one of consequence


View Profile WWW
« Reply #44 on: June 26, 2015, 06:48:41 AM »

The new camera angle is interesting - I would say for sure it would be cool to use a camera like that when special events happen (critical hit /death) even if you don't end up letting the player use it?

Although of course -- letting the player swap camera angles is probably a decent choice because everyone likes a different perspective .. your default may not feel right for some players.

Logged

Infernohawke Entertainment
deab
Level 2
**



View Profile
« Reply #45 on: June 26, 2015, 10:56:51 PM »

I'm a great believer in UI choices / options in game. There are a few things that don't currently work in first person but I intend to make this mode as playable as possible.

The default camera can be zoomed, rotated and the view angle changed. Also plan on allowing the player to control how animations play out - either each monster in turn order, or group them where possible and play at once.
Logged
deab
Level 2
**



View Profile
« Reply #46 on: July 12, 2015, 10:55:08 AM »

Update #20
Ambient occlusion and Unity Editor tools

Playing with the new first person camera highlighted a readability problem with my lighting.

My lighting set up is a little unconventional. The map is made of tiles and will sometimes be generated at run time, so baking isn't possible. I would also like to use light values as a game play mechanic at some point, so showing the light value per tile is a requirement.

To meet these requirements, I'm using a single directional light that moves with the player. Tiles and actors/props are then lit using vertex colours to show the light value at their location (or shown in grey-scale for out of sight tiles).

This works well with the low poly models, and I'm pleased with the results - hopefully giving me a unique look.

However at some angles detail is lost as there are no shadows - just the surfaces lit by the directional light. Walls are a particular problem (as shown in the gif below - for the blue walls, the lighter blue bricks stand out from the main wall).

Rather than manually colouring shadows in, I thought I'd try automating this inside the Unity Editor. This is an area I've not yet explored so this was a good reason to dive in!

Wasn't too difficult to set up a scene and my own editor window, and I was quickly able to respond to mouse clicks on the model, initially highlighting the vertex closest to the click point.

Computing the vertices that should receive shadows proved a lot more difficult. Following the process detailed

(essentially raycasting to each vertices from multiple points and counting the hits/misses) mostly worked, but due to problems caused by raycasting from inside the same collider I abandoned this approach. I had a feeling I was going to need finer control anyway, as I want the effect to be quite subtle - only close by faces should be checked, and extra vertices were going to be required to contain the shadows.

I settled on a simple tool where I could click AO on or off for any chosen vertice, and saved the index numbers to a List<int>. In game, when lighting (vertex colours) are applied, I then just darken the vertices in the AO list.

(Note that I'm using a red tint to show the AO effect in editor)



Also played with using Gizmos to show extra information. Here the yellow sphere is the last clicked vert, yellow lines the clicked triangle, and the blue line the normal direction:



Extending the Editor proved to be pretty straightforward, let me know if you would like any details (I didn't follow any particular guides for this). I can see other workflow related tasks I can improve - next up will be automatically setting the import options for FBX files that I currently apply manually for every import.

So far I've only used this on a wall tile and the torch prop (which also suffered from the readability issue). Final in game results - with AO effect on and off:



Logged
deab
Level 2
**



View Profile
« Reply #47 on: July 19, 2015, 08:28:41 AM »

Update #21
AI overhaul

After a few graphical diversions, I've been back to core game stuff - namely the AI.

Previously I had set up a state machine using a mix of node based graphs and coded functions.

States consisted of Patrol, Chase, Engage and Flee. For example, the the graph for the Engage state looked like this:



However, an awful lot of logic was actually in the custom 'Action' classes. For example the 'Attack' action includes various checks (attack range, target is visible), as well as choosing the best attack and then attempting the attack.

I really couldn't get into moving all the logic in to Actions/graph, so increasingly it was becoming a right mess of graph and code logic. And this is before more complex behaviours are added...

(I played briefly with Blueprints in UE4 last year, and again really didn't like working with the graph system for anything other than simple logic, I just find it too hard to read.)

For moving, there will be objects that may block your path (currently just crates). Depending on the character, they may be able to move these (if space) or smash/destroy them based on abilities and equipment. I really didn't want to attempt this using the current graph system.

Moving the Goap-posts

GOAP (goal oriented action planning) seemed like the best approach for this kind of task, so I set up a simple system based on an excellent TutsPlus article.

This looked very promising so I then started to rethink the FSM and ended up rewriting purely in code. The state machine will be pretty simple. I've settled on major states (Patrol, Engage, Follow etc.) with a minor state 'Move' for getting to the target location. A minor state calls back to its parent every cycle, allowing for break outs if the situation changes.

Any state can use GOAP, but currently only Move does.

So far I've replicated everything the old system had, but it's much simpler, and all in lovely code. I can slowly build out the Move state/GOAP and all states will benefit.

Next I plan to add a 'Hunt' state to improve chasing down lost enemies, and I'm confident this will be easy to add in.

Hassle-free player party members
Another reason I was keen to get back to AI was to add AI controlled allies. I'm planning a team of 3 characters, and at any time you can set 1 character as a leader, and the others to AI control, selecting from various modes - Follow, Guard, GoTo etc.

These will of course use the states/GOAP, so a solid base now will pay dividends later.



Logged
deab
Level 2
**



View Profile
« Reply #48 on: August 03, 2015, 03:26:06 AM »

Update #22
Loadable maps & ReSharper
Made a good start on moving from a prototype to something resembling an actual game - there’s now a (ugly) main menu, complete with a choice of maps. A map can also be restarted at any time, reverting to it's initial state.

A lot of work required to get to this point:

  • Added a basic menu system and file dialog, along with game 'state' (in menu/playing/editor mode).
  • Ability to save and load a map - I previously had a single map created at run time.
  • Cleaning up when closing a level - this was a large job!

For testing purposes I added the ability to click to add or remove a torch to the map. This was used to test the lighting updated and moving Props around didn’t cause any issues. Also provides the hook for context menu when clicking on a Prop.



Map Editor
This work all came about as I started work on a simple map editor, which led me down a rabbit hole of other functions that were required to get there.. (and a week of unplanned work!)

For the map editor itself, I’ve decided to build this in game rather than in the Unity Editor. I’m keen to build tools with the Editor where possible to save time (the gizmo feature is very useful) but in this case it doesn’t really make sense - as my levels are built at run time from tiles, I would need to spend time setting everything up in the Editor before I could even start on the tools

Creating the map editor in-game also gives me the option later of an editor players can use. I’m also going to need a nice usable UI in game, so might as well use the same tools (context menus, selectors etc.)


ReSharper
Following a new PC build and switching to Visual Studio 2015, thought it time I tried ReSharper. I’ve seen this tool recommended many times, and use JetBrains phpStorm for my day job so was keen to try it. I only needed 5 mins. with the free trial to know it was worthwhile.

And I’m so pleased I did - I can’t recommend ReSharper highly enough. As well as the all the shortcuts and refactoring options, the naming standards are helping me write more industry standard code - I hope to contract at some point, so this was on my todo list.

I’ve also improved my c# knowledge thanks to the tooltips and suggestions.
Logged
erebusman
Level 2
**


no one of consequence


View Profile WWW
« Reply #49 on: August 03, 2015, 05:51:43 AM »


ReSharper
Following a new PC build and switching to Visual Studio 2015, thought it time I tried ReSharper. I’ve seen this tool recommended many times, and use JetBrains phpStorm for my day job so was keen to try it. I only needed 5 mins. with the free trial to know it was worthwhile.

And I’m so pleased I did - I can’t recommend ReSharper highly enough. As well as the all the shortcuts and refactoring options, the naming standards are helping me write more industry standard code - I hope to contract at some point, so this was on my todo list.

I’ve also improved my c# knowledge thanks to the tooltips and suggestions.

Can you expound on what Resharper really does for you? I even visited their website and I'm not sure why I would pay $150 bucks for a plugin ..   furthermore a plugin that's only a 1 year license? 

Obviously I could try the 30 day trial but I'm in a mini-crunch mode and don't want to risk it side-tracking me too much right now so just curious if you are able to articulate what its real worth is?  For instance two big changes did you make in your project that made it worth $150 dollars right away?
Logged

Infernohawke Entertainment
deab
Level 2
**



View Profile
« Reply #50 on: August 03, 2015, 11:11:44 AM »

//Begin ReSharper sales pitch

Agree its not cheap, however I’m more time constrained than money. The 1 year licence covers upgrades, you could then no doubt skip a year or two.

Thanks to the added code inspectors I’ve cleaned up various unused values and redundant functions, and limited scope where there was no need for public. On first use your project will likely have hundreds of warnings sprinkled across it. Once these are dealt with (either fixed/followed or the inspector disabled) and your files are ‘green’, it’s easier to spot potential issues as they come up.

The refactoring / code cleaning options are very nice. Couple of examples I used day 1:
  • Had an enum inside a class that should have been in global scope, was a couple of clicks to move and rename it, updating all usage.
  • A group of if() statements that had grown beyond original use, picked up by ReSharper which suggested changing to a switch statement, done in a couple of clicks.

//End ReSharper sales pitch
Logged
doobieshrum
Level 0
**



View Profile WWW
« Reply #51 on: August 03, 2015, 11:14:09 AM »

This is looking really great man.

Smiley
Logged

twitter - @doobieshrum
twitter - @doobieshrum
twitter - @doobieshrum
SvDvorak
Level 0
*



View Profile WWW
« Reply #52 on: August 03, 2015, 12:31:58 PM »

Sorry to sidetrack a bit, game looks neat! Sorry if you've already explained it but how are you persisting the maps you create ingame?
Interesting stuff so far, I'll have to keep a track on this one =)

Oh, and I'd like to throw my vote in for Resharper as well. I've used it for several years before as a consultant and now that I started doing games full time I just can't use Visual Studio without it. Renaming, variable/method/class extraction, code cleanup, jump to implementation (for interfaces) and so many other things that I'm now so used to that I barely know where VS stops and Resharper starts. I tried to use VS2015 with their new refactoring tools which admittedly are much better than before but I'm still missing a lot. The cost stings but with the one year free upgrade it's worth it for me.
Logged
deab
Level 2
**



View Profile
« Reply #53 on: August 04, 2015, 04:06:58 AM »

Thanks for the kind words doobieshrum & SvDvorak.

Quote
Sorry if you've already explained it but how are you persisting the maps you create ingame?

Maps are an array of ints. I built a few tools for setting rectangle and circles of tiles (filled or unfilled). At run time I just had a function use these to layout a simple map (for example, rectangle from 10,10, to 16,20 of tile 1). Here's the test map I used for a fair while:



Was quite painful to build that!

Next step I built up save + load functions. I’m using JSON to format the data, so I can easily use structs and view/edit the files. I have a simple MapData struct:

Code:
private struct MapData
{
    public byte SizeX;
    public byte SizeY;
    // Pawn start x,y and facing direction in z
    public int[] PlayerStart1;
    public string Data;
    public List<MapProp> Props;
}

This will be expanded to include monster locations and a tile height map, but works for now.

Props cover torches, skulls and a few other items, and just specify location and facing direction.

The actual tile map layout I wrote a simple run length encoder which is saved our as a string. Here’s a sample map file:

Code:
{
  "sizeX": 3, // 3 == 8 tiles
  "sizeY": 3,
  "playerStart1": [
    2,2,4
  ],
  "data": "|8x2|5|6x1|2x5|6x1|2x5|2x1|2|3x1|2x5|6x1|2x5|6x1|2x5|6x1|9x5",
  "props": [
    {
      "id": 1,
      "coOrds": [
        1,1
      ],
      "location": 4,
      "facing": 2
    },
    {
      "id": 2,
      "coOrds": [
        6,6
      ],
      "location": 5,
      "facing": 5
    }
  ]
}

For saving and loading, I’m using System.IO calls - File.CreateText() etc. and storing these in the Assets folder. I'm not using Resources.Load() as I want to be able to create new maps at runtime and save these out. I have to remember to include map files when building an .exe as they aren't included.

So currently I can create and save a new map in game, and choose from available maps to play. Next step is add the tools to make changes (which I'm working on now).

I haven’t yet tackled a save game for the player, but imagine I’ll use something similar.

Hope I covered everything there, but do ask if not, or you would like more info!
Logged
SvDvorak
Level 0
*



View Profile WWW
« Reply #54 on: August 04, 2015, 03:22:53 PM »

Amazing response, thanks for the insight! I can totally get that creating that first map was painful but your current solution seems solid. Good tools are always a big help =)
Logged
deab
Level 2
**



View Profile
« Reply #55 on: August 07, 2015, 07:11:33 AM »

Update #23
Logo creation with Blender

I'm still working on an in-game map editor, but thought I'd take a break and try to create a logo in Blender.

I wanted something that incorporated the flat, angular style I'm using, and include a reference to the grid based game play.

Decided to use the word EVER with a rock-like effect, set on top of tiles as seen in game.
I've not used Blender rendering before, but didn't take long to get something that looked good (thanks YouTube).

I did struggle a little to get lighter faces on the top left bevel of the rock face (wanted those to stand out when the image was used as a banner), so cheated a little but using a lighter colour there.

The skull is the same model used in game, and didn't require any tweaking.

I'll take another pass at this at some point, so any comments welcome.



« Last Edit: August 08, 2015, 12:30:33 AM by deab » Logged
erebusman
Level 2
**


no one of consequence


View Profile WWW
« Reply #56 on: August 07, 2015, 07:16:26 AM »

Dude the logo looks GREAT. love it.

Only suggestion I could make is try some different colors; a slate-blue might imply RPG/dungeon a bit more than the coral-pink-ish you have at the moment.  Nothing wrong with it --- but I'm just trying to think of what additional meaning color can convey in the logo if you get what I mean?
Logged

Infernohawke Entertainment
LtRin
Level 0
**



View Profile WWW
« Reply #57 on: August 07, 2015, 07:25:42 AM »

Love the logo! Well done! I think the purple blockiness is very fitting for the dialogue of your game Smiley
Logged

Game on Smiley
deab
Level 2
**



View Profile
« Reply #58 on: August 08, 2015, 01:08:31 AM »

Thanks guys. Changed the colour so its a little more purple:



And just for fun:


Logged
mk
Level 1
*



View Profile WWW
« Reply #59 on: August 08, 2015, 01:12:07 AM »

New logo looks really cool. Good job!
Logged

Pages: 1 2 [3] 4 5 ... 9
Print
Jump to:  

Theme orange-lt created by panic