Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 16 Feb 2010
Offline Last Active Jul 01 2013 05:52 AM

Posts I've Made

In Topic: A tile system... for a sphere?

13 May 2013 - 03:09 AM

Beside using some ico sphere, there is another way to do it. It might work or not depending on the kind of game you are implementing.


Have your classic 2D tilemap with squares. Make it wrappable. That's it if you got to the end left you will come back to the right, etc.. Like Asteroid but make the camera move instead of the player. Navigating through such a space already give a 'sphere impression' because if you keep going in a direction at some point you will come back to your initial position. It's not 100% accurate though because if you go in diagonal the path would be longer than if you go in a straight direction.


Then the trick is to use a spherical vertex shader to make the 2D plane looks like a sphere. The idea is to rotate each point in function of their distance from the center of the screen. There is not much about it on the web but it's not difficult to implement if you know a bit of GLSL.


The nice thing is that all the logic is very simple because it's still 2D however it gives to the player the illusion that he is playing on a sphere. Here is a proof of concept (a project that I sadly abandoned) :


In Topic: Exploration of 1D games

05 September 2012 - 08:48 AM

It's quite interesting to think about games that use a single dimension game space. For example take a look at Swords and Soldiers (http://www.swordsandsoldiers.com/) it's quite a fancy game. However most of the maps use a single dimension game space were units move on a line from castle A to castle B. So basically if you remove all the graphical elements from the game, it could be represented using a single straight line with units and builinds on it. Each unit/building would have a 1D coordinate that gives its position among the line.

I'm pretty there are many other games that, behind fancy graphics, hide a simple 1D game space.

In Topic: Google Ai Challenge inspired game|competition

31 July 2012 - 12:45 AM

Hey good idea you have there!

Do you know scratch (http://scratch.mit.edu/) ? It's a kind of "visually represented programming language". It could give you some ideas..

What do you think is better: making a game that supports common languages (Python, Java, etc.) OR invent some interesting way to implement coding without... actual coding?

Both! Have a visual tool that people can use to generate code. People can also directly write this code, or use the editor and tweak the generated code. This way you support all kind of users and all use cases :)

In Topic: 2d animation: best practices?

27 July 2012 - 01:43 AM

Whats the best way to creating a sprite in openGL, right now I would simply load a series of textures and when moving as time passes the textures would be rotated over the GL_QUAD to look like walking, Is there a better/ cleaner way to implement this in a 2d environment?

Most 2D game engines use texture atlas (google it if you don't know it). The basic idea is to create one big texture containing all the sprites (enemy anims, player anims, projectiles, ...) and then use uv coordinates to map regions to the quads. The big advantage is you have to bind the texture only once for all the sprites which is a huge performance gain.

Actually this is more less like your idea of rotation the texture.

How would I go about creating transparency on parts of the texture? I've tried to implement a few examples of Masking but so far I haven't had any success, would I need to use something other than .bmps for this, e.g. .png

Yes simply use the alpha component of PNGs.

Good luck with your game!

In Topic: OpenGl slower and slower!

27 July 2012 - 01:36 AM

Mmh yeah what do you mean by slower and slower? Frame rate is going down (numbers) ?

As others said I doubt the problem is in driver/hardware.

How is the CPU/memory usage of your process evolving?