All ideas expressed in this blog are temporal and any resemblance to manifested reality are purely co-incidental. The forgoing is a casual musing from a fellow coder, not an iron clad promise of features and products - The Law
Someone Once Said.. ..that a change is as good as a rest, and I believe the actual wording of the original quote went further and proposed that a 'change of work' was better than a rest. Having tried actual rest, I found it utterly boring, so I decided to do something a little bit different as my form of 'advanced rest'. Hello Mr Android As some of you know before FPSC Reloaded, my chief concern and overriding project was AGK (App Game Kit) which allows anyone to code in a simple to use BASIC (or C++) language and then deploy to a wide variety of platforms including Windows, Mac, iOS, Blackberry and of course Android. It was handed over at the start of the year to Paul, the real architect of the engine and current custodian of all things AGK flavored. Since completing the initial run of Driving Test Success products at the start of the year, I have been pleased to see the proliferation of Android devices and the sophistication of what they can now do. The main reason I prefer Android over iOS is that Google kindly allow us to ship our AGK Player without undue restriction whereas Apple rules prevent the same app distributed through iTunes. The AGK Player allows any developer to 'instantly' broadcast their app to the device and run natively at full speed, without the need for complicated debug setups or submitting the app to the various stores first. I have also been lucky to obtain a few Android devices that sport the new x86 based architecture, and I have spent the day trying out various AGK apps to see how they performed. I also had the opportunity to try out the new WiDi technology, which allows you to project the contents of your mobile or tablet screen direct to your TV. Lee Makes a Video I had always intended to make a video around Android and WiDi as it's a great way to demonstrate what the technology can do. As most of you know, I don't have the time these days to indulge in coding for the fun of discovery, but I had a few ideas and wanted to put them out there. Hopefully someone in the AGK developer community will pick up the battens and run with them.
The video is over ten minutes long so I would make a cup of tea before pressing play. I must confess to a little self-publicizing, but I am quite proud of the DTS app range currently riding high in the Android and iOS charts, and wanted to blow my trumpet. AGK Factoids Did you know that many tools that promise 'easy app creation for Android' are often built upon a succession of high level layers that degrade overall performance? Many use Java/Dalvik or HTML5 style abstractions to fuel their particular engines, and your app creations sit on top of that. By the time you get down to the metal, your app is so bloated you're lucky to get even 50% of the performance you could have had. AGK is designed differently, with it's engine coded entirely in NDK (C++) and compiling down to pure machine code. Any AGK app created in C++ compiles right down to the native architecture of the device, so if you have an Intel x86 architecture running some impressive clock speeds, an AGK app would run as close to the metal as it's possible to get, providing a VERY fast app experience. If you use BASIC, the resulting byte code is processed through an insanely tight and uncluttered switch case, losing only a marginal drop in performance, and only then for extremely large programs. It is for these reasons that AGK is an ideal language and developer platform for fast apps and games, and why it should be your first choice if speed is your top priority. Not just the speed of the engine, but the speed of app development, helped along by its battery of easy to use commands, extensive app examples and helpful community. A Successful Kickstarter In case you missed the news, we also massively succeeded with our AGK kickstarter campaign earlier this year and as I type, the features are being coded thick and fast, and early prototypes are looking very cool! http://www.kickstarter.com/projects/tgc/app-game-kit-v2
You will notice from the kickstarter list that we also included full OUYA support, which is one of the first full Android consoles to hit the market. We anticipated demand for this, and had the device in our hands hot off the manufacturing line. Watch the AGK forum and news feeds for the release of full OUYA store and controller support in a future AGK update! Signing Off As much as I have enjoyed today's advanced rest, it's now time for some real rest in the form of many Z's. Before I go, I wanted to thank the AGK developer for the title Neon Bunniez, now available on Google Play and getting some great feedback. It's simple, addictive and well rounded, and a perfect demonstration of fast and smooth game play. Nicely done! Here is the link: https://play.google.com/store/apps/details?id=com.joshwebsites.nb
Normal Reloaded blog news resumes on Monday as per usual, with a strong focus on the strange 'stretchy character' issue and the improvement in performance through shader reduction and geometry batching.
Our First Update I can announce we've just released our first update to the BETA, which goes out to all pledgers. You can find it in your My Products section alongside the main BETA download dated the 8th. The software will show you all the changes that have been made via a prompt at the start, and you will find a summary on the main website. Tweaks A lot of the changes are mainly tweaks, and additional sliders to help with performance. I have also added a LOW FPS detector, which will allow you to instantly select better settings for lower end graphics cards. I also recommend you check out the new drop down items in the World Settings, which is still my favorite feature of this update. DarkSHADER Update We have also updated the DarkSHADER product for those users who own it, which will now allow you to take the terrain shader from Reloaded and tweak it from within the tool. I suggest that you are comfortable with shaders before embarking on checking this one out though, as it can get pretty technical. More Tweaks I had half-planned to do more character AI work for this update so the enemies where a little less silly but I just about ran out of time. The new update improves characters marginally, and they can no longer shoot at you from an insane distance. The next update will contain more fixes in this regard so that characters can be shot every time and that they are aware of where they are and you are during combat. After some basic AI fixes, I plan to look closer at my shaders and see if I can create some low-end shaders that can be switched too from the graphics panels. When I saw one report from a user running only 33K polygons at 10fps, I began to realize that a few systems out there will really struggle with the pixel shader 3.0 files I am using. Stepping them back down to PS2.0 level might provide a huge speed boost with only a marginal loss in visual fidelity. Signing Off Another fix was to restore the desert textures, which we had overlooked with all the fun of our new lush terrain.
One option was to pursue entity and shadow batching to reduce draw calls, but on reflection I decided reducing the shader size was going to yield more performance so batching can wait a few days. I am rather pleased with how the LOW FPS warning worked out, as even on my PC I can create some levels which are pretty hungry and a single click will bring it back up to playable speeds. With more of the essential tweaks complete, I have bought myself a little performance tuning time for next week. I would be tempted to use the weekend for such a pursuit, but it's been a crazy few days and a day off might be in order. Pity the weather does not agree with me at the moment!
The Trouble With Physics Having explored the myriad solutions to my immediate problem, that is, to ensure the player did not fall inexorably to his or her death upon starting a level, I had a wonderful time discovering why this case of affairs was so. The good news is that I found the exact piece of code responsible, but the bad news is that the solution was entirely evasive. I have not given up, but it takes a fresher brain that the one I adopted Thursday to solve it. Fear not, however, as many of the items required of me have been completed in time for Friday's update. The only hold-out is the mystery of the random vertex glitches suffered by the character and weapon animations, which both relate to something in the shader bone matrix system. This is the origin of my search and hopefully the solution. I often vex against bugs that are impossible to reproduce, but this is the rare occasion where a bug can be reproduced perfectly every time but the cause (and subsequent solution) is as illusive as a midnight thief. My hope is that Friday gives me enough hours to solve this perplexity, but in the meantime I can report that the vast majority of little niggles are gone (at least as far as my immediate list is concerned). Some of the fixes are very minor, but being able to scroll left and right when placing items on a table really count towards the feeling you get when using the software and a small adjustment can mean a great deal. I am sure a full catalog of fixes will be reported on release of the update ;) Poor Eyeballs On a personal note, these new glasses are giving me grief. I've gone to bed three nights in six with a penetrating headache, something very uncommon for me. I am tempted to solder my old glasses (which snapped in the mid-section) and continue with my old perscription, but who knows what mysteries are contained in the eye, and perhaps these headaches are just my brains way of adjusting to the 'correct' focus between me and the monitor and keyboard. I will try them for another week and if this persists, consult another optician for a second opinion. I don't think it's required that every day of coding should be accompanied with a nighttime of pain!
Signing Off I would have liked to have done more today but perhaps I burned out my brain cells the night before. The good news is that you're getting 95% of the intended release, and if I get a flash of inspiration between this sentence and the final upload, you will get 100% :) I suspect vertex buffer or bone matrix constant buffer corruption, but without a more aggressive analysis I won't know which. Seems like the perfect time to break out one of my per-frame GPU analysis tools, and see how versatile they are. I'm old school, which means writing everything yourself, including performance and graphics analyzers so it will be interesting to hand over the detective work to an outside agent and see what results we uncover. If I survive the ordeal, I will report my findings Friday. In the meantime, thanks for your eyeballs and keep one of them trained on the downloads page when a Friday update is winging it's way to you. I did say only Gold pledgers would get new content, but I simply could not resist including the new sky and bridge pieces so everyone can play around with the new stuff.
List Hopping A rather ordinary day in the life of a developer. A few emails, a few cups of tea and LOTS and LOTS of coding. I have a mission to complete a small mountain of issues for Friday so have been getting my head down and cracking on with everything. See the web site for news on what I am up to, but they pretty much range through the whole engine tackling little bits. A Big Bit I did add a rather nice new drop down gadget to the slider panel system so you can easily select the sky, terrain and vegetation type you want. It works quite nicely, and at some point our 2D artists will be free to improve the cosmetics of the whole panel system. The drop down system is pretty neat in that is just scans the contents of the sky, terrain and veg bank folders at the start, then allows you to select which one you want. It's pretty neat actually and I think it will be the main feature you will like in Friday's version. Other Bits I also dug out the Game Creator Store code and got it working with our VS 2010 redistributables after much ado. It's a back-burner integration but it will probably come in sooner rather than later, and I have also improved the legacy support for static entities so old models from classic will now be infused with the new in-game entity shader, and provided with a default normal and specular map if none are present for the entity. I have also commissioned a guide to be written next week which will cover all the basics of how to prepare an entity for Reloaded, which will be an ideal guide on how to get your favorite classic models into the new software. Signing Off Rick asked me to improve the random terrain generation so the landscape was more 'interesting', but not 'Lee Crazy Interesting', so here is what it produces now when you start the software and when you select a New Level:
Hopefully it's not too crazy for your consumption. The system will raise some ground if the random generator places you in the center of a lake, as I assume you always want to start your landscape creations from dry land :) NOTE: If anyone wants to send an old legacy static entity to me, one that you wanted in Reloaded but it failed to look right or collide properly when you imported it, email it to me in a zip to lee@thegamecreators.com. Thanks!
Performance Gives Way A strange mixed bag of a day, with some phone calls, email chasing, an interview and quite a few non-performance tweaks in the latest build. I also had a few static entity bridges lying around that I added to the library too.
Not my best shot in the world, but not bad for only a few minutes of messing about while working on the physics stuff. The latest build now fixes the strange physics issue with dynamic objects sinking into the floor due to an error in how the physical rotations where applied to the visual objects for rendering. I also changed the way Reloaded understands the 'collisionmode' flag in the FPE to increase the change that legacy artwork can load into the editor with full polygon collision in tact (so you can go into buildings designed to do that). The downside to activating polygon collision on static entities is that they are insanely hungry for performance. We are not yet at the stage where we can happily throw thousands of polygons at the player and expect him to jump. For a single core CPU solution we still need to watch what polygons we move close to the player and dynamic objects, and if possible, to use rotated boxes. I intend to write a simple 'physics editor' which can produce a composite of boxes to represent an entity and then use that in place of a complex polygon soup which is not only bad for speed but also confusing for a physics system which has to solve it 60 frames per second. I can turn a bridge piece which contains over 200 collision polygons and produce a shape with three sized boxes, making the collision on the bridge smooth and super fast. Naturally this needs to be done with EVERY object, but the payoff in amazing. Another one for my list, but when you start seeing slow-down when entering polygon soups, you will be requesting this new physics approach daily! The Fisheye Problem I have been getting letters! Apparently the render on Reloaded looks a little 'fisheye'. I keep stating that it's just the product of FOV and ASPECT, and entirely the result of a simple left handed perspective projection, but no-one quite believes me. If anyone is getting 'fisheye', turn your FOV down to 60 and then let me know if you still suffer from it. Here is a typical scene from Rick:
And here it is when you glance upwards:
Is this normal, or common for a wide FOV game rendering. It would be good to see actual AAA games in similar situations, and whether nearby buildings scew when you look upwards (at high FOV). Signing Off Had a great interview over Google Talk today regarding Reloaded, so I will announce that when it comes out. Most of it you might already know, but I am sure I have released a few pearls during my prolonged wittering so probably worth checking, just in case :) An hour left, so I will wrap up an internal version send it to the internal team for testing, then some food.
Eating My Greens After my success with the terrain LOD performance improvements, I turned my attention to the vegetation system and the hundreds of thousands of polygons that little monster was consuming. As some beta testers have observed, the vegetables are perhaps the hungriest component of the lot and switching them off provides an immediate speed gain. I therefore decided to add some additional slider controls to the creation of vegetation and also improve the back-end so that the engine was not rendering invisible grass objects. I had thought that polygons where not the bottleneck, but it seems on older or less powerful graphics chips they are a factor. By not even rendering them in the first place, I could get a speed boost in this area. The Gain
The upshot of my evenings work dropped the polygon count from 500K down to 200K without ANY visual difference in the scene.
By changing the sliders in a new Quality Settings panel, I managed to drop it down to 86K polygons without too much visual difference.
When I made my slider adjustments I went from 77fps to 104fps, and remember the 77fps was a lot lower when we had half a million invisible grass polygons knocking about. All in all, I am pretty happy with the improvements to the vegetation system and all it has really cost is 4MB for the new grass grid array and some variable quality loss when you start playing with the sliders. There could even be a way to get that quality back by using larger grass textures with more grass stalks per image, but that is for another day with a friendly neighborhood artists on standby. Signing Off I hope you don't mind me making my blogs a little shorter these days as I want to spend more time in fixing and tweaking while the beta is in it's formative months. I've used my little 'run to river' game as a benchmark and it looks like controlled vegetation behaves itself now, so the next offenders are a tie between the shadows casting and the AI module. I have a plan for improved shadow casting speed and also some notion that perhaps the DarkAI is NOT using multi-core which it was designed to do. These will be my prey tonight, but not too late as I have a few conference calls on Tuesday. You may wander what conference calls have to do with coding, but it's the price you pay for being in a team and coordinating a larger project offensive.
Fun With Fixing Fings As the beta testers beaver away experiencing Reloaded for the first time, I get stuck into my list of things to do. Still top of my list is performance and today I improved both terrain and vegetation polygon use. I have added new sliders to allow end user control of the terrain LOD stages and the vegetation slider now controls the vegetation distance too.
The result of slamming these to minimum is quite striking, and can take a 750,000 scene down to less than 100,000 polygons. No doubt this will help on the lower end cards almost immediately. I am still not 100% sold on my veg system as it creates invisible grass ready to fade in instantly. This helps performance in one way as the grass does not need significant dynamic creation but costs in another in that MANY polygons are on standby. With modern cards this might be a good technique, but older cards do not like those extra polygons. I will have to try both in time... I added some code to call the terrain randomizer when a new map is created, so you don't get confused about seeing the last one you edited. I still want to put a lot of work into this component as I think we can do some great things with procedural techniques and automated generation, but for now clearing the terrain with a decent random scene should be the goal. I have also been tackling other annoyances like the aspect ratio error on the paint cursor, the save/load paint sliding issue, sound issue (fixed) and a few other pearls. These fixes will be available to all pledge levels, but I am going to make a few more fixes before a new patch is released. In Case You Missed My First Post-Beta Official Video Some early questions came in and we decided to take the opportunity to answer them and also provide a quick start to the BETA1 version.
It might be a good idea to create another video when we release a fix patch so you can get a quick overview of what we improved. A gentle reminder when the time comes will be much appreciated :) Signing Off Now the beta is out and my time will be spent in forums and emails as much as development, my blog might be a little less verbose over the next few weeks. The more time I have for bug hunting, the better your experiences will be and I think it's a good compromise. I will of course keep you up to date with the fixes as they happen!