Final Testing, and Some Orbital Experiments

Hey Folks! Hope everyone had a good weekend. It was gorgeous here this weekend, and we took every opportunity to enjoy the weather. It almost felt like a vacation!

Back at the office, I had to do a little bit of admin work to catch-up, then see about to final tests on NEO Scavenger mobile. Our main bug is seemingly solved, and we're just waiting to see if any esoteric iOS devices have issues. That, and there are a few smaller changes coming in a new build for better user input (e.g. swiping). But once those are done, we might be ready for launch? This could be it!

Since I had a bit of time until that build was done, and the webdevs haven't advised on server permissions yet, I took another crack at the orbital plotter.

After a bunch more testing with actual data, it seems Vectrosity.MakeEllipse might have some accuracy issues. That, or I'm using it wrong. And since I couldn't figure out if I was, I poked around for some clues. And coincidentally, it seems everyone's favorite space sim (Kerbal Space Program) also uses Vectrosity for orbits! Handy!

One of their devs mentioned that they use MakeSpline instead of MakeEllipse, since they can feed it sample points from their orbits for accuracy. And the code I wrote makes this pretty easy, too, so I set about converting my plotter to splines.

About an hour or so later, I had nice, smooth, and importantly, accurate orbit tracks plotted on the screen. No more low-value precision issues!

Next step, the celestial bodies themselves...

Mobile Rendering Fixed? For Good?

Good news, everyone! It looks like Tiago was able to finally squash the rendering bug in mobile!

His latest change successfully detects the device type, and enables or disables High DPI rendering mode accordingly. And so far, all testing points towards a success! His iPad 2, my iPad3, and several iPhone models are all showing correct behavior, and no crashes now.

Plus, as an added bonus, one of the input bugs on the main menu went away with it. Woohoo! A two-fer!

There are still a few minor bugs left, but...dare I say it, we may be ready to launch! Let's not jinx things by confirming it, but next week might be an interesting one :)

Have a good weekend, all!

Making Downloads Work

Hey Folks! More webdev work today, as I started migrating the download system into the live test server.

It started out pretty straightforward, as I checked-in the files, uploaded them to the server, and began testing. I had a few bumps as I changed things to work in the new environment (e.g. adding some code to bootstrap the content management system on a stand-alone PHP page).

However, I ran into a snag: the PHP I wrote to serve game files seems to have permission issues on this new server. The users/groups must be configured differently, since it worked on my old site but not here. (And manually running the commands on the command-line in SSH works if I use the folder owner user instead of the Apache user.)

So I've changed everything I could to be ready to go, and sent a message to the webdevs to ask for their recommendation on the permissions. There are some standard ways of doing it, according to StackExchange, but it's their hardware, so I don't want to mess things up (or make a security mistake).

Hopefully, that won't take them much time to respond to or do, and I'll be back to testing soon!

Webdev Unlocked

Hey Folks! Another webdev day today, and probably at least one more in store. Today's tasks were twofold: establish access to the test server, and setup the order template.

The first task was basically getting me setup to start editing files on our test server. Until now, the webdev team I hired made all changes, and anything I asked for was done indirectly through them. This worked for the most part (indeed, it's why I hired them!), but we recently ran into a snag with the game download system. It seems the CMS we're using doesn't have a good fit for the way NEO Scavenger file access is controlled.

Ultimately, we decided to revert to the file access system I wrote on the old site. It works, and has no known issues for now. Well, except for one: I'm the only one who is familiar with it :)

Hence getting me direct access to the server. This was always something I intended to get at some point, if nothing more than to satisfy curiosity. But this system setup pushed that need up a bit in our schedule. Fortunately, getting access wasn't as hard as I expected. The main thing was to get an SSH key setup on the remote server so I could log in and use git to update the server files. Also, it lets me use SCP (a fancier FTP) to upload game files to the server, which was the main reason I'd use it later on anyway.

So far, so good. My minor test edit is now live, and tomorrow, I'll likely start the bulk upload of the system for testing.

The second task was a lot less glamorous (yes, really). You know when you buy NEO Scavenger from my site, how it goes through FastSpring to process payment? (Of course you do! Wink wink.) Well, that shopping cart/payment flow needs the new site design, too. And the way it works is to basically copy the html and css files from the new site and make a template out of it.

It involved a lot of trimming unnecessary code, copying and pasting, minor tweaks, and trial and error. However, there is now a shiny new order template sitting on deck at FastSpring for when we flip the switch. One less thing on the list!

And that was it! That was my exciting webdev day. As I said above, tomorrow will likely require some more as I upload the file access code and test it. But hopefully, that's the last major thing I need to do for the new website.

Webdev Setup, and Some Orbital UIs

Hey Folks! Still a bit of downtime as Tiago finishes up the DPI-switching code, so I continued my resurrection of the orbital plotter prototype today. I now have the orbit plots aligned with the display center, and scaled to "kiss" the edges of the display. This will be my default 100% zoom of an orbit, from which I can start scaling up or down to represent zooming in/out.

The next step will be mapping a combination of zoom amount and physical distance to the display, so I can just pump some actual planet data into it and still see them on the screen. Eventually, the idea will be to start animating them based on the passage of time, and hook up some nav UI to plot the ship's position in the System.

I'm expecting flight to be somewhat indirect. It'll be mostly plotting routes, calculating supply needs, and waiting. I may have small sections where the controls are more direct, for things like docking clamp alignment, or maybe mid-route orientation reversal to begin deceleration. But no dogfighting or anything.

I think. I did rather enjoy planetfall in Starflight, so I'll have to see how that feels when I get there.

Before I could get too far along, however, the webdev team sent me notification that I was granted git repository access. Basically, this is access to the version control for the new website, so I can start uploading some of the more custom game-file-download system I built for the old site.

Unfortunately, this means ramping-up my knowledge on a constellation of systems, from types of git flows and bitbucket, to SCP, bash, and RSA keygens. I'm half annoyed that I have to do this, but on the other hand, I should really learn how to do this in case the poop hits the fan. Once this stuff is in place, I can still rely on the webdevs to maintain 95% of the site. But I may need to get in there for edits to this custom job if there's a hurry (or I want to save money by not paying for their ramp-up of my systems).

Anyway, more of that tomorrow!

Hope for a Crash Fix? Plus New Track, and Orbits

Hey Folks! Hope everyone had a good weekend. We decided to have fun this weekend, as opposed to unpacking/cleaning/fixing the house. Hawaiian poke, gourmet cupcakes, pho, and lakeside burgers were among the highlights. Yum!

I apologize for the lack of news Friday. Part of said weekend o' fun involved quitting early Friday since there wasn't much on my plate for once.

Exciting news from Friday, nevertheless: Tiago figured out what causes iPad 3 crashes! It turns out our very own fix to make it look good on high DPI devices (e.g. iPhones 6 and later) didn't sit well with iPad 3. Our guess is that since iPad 3 lives in a weird limbo where it has a retina screen but pre-retina hardware to run it, things get bogged-down on that device. The iPad 2 lasts a bit longer due to the lower screen resolution, and probably, the iPad 4 would last longer due to the beefier hardware to run the Retina screen.

So that's the good news. The bad news, is we don't have a way to make it work on both High and non-High DPI devices yet. The current plan is to see if there's a way to switch this rendering mode at runtime by detecting the device before launch. But this sort of device polling has already proven tricky, if the iPhone 6 fix was any indication.

I also finally finished uploading screenshots for all app stores and device sizes Friday. It took longer than it should've, but I should hopefully be set for a while.

For today, work mostly focused on admin stuff, and providing feedback to Josh on his latest track. He sent me a new piece to be used in a slick lounge/bar where players can recruit folks, or just get some R&R. His track was good, but there as this one bit I really loved and wanted to hear more of. His revision pushed it a bit more, and I think it'll fit well.

I'm planning to have three "styles" of bar. The aforementioned "slick" one, a techno one I've mentioned in earlier posts (like the bars in Shadowrun Genesis version mixed with Tech Noir from Terminator), and a backwater bar. This last one is where I spent a bunch of time collecting some examples of what I have in mind. We'll have to see if Josh thinks he can make it work or not.

Finally, since I'm still in a holding pattern on just about all things, I dusted off the old space prototype. Took me a while to figure out where I left off. I had to disable an audio-looping experiment that I wired-up when Josh and I were tinkering, and then I had to re-enable orbital track plotting for a UI I was working on. But that's back up and running now, and I started working on making the orbital plotting use actual data instead of test values.

It feels good to be playing with that code again. I'm anxious to resume!

Fix Fake-out, Crafting Fix, and Store Updates

Hey Folks! We had a brief celebratory moment this morning when we thought the crash bug was fixed. But after more testing, it appears there was a false success. My iPad 3 is still crashing intermittently when on encounter screens.

What's interesting, though, is that this is even after fixing memory leaks. The memory footprint was rock-solid for several minutes before the crash, and no spike/allocation could be found prior to the crash. It just...crashed. (This was using XCode's Instruments, no less. So I'm fairly confident in the metrics.)

So if not memory, then what?

I also managed to find another iPad 3 user to verify the crashes, which is again both good and bad. Bad because it isn't just my machine, but good for the same reason. At least now we know it's an architecture-bound issue, and not just some settings/installation thing unique to me (and potentially many other users in the future).

In any case, the investigation continues.

I did manage to solve that crafting bug, though. It was down to a destructable tool ingredient with a consumed ingredient inside causing a sort of race condition. The game helpfully tries to restore any items inside a destroyed tool during crafting, but in this case, that item was meant to be destroyed (and was in a separate code section). I ended up having to add a null-check in the restoration code section to make sure it didn't try to clone a destroyed item.

The website is still having issues, but they're going to get me setup in their git repo so I can start making edits myself. Since I wrote many of the pages, I can probably nip the user logic errors in the bud pretty quickly.

Finally, I've started uploading screenshot assets to the Apple and Google stores. It took a while to get good ones (showing interesting samples of gameplay, and also in each aspect ratio), but I have a good stable to work from now. The next trick is making sure they're ideal sizes for each store.

Apple was actually really easy in this regard, with specific requirements per phone/tablet section. (Expected, since they have fewer devices in their range.)

Google, on the other hand, is really vague. "Provide smartphone, 7-inch, and 10-inch" versions of each screenshot to be featured in both phone and tablet sections. Okay, fine. But what does that mean? How do I denote a 7-inch screenshot aside from just putting it in the appropriate slot? Or is that what they're saying? Like many things Google, it's probably really logical, just unclear to noobs :)

Anyway, moderate progress today. Could be better, but also worse. Hopefully, we have a stroke of genius soon!

Memleak Is Back, and Brought His Minion, Crafting Bug

Hey Folks! No fix for the iPad 3 crash bug yet, but the situation is developing.

It turns out this may be a memory leak after all. Tiago got his hands on an iPad 2 for testing, and while the timing is different, the outcome is similar. He was also able to spot some weird memory usage patterns. Up until now, I've erroneously thought my iPad 3's memory usage was stable, but could confirm in my latest tests that it was going nutso. Like MB/s increases and then garbage collection.

What's more, the increases start fast and small, and get slower and larger as time passes. This could just be a memory reporting idiosyncrasy, but I think Tiago is confirming it in memory profiling tools outside of the game, as well.

So what does this mean? Well, for one thing, maybe our memory leak has returned. Or else we have a new one that is quite aggressive and sudden. I guess the good news is that we have a better idea what we're looking for now, and maybe even some crash logging to help. But no fix just yet.

I also stumbled across a bug during some testing today. I decided to start an earnest playtest as a way to start collecting useful screenshots for the App Store. And while crafting boiled water in a whiskey bottle, I managed to crash the game.

This sounded familiar, and checking over my issue list, I found why: one of the beta testers noted a similar crafting issue a couple weeks ago. One which I was not able to reproduce.

The trick, it turns out, was that I had to craft boiled water with a whiskey bottle while the water was inside. Water outside the bottle won't do it. From the looks of it, the water in the bottle is getting destroyed/nullified before the recipe is done with it, possibly as a result of destroying the bottle before dealing with the water? I'll have to look into it more tomorrow.

But 100% repro steps are a great start! Now if we could just figure out the source of that leak...

Setbacks On Two Fronts

Hey Folks! Unfortunately, both the iOS and website situations experienced some setbacks today.

The draw call optimizations Tiago recently made haven't stopped the crashing on my iPad3. We think it has affected the rate, possibly for the better. But we're still seeing crashes in the ballpark of 1-5 minutes on encounter screens, and 0:40-2:00 on the hex map. Still short enough durations that regular users will hit them in normal play.

The good news is that disabling the message window (1 lass draw call) may have fixed this, so at least we have a way to avoid the issue. (Thanks, ra1 for the idea!) The tricky part will be finding a way to take advantage of this without hiding important UI items.

On the website project, the full version download feature revealed some serious flaws. It makes it possible for any registered user to download the game if they know the special URL. That, and Yukon customers have no way to get their special versions.

I've asked the web devs if this means we should revert to the old (current site) way of handling files. They think it might be the same effort to go either way, but that it'd be ideal to push forward and use official plugins and features of the CMS instead of homebrew systems. I can see their point, particularly since my reasons for hiring them is so I can offload web maintenance and dev. So we'll see where this goes.

Not a great day for dev, unfortunately.

In other news, Josh's latest track is in, and has a decidedly "Tech Noir (Terminator) meets Mass Effect club" vibe, which is perfect. Old and new simultaneously :) It's slated for use in techno-club style venues on stations and colonies in the space prototype. (Think Shadowrun Genesis bar music.)

Also, the accountants finished my corporate tax return. Nothing owed nor refunded, which is good. But yet another expense. This should be it for the year, though!

Hopefully, more successful news tomorrow. Fingers crossed!

Building On OSX, Draw Call Culling

Hey Folks! Hope everyone had a good weekend. We did some local neighborhood clean-up volunteering, and yet another round of home improvement/move-in/cleaning. So pretty busy! We celebrated our hard work by getting tipsy on a bottle of Semillon, eating cheese, pickles, and bagels, and watching Arrival. Would do again :)

Today, I decided to bite the bullet and try to figure out building the iOS version on my MacBook. Up until now, Tiago has owned this process. (Indeed, his mobile expertise was a big part of why I contracted him!) He also graciously created a wiki for me a while back to show me how to build and test iOS locally on my iPad. I've sort of been dreading trying this, but with the project nearing launch, I'm going to need to know a bit more about how this works.

Overall, the process has been slow, and error-prone. But it has also been progressing steadily, which isn't always the case with Haxe stuff. I had a few minor updates on OSX to get out of the way, and then went through the process of installing Haxe and haxelibs (which is actually not too bad).

Getting the correct versions of libs is a bit trickier, as some need custom versions, recompiling, etc. But I think I got most of that squared away, too.

Getting XCode to play nice with Haxe is voodoo from my point of view. If it weren't for Tiago's wiki, I'd be lost. So I was fortunately able to stumble around the foreign IDE with his map in hand, and am now at the point where I can start the build process.

Unfortunately, that's where my progress ends for the day. I seem to be running into a compile error in the generated C++ code that tries to cast an item handle into an int, but no valid conversion exists. My first instinct was that this might be a lib mismatch. But my attempts to realign libs hasn't helped yet. I'll try again tomorrow.

Meanwhile, Tiago is refactoring a bunch of the mobile project to use fewer draw calls. Our operating assumption is that the random crashes I see on iPad 3 are due to excessive draw calls. And since they only occur on screens with 3+ calls, that seems like a sound assumption.

He's making progress, but there are several UI screens that each need their own solution to reduce draw calls. So he has a bit further to go before we know more.

Not very glamorous, as you can see. But necessary work, all the same!

Pages