Starfield Update

Posted by

OK, so after playing around with the starfield code on an actual phone, I've decided to change things slightly from what we saw last time.

Firstly, there's no more notion of a "grid" inside the sector. It's just a block of "space" and there's a bunch of stars in there. So far, I've used a "virtual" grid when generating the locations of the stars, but that's only so that no two stars are generated too close together. Secondly, I was originally going to make the sector 512x512 pixels. But looking at that on an actual device, you can see it's far too small:

Actual phone - too small

As you can see here, the stars are way too small to realistically expect someone to be able to tap on them. So I decided to approximately double the size of the stars, while approximately halving the number of stars in a sector. You can see in this screenshot, that it looks much more reasonable tapping on them (keep in mind, the emulator is running in a approximately 1:1 actual size):

Actual phone - much better

Also, keep in mind that this is really just a test at this stage. I'm drawing the "stars" with a simple radial gradient, and a plain black background. Obviously, things will improve over time! I've just used a SurfaceView to draw the stars, and it only redraws when you're scrolling around. That's kind of the feel I'm planning to go for in the long run, with the idea being that you should be able to play the game for long periods without significantly draining your battery, or turning your phone into something you could fry an egg on.

My testing on an actual device has been done using a Galaxy Nexus as the "high end" device (that's my normal phone) and also on my old Galaxy S. The Galaxy S is what I'd consider to be the "low end" of the spectrum of phones these days and I figure if performance is acceptable there, then it should be acceptable for anybody. We'll see how we go anyway. Hopefully I can get a nice starfield background and better star graphics without having to get all complicated using OpenGL and stuff. We'll see.

Anyway, this post is just an example of how things will change in the game once I've tested my ideas out in the real world.

blog comments powered by Disqus