Tag Archives: touch points

Biosphere V. 0.0.4

Biosphere V. 0.0.4 – Multi-Touch And On Screen Joystick/D-Pad!

Joystick/D-Pad thingy

the character’s way of movement had passed a many evolutions, it started as simply using the volume up/down to move it (mostly because i was lazy to implement something bigger.. like touch screen…) then it passed to moving in the direction the finger is located relative to the  character itself, and now, finally, there is a “real” way of moving! there is now a D-Pad thing on the left bottom corner for movement, it is not what it is supposed to look like at the end, this is just my artistic skills in action! This is just a simple place holder for what is soon to be the main On-Screen control.

Multi-Touch

Now THIS, is what made everything possible! After implementing touch screen, I had to find a way to make everything compatible with each other, and the main problem was using more than one touch point at a time, and also making sure that it is not being exploit, meaning you cant use 5 fingers to dig down faster, or build structures in a ridiculous speed! So I had to make some rules in the game code, making sure there can be one finger for the On-Screen controls and one finger for the Game itself.

Well, that’s it for now, attached to this article is a picture of how the game looks like right now, I think the new blocks makes it look far better than what it used to!

BioSphere V. 0.0.3

Biosphere V. 0.0.3 – – Touch Points, Remove & Add Blocks, HUD, and Chunks!

Touch Points

I implemented one touch point for now, just to test character movement. I made it so that the touch point would be tested relative to the center of the camera, so if its above the center it will go upwards, underneath the center would go downwards, to the right would go right, and to the left would go left.

Chunks

So chunks are pretty simple, a chunk is simply a list of coordination for blocks, there are 10 rows of blocks in each chunk, and 50 blocks in each row, ending at 500 blocks total. I might be changing this to a different amount of dimensions later after testing it with more objects running.

Removing & Adding Blocks

To keep it simple at the beginning, I made a big loop that went through all of the blocks in a certain chunk when you touch the screen, this made it really slow because that every time you touch the screen, the loop would check 500 objects and then just erase the block when it found it. So to save time and memory, I used my math skills! I made a small function that helps me find the exact place the person touched, then calculating that into a position of the block inside the chunks, and then simply erasing it from the list.

HUD

HUD (or heads up display) is really, really, REALLY simple for now, all it is, is just a bar on top with numbers 1-10 which will soon will act like a tool bar to change weapons or items the player is using quickly. For now nothing in the toolbar is functional and probably won’t be for some time. It is using a different camera than the rest of the game, causing it to become “stuck” on the screen, and not move when the character is moving or world is changing.