Monday, February 23, 2015

PROTOTYPE - Update 4 (Mega-Risk v.Proto_0.0.1)

Welp, I did it.  I added the ability to select territories in-game and then edit their properties with using a set of buttons.  I also made all the continents into territories and put them on the map.
Implementing this wasn't nearly as tricky as I thought it would be.  I simply made it so that when the player clicks on a territory (which can be toggled through a built-in event), any existing UI is deleted and new UI is created.  This is to prevent multiple UIs from popping up.

The UI itself consists of a string of text displaying the name of the territory and a set of buttons that directly alter either the troop count or the color of the territory.

The map.  Finished and covered in colored territories.











Here, I've changed a few things around in-game.  All of the settings are reverted to their original state when the game closes.











I don't expect to be able to get anything of substance done anytime soon after this.  All the easy stuff is done and the next task at hand is implementing invasion, which also involves figuring out how to make each territory know all of its adjacent territories.

However, it appears that a checkpoint of sorts as been reached.  We have a 3D map of all the continents.  They all have been divided into territories and have a couple of fundamental properties that can be altered.
Therefore, I'm going to go ahead and dub this:

Mega-Risk v.Proto_0.0.1 (we have a cool development name now woo!)
Changelog:
- Initial version
- Added 3D map
- Added Continent-Territories
- Added Territory selection
- Added Territory buttons

Sunday, February 22, 2015

PROTOTYPE - Day ??? (Update 3)

NOT DEAD YET.
I finally was able to take a Saturday off and get some stuff done! :D
Using vertex-snap magic, I was able to fix my earlier problem and then some.  The board (or at least the part I'm testing) now displays a numeric troop value above the territory and has a colored overlay which I'm using in place of a border.  This overlay will later represent ownership.
I also made it so that Unreal recognizes when the cursor is hovering over a territory.  I'll use this to implement territory selection, which I'm hoping to do tomorrow.
BTW, I'm initially just going to use continents as territories since I haven't figured out the territory-continent relations yet.

Now for screenshots:















Here's my test region in-editor.  The actual texture of the land is a dark, metallic grey (as you can see in previous screenshots); the colors are just overlays which double as basically giant buttons that can be used to select the territories.















"In-game" (well, in-editor game mode).  You can't see the cursor here, but it's hovering over the purple territory.  All territories turn white when they're hovered over.

TECHNICAL STUFF:
Each landmass is currently broken into: the base mesh, a 'collision' plane, and a blueprint for each territory.
- The base mesh has its origin at the center of map even though the meshes are in different places.  Because of this, I can drag the map meshes into Unreal and set their locations to 0.  This snaps the landmasses to their exact locations.
- The 'collision' meshes are basically placeholders for the actual territory blueprints.  What I do is take the top face of each landmass and split it along the territory borders into various parts.  I then make each of these parts, each of which is now a good representation of each continent, a separate object.  I can then import them into Unreal.  I use vertex snapping to line up the collision planes to the meshes themselves.  It's all very manual but it works pretty well for now.  Later on I'll see if I can revamp this system to use sockets and make it all more automatic.
-The territory blueprints take some more explaining to do.  In fact, I think I'll make an entire other post to explain them.

P.S. Since I'm unable to create enough content most days to warrant full update posts, I'm going to number these things by updates instead of days.

Saturday, February 14, 2015

I got stuck.

Just as the title says, I've encountered a problem.
Basically, I can't find a good way to make a template that every territory/continent could be used for.  That's the gist of it, but the full situation is a little more complicated.

So, what I'm trying to do is make a simple class in Unreal's Blueprints that, for the time, does one simple task: it grabs uses a variable that holds a static mesh and displays the troop count using a text renderer, which is attached to a socket (a fixed point relative to the mesh) called 'Text'.
Now that doesn't seem very hard, but I have three main problems:
  1. Sockets are components of meshes and each mesh could have multiple sockets, all with different names.
  2. Typically, when attaching something to a socket, a constant reference to a mesh is used, not a variable that could hold any number of meshes.  This is probably screwing around with the sockets somehow, but I don't know how because...
  3. I have very little experience with Blueprints and the Unreal API so I'm not quite sure what I can do to fix this.
I'll probably post my problem on the Unreal AnswerHub tomorrow but I thought I'd share with you what I'm doing.

Once I get this fixed it shouldn't be too hard to render a border around these meshes and add the ability to select each of them and do things like adjust troop count or attack an adjacent territory.

Monday, February 9, 2015

:I

NO UPDATE SUNDAY.  MUCH MATH.  TOO BUSY. VERY SORRY.

Also, if anyone reading this has any suggestions on how I can split the map into segments and then assign a numeric (army) value to each of those segments, please tell.

Will post again when I do something substantial.  Might not be for a couple of days.

Sunday, February 8, 2015

PROTOTYPE - Day 2

Didn't have much time to work on the prototype today.  However, I did, after more trial and error than there should've been, manage to add the ability to pan around the map.
Basically, instead of setting up a big ol' system where the camera itself moves around when you use WASD, I just stuck the default third-person character on a plane under the map and made it so that the camera was much farther away from the actual character.  This should have taken fifteen or so minutes, but I had started the prototype using the wrong template and had to port it all over to another one.

Some time in the next three days I hope to divide the map into territories and make them each display their own army values.

Saturday, February 7, 2015

PROTOTYPE - Day 1

IT HAS BEGUN.  I spent about two hours working on what you see below. There is no play functionality or anything, just that map floating in limbo.  Still, it took me a while to get everything to render nicely.
Tomorrow I hope to add a camera to pan around the map.  I'll talk about that more in depth when I finish it.
The map.  Yes, the peanut is made of gold.

Intro/Welcome

Hello everyone!  As you can see, I, Shmid, have created a blog with which updates can be kept track of!  I'm still figuring this thing out but I'm fairly certain I can add co-authors to a blog so we can all post our own stuff.
If/when you do post, please add your name to the labels.  Make sure to keep the case and spelling consistent.