FAQ Database Discussion Community


How to display an image on another image?

java,jframe,jpanel,jlabel,game-engine
I try to create a little game in java but I'm in trouble. When I draw a map, I'm not able to display the characters without overwrite the titlesets of the squares. My goal is to be able to display many pictures on the same square (like the titleset of...

PlayN and Firefox issues

facebook,firefox,gwt,game-engine,playn
I am working on a pet project of a Facebook game. I've had a couple of problems until now on Firefox browser. CPU runs wild when you start a game on FF. TextLayout gets moved a few pixels up. Caching ruins reloading of resources Anyone had these kind of problems?...

How to remove coupling without duplicating the code? [closed]

javascript,node.js,game-engine
I'm making a server for a multiplayer game and have some problems figuring out how to make the logic modular. When a player move I want to update the object, update the database record and emit the move to all connected clients. Right now I'm doing it like this: var...

Why does this call of glEnableVertexPointer and glVertexPointer cause InvalidValue?

c#,opengl,shader,game-engine,opentk
I am creating a game engine that includes basic game needs. Using glslDevil, it turns out my bind VBO method throws an InvalidValue error. A call of glVertexPointer and a call of glEnableVertexPointer cause the issue. The vertex attribute index is causing the issue. The index is 4294967295 which is...

Slick2D game launches then immediately closes

java,windows,game-engine,slick2d,kryonet
I've been working with Slick2D and Kryonet to create a pretty basic multi-player RPG. While the server portion and database have been literally just plug and play it seems I'm having trouble with the graphics. Essentially when launch the client I connect to the server just fine, upon a successful...

Movement of sprite using fixed time step

c++,game-engine,game-physics,sfml,movement
I have this loop: sf::Clock clock; sf::Time timeSinceLastUpdate = sf::Time::Zero; while (mWindow.isOpen()) { processEvents(); timeSinceLastUpdate += clock.restart(); while (timeSinceLastUpdate > TimePerFrame) { timeSinceLastUpdate -= TimePerFrame; processEvents(); update(TimePerFrame); } render(); } and in update function I do this: object.speed = object.speed * TimePerFrame.asSeconds(); and then I run a method in which...

Java 2d game programming struggle [closed]

java,class,game-engine
In my 2d game (Slick2d java library) I have defined a sprite class (that stands for enemyCharacter - to be more specific - its a red square that chases white square - the player). Now i want in my state (one of the class names PlayState that stands for my...

please introduce best game engine for strategy mobile game [closed]

mobile,cross-platform,game-engine
we want to create strategy mobile game like clash of clans and now please introduce best game engine for strategy mobile game . It's very important that engine must be cross platform thanks

HTML5 / JavaScript game solution focusing on connectivity between server and client

game-engine
Considering the simple-graphic turn-based games such as card games, backgammon, ... we can see most of them are still developed using Flash or other plugin-based solutions instead of pure JavaScript (Ajax/WebSocket). I want to know what is the reason? Is the connectivity between a flash game and the server more...

Data-oriented tree traversal without recursion

c++,memory-management,tree,game-engine,data-oriented-design
I have a tree structure like this: a Model has a root Node and each Node has any number of child Nodes and also any number of Meshes. Alot of time in my application is spent traversing this tree and doing computations like view frustrum culling and doing matrix multiplications....

java unreachable code error (Render class game development)

java,game-engine
i have been working on a java game engine but my render keeps getting the unreachable code error.The error appears at the setPixels method. public class Renderer { private int width, height; private byte[] pixels; public Renderer(GameContainer gc){ width = gc.getWidth(); height = gc.getHeight(); pixels = ((DataBufferByte)gc.getWindow().getImage().getRaster().getDataBuffer()).getData(); } public void...

How to Quickly save/load 200,000 of double type into memory using iOS?

ios,memory,game-engine,numeric
I tried to use NSKeyedArchiver to save/load numerical data which has 200,000 of doubles. It took around 160 secs to save, and 1900 secs to load. When I changed to use Core Data, it is even slower. I couldn't find un-keyed archiver in iOS however. The code is like below:...

what game engine should use a web developer for start? [closed]

javascript,android,game-engine
It is been almost 5 years I develop with javascript and php. I would like to start develop games for mobile (android as start). I saw that there are a lot of game engines out there. What game engine would you advice to me as start maybe something that uses...

Libgdx Unscaled Fullscreen

java,libgdx,fullscreen,game-engine,pc
I'm using libgdx for a PC game. I am trying to make the window fullscreen while keep the original window size (1024 x 768). In other word, I want to preserve my 1024 x 768, have the game centered at the middle of the screen, and just have the black...

Obfuscate a game in Java

java,game-engine,obfuscation
My situation is something similar to this... I have a game I am currently developing in Java and I have taken a couple steps to secure the data (such as using encryption when saving local files). However one thing I was recommended by a friend is to obfuscate the code...

Developing a Checkers (Draughts) engine, how to begin?

algorithm,logic,artificial-intelligence,game-engine
I'm a relatively inexperienced programmer, and recently I've been getting interested in making a Checkers game app for a school project. I'm not sure where I can start (or if I should even attempt) at creating this. The project I have in mind probably wouldn't involve much more than a...

How do i connect a 'unity' web-based game to a 'ruby on rails' website's database?

ruby-on-rails,database,unity3d,game-engine
A game my friends and I are developing requires being connected to a website's database, because players need to log in with their accounts which are saved in the website's database, and we need to save players' game records and stats in the same database. We haven't decided the database...

How does a game engine talks to the GPU, what is in the middle of the process?

unity3d,game-engine
I want to understand how the commands inside the game engine will be converted into gpu instructions which might use D3D or OpenGL. *I'm starting to learn unity and I would like to understand better what is under the hood. Thanks.

Why is clock() considered bad?

c++,c++11,game-engine,clock
I was once advised to use a platform dependent method (GetTickCount() for Windows) for getting time instead of using clock(), because it's bad or unreliable. Why? There's also this <chrono> header functions that many suggest, however, I can't find it in my IDE (VS 2010). My target is game development,...

How to find nearest N grid points (greedy)

arrays,algorithm,sorting,grid,game-engine
I'm using 2d arrays for to handle objects in a game. The dimensions of the array act like coordinates on a cartesian grid. When the player selects a point on I want to collect the N nearest grid cells from the array, even if the point is not a valid...

Dynamic text for humanoid avatar

unity3d,game-engine,text-to-speech,avatar
I am new to game development, i used iclone character avatar and added some basic animations, text to speech, facial animation. I bring all my avatars, animations to Unity3d Via 3dxchange, only the text to speech audio file can't be imported to Unity 3d. My questions is possibly i can...

Making animated movie and embed in game in unity3d

video,unity3d,3d,game-engine,animated
I want to make a 3D animated movie/video so that I can embed it after my game level made in Unity3D. May anyone tell me the free software that I can use for this? Thanks in advance....

Can I develop high quality games for Android/iOS using libGDX? [closed]

unity3d,frameworks,libgdx,game-engine,2d-games
All I wanna know is, "Can I develop high quality games for Android/iOS using libGDX or game engines like Unity3D would be needed?"

Rotating a bit matrix

java,game-engine,affinetransform
Let's say I am using a char array of size 8 to represent a collision mask for an image. Each bit of the char represents a pixel. In reality I will be using a long[64] array for a 64x64 matrix. So a box will appear as: 00000000 01111110 01111110 01111110...

How to Install the Source Game Engine?

game-engine
I want to install Valve's Source game engine to make a game of my own. But I cannot find any installation guide (or anything else like that). How do I go about installing the game engine? Also, are there any good tutorials on how to use it? P.S. Is the...

Player Movement Direction Logic

java,libgdx,logic,game-engine
Consider points A and B as walls and point O as player inside walls. So they look like A O B. I want player to move left when he touches rightPoint B. And move right when he touches leftPoint A. The screen is being rendered and player position is either...

How do I deploy my LibGDX game to my website?

java,html5,gwt,libgdx,game-engine
The furthest I've gotten is running it on the browser through the command line. I went into the appropriate directory and used the ./gradlew html:superDev command and then went to the URL localhost:8080 and was able to play my game. However, what i need to do is put this game...

Java - Draw'ing outside frame

java,performance,graphics,2d,game-engine
I am developing a 2d game; I am currently developing a system of movement of the camera on the map, I used the following method: my camera has own coordinates - x,y; I have ArrayList with all my sprites for map with their coords from 0 to mapSize, every sprite...

Allways call base.Method in Override without mentioning it for simple Scripts

c#,game-engine
I am trying to implement C# as a scripting language for my game engine. Everything works fine, only one major problem occurred in my design. I have the class BaseEntity. And another class BossEntity that derives from BaseEntity. Then I want to be able to create a new entity via...

How to access objects from specific layer in blender game engine

python,game-engine,blender
I want to make a game with progressive level generation. I have some diferent parts of the level on another layer and I spawn them in the first layer using add object in python controller. The problem is when there are multiple objects in the first layer which all have...

phaser , Circle button

javascript,game-engine,phaser-framework
im trying to make a circle button with tap event i used hitArea property from sprite class and using pixi Circle class i did that this.sprite = game.add.sprite(50,50,"cursors"); this.sprite.anchor.set(0.5,0.5); this.sprite.hitArea = new PIXI.Circle(50,50,84); this.sprite.inputEnabled = true; this.sprite.events.onInputDown.add(function(){ console.log("clicked"); }); }; it is not working at all so i tried removing...

What is the difference between making android game with hand or some game engine? [closed]

android,game-engine
I want to know what is the difference between making game with game engine and code that you write yourself. in other words how the game engine help us to develop a game. and can introduce me some good game engines for android platform?

Rendering 2D Images best practices [closed]

c++,opengl,game-engine
I'm working on making a 2D game, and I've been looking through the tons of threads made regarding this - it seems to be a popular topic. The problem I am encountering, though, is that the advice differs each time, probably in part due to the fact that the questions...

In Unity what exactly is going on when I implement Update(), and other messages from MonoBehaviour

c#,unity3d,game-engine
I'm pretty new to C#, coming from a strong background in Java, python, and some "web" stuff. So I'm probably just missing some knowledge here, that hopefully somebody can fill in for me. Going through the Unity Scripting API, I noticed a lot of methods, listed under "Messages", which is...

Best method to gift daily coins to player without risk of abuse

libgdx,game-engine
I want my game to give a certain amount of coins as gift to the player on a daily basis so he can buy whatever he likes. What's the best way to achieve this so the system will be immune to stuff like setting the time forwards and re-starting the...

How can I avoid poor program performance from a TRY statement?

c#,opengl,try-catch,game-engine,opentk
I am currently developing a basic voxel (cuboid) game engine, and I have encountered a performance issue. Every frame the game: Finds player's viewing direction → Checks every co-ordinate in the player's direct view path → Finds closest occupied space → Draws a wireframe around this block. I am using...

Game keyboard input and events

c++,winapi,keyboard,game-engine
I'm working on a little game engine and can't decide how to deal with keyboard input. So far, I have been handling keyboard input by catching WM_KEYDOWN and WM_KEYUP messages from window procedure, however this seems to me as not a great solution to handle keyboard input. I really love...

Prevent overlapping of spawned game objects in unity

c#,unity3d,game-engine
Iam trying to make a simple 2d platformer game in unity. I managed to move the player and all other stuffs. The problem now i am facing is that the prefabs that randomly spawned onto the game is overlapping. So my question is how to prevent the overlapping of game...

What's the use of lightmap?

graphics,unity3d,3d,game-engine
For starter, I know what a lightmap is, what to be gained by using it, and how to implement it. What I don't get is, if you have dynamically moving objects, which won't be able to generate a lightmap, you still need a light source to project their shadows. So,...

Applications that I can use to create a smooth game for android [closed]

game-engine
Guys were about to begin our capstone project after our the approval of our proposal. We need to create a game that requires logic in order to advance. The smoothness of the game and the transitions is strictly required. But the problem is we dont have a clue on what...

Unexpected behavior with the IF function in Blender Game Engine

python,if-statement,game-engine,blender
I am working on a project in BGE and I want to make an object slowly accelerate to its max speed when I press the button. When I press another button it should decelerate and then again slowly accelerate to the top speed in the other direction. Here is the...

Does OpenAL-Soft have an upper limit on the number of sources?

audio,game-engine,openal,openal-soft
I'm using OpenAL-Soft for a project, and right now I'm trying to decide whether I need to implement OpenAL source pooling. Source pooling is somewhat cumbersome (I need to write code to "allocate" sources, as well as somehow decide when they can be "freed"), but necessary if the number of...

Redrawing only some objects? [closed]

c#,game-engine
I'm trying to learn C#, so I decided to make a little game where monsters siege you. The problem is, I draw the character by using fillrectangle, and same for the trees. The trees start with a random location. They're supposed to stay at the location they first appeared in,...

Animation not working Unity 5

unity3d,game-engine
So I upgraded my project to unity 5 but now ALL animations on the project just don't work !!! whats the problem Every thing was working fine before upgrading to unity 5...

Move a Box with another on colission respecting the next neighboring mesh in Three.js

javascript,three.js,collision-detection,game-engine,game-physics
Found a lot of physic engines out there but nothing that fit my needs directly. I try to to find a simple way to push and pull boxes including collision detection which respects the next neighboring mesh hit while moving. Some use cases to understand: All boxes except box 1...

Mesh tilemap and scrolling

c#,unity3d,game-engine,mesh,tile
I'm working on a top-down game where the player can move up, down, left, or right. I've come across tilemaps but since using Unity, I'm seeing the idea of using Meshes. I don't quite understand how this works. Is it one mesh (two triangles) per tile? If I want to...

Is there a platform porting guide for Chilli Source? [closed]

open-source,game-engine,porting
I have been planning to start porting Chilli Source to Linux but haven't found clear info on what needs to be done to port Chilli Source to a new platform. Is there a guide for it explaining how to do it or where to look? -Where the platform specific implementations...