Posted on 03/27/2015 - 16:27
After a few more unsuccessful tests, I think I'm going to put the AIR Android stuff aside. I just can't seem to get a Context3D on my Android tablet, and I can't tell if it's a shortcoming of the tablet, my code, or my project settings. I can get the Context3D when running on the emulator, however, so my guess is it's the tablet.
In theory, I could just go to the store and buy a more modern Android tablet. Mine's an AGPTek Wondermedia 8850-mid, which has zero support, and I suspect a GalaxyTab or similar mainstream tablet would make it easier to rule-out hardware/driver issues.
However, I do have one other trick up my sleeve: Haxe. I could always try porting NEO Scavenger to Haxe/OpenFL/HaxeFlixel, and see how that runs. The last time I looked into this, I decided against it since I was in mid-development. The downtime and risk was too high.
Now, though, the game is out, so I have time to explore what's next. And since I plan on using Haxe/OpenFL/HazeFlixel for any sequels I do, this work achieves two goals at the same time.
Before I commit to that path, I figured I'd try to get a test app running on my tablet. I took a tile-drawing app I made in Haxe a couple weekends ago, and compiled it for Android. I needed to download Android SDK v16 for some reason (I had v22 installed), fix a JDK path issue, and learn a bit about adb (a command-line tool to connect a PC to an Android device).
Or so I thought. That last "adb" thing wasn't my issue. Instead, I realized I needed to give my app a "package name" like com.bbg.myapp. I think Android needs this to identify an app, even though Windows does not, and I was missing that setting in my project.xml.
Anyway, with that setup, I was able to press F5, compile the app, and get it running on my tablet! I drew "hello world" in tiles on the touchscreen with my finger.
And, as a bonus for my learning about adb, I was able to get this all to work over wifi! No more usb connection to the tablet to make it run. I could hit F5, wait a few seconds, and it would download via wifi and launch on the tablet with no intervention. Cool!
With that working, I may try porting a subset of NEO Scavenger to Haxe next. The title screen, with it's scrolling background, was already slow when I tried the AIR Android version on my tablet. If I can get that menu screen to work, and it seems to run faster, it may mean it's worth porting more of the game.
And if not? Well, maybe mobile isn't meant to be. However, it may still be a good starting point for figuring out how a sequel will handle graphics stuff. Or maybe I need a new Android tablet to rule-out hardware/drivers, once and for all.
As for NEO Scavenger PC edition, I still have some bug fixes awaiting a new build/upload. I'll probably try to get a few more fixes in before packaging another build. I have plenty to choose from in my backlog, but I'm hoping some clear winners become apparent.
That's all for this week. Hope everyone has a good weekend!
Posted on 03/26/2015 - 16:16
I'm still not getting anything rendering on my Android tablet. After some mucking around and writing a bare-bones Stage3D initializer, I was able to determine that the tablet is not supporting any of the Stage3D contexts: baseline_extended, baseline, and baseline_contrained.
What this means is that the current code will only work using a software renderer (i.e. the CPU), and will therefore be slow. However, I'm not certain if this is that straightforward.
According to the docs, my tablet does have a GPU on board. And it's possible that the compiler I'm using is somehow at fault. When I looked at what AIR version I was using to compile, I was at v3.9, while Adobe has v17.0. "Whoa," you exclaim, "you're 13 versions old?"
Adobe decided, for some reason, to skip straight from v4.0 to v13.0. So that accounts for 9 versions. Confusingly, they also gave (?) Flex to Apache Foundation, and now there are AIR SDKs, AIR+Flex SDKs, Flex SDKs from Apache, and all kinds of crazy combos floating around. I don't know which one I'm supposed to be using, nor why.
What I do know is that I'm out of date. In this version-checking, I also noticed my FlashDevelop was a few versions old. An upgrade was necessary to be compatible with the latest AIR. Furthermore, my version control software, SVN, was out of date, and required an upgrade to work. Yadda yadda. It's the cascading upgrade dance.
So here I am, downloading SDKs, IDEs, JREs, JDKs, Android NDKs, SVNs...and I don't even know if this will help the particular Android tablet I'm using. There are probably a few hundred others out there I haven't even begun to test.
Have I mentioned that mobile development is a pain in the ass?
I guess I could work with someone to do the mobile port. I'm not sure I'm ready for that route yet, but some folks are out there and have offered. We'll see.
For now, I'm going to try a few more things to see if I can make any headway. It'd be nice to at least confirm why this isn't working, if I can't get it to work.
Hope your day was more productive than mine!
Posted on 03/25/2015 - 16:33
I spent a few more hours on the GPU renderer update today, and finally got NEO Scavenger to select the GPU renderer (GR) and to run. However, it immediately crashed. Apparently, the GR was trying to do something that was restricted to "baseline_extended" or "baseline" contexts. Since these were things I didn't personally control, I had to dig through a bunch of code.
And unfortunately, the Genome2D renderer was recently converted to what's called a compiled SWF, or SWC file. Coincidentally, this is because the owner of the code is changing it from AS3 (Flash) to Haxe, so they can use it on multiple platforms. That's actually good for making his life easier, but it makes debugging a Flash app harder. With a SWC file, I can't really see what's going on in the debugger if there's a crash.
I briefly considered reverting to the pre-SWC version from GitHub, but the Flixel branch I was using required the latest Genome2D (v279).
Failing that, I decided to do some manual digging through the Haxe code. Fortunately, I can do that easily in FlashDevelop, where I code NEO Scavenger, so I didn't have to jump through multiple apps to trace the code. Unfortunately, it was mostly searching files for text, since the more sophisticated code reference tools only work if the code is part of the current project. Again, SWC doesn't count in this respect.
After a few hours of messing around, I eventually found the code that sets what I think is the rendering profile. And from what I can tell, it tries "baseline_extended," "baseline," and finally, "baseline_constrained" if the first two fail. I tried omitting the last option, to force one of the first two in hopes it might satisfy the original error message. And it did! I had some weird missing sections of the game screen, but it ran on the emulator.
Unfortunately, that wasn't the case for the tablet. I just got a black screen. And unhelpfully, no error messages.
Since NEO Scavenger is such a huge project, with many files, I decided maybe I should simplify my testing by creating a simple Flixel project. It wouldn't have any data or extra code, just a simple "Hello World." This sped up iteration and build time, and allowed me to rule out complicated sections of NEO Scavenger's code.
As of this evening, I was able to get this project rendering normally on the emulator, but I still get the black screen on the tablet. I can, however, spit out debug text into my debugger using trace(), and this has revealed that the "Context3D is not available" on the tablet. An unfamiliar error to me, but I believe it's something I can work with. Maybe this is just a setting I'm forgetting, or maybe my tablet truly doesn't support GPU rendering? We'll have to see.
Apart from all that (not) fun code flailing, I also spent some more time discussing options with prospective publishers, partners, and the like. You know when you were a kid and you saw movies/shows where a business owner is on the phone negotiating, reviewing prospecti, estimating sales in regional markets, making deals, and generally being a grown-up? This may be the closest I've gotten to that in my life. It's actually kind of cool, believe it or not. I find business stuff strangely addictive.
But man, it is exhausting. It's basically due diligence and value judgements for hours at a time. Examine every detail, follow links and read up on businesses. Number-crunch past performance, and try to project the future. Decision fatigue is most definitely a thing. By the end of the day, I hardly have the mental endurance to choose a show to watch or game to play. I just stare at the computer for minutes...hours.
It's weird to be such a fan of games, and at the same time, to be way too tired to want to play any. Hopefully, some of this harder decision-making will pass, and I'll have more energy again soon.
Have a good night, all!
Posted on 03/24/2015 - 16:20
As you've read in previous news items, the NEO Scavenger mobile port has its share of pitfalls. Performance is pretty abysmal on my test Android device. And this was even after using a special branch of flixel that was supposed to enhance mobile render speeds.
However, I made a discovery the other day which gave me some hope with the mobile port of NEO Scavenger. Namely, the special flixel branch that I used had two branches of its own. The one I grabbed still uses the old flixel blitting renderer, which is slow on mobile. But there was a dev branch which was using an experimental GPU renderer, called Genome2D. From what I can tell, the dev version lets developers choose whether to use the blitting (CPU) renderer or Genome2D (GPU) renderer. So I decided to give this a shot.
The first order of business is to merge my modified flixel changes into the GPU branch, and get my project compiling. This turned out to be an all-day affair, as whoever made the GPU update decided to seemingly move every class file into a new folder. I spent about an hour trying to get my project to see these new paths before I said "screw it, I'm moving all these files back to where they were." After some more path-fixing to make the GPU code work with old flixel paths, I was able to get it compiling.
The next step is to figure out how to make sure NEO Scavenger uses the GPU renderer. I think this'll just be a flag I have to set somewhere. And once that's done, I'll have to see if it runs any differently on my test tablet. (Likely tomorrow.)
I've also been using some spare time to fix bugs in the game. Modders found some bugs with the way the game loads modded campsites and items that ignore subgroup IDs when stacking. Both of these turned out to be issues in the ID remapper, where it was not correctly reserving new IDs for modded data. I fixed both of these in the code yesterday.
I also took a suggestion to change the loading screen such that clicking anywhere no longer loads the BBG website in a browser window. Instead, now only the BBG logo will have that click behavior.
Finally, it seems like a switch went on with publisher awareness of NEO Scavenger. I've had several publishers contact me recently about partnerships, especially those offering marketing/PR services. I'm not sure if I want to go the partnership route just yet, but I'm in discussions with them to see what they offer. It can't hurt to know what my options are. I'm certain they can do better at marketing the game than I, but my question is whether it'll fit the current business philosophy I have. We shall see!
That's all for now. Hope everyone has a good night!
Posted on 03/23/2015 - 07:20
Good news, everyfolk! NEO Scavenger is on sale for the first time since launch!
GOG is featuring a sale called the Weekly Staff Picks: Roguelikes and the Like, of which NEO Scavenger is a member! For four days between Monday the 23rd and Thursday the 26th, NEO Scavenger is 33% off, or $9.99 (US).
So if you've been wanting NEO Scavenger, but were hesitant about the price, this is your chance to get it at pre-launch beta pricing.
What's more, be sure to check out the other roguelikes GOG has in the sale, including Tales of Maj'Eyal, Rogue Legacy, Tower of Guns, and Ascendant. Much
death fun awaits you!
Posted on 03/20/2015 - 16:01
I finally got around to uploading the photos from PAX, including some my folks took during setup. And since they are pretty large, and this site tends to limit photos to 600px wide, I decided to upload them to a Google Photo Album so they can be seen larger:
Jody (my brother-in-law) and I surveying our camp.
I've captioned each photo, too, if you want some more context (and witticism) :)
So come one, come all, to Camp NEO Scavenger! See how we built it, and what the view was like from the trenches. Hope you enjoy, and have a good weekend!
Posted on 03/19/2015 - 16:24
I dove back into the Android port tests today. And I actually made some progress on the performance changes to code. However, I'm not seeing much (if any) improvement.
When we last left off, I was trying to merge my custom flixel changes into a flixel_community fork, which ostensibly leverages special GPU-accelerated code from Adobe. It took a few more hours of fixing missing code and copy/pasting, but eventually I got NEO Scavenger working with the new flixel_community branch. I fired it up, and was able to do most normal things without error on the PC, so the next step was to test the tablet version.
The result was pretty underwhelming, though. In fact, there may be no difference at all. I tried both "Auto" and "Direct" rendering modes, which are supposed to try GPU and fall-back to CPU, and force GPU, respectively. Neither seemed to make a difference.
I decided to look around for ways to profile the performance, and maybe see where all the slowdown is happening. Traditionally, I've used a tool called TheMiner for SWF profiling. However, it wasn't as useful for the AIR app.
Instead, I found out that Adobe has something called "Scout" which can profile any running AIR app. I downloaded that, as well as some clunky python script to make it work with FlashDevelop, and managed to get it live-reporting on the app on the PC.
The results were none too surprising. Something like 90% of the framerate was being spent on bitmap.copypixels. Which is something that I already knew about the old flixel version I used. So it would appear that maybe the new branch doesn't fix the issue I had hoped it would.
One possibility is that I haven't used the new branch's full power correctly. Maybe I need to tweak which copypixels method calls I use? Also, it occurs to me now that all my testing today was using debug builds. It may be that the release builds make a difference. Though, I'd expect that even the debug would run faster if it were actually using the GPU.
There are still a few things left to test, at any rate. I'm less optimistic, though. But for now, it's the end of the day. Hope everyone has a good night!
Posted on 03/18/2015 - 16:10
I did a bit of modding documentation today, at the request of modders. There's now a complete listing of all creature fields that can be modified through conditions. It took a few hours to get it all into one document, as I had to comment some fields that were missing info. (I know, bad programmer :) However, it is comprehensive, and probably even exposes some fields previously never used by game data, which could make modding interesting. (E.g. the creature sprite's x and y position may be moddable?)
And since I was in there, I also decided to do some modding forum housecleaning. We were getting a lot of stickies, and some had less-than-helpful titles. So what I've done is to consolidate them all under one sticky, NEO Scavenger Modding Documentation. That way, I can add a little explanatory text and headers to make them more visible. I also took the liberty of editing a few thread titles for clarity.
Apart from the documentation, I fixed a bug in the master volume that was preventing user preferences from being saved. It should begin remembering correctly in future builds.
And finally, I spent a decent chunk of time emailing some service providers about business stuff. PAX put me in contact with several interesting folks, and I'm feeling-out potential partnerships and services now. When it comes to business, though, I'm one of those annoying customers who asks endless questions and kicks the tires :)
Anyway, hope everyone has a good night!
Posted on 03/17/2015 - 16:18
Today was my first normal day in a while, and it felt good. Most of my messages are caught-up, no appointments to interrupt me...just time to work.
And incidentally, I worked on a modding bug that Kaaven brought to my attention. It appears that there is an ID remapping issue that sometimes appears when a modded encounter refers to multiple modded ingredients.
After a few hours of tracking it down, it turned out to be a problem with the way the game reserves future ID numbers for things I hasn't loaded yet. In mods, data IDs need to get remapped internally to avoid confusion. Two mods may use similar IDs, and the game tries to sort them out to avoid collisions.
Sometimes a piece of data that's being loaded refers to other modded data that will be loaded soon. And since we don't know what that future data's ID will be (since it hasn't been remapped yet), the game tries to guess. Normally, this works fine. The game will just look for the first unused ID and reserve that.
However, it appears that this was only working for data that was stored in array (list) format. Some types of data are stored in dictionaries (a.k.a. hash tables), and these types were not setting aside new IDs for each new datum. The result was modded data that reused certain IDs, causing conflicts in the mod.
I think I've got this sorted out now, and will add this to the next test build.
Apart from that and some business emails, not much to report. It was a busy day, despite not having much to show for it. Hope everyone has a good night, and see you tomorrow!
Posted on 03/16/2015 - 16:13
I think the bug's on its way out now. Symptoms are abating, and the biggest remaining issues seem to be fatigue and bloody nose. The former is probably just due to body being on overload. And the latter may just be a matter of bad timing (seasonal changes, dry indoor air, and illness at the same time). In any case, I'm optimistic.
Despite the recovery, though, today was fairly low on productivity. Rochelle and I had an endless list of errands to run today, many of which were in town. We decided that since we had two appointments, we would just pack everything in today so we can proceed with the rest of our respective weeks uninterrupted. The good news is that they were mostly one-off chores that shouldn't come up again for a while.
I still have some emails I'm catching up on from my PAX absence, plus that Android build is still taunting me. I'm hoping to get back into some code tomorrow.
Until then, hope everyone has a good night!