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
1
vote
0 answers

Open Dynamics Engine (ODE) support for custom bodies

The Open Dynamics Engine (ODE) supports creation of rigid bodies like sphere, capsule, box etc. How can we create custom made bodies like a cloud, or a tree? I want to know if there is a way to get a partial sphere (may be a hemisphere) and then…
Yashu Seth
  • 935
  • 4
  • 9
  • 24
1
vote
1 answer

Clojure: Every frame, read user input if available. input is passed into loop, can be either lazy-seq of (reapeatedly (readline)) or predefined list

I'm stuck on figuring out how to implement this. The concept is that I want: to be able to let the game update whether or not the player has entered input, but use the input if it's available be able to seamlessly swap out the user's input with a…
user3888177
  • 85
  • 1
  • 8
1
vote
2 answers

How to tell agent is facing a point?

I am working on a game. I know the agents postion (x,y) and its orientation in range (-PI PI) and the position (x,y) of the object of interest. How can I tell if agent is looking at the object?
Hamza Yerlikaya
  • 49,047
  • 44
  • 147
  • 241
1
vote
1 answer

Java hidden methods

I'm creating a new game engine in Java and I want to provide GameWindow class with some public static methods like setTitle(), resize() but I want to create one more method that will be able to create a whole window. This method should be accessible…
user4921399
1
vote
1 answer

How to rotate an object so it faces another?

I am making a game in opengl, and i can't figure out how to make my enemy characters turn to face my player. I only need the enemy to rotate on the y axis towards the player. Then I want them to move towards him.I have tried a bunch of different…
marc k
  • 63
  • 7
1
vote
0 answers

Unity Instantiate GameObject not working in iOS

I have a level loading script that draws a level from an array representation loaded from file. This works fine in unity editor but when I build for ios those objects dynamically drawn do not display. Here is the code that does the drawing: void…
Tanner Ewing
  • 337
  • 4
  • 18
1
vote
0 answers

Java double multiplication giving weird result

Currently writing a small framework that I have to use for a school project, more precisely, a game of Pong. I'm using NetBeans to code. I'm trying to make the ball movement speed frame-independent which if I'm not wrong is given by the formula New…
5unkEn
  • 78
  • 7
1
vote
0 answers

Expectimax Algorithm for 2048 Not Performing Expectation as Intended?

I wrote an Expectimax solver for 2048 using the heuristics noted on the top ranking SO post "Optimal AI for 2048". However, my expectimax algorithm performs maximization correctly but when it hits the expectation loop where it should be simulating…
1
vote
3 answers

Fastest way to check intersection between a Rectangle List and a single Rectangle

I want to check if a Rectangle(A Player) , intersects with one of the rectangles in a list (List). I am currently using a for loop , which makes it slow , and poor performance. for (int i = 0; i < gameObjects.objectList.Count; i++) { if…
Paz Haviv
  • 137
  • 1
  • 1
  • 10
1
vote
1 answer

How to use WGLARB in LWJGL 3?

Previously in my game engine written in java, I have used lwjgl 2.9.3. I ran into an issue. I wanted lwjgl to run on another graphics card. So I researched and soon figured out, that it would be impossible using lwjgl 2.9.3. So I read about…
daniel
  • 26
  • 4
1
vote
0 answers

How do I store values to create an average in GML

Sorry if this is a dumb question, I tried google and stackoverflow but I couldn't find anything. So, I want my end user to be able to enter an unspecified amount of number values and then I want my program to create an average number out of the…
MIB
  • 11
  • 3
1
vote
1 answer

Isometric coordinates, diamond shape, unwanted space between tiles

I'm working with SMFL/C++ to make a 2D isometric game engine, i got this when i do the isometric calculations : Here is my formula to calculate isometric coordinates in my 2D engine : For I-J coordinates i have : x = (I - J) * (tileWidth / 2); y =…
Madz
  • 287
  • 3
  • 14
1
vote
3 answers

Trying to Create a basic Text Based Game in Python. How can I implement an if loop around "Spear" without nesting

I am trying to implement a loop around the option of having the spear or not. With the spear, the hero should kill the bear. Without the spear, he should be eaten. Originally, I set spear to False, and then changed it to TRUE when the hero picked up…
1
vote
1 answer

Creating a Dialogue tree

So, I'm working on a simple project in SDL2 at the moment, and I'm having a tough time getting my head around code for a dialogue tree. I've pretty much got everything done except for this. So let's start with what a dialogue tree is: So, a…
genfy
  • 83
  • 3
  • 4
  • 18
1
vote
5 answers

Java: how to retrieve a specific type in an arraylist?

I am writing an Entity Component System for a game engine in Java (using LibGDX). I have an entity with an arraylist of various components. Each component inherits from a base Component class. I want to have a method on my entity that can give me a…
Wikzo
  • 170
  • 2
  • 12