Refraction 2
So what have we been doing you might ask?
Well, there hasn’t been much activity here (primarily because we assume almost no one reads this) but we have been busy. Work on the Android version of Refraction stopped around August on v1.8.4. We, like any eager developers, wanted to expand and take our successes elsewhere. So in August we began “porting” Refraction to iOS devices, unfortunately it was around this time when we lost 1 of our 3 man team. Brandon had responsibilities that took more than he could offer if he continued to work heavily with us, considering those were much more important than the Textual Indices side project, he phased out work with us after assisting in some early iOS tweaks. This made things progress a lot slower than we anticipated.
Ultimately come late December we had it ‘ready.’ Except unfortunately it wasn’t, and while that is primarily a topic for another blog, it’s worth mentioning because the improvements we made with the iOS port, plus even more stuff, is going to wind up as Refraction 2: working title for Android. Which brings me to the point of this blog, to cover most of you what you can expect to see in the Sequel for those die hard fans who have interest!
1. Proper GFX (GPU Rendering!)
In Refraction, we took kind of a short cut. To handle graphics rendering we went the easiest route possible, using the primitive android ‘Canvas’ and paint libraries. Which are actually intended to be used for custom layout rendering (not full on game rendering!). As you may have noticed the game can’t make it much above 25fps (in later versions we capped it at 24fps to save cpu) because the entire game is being rendered with the cpu, not the gpu. While not only feeling and looking unresponsive and slow, this also puts unnecessary drain on the cpu. In Refraction 2 this is gone!
We revamped the drawing and now the game makes use of the awesome andEngine graphics library. Numbers vary by device, but if you have a phone roughly equivalent in horsepower to a Galaxy S II, the game will be ~60fps with all particle effects on. On my Captivate (getting kind of old now) I get 40-60fps depending on the amount of particles on screen (there will likely be settings to tweak this).
Filed under this category as well, I think are two important sub points. Firstly, the visuals have been redone, we think it looks a lot better, but of course opinions may vary there. And additionally, the highest resolution textures we had available for Refraction were for a 480×800 resolutions screen, anything larger was upscaled. This is gone as well now, and we should be able to support any resolution going forward (even the rumored high density tablet displays).
While I can’t do the fps justice in a screenshot, at least you can check out some of the visual improvements here.
2. Controls
Over the course of development and updating we changed the controls a lot, never really being satisfied. We think we finally got it right. Below you will see a picture of a Prism that is currently selected, you should notice a lot of things are different. First off all, selected objects are ‘raised’ to give a clear view of what their outputs are effecting. This is to hopefully give you a better idea of how you are about to screw up your solution — before you do it.
To rotate either laser from the prism, simply touch anywhere in the game area while an object is selected and rotate around it. If you have a prism with 2 outputs selected it will find the one closest to where you started your rotation and use that.
To get very descriptive of how it all works… when you first touch your finger down the game will highlight the laser your finger is closest to, so you know which will be rotated. Nothing is changed yet — as soon as you start to move your finger, the laser is then in a way ‘deleted’ and your working solution actually altered. The laser then follows your finger as you rotate as a visual guide. As soon as you release your finger, the laser will snap to the closest available slot in the prism and then once again affect the solution. Mirrors largely work the same way.
Another problem users expressed trouble with was the fact that Prisms alternating between a ‘splitter’ and a ‘combiner’ caused way too many headaches. We sympathize, and debated on what was the most realistic way to help alleviate the problem. Our solution probably isn’t perfect, but we think it was the most reasonable compromise between helpfulness and difficulty to implement. Essentially Prisms can be ‘locked.’ What this means is very simple, if the Prism is ‘splitting’ a laser (i.e. has one input – two outputs) and it is locked, hitting it with a second laser will not cause the second laser to combine. it just dies there, below is a screenshot. Locking a prism really means nothing if it already has two inputs obviously, as a 3rd would have no effect regardless.
There are a few other key aspects, such as locking a prism in no way stops the input from being removed. Should an input be removed, the prism is unlocked. Same thing happens if the prism is relocated to a different gridsquare, it ‘unlocks.’ Pretty straightforward stuff. For convenience we are considering adding a ‘lock all’ functionality, just so if you get paranoid at the end of a very complex solution, you don’t have to go back and lock Prisms one by one.
3. Solutions
This might not deserve it’s own major heading but why not. Solutions in Refraction are broken, it’s tough to admit as a developer but it is true. And after looking into it for the iOS port we realized how glaringly obvious the problem was.
In Refraction only the final ‘grid state’ was saved as a solution. This is a big problem, I am sure some of the smarter users can see why pretty much right away. Needless to say we revamped the solution handling for Refraction 2, (well Brandon did a big chunk of it as his last work) and the entire progress of a solution is now saved, every deletion is included. It felt excessive but unfortunately all this information is needed to guarantee a valid solution. Yes, here at Textual Indices we take broken parts of the game, fix them, and call them features for the sequel!
Solution sharing will be back, and hopefully with a slightly improved UI this time. There is more here potentially, but this is going to be played ‘by ear’ as we see how much time we have.
4. Misc Features
There are a few things here and there that we have added to hopefully polish the game off a bit. To help with laser direction (since the rotation overlay from Refraction is gone) we have what I terribly named ‘pulse arrows.’ Essentially every 10 seconds or so a wave of directional arrows is fired off starting at emitters and covers your entire solution, partially as a nice visual effect, and partially to give you a quick reminder of which lasers are going which way.
A cool little line effect has been added when you place an object, gameplay wise this doesn’t do much, but it helps give a little pizazz (I think).
The UI has been redesigned a little bit. Gone are the text labels atop representing the list of checkpoints in the level, now spanning the entire top of the screen are what we like to call (again terribly named) color pads. This lifts an arbitrary restriction that we had in Refraction that there could only be 4 (sometimes 5 if the text was small enough) checkpoints per level. We don’t really have a cap now, but realistically it’s probably something like 8. This lets us make some cool levels.
And Prism / mirror counts have been made a bit more visible, I could go into detail here but it’s not that big of a deal. We just have a system that hides the prism or mirror button while you are dragging out a new object and instead shows the remaining count. It’s glitching a little bit in the pictures above, but when it’s all polished off it will be really nice.
5. Stuff that might or might not happen
We have been debating a few new mechanic/object tweaks to add some variety into the new levels, so it’s not entirely the same thing. I am not sure what will happen of this, it’s high priority but not a guarantee for the first release.
Community Section / Level Editor. We really wanted to do this for the main release but due to time constrains and losing some man power, it definitely won’t happen for the first release. Ideally it would line up perfectly as a first big content update a couple of months after initial release. Users would be able to create and upload their own levels, hopefully allowing the game to live on for a while to come.
Allowing the original levels to be played through the sequel. Some of the levels we think are really cool, and deserve to be played with the new and improved graphics and controls. We think ideally we would check (we can do this) to see if you have the original installed, if so the original levels will all be there for you. And potentially as an in-app purchase for those who never purchased the original.
6. Closing Remarks
We plan to have the game ready early March. It has to happen now, before school gets really crazy later in the semester. Even if some big things don’t make it in to the main release, development will continue on into the summer (albeit at a slower pace) with some updates to get everything in there.
I hope you enjoyed reading this, and hope you are excited for this as we are!