1
vote
1answer
157 views

How should I implement the “Observer” pattern with respect to a game world?

I'm thinking of ways to implement the Observer pattern in a game I'm developing at the moment. I can have a Game World (local map) with Game Objects (player, NPCs, monsters etc...) inside of it. Other ...
1
vote
2answers
223 views

Where should I put my game loop?

I've seen some tutorials on programming a good game loop, but none mention where (in the game code) I should call it. My guess is I should call it from the main() method. Am I right? Is there another ...
0
votes
2answers
149 views

Driver inversion

I have a GUI game, which is driven by user every time it clicks the mouse. Every time user clicks a square on a board, the board state is updated (we re-compute the score, the player to make next move ...
0
votes
0answers
21 views

How can I avoid duplication of jBox2D physics attributes?

I'm using jBox2D for physics and collision detection in a game engine with an entity-component system. It works, but I'm unsure how to structure my code with respect to the values represented in the ...
-1
votes
1answer
301 views

Distributed Multiplayer Game Server Architecture [closed]

I'm programming a multiplayer game for mobile phones.I'm working on a distributed server architecture for handling lots of concurrent players. Here is my architecture on my mind: Some questions ...
1
vote
2answers
154 views

Circular dependency when creating entities

I have the following problem: I have a a class called Stage, that keeps an list of entities, which it iterates over every update loop, and updates them. One of these entities might be a weapon (PEW ...
2
votes
3answers
167 views

How do I implement Breakout's “multiball” powerup?

I'm just starting out and making a breakout clone as my first game. I'm implementing all kinds of powerups, but I'm stuck on multiball. The powerup adds additional bouncing balls to the game. So far, ...
2
votes
2answers
230 views

Expandable 2d environment by spawning and controlling individual tiles

what is the best way to implement an environment that is "expandable" in every direction so that when the player moves in any direction a new row or column of tiles that can be manipulated ...
0
votes
0answers
102 views

Different Spawning Target Pattern on a Music Game App (Prototype)

I'm using Gtomee's audio spectrum decoder tutorials (from sample video or codes at GitHub) to create its own spawning pattern according to what music it played. It worked pretty nicely despite this ...
10
votes
3answers
622 views

How should I model an economy-based game in code?

I'd like to create an economy game based on an ancient civilization. I'm not sure how to design it. If I were working on a smaller game, like a copy of "Space Invaders," I'd have no problem ...
5
votes
1answer
296 views

Implementing Vehicles in your game

In the game i am creating as an hobby (learning is the primal goal of it all) i plan to implement a space ship that the player can enter and use to explore it. I tried to search the internet for the ...
1
vote
2answers
295 views

Implementing Explosions

I want to add explosions to my 2D game, but im having a hard time with the architecture. Several game elements might be responsible for explosions, like, lets say, explosive barrels and bullets (and ...
0
votes
2answers
186 views

Game Architecture doubt on variable access

Im having a hard time figuring out a solution to a problem that seems it should be easy to answer but since i cant come up with a good solution I bid your knowledge: In my game i have a state manager ...
1
vote
0answers
415 views

Weapon Class Organization [closed]

Im making a game and i want to organise my weapons, and im having a few doubts on not only the best architecture but also on how to use it properly: The First approach is to make a single Weapon ...
9
votes
3answers
340 views

Object of arrays or array of objects?

I'm making a management sim game, something along the lines of Roller Coaster Tycoon. I want to know what the best way to structure my world objects is so to maximise performance. Let's say I have ...
1
vote
2answers
647 views

How to make a “GUI In Game”?

My game is very GUI based, the way how it works is that I have a GUI class, which contains the basic GUI elements, a parent GUI object, and a copy of the main game's class object. The game starts out ...
3
votes
1answer
241 views

Where should I put my mob rendering code?

I'm making a simple LWJGL game. However, I'm a bit confused about rendering. So I have a Mob class and a TriangleMob is a basic enemy. package daniel.entity.Mob; public class TriangleMob { ...
1
vote
2answers
411 views

adventure game architecture

I would like to make an adventure type game functioning similarly to machinarium or broken sword. The only way I can think of doing this is to draw an image as a background on a canvas and use some ...
1
vote
1answer
240 views

Alternative to JSF for browser-based 4X game [closed]

I intend to make browser based MMO game. Something from Master of Orion genre but with more accent on command ship operations. I've done some tests and research and turns out that indeed, for ...
2
votes
1answer
411 views

Abstract skill/talent system implementation

I've been making small 2D games for about 3 years now (XNA and more recently LWJGL/Slick2D). My latest idea would involve some form of "talent tree" system in a real time game. I've been wracking my ...
2
votes
1answer
129 views

How to manage my model

I have in my model, a list of Classes : Player, NonPlayerCharacter, Monster, Item, NonMovableItem etc With AndEngine I've a list of sprite for each piece of my model, How can I manage the ...
0
votes
2answers
206 views

Java applet game design no keyboard focus

THIS IS PROBABLY THE WRONG PLACE. POSTED ITHERE (STACKOVERFLOW) I'm making an applet game and it is rendering, the game loop is running, the animations are updating, but the keyboard input is not ...
1
vote
1answer
202 views

Game Engine Collision Handler

I'm making a collision handler for a Java game engine. I made an interface called Collidable. I have a method called onCollision which takes the parameter of my Engine Game Object. public void ...
3
votes
2answers
654 views

Design pattern for creating multiple enemies

I'm currently attempting to implement a factory method pattern for creating multiple different enemies after loading data from a file. But I'm having second thoughts on what would be the best design ...
1
vote
2answers
101 views

Refresh a single view

The game I'm working on is based on different levels. I can use different activities or only one activity with different layouts ( or maybe only one layout, you have to apologize me but I'm studying ...
2
votes
2answers
369 views

Would it be too much overhead to keep a HashMap of variables on a server per object for the purpose of syncing object changes with the client?

I am currently writing a server for a multiplayer game. I am trying to find a good solution for synchronizing GameObjects across the server. The server sends each client a snapshot of every object in ...
-1
votes
1answer
312 views

When should one use the Abstract, Implements, or extends keywords? [closed]

I'm just now moving from a beginner to intermediate level android programmer in the java language. i can successfully write a game framework of classes that work together to accomplish a task beyond ...
5
votes
3answers
2k views

GameState management hierarchical FSM vs stack based FSM

I'm reading a bit on Finite State Machines to handle game states (or screens). I would like to build a rather decent FSM that can handle multiple screens. e.g. while the game is running I want to be ...
4
votes
1answer
1k views

In a component/entity system, what's the correct way to implement entity-specific components?

I'm trying to create a basic C/E game engine for Android, and I'm trying to re-create pong as a basic warm-up. I currently have a EntityManager class that contains a list of all the UUIDs for its ...
2
votes
1answer
310 views

Implementing Object Composition

I'm trying to structure my game object classes similar to how it is done in this article. One way to implement this strategy is discussed in this StackOverflow question. Following the strategy ...
11
votes
2answers
5k views

how should i develop my android game efficiently?

I have attached a image of a flow chart that i made in paint. The image shows how i want to develop my game. I want a game that runs great with smart coding that is easy to update and ad features ...
2
votes
5answers
1k views

How should I implement side-scrolling level design?

I'm working on a college project using the educational Java framework Greenfoot, and as stated above we're making an r-type clone. I've been looking at using an array of strings to populate the ...
1
vote
1answer
144 views

3D Location Handling

I am thinking about making a simulator type game that will involve having lots of small objects in a 3D space. What is the typical solution for handling these objects? The first thing that comes to ...
1
vote
2answers
607 views

Enemy class architecture

I'm developing a game for Android in Java. I would like to know how a good Enemy class architecture could be implemented. I've created an abstract class called Enemy. It stores common properties like ...
2
votes
3answers
657 views

Design pattern on class level, how to do separation of concerns through mvc or alike?

Say i had a Monster class public class Monster { } Now this class has a set of properties like int health int speed int weaponDamage which details the core information about the monster. in ...
0
votes
2answers
284 views

Question on methods in Object Oriented Programming [closed]

I’m learning Java at the minute (first language), and as a project I’m looking at developing a simple puzzle game. My question relates to the methods within a class. I have my Block type class; it ...
2
votes
3answers
1k views

Pub/Sub or message passing in multiplayer server backend?

For my masters thesis I'm going to develop a scalable multiplayer server for locationbased games. It's going to be a "service oriented architecture" e.g. one dedicated service for positions, one for ...
2
votes
3answers
675 views

Game World structure in classes

I am developing 2D game in java, and I want some basic in-game scripting (spawn enemy, spawn item, change enemies properties). What I don't know is, how to divide the game world, to easily work with ...
6
votes
5answers
1k views

What is Java missing that might make it difficult to develop fully-featured 2D games?

Without using any external libraries, does Java, including all officially supported APIs give you enough to develop fully-featured 2D games? The reason I ask is that I hear a lot of "bad-mouthing" ...
20
votes
4answers
849 views

How to implement a never-rebooting test world?

Am looking for ideas on how to do the following: I want to write a simple "world" in Java. One which I could start and then add new objects later at a later date to simulate/observe different ...
4
votes
3answers
6k views

Server-side Architecture for Online Game

basically I have a game client that has communicate with a server for almost every action it takes, the game is in Java (using LWJGL) and right now I will start making the server. The base of the ...
8
votes
8answers
2k views

Best resources to learn Game Development from a Java background? [closed]

I'm an enterprise Java programmer, however something I've been interested in and what got me into the whole programming thing was the idea of being able to create a game. Just wondering if anybody ...
5
votes
2answers
1k views

Java game design question (graphical objects)

I'm beginner in game development, in Java and here on this site too and I have a game design question. Please comment my idea: I have a main loop which call update and draw method. I want to use an ...
8
votes
3answers
1k views

Android threads trouble wrapping my head around design

I am having trouble wrapping my head around game design. On the android platform, I have an activity and set its content view with a custom surface view. The custom surface view acts as my panel and I ...
3
votes
1answer
510 views

Online architecture guide

I am a newbie in gamedev, and I don't know about programmer's problems that can appear during development. So can you advice me some best practice for starting build new online multi-player game ...