by alarial | Feb 20, 2016 | GameDev, Unreal Engine 4
Wow. It has already been a month since the last post! Time seems to fly when one is head’s down putting components together, testing out plugins, and dealing with sick kids. That said, I have been tied up with those things lately. I’ve been balancing my time between writing basic character building blocks and trying to integrate other pieces such as inventory management, animation, and per-bone damage. All of these things being first pass, of course. My other game dev is still acclimating himself to the switch over to C++ and doing tons of research on other things that will become very important very soon.
I’ve decided to take the transparency approach to reporting what we are working on once we start hitting the alpha stages. I am going to work on a way to pull the data from our internal tracking system into a more consumable format and location. This will make sure we can be held accountable for our work and it will be easier to see feature and bug progress.
I did see something really cool recently, though. It looks like Epic is working on a Blueprint to C++ conversion tool. This would essentially break down your Blueprints into native C++ when it builds for release. While you wouldn’t really be able to debug them via your code editor, it would eliminate the performance hit Blueprint codes takes from basically having to run inside a virtual machine on game execution. While this won’t significantly change my decision to move over to C++ as my primary choice for development, it will make me less hesitant to implement in Blueprint when it would be easier or make more sense there.
by alarial | Jan 24, 2016 | GameDev, Unreal Engine 4
An important part of any distributed development team is an effective source code management (SCM) solution. Typically I’m a Git kind of person. I like the branch management and the simplicity of use, along with the wide variety of clients available.The specific SCM solution chosen is less important than whether the solution meets the purpose it is meant to serve. I am a big advocate of using the right tool for the job and there are some choices that would not have made sense for our development workflow. Thus, I was open to other solutions for game development purposes. My goal was to set up an SCM that facilitated development structure between myself and remote members that also integrated well with Unreal Engine 4 (UE4). This narrowed my choices considerably because I wouldn’t touch one of the three options, SVN, with your worst enemy’s face.
Public providers
Git is an option, but we ran into some problems very early on with this because arguably the most popular free and private-by-default provider, Bitbucket, enforces a limit on the size of the repository. This makes game development collaboration a bit harder because uncompressed game resources get pretty large pretty quickly. We hit our limits with a couple providers very quickly as we were bringing in assets to test and checking in our changes. These problems didn’t rule out Git, but it did cause me to reevaluate the solutions.
Bitbucket server
I still wanted to use Git, so I went out and grabbed the latest copy of Bitbucket server and installed it locally. I then fought the access battle of my overprotective network (by design) and a server trying to accept incoming connections. I was able to get it working from within the same network, but anything that required entry from the public internet died quickly. I tweaked settings for a while before deciding to move on because it wasn’t a good long-term solution anyway. i needed something that was not dependent on compromising my own security by exposing my IP address rather than routing through the VPN.
Perforce
I noticed when I first starting using UE4 that Perforce support was built into the editor from the start. I remember trying to get something working back at one of the hackathons, but getting everything up and running just didn’t materialize fast enough to consider it a viable option for that 24-hour period. I liked the concept of using it because from everything I have read, this SCM has a much wider adoption across larger game development shops and many other software companies. One of the advantages I see with Perforce is that it doesn’t care about repository size or large files (Git doesn’t like large files so much). So I decided to give it another shot at setup and see what I could make happen.
Perforce Cloud
My first attempt with Perforce was to use the Helix Cloud service they offered for free. This was only up to 5 GB, but it was plenty large enough to test out and see if we wanted to transfer over to a full installation. Unfortunately it didn’t work as planned. I was not able to get UE4 happy with the connection string and the information I was able to dig up online was not very helpful. Considering I didn’t know what a good installation looked like or how to solve problems with a cloud service I couldn’t touch, I decided to just go for the full thing myself.
Perforce Full Server Install
Perforce offers a free license for up to 20 users. This is awesome for smaller teams like mine and makes it really easy to get large-scale functionality at the micro scale of my team. However, because this is an enterprise-grade solution, that means the installation should be fairly difficult and convoluted, right? Not so much! The problems I ran into had nothing to do with difficulty installing or even basic setup. Let’s run through the issues I had getting a full Perforce server installation up and running and connected with UE4. I will point out all my servers were Ubuntu 14.04 for these installs so your experience may differ if using a different backend.
I looked up installation directions directly on the Perforce website. The website gave directions for adding the APT repository key to the keychain and adding the source to the sources list (which were actually correct and worked perfectly!). I had to install 1 package, helix-p4d, which installed a few other dependencies and then told me very simply how to configure a new Perforce server. After choosing some options, the server was installed and ready to go. What? Yes. The actual server setup on Ubuntu only takes like 5 minutes. So now we get into the issues I faced after server install.
- My first installation was on a Digital Ocean droplet I already had out there. Everything installed fine, but I couldn’t reach it from UE4 for any amount of coaxing or sugary drinks. I was able to set it up in the Perforce Visual client (P4V) and add files to the depot, but connecting via UE4 just wasn’t happening. I tried messing with it for a while and finally decided that maybe my problem wasn’t my settings, maybe it was my location.
- I set up an EC2 micro instance on AWS. Exact same installation steps because exact same OS. I was also able to connect via P4V client, but UE4 was having some problems. I started off with errors about the Unicode format. UE4 was complaining that a Unicode client required a Unicode server. First, I wasn’t aware that UE4 editor presented itself in a Unicode format. Second, I couldn’t find any information online about how to change this on the editor side. So, I turned to the server side and ran the command that was meant to irreversibly convert the installation to Unicode mode. It made no difference to the UE4 client. No matter what I tried to change or tweak, the client error would tell me that a Unicode client required a Unicode server.
What Finally Worked?
I set up a new EC2 Ubuntu server and chose Unicode support during Perforce server installation. My P4V client loved it! My UE4 client loved it! There was lots of love all around! After getting all this working, I had another team member validate my setup by having him go through just the client-side installation and setup procedure. As of last night, he was able to perform the setup successfully on both his laptop and desktop.
Conclusion
This past week I’ve felt pretty useless as I was not able to write any code, but getting source control working and validated from external clients was a huge win. This means we have a much easier path as we move forward and we don’t need to rely on proximity to onboard new team members (all code was hosted on my NAS previously). I think what surprised me the most was the lack of information surrounding Perforce setup with UE4. I found several guides and videos, but everyone essentially assumed a Windows installation for your local server, not a remote Linux derivative. To me that makes the most sense for remote hosting, and maybe it is just that larger studios don’t need online guides or tutorials. For me, it was a week-long frustrating learning experience that paid off eventually. I can only hope that all of my frustrations end up the same way.
I know I didn’t go into great detail as to setup or fixing of different pieces of this SCM experience, but we’re already approaching the standard college essay word count and I wanted this entry to be focused more on the troubles than anything else. Leave a comment if you have specific questions about this experience or the eventual solution.
by alarial | Jan 11, 2016 | GameDev, projects, Unreal Engine 4
The new year often brings a feeling of rebirth to people, projects, relationships, or any number of things. For myself and the Squirrel Alienz studio we are renewing our commitment to creating fun games and developing engaging experiences. We have a high-level path forward for the year and have already begun the first steps of increasing engagement, focusing on artistic resources, and redesigning the website. I have some really exciting plans for the future and can’t wait to share more of them with everyone!
Our primary and immediate focus is Alsherok: Arena which will combine much of the RPG elements of races, classes, and skills with an action arena experience that will have you fighting for your life. Go check out the page for more information (Alsherok: Arena)! The game features multiple classes, races, skills, arena paths, and challenges. Over the next few weeks I will be updating this page with more specific details about the game as well as some planned features.
As I also mentioned, there are larger plans in the works. I will share some of those as I build out the timeline so that everyone can see where we are and where we are headed as a company. 2015 was a year full of learning and discovery, but I plan to make 2016 the year of accomplishment and action. I will always be transparent about our process and our work because I believe community involvement requires trust on both sides and you can’t buy into something you don’t understand. Please join me in making 2016 the best year yet!
–Regards
Cameron Carroll
by alarial | Jan 2, 2016 | GameDev, Unreal Engine 4
I have been able to replicate most of the functionality, properties, and UI pieces I had originally written through Blueprint. The only thing I am lacking now is the AI portion I had set up near the end of my time using Blueprint and haven’t even begun to tackle through C++. I will work on that soon. I want to start focusing on AI and enemy behavior, so I need to cross basic functionality off the list. I am still lacking attributes (strength, dexterity, etc.), an interface that allows allocation of any points, and a way to view current information. After that I will need enemy functionality including vitals, hovering text, and basic movement. I also want to look at floating combat text and onscreen indicators of nearest enemy. Things are coming together much more quickly now that I have the basic C++ conversion out of the way.
by alarial | Dec 25, 2015 | GameDev, Unreal Engine 4
Finally got the project compiling on my Macbook! That meets my immediate cross-platform needs so I’ll not worry about the Linux side for now. Turns out it was my fault in the first place. I had already built the library on my Windows machine on first load, so the editor didn’t care when I introduced errors on the code side to resolve. When compiling from scratch, the editor cares very much. I fixed the issues and pulled the code down to my Macbook and compilation worked perfectly 🙂
Back to the more fun work of actually working on functionality!
by alarial | Dec 21, 2015 | GameDev, keeping you hopeful, projects, Unreal Engine 4
I’ve succerssfully completed my transition over to C++ for the primary implementation of my work, updated repositories, and brought everything in-house to my own NAS because of game size issues. I am still working on testing cross-OS compilation for the game when working on either my Windows machine or my Macbook and getting everything reimplemented.
I have found that I want to approach certain pieces different now that I have had a chance to reevaluate during the transition. So I will inevitably scrap some of what I had done before. But that’s what refactoring is all about, right? 🙂
by alarial | Nov 21, 2014 | GameDev, projects, Unreal Engine 4
While it is perfectly acceptable to handle updates within character blueprints, sometimes it doesn’t make as much sense to perform all updates immediately when in a multiplayer experience. I previously wrote about creating a game tick that could be used for timed updates, but I didn’t have a hook into how to perform those updates. I created that hook by using an event dispatcher within the world tick logic. This allowed me to add events to the dispatcher queue and execute the queue at whatever interval the world tick was running.
So the logic works something like this…
Event happens → Add reference to an event to the event dispatcher → OnWorldTick, process everything in the dispatcher queue → Empty queue and start over
(more…)
by alarial | Nov 1, 2014 | GameDev, Unreal Engine 4
I have been playing around with UMG since it came out in experimental format, but just got around to trying to tie data binding to a bar (for fun things like health, stamina, etc). UMG was promoted from experimental status with the latest UE4 release, so everything should be working fairly consistently. I spun my wheels for a little bit because apparently I forgot basic numeric properties >.>
To calculate the percentage for the bar, you have to take current <whatever> and divide it by max <whatever>. Basic math stuffs, yeah? The function for the percentage expects a float returned, because that is standard percentage stuff. Well apparently if you architect your variables as integers and ignore the main difference between integers and floats (whole numbers vs. fractions), you end up with a bar that only registers 0 and 100%! Whoops.
Go maths!
Besides that little snafu, I found the data binding within UMG to be extremely easy to handle inside of Blueprints once I figured out the casting I needed to do. I eventually switched to getting my character’s attributes through a Blueprint interface instead of having to mess around with so much casting. I found it much cleaner and easier to work with.
For example, I created an interface and implemented it in my character class like this:

After which I can easily pull data out in the UMG HUD class like this:

The result of the bars on the front end looks something like this:

I’ve since created new attribute variables as floats and recreated the workflows (UE4 doesn’t allow you to change data types of variables that are in use anywhere in the Blueprint). I imagine as long as I segregate my interfaces well enough, they won’t become too unmanageable.
by alarial | Sep 4, 2014 | hackathons, Unreal Engine 4
So I competed in a hackathon (Hack Midwest) back in July around my birthday and I managed to snag a prize for the “Most Entertaining App”. I used a combination of Unreal Engine 4, the VaRest plugin, and the Best Buy API. I open sourced the project here: https://github.com/alarial/BlastBestBuy and tried to include the basic instructions to get it up and working.
The project itself was more of a proof of concept than anything. I wanted to see if I could take returned data from a REST API and create some game objects dynamically. Turns out I can, but it is a little slow. I could see the code needing some optimization to be used in a production environment… but it worked for the intended purpose, which was to delight and entertain.

Yes, that is a cow in the lower right corner. I dynamically created spheres with category labels, then as you destroy the spheres, cows drop with the subcategory labels.
Fun stuff. It may be a good example for someone looking to take advantage of RESTful API’s within UE4. I am hoping to see more full-featured API access within Blueprint, but I will take it one step at a time right now and explore what I can accomplish with what is available.
by alarial | Jul 5, 2014 | GameDev, Unreal Engine 4
I felt like my previous post deserved at least a little bit of a breakdown as to how to implement the game tick. If you have any desire to create an RPG-derivitive of some sort and your characters regenerate slowly over time rather than instantly, the game tick is your best friend. If you don’t like the idea of processing everything at the same time, you can always implement multiple ticks to handle different aspects of the update. Or use some type of tick logic on individual effects. There are many ways you can go with something like this, but deciding how you want to update your characters is very important.
I figured it would be worth it to run through the breakdown of how this tick is set up so that anyone that wanted to follow along would not need to just look at the screenshot and just blindly implement it hoping for the best.
Let’s start at the beginning…

Event Begin Play issues a call to Game Tick, which is a custom event. One improvement to this might be adding a Switch Has Authority node so that you don’t make unnecessary calls. That node is on the Game Tick, so regular clients will get no further anyway.

GameTick first makes sure that the entity trying to create a new tick is the authority (wouldn’t want peons defining their own ticks, right?). After that it seeds a new random stream. I have no interest in repeatable random, so the stream is set up to get a new random each time. I still need to fix the seed variable because it has no logic to regenerate every time, but the framework is there. It then gets a random integer between the min and max variables using the random seed and sets the CurrentGameTick value.

Next, EventTick is obviously firing off all the freaking time, but we really don’t want to update that often. To fix that, we give it a sequence (so we can also process other stuff later) and check if the CurrentGameTick is not equal to 0 (ensuring that we have at least set it once). If it is something other than 0, we set a Delay for the length of time. After that delay, we execute another custom event, ProcessTick.

The last step here is to actually process events for the Game Tick. ProcessTick should contain whatever callouts to process things that you want to do every tick.
Finally, a quick look at the variables used here

Ignoring DefaultSceneRoot, the GameRandom is a VariableStream, while the rest are Integers.
There you have it. Hopefully an easy-to-follow implementation of basic game tick functionality in your game, using only Blueprints 🙂
As a recap:
1) Begin Play - Call the Game Tick
2) Game Tick - Create a new value in some range based on random seed
3) Event Tick - Wait for Game Tick time
4) Process Tick - Do stuff
Let me know if there is something here you would like me to explain more clearly 🙂
Recent Comments