Posts Tagged ‘superflyingthing’

Modifying textures using libGDX Pixmap in runtime

Thursday, October 6th, 2011

Since the beginning of Super Flying Thing, I wanted the game to behave in some aspects similar to Worms (and other games). One of those aspects is the destructible terrain, I love that feature and that is why I am prototyping some stuff to see if we can add that feature to the game or not.

The next video shows how I am using the Pixmap class of libGDX library to modify textures dynamically.

In the previous video there are two textures, they start with the same pixmap data. Then I start to paint and erase pixels from each texture to show how the pixmap operations works over the two pixmaps. Finally, I start rotating both textures and then paint and erase stuff again, to show how I am transforming from game world coordinates to each pixmap coordinates.

Pros

Destructible terrain. If that works, then we could add some new game play options, like throwing missiles (weapons!!) or killing yourself in order to destroy some part of the map and open paths. Or some power like a shield or something where you move through the terrain destroying it.

We could create some kind of in game level editor for people to make their own levels (and possibly share their stuff). We could make that now using tiles maybe, but I believe making the levels from textures could be easily used by any player (maybe kids). I feel like an in game level editor similar to Inkscape (what I am using right now) is advanced stuff for a typical player.

We could also make more interesting random levels (using some other techniques).

Cons

Having to handle all this texture modification information implies we have to use more memory since we can't reuse textures, and that could be a problem in limited devices.

Another problem is that textures created with Pixmaps are not being managed by libGDX, that means if the game is paused (you had a phone call for example) and the textures were disposed, then when the games continues the texture data will not be automatically loaded by the library, so we need to manage the texture ourselves.

Also, we will probably lose Box2D collisions calculations as our world is currently made by Box2D polygons, and we will have to create our own bitmap collision calculations.

Conclusion

Working the terrain as textures is really interesting but also harder and we have to prototype more to know if this is possible or not. However, I will keep dreaming with this feature.

Hope you the post, and if you know some techniques that could help or want to make another contribution, feel free to comment, we will appreciate it.

VN:F [1.9.22_1171]
Rating: 3.7/5 (6 votes cast)

Super Flying Thing - Update 09

Wednesday, October 5th, 2011

There is a new version of Super Flying Thing available, here is the change log:

  • Changed to count the best time to end a level
  • Modified random level generation and changed random mode to be named training
  • Removed practice mode, go to training now
  • Removed Exit button, you can exit the game pressing back button on main menu
  • Added sound for the explosions
  • Added about us screen with links to blog and more games

Remember, you can play it right now, just follow the next links:

PLAY ON PC or PLAY ON ANDROID:

Play on Android

Hope you enjoy it.

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

First version of new random level generator for Super Flying Thing

Friday, September 30th, 2011

Two weeks ago I was working to improve random level generation of Super Flying Thing, the objective was to make the levels a bit more interesting.

Previous generator was really simple, the idea was to define where the starting and destination planet will be and then generate a lot of "garbage" in the way, sometimes with no possible path between both planets.

New level generator does more work to generate a bit more interesting level. Basically the idea is to use some pre generated tiles:

Tiles are defined by SVG groups in a SVG file with custom meta data defining with which tile can be paired.

Based on that information, the generator creates a pattern and based on that pattern and the tiles, it creates the level.

For example, if we have four tiles {A, B, C, D} where A is the where the start planet should be and D where the destination planet should be, and we have the possible links {A -> B, A -> C, B -> B, B -> C, B -> D, C -> B, C -> C, C -> D}, then a possible level could be ABBCBCD (using a regular expression could be defined with something like A(B|C)+D).

So, a very basic pseudo algorithm could be something like this:

	tiles.add(startTile)
	currentTile = startTile
	while (currentTile != endtile) {
		tile = getPossibleNextTile(currentTile);
		tiles.add(tile);
		currentTile = tile;
	}

Where getPossibleNextTile() method uses the meta data of the tile to define randomly a possible next tile.

Here is how a random generated level looks like:

As the title says, this is the first version of the generator, there are a lot of possible improvements to be made and/or create a new generator and throw this one to the trash can.

After writing the post I realized that there is not so much information and the algorithm is pretty basic but I hope it could be of help anyway.

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

What's going on with the Super Flying Thing?

Wednesday, September 28th, 2011

On the last weeks I was a bit distracted working on Vampire Runner and with Mad Jetpack so I ended up kinda leaving Super Flying Thing abandoned, I also have some doubts about which features to work on so I preferred to dedicate time on other projects while deciding what to do with the game.

Super Flying Thing is really fun to me, I love the concept but right now the game could be a bit boring and I want to improve that, not so sure how, but I want to try some ideas I have in mind.

About levels

The main idea of the game is you have to master your flying skills and for that you have to try and fail a lot of times. For that reason, I want to modify the levels to be smaller and harder but not frustrating since you can quickly try again and again.

Random levels are now generated using pre generated tiles (I want to talk about this in a dedicated post), so they are a bit more interesting, however they don't transmit the idea of try and fail a lot of times yet, so I have to work a bit on level generation.

About game modes

The practice mode will be removed since you can practice in both challenge and random modes. However, for starters I want to add a Tutorial where you can test the controls and learn how to play to mitigate the change I plan to do over the levels.

Also, we want to try an Endless mode where you have to go as far as you can, playing through different challenges each time harder and harder.

About content

On some levels there are lasers, moving obstacles and even portals. Despite I love all this stuff, I will probably remove them until I see how they really fit in the game.

Stars will be probably removed as well since they don't contribute nothing to the game for now. Again, this will be probably temporary until it fits in the game.

About game objective

On normal game mode, the main objective will remain the same, travel from one planet to the other. However, I want to add a second objective to add challenge factor to the game, something to make the player want to try again the same level several times. One possibility is to add some kind of local competition, for example, improve the time to reach the destination planet, play against your best time, or something like this. Going further with that possibility, maybe publish that replay/best score online and compete with others.

We have to dig further in this subject since it can contribute with re playability factor.

About controls

Now that we fixed the game behaving different on different devices I will rip off the AxisController and the TiltController and probably one more, and leave only the original one plus maybe some other.

The original control was modified a bit in order to let the player control the ship better based on how new levels are going to be.

Conclusion

That's all for now, the idea of this post is to let you know that I want to to continue this game.

Hope you liked it, even if it has nothing interesting.

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Super Flying Thing - Update 08

Friday, September 2nd, 2011

There is a new version of Super Flying Thing available, here is the change log:

  • Added replays to show how you died a lot of times :P, could be disabled if you don't want to watch it.
  • Changed the Splash screen to load all stuff once to improve performance during the game and to show loading progress.
  • Changed screen buttons, moved them up to avoid touching the ads when trying to touch a button.
  • Changed to avoid showing a title bar when the game started.
  • Changed Settings screen, moved controllers stuff to another screen.
  • More performance improvement.
  • Fixed (probably) the bug of OutOfMemoryException when the game was left open for a long time.

Remember, you can play it right now, just follow the next links:

PLAY ON PC or PLAY ON ANDROID:

Play on Android

Hope you enjoy it.

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Super Flying Thing - Update 07

Friday, August 19th, 2011

Hi everyone, we found a little tiny bug that made our game run different in different phones, so in some phones the ship would move way faster than in others, and that make the game a little too challenging (impossible to control, always dying, lots of fun).

The other big changes in this updates are some stuff trying to get the game to run better on phones that aren't the latest and greatest. For now the background will start disabled but you can enable it by going to the settings page (it looks really nice :-) but it is expensive to show in some phones, in the future we will try to test the phone or start with the background enabled and detect if it is an issue and suggest to the user that he can disable it to get better performance).

As always, a change log:

  • Fixed a bug making the game run different on different devices, some times almost not playable
  • Added settings to enable/disable background to improve game performance (disabled by default)
  • Added new controller named TargetController which allows you to specify the point the ship should go
  • Added a second background which moves with the camera giving a basic idea of parallax
  • Changed ship animation to have more frames to be smoother
  • Changed internal stuff to improve performance.
  • Changed the graphics (background, walls, color of portals)

Also, we have a new gameplay video:

Remember, you can play it right now, just follow the next links:

PLAY ON PC or PLAY ON ANDROID:

Play on Android

Hope you enjoy it.

VN:F [1.9.22_1171]
Rating: 4.0/5 (1 vote cast)

Super Flying Thing - Update 06

Friday, August 12th, 2011

Readers, I know there are some, there is a new update of the game, should be available on Android Market already.
We added different controllers and we are testing how they feel and what method of control people like best.

As always, a change log:

  • Added more levels and fixed previous ones.
  • Added different controllers to test.
  • Added level preview on level selection screen.
  • Added settings screen which lets you choose different controllers and test them.
  • Added message to show which level is being previewed
  • Added animation to visited planet to differentiate easily between start and destination planets.
  • Changed ship to receive damage instead killing it instantly, so you now could survive in some cases.
    Fixed a bug with lasers.

Remember, you can play it right now, just follow the next links:

PLAY ON PC or PLAY ON ANDROID:

Play on Android

Hope you enjoy it.

VN:F [1.9.22_1171]
Rating: 5.0/5 (2 votes cast)

Multiple Android controls for Super Flying Thing

Tuesday, August 9th, 2011

Most people tell us that the game controls are not fine yet, at least for the Android version. Based on that, we are working on multiple control implementations to test and to let the user choose which controls fits best for him.

How we manage the controls internally

To control the Ship, we created a structure named ShipController with two methods:

  shouldReleaseShip() : boolean
  getMovementDirection() : float

The first one returns true if the Ship should be released from the planet, false otherwise. The second one returns a real number between [-1, 1] to determine the rotation direction of the Ship and the rotation speed.

That is just a structure with the values modified by the real controllers, explained next, and processed by the Ship behaviors.

Classic controller

The classic control is the current one, you have to press one half of the screen to rotate the Ship to the right and the other half to rotate the Ship to the left.

Classic Controller

This controller performs an acceleration from 0 to 1 internally to the returned movement direction. This allows the player to rotate in slower but after pressing the controls for a while start rotating faster.

Problems with this controls are that it is too sensitive on Android, it may be enough to find better values for acceleration but we couldn't find the best solution yet.

Axis based controller

Determines the movement rotation based on a variable Axis and the current pressed position. The Axis could be horizontal or vertical its position is defined with the first pressed position.

Axis based controller

We are just testing and we have to play a bit with the controller values to know exactly if this controller will work or not.

Some options of the controller could be to make the Axis fixed, not dependent of the first pressed position.

Analog stick based controller

This controller behaves like an analog stick, you decide the desired Ship's direction and the controller will do its magic to make the Ship points to that direction.

For now, the stick center is dynamic and defined with the first pressed position and the stick direction is defined with the current pressed position and the stick center.

Analog based controller

A problem with this controller is we are afraid it could change all the original game play of the game, but could be for the best if it let players control the Ship in an easy way.

We are just testing it also, for now it doesn't feel easy to use, but again, we need to test more controller values to know that better.

Same as the previous controller, one option could be to have the stick center fixed in some part of the screen.

Tilt based controller

Finally, the Tilt based controller is just that (not implemented yet), control the Ship using device's sensors, never worked with that before.

No image in this case, should be easy enough to imagine.

An interesting point of this controller is that it let us recover part of the screen and that could be very important for small resolution devices where your fingers could cover a great part of the screen.

Final notes

One interesting point in testing different controls is to understand that different players need different controls, some times they need the game to adapt to them and not vice versa. We are thinking in having a controls menu or something to select the Controller you want to use and maybe some internal values.

Also, some of the controls could work for Desktop version too, have to test them a bit there to see if they fit, could be great to play using only the mouse.

As always, hope you enjoy these kind of posts.

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)

Some funny stuff on Super Flying Thing

Monday, August 8th, 2011

I was testing some code about hierarchical structures for the game entities and I tried adding a laser gun to the ship to see how it looks like and here are the results:

Testing random stuff on the game to test code gives me some new gameplay ideas, for example, shooting lasers to some targets to destroy them while avoiding killing some good targets.

VN:F [1.9.22_1171]
Rating: 4.0/5 (1 vote cast)

Super Flying Thing - Update 05

Tuesday, August 2nd, 2011

We have a new update with new features, here is a video some of them:

As always, a change log:

  • Added levels 13 and 14.
  • Added a basic AI to control the ship on background game.
  • Added portals which teleports the ship from one point to another
  • Added lasers guns which shots lasers to destroy the ship
  • Added colors to visited planets, to know if the planet is the start planet or not.
  • Added played level status by showing a Tick over the levels on level selection screen.
  • Added time label to show current time on level, will be (probably) part of the game objectives later.
  • Incremented bounds of stars and sprites to make them easier to take.
  • Fixed a bug when finishing the random/practice modes and showing the select level button

(note: if you want, you can follow commit history here)

Remember, you can play it right now, just follow the next links:

PLAY ON PC or PLAY ON ANDROID:

Play on Android

Hope you enjoy it.

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)