Use:

UGameplayStatics::CreatePlayer(World, Index,bSpawnActor) (Docs).

When creating a custom game mode it wasn’t clear in the documentation how ones goes about:

  1. Spawning a playercontroller
  2. Spawning a pawn
  3. assigning both to each other
  4. and possessing the pawn with the controller

So I basically did it all manually inside InitGame(). This cropped up some unwieldy UI focusing bugs. Once I replaced it with a call to CreatePlayer() things started working as intended. Hope this helps anyone who’s starting out in UE4 with C++.

“If the byline on your article doesn’t enlarge its readership then you don’t have much of a value. All you’re doing is using the distribution network of a company. That makes you expendable. They can find someone else just like you. “

– Clay Davis

Quite an interesting read regarding the business of writing for a living. I don’t 100% agree with all the conclusions he argues for, but when put through the lens of indie games I think a lot can be applicable as well. The above quote struck a chord with me as it described the value of any given article on a major news site. In the 2009-2011 era of iOS indie games market, I think it’s fair to say most indies didn’t bring their own following to the app store. They used Apple’s distribution network, namely, App Store headlining features to move units.It was pretty clear that the ones that got early successes outside of “viral hits” were bringing to bear their already existing fanbase to the platform (licenses, tie-ins, pre-existing userbase). As more indies showed up to the party, it quickly became evident that any one game or studio was pretty much expendable, both to the platform holder and to players because there’d be 10 more with just as high quality (if not higher) games ready to sell or give away.

I think mobile is becoming a place where you have a better chance at trying to expand your following or re-enforce it, not start it. I’m pretty convinced you need more business savvy than game design savvy to be able to get any decent return on iOS indie games. That’s something most indies are horribly underprepared for. I’m starting to  think no amount of impeccable game design/execution will move a game from “financial flop” to “middling success” without a large dose of monetization strategies built into the game. This wasn’t the case from the outset, but times have changed the nature of the game.

Another choice quote from that article that made me think:

Every other site is based on ad revenue. That’s because sports fans have been conditioned not to pay for any content they receive. (This is why consumers complaining about content is so contradictory. Does any other free to consumers business hear this all the time: “Why isn’t the content that we don’t pay for more to my liking?!)

– Clay Davis

Music, literature, and games, seem to be running on similar paths when it comes to how people value them and what people expect out of them.

With each game release I’ve noticed I’ve committed less and less time to writing the ‘fun bits’ and more time spent trying to mitigate complexity and find ways to make as many things as testable as possible. I guess that’s the nature of the beast once you go beyond your average ‘asteroids’ clone. With the recent announcement of SFT getting asynchronous play in the coming months, I’ve been scoping out my dev schedule for what needs to happen to make it reality, and the only issue that I keep circling back to is “how the hell do I make all of this testable/bug free”. Sure, I could write the async frontend and backend and just do some “dry runs” on a few VM clients, but I’d lose sleep knowing full well that wouldn’t cover even half the potential bugs or edge cases. I use to reserve testing for server-side components, core game logic, but our games have grown to a level of complexity that I can’t ignore the UI/animation layer anymore in regards to testability.

The core logic of the game is fairly well unit tested. But the UI/animation layer on top of it has less than ideal integration testing. That layer has tiny bits of interface logic that has grown quite complex despite most of it not really touching the actual game state. It has sufficed for now, but it’s increasingly clear that it needs to get refactored, maybe in some cases re-done for easier integration testing if I want to move the game from “real time only” to “real time, async, and seamlessly transition between the two”. On top of that, I just recently moved SFT to Unity 5.x which has cropped up a lot of bugs on the UI layer, and are increasingly hard to hunt down. Adding in integration testing after the fact is definitely not the best way to go, but I’ve gotta make do. The show must go on!

Early on in the development of SFT I had concerns about how I was going to do text rendering on the cards in such a way that things stay readable regardless of resolution, while keeping fonts looking nice. I ran into aliasing issues as well as pixelation, since all the fonts being rendered were simply bitmap textures on top of cards that are flipping, rotating, and scaling in 3D space. I had read about SDF (signed distance fields) font assets for text rendering and was wanting to get something implemented for SFT’s cards. But alas, I had to temper my eagerness to “learn something new and cool” and focus on getting the game done.

So in the end, I opted to use Unity’s built-in font rendering, along with NGUI’s nice text layout and rendering tools, and  tuned the distance of cards from the camera in the different UI screens to make sure everything stayed “more or less” readable in as many cases as possible on as many resolutions as possible. This worked well for the rest of production and I think we have a very shippable solution for card text in SFT.

A couple of weeks ago I ran across this Unity asset called Text Mesh Pro. It had SDF font rendering! I poked around with it for a bit as it was a very easy library to just drop in and start rendering text in the game:

Screen Shot 2016-02-12 at 7.08.15 PM

 

The top number is rendered with Text Mesh Pro. The bottom with a combination of Unity fonts + NGUI UILabels. The difference is stark. Now in practice, I think most wouldn’t even notice. The UI in SFT was minimized to the best of our ability to make sure the limitations of the fonts didn’t draw attention to themselves. Sure enough, it was hard to tell in SFT unless you were looking and had both builds side by side. It was a definite improvement, but I think in future projects using SDF fonts will make me less weary of using thin or very large typography. Even if the visuals aren’t miles ahead, the big win here is memory savings. Instead of having huge font atlases with 200pt fonts to keep things crisp, a single small SDF atlas is all that’s needed for any point size, and in the case of the TMP asset, any style.

This is one of the things Unity gets right. The font rendering asset that Digital Native Studios put together represents probably hundreds of man hours. I simply couldn’t justify that kind of time for our game on just text rendering, despite it being arguably an important part of a card game. If I wanted to do that for any piece of “core” technology in any given game, we’d be measuring our development time in years, not months. Sadly, we can’t afford that kind of time. Instead, I made use of the tools we had at the time (which were good for the most part), and alter the game’s aesthetic to match with what we were capable of. Being able to go and drop in a new library for font rendering and immediately benefit from it after 20 minutes of work + a few bucks vs hundreds of hours is impressive. Hats off to the developer behind this nice little tool!

Taking the “conflict” out of shared roles:

We opted to do a ‘ranked preference’ for role selection in SFT. Instead of players joining/leaving and selecting anywhere from 1-3 players to control and then having more UI flow when conflicts arise, or a character is left unselected, or a few other scenarios, we simply take everyone’s preference list and the game deals out character roles based on them. If there’s a “tie” (for instance two or more have captain as their first choice) it’ll be random who gets it. This means:

  1. One UI (simpler implementation)
  2. No timing based conflicts or resolutions to manage
  3. More control over how players are distributed.

The core reasoning behind going for this system was also due to the game always has 4 valid characters. You can’t play SFT without one of the roles. If a player drops mid-game, the host takes over that player’s role. The key influence for this system was from Evolve. A fine game I might add that I think deserves way more credit than it has received.

Finally got another card ability animation implemented into SFT:

The method and architecture I’m using for driving game logic I think has served me well for the past few years. I shipped Outwitters on the basics, and expanded the gameplay “engine” for SFT, which allowed for real-time multiplayer (albeit in sometimes hokey ways). The drawback is I haven’t found a good way to untangle it from the animation layer. It’s all 100% unit-testable, but when it comes to driving user input visuals for card play, it’s still a mess of:

  1. Play this animation clip when a user clicks.
  2. At this point in time, run this action to apply changes to the game state
  3. Then run this bunch of code to update UI, send state machine changes to animation FSMs, and send out any other misc events
  4. Then either:
    1. wait some arbitrary amount of time to submit another “action”.
    2. Have some hook in either an FSM or animation clip, to call back to a method to submit another “action”.
  5. And proceed to pull hair out at all the other permutations of that flow should the user wish to back out of the “happy path”.

This makes for a very difficult setting to collaborate on animations. Ideally it’d be nice to just have the artist create some canned animations that I can just use and then time them to game logic when needed on a separate queue/thread. In practice this doesn’t work because a lot of card animations are spline-based. Furthermore, the splines are dynamic since cards could be in any number of states, locations, or orientation at any given time when a user decides to click them. This makes the process of “animating” abilities such as the above really time consuming. The alternatives:

  1. creating a ton of animations for each possibility (lol, no).
  2. Or a less ‘fluid’ look where cards simply don’t move as you’d expect, but do slightly strange arcs since it’s the same canned animation regardless of angle, position in hand or inventory slot.

I think in retrospect I needed to spend some extra time, maybe a week or more, coming up with a better pipeline or workflow to allow for easier iteration on card animations. My first hunch is maybe trying to make some sort of ‘building block’ animation library for cards. So for complex sequences they’d simply just be queued up series of fundamental animations in cards, and then I can easily just interlace calls to PlayAnimation() and SubmitActions() and treat them almost identically in code as opposed to the one-off hacks for each ability that currently exists. But even that process is rife with a lot of edge cases due to the dynamic nature of how players interact with cards, and ultimately would still require some programmer help to get things looking right.

For the moment, card animations in SFT are created by:

  1. The artist creates a fully animated mock up in Unity using the tools they know. Artist now exits stage right.
  2. I then painstakingly try to mimic that entire flow (and very often other user flows not captured in the 1 one-off mock up) using a combination of animation clips, splines, FSMs, and procedural animation via code.
  3. Give up trying to replicate the mock up when enough time has gone by and I realize I have to move on.

I’m able to capture the majority of the mock up’s “essence”, but a lot of the subtleties of the animation that artists are actually good at creating are lost due to lack of time and lack of flexibility. Maybe next go around if we’re doing another card based project I’ll be able to have another go at this.

This week I’ve got a lot done in the way of Steam integration, save files, automated builds, some better randomization for galaxy generation, as well as some much needed bug fixes to make online play smoother. Got a lot done but not much on the visual side of things. But hey:

Nice to be one step closer to a shipping product

Nice to be one step closer to a shipping product

Got basic Steamworks apis integrated as well. Pretty painless with the Steamworks.net library for Unity. I was hoping to get steam invitations working this week to make play testing a bit easier but it looks like it’ll require a pretty extensive test environment that I simply haven’t setup yet. So I’ll be sticking to our current matchmaking system until then. I’m going to need a few virtual machines running different steam clients to get full end-to-end testing on the lobby functionality. The testing and development environments for multiplayer games always have been a bit cumbersome compared to their single player counterparts.Alpha main menu

Bugs bugs bugs

I’ve taken the effort to get a decent suite of unit tests for Space Food Truck using Unity’s Test Tools. In the past, they’ve kind of lingered once some basic functionality was implemented but never really maintained, or even worse didn’t have any (see: Tilt to Live Series). In Outwitters, I had a small suite of client-side tests to validate some unit abilities but never really maintained much of them after several content updates. Meanwhile, the Outwitters back-end has an extensive suite of unit tests. They have been utter life-savers. The extra time spent writing thorough tests would quickly pay for itself just in stopping regression when updating the server-side logic.

Taking that lesson I wanted to apply it to Space Food Truck. The game logic itself is largely covered in the unit tests. Again, extra effort, but it’s bought me great flexibility when trying gameplay experiments, tweaking or fixing gameplay rules. I can quickly go in, change some gameplay rules or abilities, have decent confidence I didn’t break anything fundamental to the logic of the game. That’s great for sleep. But SFT gameplay kind of lends itself more easily to unit testing. For one, a lot of the architecture for the gameplay is a highly modified version of Outwitters core code. It’s a bit harder to do with an action-based game when a lot of your logic can heavily rely on simply collisions and collision detection (systems Unity handles internally and hard to test end-to-end).

The bugs I’m running into now are, unsurprisingly, anything that isn’t unit tested. Go figure. This is largely visual and UI bugs. A lot of times the underlying logic is happily chugging along and fully validated but the UI tripped over itself and has no clue WTF to do anymore. Getting UI and gameplay prefabs testable is an even larger effort (integration and automated UI testing) that I simply haven’t taken the time to do so. Part of the reasoning stems from time constraints (bad argument, I know) and also we’re using quite a few pieces of middleware to drive the visual aspects of Space Food Truck. Getting those isolated and into a testable form isn’t easy (especially if some don’t come with source).

Onward

Took a bit of time earlier this week to get a planet montage of some planets from Space Food Truck. Far from fellow indie Colin Walsh’s epic scale of Drifter’s “grand tour” video, but still fun to look at nonetheless. Looking to get more lobby UI working next week as well more graceful handling of less than ideal online environments. So far I’m on schedule with the sprints I’ve planned. Wonder how long that’ll last…

 

 

 

We ran a kickstarter for the game I’m currently working on, Space Food Truck. The game is coming along great, but we lacked the funds internally to really step it up a notch mostly in the audio department as well as some aspects in the graphical department due to budget constraints. I needed to be persuaded on the idea of running a kickstarter, but I eventually came around to it. Obviously, things didn’t work out but it was an exciting, sometimes nerve wracking experience. Figured I’d write down some notes on my feelings of the overall experience. So without further ado…

Some Unsubstantiated Thoughts on Kickstarter

 

The pitch video is important.

Having a good pitch is critical (not even just on kickstarter, just in games in general), and good production would help legitimize you. I think our video pitch need more iteration but neither of us had the energy, time, or will to do it (more on this later).

 

Don’t shy away from previous accomplishments.

I think we could’ve pushed our previous efforts more to establish credibility. There’s been somewhat of a less than friendly perception of mobile in the eyes of “mainstream” gamers, and even in the press on some occasions. It’s already hard enough as an indie to get press attention, but being typecast as a ‘mobile developer’ doesn’t exactly work in your favor these days, despite how awesome mobile games can be. Anyone that took the time to read our project page or look us up would see our previous catalog, but maybe we should’ve championed it rather than downplayed it.

That being said, I think it was important to state SFT was coming to PC (and eventually tablets), rather than the other way around. Not because of the treatment they get in press or gaming culture, just the data seems to imply mobile is a tough gig even on Kickstarter. I’m not even sure how you’d pitch an iOS game on kickstarter given how there is no way to distribute it to backers without Apple frowning upon it. As much as we don’t like the perception, gamers see Kickstarter as a pre-order system and if they don’t get a copy with their pledge then I’d imagine their enthusiasm for pledging approaches zero.

A lot of the negative rhetoric I typically hear is on Steam, and more specifically Greenlight. Kickstarter isn’t Steam and the majority of those that went to our Kickstarter page most likely never heard of us. Credentials can be important to those that have zero clue who you are. Furthermore, our fans asking for PC and Mac ports of our games is indicative enough to me that our games aren’t viewed based on the platform they originally released on but the merits of the games themselves. In hindsight, I was too concerned with this aspect. If the ideal goal is to have a game good enough to be worth releasing on every platform possible, then the platform drama is insignificant. Almost all our previous games were critically acclaimed, and maybe I could’ve played that angle up more.

 

Initial reveal of the game: probably not the best time for your Kickstarter campaign?

I’m still wishy-washy on this because it’s hard to get a sense of the direct impact initial announce press releases, marketing, and social media buzz can get you towards Kickstarter pledges. But my logic is as follows:

If you’re starting your marketing campaign to build up interest, excitement, and, ultimately, followers for your game leading up to launch several months away, presumably the amount of dedicated followers you have right before announcing is at an all time low. Kickstarter is about turning dedicating followers into pledges, and is largely about momentum in terms of how many pledges you can get in that crucial first week. So in a way, using Kickstarter in tandem with your initial reveal may possibly be the worst moment to launch your Kickstarter. Conversely, launching your Kickstarter on the day before you release your game is also useless despite ideally having the maximum number of followers at that point. That would seem to imply that there is some middle ground here between reveal and launch.

The vibe I got from other Kickstarter alums was launching a campaign was almost like trying to line up votes in congress before the vote goes to the floor. The more fans you can convince to be there on day 1 to say “yes” the better the chances you’ll have. In a way, kind of antithetical to the whole idea of Kickstarter given that it’s supposed to be about raising pledges during the campaign, but oh well.

And this is me being completely 100% superstitious, but if our initial out-reach to press is pushing a new game and it’s already got a Kickstarter going I suspect it knocks it down a notch. Sometimes due to the journalist’s own stance on kickstarters, and sometimes the publication feeling they are put in a strange position when discussing Kickstarters. In the future if I ever do a Kickstarter again, then I might lean on the side of “don’t let it be your reveal”. Obviously there’s exceptions to that, but Space Food Truck isn’t tapping into any of the nostalgic angles that have been popular as of late on Kickstarter so that’s a bit of a non-starter.

 

Social Media…helps?

It was really difficult to suss out the impact of twitter and facebook. The analytics I do have suggests it helped…a bit? It accounted for at least 17% of funds raised. But ultimately the pledges were more of a slow steady trickle than anything meaningful to help build momentum. Looking at other successful Kickstarters it seems that twitter and facebook were not central to their strategies for getting funded. I’d go so far as to say that if this is your main strategy for getting funded, re-think it. Building twitter buzz is doable, but that’s about as far as it got for us. Trying to transform “buzz” into action seems supremely difficult in that medium. I think a better twitter strategy would be centered around encouraging backers, fans, followers to tweet about your project rather than making your company and/or personal account the central point of info on twitter where others retweet or discover your game. Easier said than done though.

Tying into the previous point about reveals, building up a social media following prior to a kickstarter launch is vital. A Kickstarter campaign isn’t the time to increase your follower count on twitter or facebook. Maybe if we had massively popular social media accounts with hundreds of thousands of followers it would’ve been different. Beyond our initial kickstarter announcement and the 48 hour tweet there wasn’t much gain in the 30 days in-between from either source. I think a really interesting post for the future would be to get down in the nitty gritty and explore how many views the page got, where they came from, how many pledged as a result from which sources, etc. Ultimately, I suspect our social “reach” is on the lower end of the scale so data may prove to be more noisy and difficult to find any trend in.

 

It Can Consume You

Regarding our effort on the pitch video, we went into Kickstarter without much expectation. I hoped we could raise funds with minimal distraction so that we could get back to focusing on the game during the campaign and not lose much time. It turned out to be the opposite. From all that I’ve seen and heard from successful kickstarter alums the scope of a well run campaign far extends the the “1 month” of kickstarter and a week or two of prep.  If 2+ months of part time work dedicated to planning, creating, and organizing a campaign takes a significant chunk of a development cycle, then maybe the game is too small for kickstarter? Or maybe priorities are in the wrong order and marketing isn’t getting the attention it deserves? Our dev cycles aren’t measured in years. Dedicating months to a kickstarter detracts from progress on the actual game, and with our deadlines being less flexible, it’s difficult to justify the time spent with the risk of not getting funded.

If anything, Kickstarter is a hyper accelerated marketing campaign. It kind of became an interesting assessment in our studios marketing capabilities. It highlighted holes in our marketing tools and outreach abilities. The silver lining, I suppose, is the game is largely going to be taken care of, but we’ve exposed that the awareness level of Space Food Truck isn’t where it needs to be. Better to be aware of that now than at the real launch of the game.

DD_5

Oh my word. This game is my current single player obsession. Loved the new X-Com? Loved FTL? Love RPG’s and the that “one more turn” feeling? I found it hard to stop playing. It came out of left field for me (but that’s how it always feels if their marketing is doing its job right?). I’m not a huge fan of “medieval”  or “dark and grim” themed games. But the art style in Darkest Dungeon is amazing and I quickly became a fan. Also the narrator in the game was a great touch. The lines he delivers builds a great sense of atmosphere and immersion. So much so that I found myself thinking about the narration outside the game:

Ya, it’s quickly accumulating hours on my steam account over these past several weeks:

Screen Shot 2015-08-06 at 2.44.55 AM

Where have the hours gone?