game-development

Best approach for game animation?

I have a course exercise in OpenGL to write a game with simple animation of a few objects While discussing with my partner our design options we've realized we have two major choices for how the animation is going to work, Either Set a timer for a constant interval, say 30 msec, when the timer hits, calculate where objects should be...

How to build a Tiled map in Java for a 2D game??

Not sure how to approach this problem. Basically, I want a Pixel -> Tile representation of a 400x400 window. Each coordinate on the screen, e.g 120x300 should be part of a tile. My smallest sprite is 4 pixels, so we can say that 1 tile = 4 pixels. The player and enemy sprites are all 20 x 20, so each player/bad guy will occupy 5 tiles. ...

Path finding in a Java 2d Game?

Essentially its a pacman clone game I'm working on. I have an Enemy class, and 4 instances of this class created which all represent 4 ghosts of the game. All ghosts start up in random areas of the screen and then they have to work their way towards the pacman character. As the player controls the pacman, moving it around, they should f...

Embedding a Ruby interpreter in a C++ app

I'm hoping to use Ruby as a scripting language for my game engine. I've found the usual articles describing how to call Ruby classes from C++ code and vice versa (e.g. here) but I can't quite see how to do what I want with that way of working... My engine currently uses a little language I wrote myself with Flex and Bison, and a little ...

How to get started with implementing my own VGP code for iPhone OpenGL ES development?

How do I get started with implementing my own Vertex Geometry Processor code for iPhone OpenGL ES development, in order to fully benefit from its VGP Lite chip? ...

Server architecture for a multiplayer game?

I'm planning to build a small multiplayer game which could be run as a java applet or a flash file in the web browser. I haven't done any server programming before, so I'm wondering what sort of server architecture i should have. It'll be easy for me to create perl/php files on the server, which the java/flash code contacts to update th...

Flying in a 3D game?

I'm wondering why so few 3d games have a mechanism that allows the player to fly over the map and land down when he likes. Is this very hard to accomplish in a 3d game, or otherwise technically unfeasible? ...

wxPython or pygame for a simple card game?

I have been playing around with writing some simple card games in Python for fun and I would like to add a graphical user interface (GUI) to the games. Which library would you recommend for writing the GUI for a simple card game? ...

Architecture for social multiplayer browser game (backend choice + frontend choice [flash/silverlight])

Hi there I'm thinking about developing online multiplayer social game. The shared state of the world would require something fast on the backend, so the potential solutions seem to be: fast game engine on server (eg. c++ ) and some frontend language (php/python/ruby) + flash whole stack in python (using twisted or stackless python) + ...

What language features are needed for game scripting?

I am looking into designing a game scripting language and was wondering what people employed in the games industry considered essential items/properties for a good game scripting language. This includes things like: static vs dynamic types Who should it be aimed at: programmers or designers? syntax(must it look like C?) How high level...

j2me - Rotate array of 2d points in 45 degree increments

I'm working on a roguelike style cellphone game that operates on a grid. Attacks/Items in this game operate by targeting tiles in a pattern relative to the user. The paturn is usually relative to the direction the user is aiming in as well, For instance in this screenshot the pattern Point2d[] damageTiles = new Point2d[4]; ...

Creating a solid (framerate stable) game engine for OpenGL (ES)

I'm having trouble creating a solid game engine for my OpenGL application. It's a game which consists of several sprites with a lot of action. I created objects which are basically all of my sprites. Another object called "gameEngine" loops through a set of calculations every something of a second (a timer), resulting in new game variab...

Tackling alpha blend in OpenGL for better performance

Since having blends is hitting perfomance of our game, we tried several blending strategies for creating the "illusion" of blending. One of them is drawing a sprite every odd frame, resulting in the sprite being visible half of the time. The effect is quit good. (You'd need a proper frame rate by the way, else your sprite would be notice...

Can 3D OpenGL game written in Python look good and run fast?

I am planning to write an simple 3d(isometric view) game in Java using jMonkeyEngine - nothing to fancy, I just want to learn something about OpenGL and writing efficient algorithms (random map generating ones). When I was planning what to do, I started wondering about switching to Python. I know that Python didn't come into existence ...

Proper OO Pong

How should I design a "Proper" OO Pong? The idea of Proper being that any element can be changed: The shape of the ball, the court, and the paddles, adding obstacles, and even "powerups", like "can stick the ball to the paddle". The two more pressing questions, right now, are: Who checks for colissions? and When a colission does happ...

How to blend a quad, already with a texture on it.

I made a quad with a nice texture on it. The texture has an alpha channel (RGBA). I replaced the quad with the texture (GL_REPLACE), so now I have a billboard with (semi)transparant pixels on it. So far, no problem. But now I want to blend the entire billboard, so it's overall opacity changes. How would I do this? ...

How to Rotate a 2D Array of Integers

I am programming a Tetris clone and in my game I store my tetromino blocks as 4x4 arrays of blocks. I now need to be able to rotate the integer positions in the arrays so that I get a rotated tetris block. I cannot simply rotate the texture because all my collision detection, etc has been designed to work with the 2D array. The game is w...

In what way would you present an algorithm to detect collisions between diffrent objects?

While working on a really only-for-fun project I encountered some problem. There is a 2D world populated with Round Balls, Pointy Triangles and Skinny Lines (and other wildlife too, maybe). They all are subclasses of WorldCreatures. They can move inside this world. When they meet each other, a Collision happens. The thing I'd like to d...

Using TouchScreens for game control

I'm working on my first video game for the Android platform as a bit of a nights and weekends project. It is coming along nicely, but I am very unhappy with the control sensativity. In this game, you move an object left and right on the screen. On the bottom of the screen is a "touchpad" of sorts, which is where your finger should rest...

Using Sound Effects in a java game

Basically I am trying to use this SoundEffect class in a simple java game I'm working on for my assignment. import java.io.*; import java.net.URL; import javax.sound.sampled.*; /** * This enum encapsulates all the sound effects of a game, so as to separate the sound playing * codes from the game codes. * 1. Define all your sound eff...