game-development

Android: Multi-layered Tilesets and "Camera" Positioning

Hello everyone, I've just recently begun working on developing Android applications, and what I am attempting to do is build a 2D RPG game, ala Final Fantasy 1, and am running into issues with setting up multiple tile layers. Basically, what I want to do is set up a GameMap view which has 3 layers: a "background" layer with grass/roads...

Test if JavaScript has been modified

I have coded a basic game in JavaScript and am working on a high score system for it, however as it is coded in JavaScript we all know it is incredibly easy to open Firebug or Chrome's Dev tools and edit the code. For example adding a multiplier to the score. Does anyone know either A) a way to check the JavaScript hasn't been modified ...

Android: moving ball through touch

Hello, I am making a simple game for class on an Android phone in which you can change a ball's position by touch. I had it working in Processing by simply using mouse position. In Android, I am using the gesture scanner and corresponding methods for various gestures, but I can't figure out the exact way to pull in the coordinates of t...

UIImageView "Sprite Movement" How?

Hi all, I am trying to make a game for the iPhone/iPod Touch. I am somewhat new to iPhone programming and extremely new to iPhone game programming so try to bear with me if this is a stupid question. How to I make my character, a UIImageView, move to the right or left, along the x axis. Just a simple translation across the screen. Th...

How can you make the form maximize to any computer screen in a Windows Forms application?

So I am making a game on Visual Studio C# and I want the form to be automatically maximized to any user's computer screen when compiled? How can I do that? ...

More efficient comparison of numbers

I have an array which is part of a small JS game I am working on I need to check (as often as reasonable) that each of the elements in the array haven't left the "stage" or "playground", so I can remove them and save the script load I have coded the below and was wondering if anyone knew a faster/more efficient way to calculate this. Th...

Best direction for displaying game graphics in C# App

I am making a small game as sort of a test project, nothing major. I just started and am working on the graphics piece, but I'm not sure the best way to draw the graphics to the screen. It is going to be sort of like the old Zelda, so pretty simple using bitmaps and such. I started thinking that I could just paint to a Picture Box contr...

2d Game graphics/sprites - landscape vs portrait - 2 sets?

Hi, I am working on a simple iPad game and wondering whether I should be using different graphics for portrait vs landscape or just doing some kind of transform between them? Thanks for any tips/advice Chris ...

Making Billiards in Box2D

As a quick overview: I'm trying to make a game of pool using Box2D as a basis. Now my question: How should I set up the billiard balls and edges so that they act normally? The balls sometimes seem to stick to the edges for no apparent reason. I've got four static wall objects with a restitution of 1 around the edges of the table. Ea...

Is PyOpenGL a good place to start learning opengl programming?

I want to start learning OpenGL but I don't really want to have to learn another language to do it. I already am pretty proficient in python and enjoy the language. I just want to know how close it is to the regular api? Will I be able to pretty easily follow tutorials and books without too much trouble? I know C++ gives better performa...

Network communication for a turn based board game

Hi all, my first question here, so please don't be to harsh if something went wrong :) I'm currently a CS student (from Germany, if this info is of any use ;) ) and we got a, free selectable, programming assignment, which we have to write in a C++/CLI Windows Forms Application. My team, two others and me, decided to go for a network-co...

C# Changing Objects within a List

Hi, I'm having a little problem changing members of an object in a list using a found index. So this is the method I am currently working with: static void addToInventory(ref List<baseItem> myArray, baseItem item, float maxAmount, ref float currentAmount) { if (currentAmount + item.getWeight() <= maxAmount) { Console.Wr...

Making interactive touch objects on Android

I've never built a game before, and I've not programmed for Android before but am looking to do so over the summer by building a game. What type of object do I use for a shape that I want the user to be able to drag around the screen for instance using touch gestures? How do I tie together the MotionEvent, View and Graphics2D to make o...

Representing a Gameworld that is Irregularly shaped

I am working on a project where the game world is irregularly shaped (Think of the shape of a lake). this shape has a grid with coordinates placed over it. The game world is only on the inside of the shape. (Once again, think Lake) How can I efficiently represent the game world? I know that many worlds are basically square, and work wel...

Learning C++ from AS3

I'm a decent AS3 programmer. I work in games, and that is my reason for programming. While there is much I can accomplish with Adobe AIR, my understanding at this point is that learning C++ is probably a good direction to take. I would learn a lot of valuable lower level programming if I needed it down the road, and I would have an easie...

Surface Detection in 2d Game?

I'm working on a 2D Platform game, and I was wondering what's the best (performance-wise) way to implement Surface (Collision) Detection. So far I'm thinking of constructing a list of level objects constructed of a list of lines, and I draw tiles along the lines. I'm thinking every object holds the ID of the surface that he walks on...

iPhone game display is off the screen by 10 pixels or so on the device

I recently deployed my first iPhone app, a simple game, to my testing iPhone for the first time. Everything looks and runs fine on the simulator in Xcode, but on the iPhone the whole image is shifted up about 10 pixels or so. So the gameplay goes slightly offscreen on top and has a slim white/grey bar at the bottom. Has anyone encounter...

Can't move my character! Please HELP!

I am trying to make a UIImageView move when I tap a button. I have set a UIIAction to start an NSTimer. When tap the button, the character(UIImageView) moves fine. When I tap the same button again, the character speeds up and so forth so eventually he is moving a billion mph. How do I solve this? Here is the code: (void)animateCha...

OS independent C library for calculating time lapse?

So in my game I need to simulate the physics in a hardware independent manner. I'm going to use a fixed time-step simulation, but I need to be able to calculate how much time is passing between calls. I tried this and got nowhere: #include <time.h> double time_elapsed; clock_t last_clocks = clock(); while (true) { time_elapsed = ( (...

Changing background image in JGame

In JGame, the method setBGImage() is supposed to change the background image. This works when I'm setting the background image for the first time at the start of the initialization. However, when I call the same method later to change the background image, it seems to do nothing. What am I doing wrong? Here's some example code to show y...