Questions tagged [game-engine]

Use this tag only if you are creating or modifying a game engine framework, or if the game engine you use doesn't yet have its own tag on Stack Overflow. Otherwise use the engine-specific tag(s).

A game engine is a software framework designed for the creation and development of video games.

Some game engines even include a suite of visual development tools in addition to reusable software components and an asset pipeline that takes care of pre- and postprocessing resource files.

Many so-called "game engines" only provide real-time rendering capabilities instead of the wide range of functionality (physics, collision detection, pathfinding, user interface controls, AI, etc) needed by games. These engines rely upon the game developer to implement the rest of this functionality and are more correctly referred to as a "graphics engine" or "rendering engine".

3791 questions
12
votes
3 answers

How to calculate 32-bit floating-point epsilon?

In book Game Engine Architecture : "..., let’s say we use a floating-point variable to track absolute game time in seconds. How long can we run our game before the magnitude of our clock variable gets so large that adding 1/30th of a second to it no…
Xia Cuo
  • 123
  • 1
  • 5
12
votes
3 answers

Efficiency of method call in for loop condition

I am writing a game engine, in which a set of objects held in a ArrayList are iterated over using a for loop. Obviously, efficiency is rather important, and so I was wondering about the efficiency of the loop. for (String extension :…
Isaac Woods
  • 1,114
  • 1
  • 17
  • 28
12
votes
3 answers

Chipmunk Physics or Box2D for C++ 2D GameEngine?

I'm developing what it's turning into a "cross-platform" 2D Game Engine, my initial platform target is iPhone OS, but could move on to Android or even some console like the PSP, or Nintendo DS, I want to keep my options open. My engine is developed…
Goles
  • 11,599
  • 22
  • 79
  • 140
12
votes
3 answers

libgdx - how to add background image in stage?

I am learning libgdx but i am stuck at a point.. I have added a button in my stage , now i want to add a image in the stage so that the image looks as the background image to the button.i mean to say that the button should lie on the image. I have…
rahul_raj
  • 275
  • 2
  • 3
  • 9
12
votes
2 answers

Does Unity3D let you code with Java?

I have been searching but I get the mixed up answers with Java and Javascript. Basically I am wondering if Unity3D lets me make games with Java? I want to make browser based games, not android.
tur sander
  • 137
  • 1
  • 1
  • 6
12
votes
5 answers

Libgdx - How to draw filled rectangle in the right place in scene2d?

I am using scene2d. Here is my code: group.addActor(new Actor() { @Override public Actor hit(float arg0, float arg1) { return null; } @Override public void draw(SpriteBatch batch, float arg1) { batch.end(); …
Aleksandrs
  • 1,488
  • 1
  • 14
  • 34
12
votes
2 answers

Custom memory alloc and dealloc which multiple Inheritance class

i want do memory management in my project. i do not want operator global new/delete so i implement a simple memory alloctor. this is my code: class IAllocator { public: void* Alloc( unsigned int size ) { 1. alloc memory. 2.…
xfxsworld
  • 283
  • 1
  • 10
11
votes
7 answers

Cocos2D OR libgdx for Android Game Development

I just want to know, that in the long run, using which of these engines will be better. Although I feel that using Cocos2D will be a better option, as it can also be used for iphone development, there's just 1 tutorial…
Saurabh Verma
  • 6,328
  • 12
  • 52
  • 84
11
votes
1 answer

Game engine and data driven design

I've heard about data driven design and have been researching about it for a while. So, I've read several articles to get the concepts. One of the article is Data Driven Design written by Kyle Wilson. As he described, it seems to me that the…
Amumu
  • 17,924
  • 31
  • 84
  • 131
11
votes
3 answers

Collision reaction in a 2D side-scroller game similar to "Mario"

This has been greatly bothering me in the past few weeks. In this time I've been researching online, even reading books in the Computers section at Borders to try to find an answer, but I haven't had much luck. I programmed a 2D level editor for…
Rob
  • 430
  • 1
  • 5
  • 13
11
votes
4 answers

Steady_Clock skipping between updates in main game loop

In the process of trying to work out a solid game loop in SFML I came across this issue which I can't seem to figure out. I was able to strip out all of the SFML code and still see the issue with clock() in time.h. Then I went further and still see…
S. Turnage
  • 111
  • 5
11
votes
2 answers

Is there a way to pause SKActions?

I'd like to create a pause menu but I don't know the simplest way to do this... I think a simple way would be to pause all my SKActions, but I couldn't find any method in the reference. Thanks for help.
user1940136
  • 343
  • 6
  • 12
11
votes
4 answers

libgdx coordinate system differences between rendering and touch input

I have a screen (BaseScreen implements the Screen interface) that renders a PNG image. On click of the screen, it moves the character to the position touched (for testing purposes). public class DrawingSpriteScreen extends BaseScreen { private…
Brian Mains
  • 50,520
  • 35
  • 148
  • 257
11
votes
8 answers

Play Audio through JS with Overlapping

I have the following JS code for a canvas based game. var EXPLOSION = "sounds/explosion.wav"; function playSound(str, vol) { var snd = new Audio(); snd.src = str; snd.volume = vol; snd.play(); } function createExplosion() { …
Lucas Penney
  • 2,624
  • 4
  • 27
  • 36
11
votes
1 answer

LimeJS Custom Sprite Swallowing events

I made a custom Lime JS sprite class by doing: test.obj = function() { lime.Sprite.call(this); . . this.label = new lime.Label(). ...; this.appendChild(this.label); } goog.inherits(test.obj, lime.Sprite); I'm unable to get the label click…
Brian Mains
  • 50,520
  • 35
  • 148
  • 257