City Builder Construction System


City Builder Construction System

One of my dreams to create a strategy and/or city builder game.  I often work towards this goal in small bursts, learning how to create the systems necessary to make such a game work over time.  The most common system I experiment with is the actual placement of the buildings themselves, which involves raycasting to a position in the game space.

My most recent attempt at creating a building placement system was inspired by the game Majesty: The Fantasy Kingdom Sim.   In Majesty new buildings are placed with a ring of detection.  If another building is within that ring of detection the new building cannot be built and must be placed elsewhere

 Below is an example of this:

Invalid Building Placement (too close to other buildings)
Valid Building Placement (far enough away from other buildings)

Below is a video of my system.  I think it pretty accurate to the one that is used in Majesty.  Each building also uses a Scriptable object o hold specific information about each building so that designers/collaborators could easily make new buildings or change existing ones.

The placement system in the video works as follows:

The system uses a raycast to find a valid location which requires a collision with an object on the Ground layer of the game.  Once the raycast collides with a valid target, that collision point is taken and a projection of the new building is instantiated there.  The building will move around as/if the raycast changes position.

When the new building starts being projected a ring is also projected visually, however, in actuality a sphere collider is being created.  The sphere collider’s radius is equal to the ring’s radius and thus captures the same area.  The sphere collider detects for collisions of other buildings (which should be on a layer called Buildings).

If the sphere collider does not detect any other buildings in its area then the building can be placed.  The building is then deselected and the projected building becomes invisible.

If the collider detects another building in its area then the building is not placed and the player is given another opportunity to place the building.

The current scriptable object I have has a couple of parameters that makes instantiating and tweaking the buildings easier for the placement system.

Obvious fields are name, and height offset (so the building does instantiate partway into the ground), but the Placement Col variables are what set the detection ring’s size while the Col variables set the actual building’s collider.

A few more additional variables I added to the Scriptable objects is the ability to add a mesh, which allows for quick aesthetic changes to the buildings and a Material that should allow the buildings to look different once built if the I so choose.

Blog Posts Update


Blog Post Update

Hello blog post readers.  I has been awhile since I posted and for that I apologize.  A lot has been happening so I’m going to try and post a little more frequently in the next week or so bring you all up to speed on what I did during my gap.

A quick announcement is that I’m starting to stream on the website Twitch!  I don’t have a confirmed schedule yet, but I’ll be alternating playing games and doing game development.

The games I’ll be playing will be a variety, probably smaller games that I enjoy (sometimes bigger games).  

For game development I’ll mostly be working in Unity at first, but will branch out into Unreal or other game engines.  Development streams should consist of programming and design, with a splash of art when I need custom assets.  Hopefully anyone curious about game development can catch a glimpse or maybe learn something from my streams.

I’ll put a link to my Twitch channel below so you can follow me if you want to see what I am doing.  I’ll be making  matching blog posts whenever I do a game dev stream explaining what I accomplished and what I want to do next.

The next bit of my blog post will be showing you what kind of blog post topics I will be posting in the week or so.

The following topics will make an appearance:

  • Majesty/CityBuilder Placement
  • Shadergraph Experiment
  • MonkeyByte Monster Hunter Recreation Pt1

These posts should be up next few days though not necessarily in this order.

That pretty much covers it for this blog post.  I will see you readers next post!

Ladder Coding/Prototype


Ladder Testing/Prototype

I messed around with a first person controller and building a ladder.  The first person controller was based off a Brackeyes video and I created the ladder off of that base code.

The image to the right is the Unity Editor view of the ladder.  Its has two colliders attached to it.  One collider is used for physical interaction with the ladder such as standing on top and preventing the player from running through it, while the other collider is for detecting when the player is in range to start climbing. The larger collider is the one that detects whether the player is about to start climbing.

Right now once you climb the ladder you can’t back up off the ladder, but I think that should be simple enough to do with a small change to the ground check system that is currently implemented.

Personal Project: Sword Director Intro Post


Sword Director Prototype Intro Post

Prototype Prompt

I got the idea for this prototype form watching the Castlevania show on Netflix.  I was watching Alucard fight using his sword.  I thought it was really cool how it moved around on its own with only a few directions from him.  I thought that would be a cool experience for a player.  Manually fighting while simultaneously directing another entity.

Current Progress

I worked on a rough prototype for a few days in the Unity Engine.  This is my first time using Unity’s new input system so it has been a bit of a learning experience.  Right now I have a few of the core features I want in the game.  Movement, jumping, and launching/recalling the sword are all functional.  Jumping still needs a little bit of tweaking, but it still functions as a jump.

Current Issues

My biggest issue right now is getting a system in place to allow the player to create a series of points in the level that the sword will pathfind to.  I have a some code set up that should work, but the input system that’s set up right now does not have enough bindings.  Right now the input button for marking a location for the sword’s path is a continuous hold and not a single frame.  This means a new point is added to the path every frame, which gives the player very little time to decide what direction they want the sword to travel in.

Next Steps

The next step for this project is to redo the input system bindings.  I need more options for button presses in order to test and create good control schemes.  Once the new control scheme is taken care of I can move onto making the sword pathfinding work.

Senior Production Blog Post #5

Senior Production

Senior Production Blog Post #5

It’s the final week of the project and that means time for a post mortem of the project. Overall the project went really well I think.  There were certainly many hiccups along the way, with some being handled better than others.  The work we did was really great and I think most of, if not all, of our team is happy with the end result we produced.  The biggest detractors from the project in my opinion were a lack of productively from team members and some disorganization from the leads.

There were many factors that contributed to the lack of productivity from the team.  Covid still raging on, isolated, and other classes from school to name a few.  This led to some of the level design, UI implementation, and weapon implementation getting a bit behind.  A major setback in the level design was level scale.  Our beginning levels were really off scale and certain members of the team weren’t really focused or participated very much.  This delayed the start level iterations for a couple of sprints.  Initially the level designers worked on the tutorial level for the game while figuring out the multiplayer level scale, however making the tutorial took more energy than initially thought, which meant work on the multiplier level scale ended up being delayed and/or worked on by people who had very little level design experience.

The second issue with the way the leads organized the project with some of the meetings.  This was their first time organizing and being leads.  Some of the meetings could have been organized better and some things started earlier.  QA was one of them.  We didn’t really get started on planning what we wanted from QA until part way through the project which showed some of the earliest data.  It also would have helped us scope what we wanted to implement each week and set deadlines for when things should be merged into our core develop branch.

For me personally I think I was a good collaborator and developer overall.  I think I should have fought some for more design work earlier on in the project, but was happy to help the programmers implement some weapon features and make good use of my second major in game programming.  I could have taken a bit more charge when I came to areas I thought were somewhat lacking such as the previous QA issues I mentioned earlier.  Talking with the leads and telling them what I think they could have been better was definitely something I can improve upon.

Senior Production Blog Post #4

Senior Production

Senior Production Blog Post #4

It is post alpha at the time of this blog post and I have started balancing the game.  I’ve put off finishing the final weapon for the game in order to help get the balancing process started.  I’ve organized a QA planning meeting for our QA lead, design leads, producers and I can start planning out QA sessions for the upcoming sprint.  I facilitate the meeting to see what we want to test for this upcoming sprint and who we need to talk to in order for the tests to run successfully.  I’ve overall been trying to help get the QA pipeline to run a smoother since my balancing data depends on having good, reliable testing data.  I also have plans to start notifying people in our Discord server to start more internally testing changes I’ve made.  Ideally once the dev tools get integrated into the game I should be able to do more live tweaks, which means I can gather a small internal testing group and change values while they test.

In addition to tweaking the weapon’s values I’ve also started working on the balance of levels and prepping a mock-up for the level we are currently developing.  When setting up the document I first took the level sketch that our lead artist made with the help of our level designers and traced over it in Adobe Illustrator.  After I traced the sketch I then created a set of symbols for key points of interest such as team spawn locations, weapon pickups, and repair kits.  After the symbols are set up then I can start placing them, which also brings me to my biggest impediment, map detail.

The map sketch is just a sketch so there isn’t a lot of detail.  There were large swaths of empty space that I don’t know about.  I made some assumptions with what would be placed there, but I also talked to one of the level designers to see if I could get some quick sketches so I could see where the spaces are headed towards.  Height is another issue with those white spaces too.  Are the buildings in those white spaces going to have the same height, creating a large level top?  If I go about it this particular way I am still iterating while still moving towards what the level designers had in mind.