Search Results

Search found 19182 results on 768 pages for 'game engine'.

Page 9/768 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Questions about game states

    - by MrPlow
    I'm trying to make a framework for a game I've wanted to do for quite a while. The first thing that I decided to implement was a state system for game states. When my "original" idea of having a doubly linked list of game states failed I found This blog and liked the idea of a stack based game state manager. However there were a few things I found weird: Instead of RAII two class methods are used to initialize and destroy the state Every game state class is a singleton(and singletons are bad aren't they?) Every GameState object is static So I took the idea and altered a few things and got this: GameState.h class GameState { private: bool m_paused; protected: StateManager& m_manager; public: GameState(StateManager& manager) : m_manager(manager), m_paused(false){} virtual ~GameState() {} virtual void update() = 0; virtual void draw() = 0; virtual void handleEvents() = 0; void pause() { m_paused = true; } void resume() { m_paused = false; } void changeState(std::unique_ptr<GameState> state) { m_manager.changeState(std::move(state)); } }; StateManager.h class GameState; class StateManager { private: std::vector< std::unique_ptr<GameState> > m_gameStates; public: StateManager(); void changeState(std::unique_ptr<GameState> state); void StateManager::pushState(std::unique_ptr<GameState> state); void popState(); void update(); void draw(); void handleEvents(); }; StateManager.cpp StateManager::StateManager() {} void StateManager::changeState( std::unique_ptr<GameState> state ) { if(!m_gameStates.empty()) { m_gameStates.pop_back(); } m_gameStates.push_back( std::move(state) ); } void StateManager::pushState(std::unique_ptr<GameState> state) { if(!m_gameStates.empty()) { m_gameStates.back()->pause(); } m_gameStates.push_back( std::move(state) ); } void StateManager::popState() { if(!m_gameStates.empty()) m_gameStates.pop_back(); } void StateManager::update() { if(!m_gameStates.empty()) m_gameStates.back()->update(); } void StateManager::draw() { if(!m_gameStates.empty()) m_gameStates.back()->draw(); } void StateManager::handleEvents() { if(!m_gameStates.empty()) m_gameStates.back()->handleEvents(); } And it's used like this: main.cpp StateManager states; states.changeState( std::unique_ptr<GameState>(new GameStateIntro(states)) ); while(gamewindow::gameWindow.isOpen()) { states.handleEvents(); states.update(); states.draw(); } Constructors/Destructors are used to create/destroy states instead of specialized class methods, state objects are no longer static but

    Read the article

  • How to handle a player's level and its consequent privileges?

    - by Songo
    I'm building a game similar to Mafia Wars where a player can do tasks for his gang and gain experience and thus advancing his level. The game is built using PHP and a Mysql database. In the game I want to limit the resources allowed to player based on his level. For example: ________| (Max gold) | (Max army size) | (Max moves) | ... Level 1 | 1000 | 100 | 10 | ... Level 2 | 1500 | 200 | 20 | ... Level 3 | 3000 | 300 | 25 | ... . . . In addition certain features of the game won't be allowed until a certain level is reached such as players under Level 10 can't trade in the game market, players under Level 20 can't create alliances,...etc. The way I have modeled it is by implementing a very loooong ACL (Access Control List) with about 100 entries (an entry for each level). However, I think there may be a simpler approach to this seeing that this feature have been implemented in many games before.

    Read the article

  • Need some help on how to replay the last game of a java maze game

    - by Marty
    Hello, I am working on creating a Java maze game for a project. The maze is displayed on the console as standard output not in an applet. I have created most of hte code I need, however I am stuck at one problem and that is I need a user to be able to replay the last game i.e redraw the maze with the users moves but without any input from the user. I am not sure on what course of action to take, i was thinking about copying each users move or the position of each move into another array, as you can see i have 2 variables which hold the position of the player, plyrX and plyrY do you think copying these values into a new array after each move would solve my problem and how would i go about this? I have updated my code, apologies about the textIO.java class not being present, not sure how to resolve that exept post a link to TextIO.java [TextIO.java][1] My code below is updated with a new array of type char to hold values from the original maze (read in from text file and displayed using unicode characters) and also to new variables c_plyrX and c_plyrY which I am thinking should hold the values of plyrX and plyrY and copy them into the new array. When I try to call the replayGame(); method from the menu the maze loads for a second then the console exits so im not sure what I am doing wrong Thanks public class MazeGame { //unicode characters that will define the maze walls, //pathways, and in game characters. final static char WALL = '\u2588'; //wall final static char PATH = '\u2591'; //pathway final static char PLAYER = '\u25EF'; //player final static char ENTRANCE = 'E'; //entrance final static char EXIT = '\u2716'; //exit //declaring member variables which will hold the maze co-ordinates //X = rows, Y = columns static int entX = 0; //entrance X co-ordinate static int entY = 1; //entrance y co-ordinate static int plyrX = 0; static int plyrY = 1; static int exitX = 24; //exit X co-ordinate static int exitY = 37; //exit Y co-ordinate //static member variables which hold maze values //used so values can be accessed from different methods static int rows; //rows variable static int cols; //columns variable static char[][] maze; //defines 2 dimensional array to hold the maze //variables that hold player movement values static char dir; //direction static int spaces; //amount of spaces user can travel //variable to hold amount of moves the user has taken; static int movesTaken = 0; //new array to hold player moves for replaying game static char[][] mazeCopy; static int c_plyrX; static int c_plyrY; /** userMenu method for displaying the user menu which will provide various options for * the user to choose such as play a maze game, get instructions, etc. */ public static void userMenu(){ TextIO.putln("Maze Game"); TextIO.putln("*********"); TextIO.putln("Choose an option."); TextIO.putln(""); TextIO.putln("1. Play the Maze Game."); TextIO.putln("2. View Instructions."); TextIO.putln("3. Replay the last game."); TextIO.putln("4. Exit the Maze Game."); TextIO.putln(""); int option; //variable for holding users option TextIO.put("Type your choice: "); option = TextIO.getlnInt(); //gets users option //switch statement for processing menu options switch(option){ case 1: playMazeGame(); case 2: instructions(); case 3: if (c_plyrX == plyrX && c_plyrY == plyrY)replayGame(); else { TextIO.putln("Option not available yet, you need to play a game first."); TextIO.putln(); userMenu(); } case 4: System.exit(0); //exits the user out of the console default: TextIO.put("Option must be 1, 2, 3 or 4"); } } //end of userMenu /**main method, will call the userMenu and get the users choice and call * the relevant method to execute the users choice. */ public static void main(String[]args){ userMenu(); //calls the userMenu method } //end of main method /**instructions method, displays instructions on how to play * the game to the user/ */ public static void instructions(){ TextIO.putln("To beat the Maze Game you have to move your character"); TextIO.putln("through the maze and reach the exit in as few moves as possible."); TextIO.putln(""); TextIO.putln("Your characer is displayed as a " + PLAYER); TextIO.putln("The maze exit is displayed as a " + EXIT); TextIO.putln("Reach the exit and you have won escaped the maze."); TextIO.putln("To control your character type the direction you want to go"); TextIO.putln("and how many spaces you want to move"); TextIO.putln("for example 'D3' will move your character"); TextIO.putln("down 3 spaces."); TextIO.putln("Remember you can't walk through walls!"); boolean insOption; //boolean variable TextIO.putln(""); TextIO.put("Do you want to play the Maze Game now? (Y or N) "); insOption = TextIO.getlnBoolean(); if (insOption == true)playMazeGame(); else userMenu(); } //end of instructions method /**playMazeGame method, calls the loadMaze method and the charMove method * to start playing the Maze Game. */ public static void playMazeGame(){ loadMaze(); plyrMoves(); } //end of playMazeGame method /**loadMaze method, loads the 39x25 maze from the MazeGame.txt text file * and inserts values from the text file into the maze array and * displays the maze on screen using the unicode block characters. * plyrX and plyrY variables are set at their staring co ordinates so that when * a game is completed and the user selects to play a new game * the player character will always be at position 01. */ public static void loadMaze(){ plyrX = 0; plyrY = 1; TextIO.readFile("MazeGame.txt"); //now reads from the external MazeGame.txt file rows = TextIO.getInt(); //gets the number of rows from text file to create X dimensions cols = TextIO.getlnInt(); //gets number of columns from text file to create Y dimensions maze = new char[rows][cols]; //creates maze array of base type char with specified dimnensions //loop to process the array and read in values from the text file. for (int i = 0; i<rows; i++){ for (int j = 0; j<cols; j++){ maze[i][j] = TextIO.getChar(); } TextIO.getln(); } //end for loop TextIO.readStandardInput(); //closes MazeGame.txt file and reads from //standard input. //loop to process the array values and display as unicode characters for (int i = 0; i<rows; i++){ for (int j = 0; j<cols; j++){ if (i == plyrX && j == plyrY){ plyrX = i; plyrY = j; TextIO.put(PLAYER); //puts the player character at player co-ords } else{ if (maze[i][j] == '0') TextIO.putf("%c",WALL); //puts wall block if (maze[i][j] == '1') TextIO.putf("%c",PATH); //puts path block if (maze[i][j] == '2') { entX = i; entY = j; TextIO.putf("%c",ENTRANCE); //puts entrance character } if (maze[i][j] == '3') { exitX = i; //holds value of exit exitY = j; //co-ordinates TextIO.putf("%c",EXIT); //puts exit character } } } TextIO.putln(); } //end for loop } //end of loadMaze method /**redrawMaze method, method for redrawing the maze after each move. * */ public static void redrawMaze(){ TextIO.readFile("MazeGame.txt"); //now reads from the external MazeGame.txt file rows = TextIO.getInt(); //gets the number of rows from text file to create X dimensions cols = TextIO.getlnInt(); //gets number of columns from text file to create Y dimensions maze = new char[rows][cols]; //creates maze array of base type char with specified dimnensions //loop to process the array and read in values from the text file. for (int i = 0; i<rows; i++){ for (int j = 0; j<cols; j++){ maze[i][j] = TextIO.getChar(); } TextIO.getln(); } //end for loop TextIO.readStandardInput(); //closes MazeGame.txt file and reads from //standard input. //loop to process the array values and display as unicode characters for (int i = 0; i<rows; i++){ for (int j = 0; j<cols; j++){ if (i == plyrX && j == plyrY){ plyrX = i; plyrY = j; TextIO.put(PLAYER); //puts the player character at player co-ords } else{ if (maze[i][j] == '0') TextIO.putf("%c",WALL); //puts wall block if (maze[i][j] == '1') TextIO.putf("%c",PATH); //puts path block if (maze[i][j] == '2') { entX = i; entY = j; TextIO.putf("%c",ENTRANCE); //puts entrance character } if (maze[i][j] == '3') { exitX = i; //holds value of exit exitY = j; //co-ordinates TextIO.putf("%c",EXIT); //puts exit character } } } TextIO.putln(); } //end for loop } //end redrawMaze method /**replay game method * */ public static void replayGame(){ c_plyrX = plyrX; c_plyrY = plyrY; TextIO.readFile("MazeGame.txt"); //now reads from the external MazeGame.txt file rows = TextIO.getInt(); //gets the number of rows from text file to create X dimensions cols = TextIO.getlnInt(); //gets number of columns from text file to create Y dimensions mazeCopy = new char[rows][cols]; //creates maze array of base type char with specified dimnensions //loop to process the array and read in values from the text file. for (int i = 0; i<rows; i++){ for (int j = 0; j<cols; j++){ mazeCopy[i][j] = TextIO.getChar(); } TextIO.getln(); } //end for loop TextIO.readStandardInput(); //closes MazeGame.txt file and reads from //standard input. //loop to process the array values and display as unicode characters for (int i = 0; i<rows; i++){ for (int j = 0; j<cols; j++){ if (i == c_plyrX && j == c_plyrY){ c_plyrX = i; c_plyrY = j; TextIO.put(PLAYER); //puts the player character at player co-ords } else{ if (mazeCopy[i][j] == '0') TextIO.putf("%c",WALL); //puts wall block if (mazeCopy[i][j] == '1') TextIO.putf("%c",PATH); //puts path block if (mazeCopy[i][j] == '2') { entX = i; entY = j; TextIO.putf("%c",ENTRANCE); //puts entrance character } if (mazeCopy[i][j] == '3') { exitX = i; //holds value of exit exitY = j; //co-ordinates TextIO.putf("%c",EXIT); //puts exit character } } } TextIO.putln(); } //end for loop } //end replayGame method /**plyrMoves method, method for moving the players character * around the maze. */ public static void plyrMoves(){ int nplyrX = plyrX; int nplyrY = plyrY; int pMoves; direction(); //UP if (dir == 'U' || dir == 'u'){ nplyrX = plyrX; nplyrY = plyrY; for(pMoves = 0; pMoves <= spaces; pMoves++){ if (maze[nplyrX][nplyrY] == '0'){ TextIO.putln("Invalid move, try again."); } else if (pMoves != spaces){ nplyrX =plyrX + 1; } else { plyrX = plyrX-spaces; c_plyrX = plyrX; movesTaken++; } } }//end UP if //DOWN if (dir == 'D' || dir == 'd'){ nplyrX = plyrX; nplyrY = plyrY; for (pMoves = 0; pMoves <= spaces; pMoves ++){ if (maze[nplyrX][nplyrY] == '0'){ TextIO.putln("Invalid move, try again"); } else if (pMoves != spaces){ nplyrX = plyrX+1; } else{ plyrX = plyrX+spaces; c_plyrX = plyrX; movesTaken++; } } } //end DOWN if //LEFT if (dir == 'L' || dir =='l'){ nplyrX = plyrX; nplyrY = plyrY; for (pMoves = 0; pMoves <= spaces; pMoves++){ if (maze[nplyrX][nplyrY] == '0'){ TextIO.putln("Invalid move, try again"); } else if (pMoves != spaces){ nplyrY = plyrY + 1; } else{ plyrY = plyrY-spaces; c_plyrY = plyrY; movesTaken++; } } } //end LEFT if //RIGHT if (dir == 'R' || dir == 'r'){ nplyrX = plyrX; nplyrY = plyrY; for (pMoves = 0; pMoves <= spaces; pMoves++){ if (maze[nplyrX][nplyrY] == '0'){ TextIO.putln("Invalid move, try again."); } else if (pMoves != spaces){ nplyrY += 1; } else{ plyrY = plyrY+spaces; c_plyrY = plyrY; movesTaken++; } } } //end RIGHT if //prints message if player escapes from the maze. if (maze[plyrX][plyrY] == '3'){ TextIO.putln("****Congratulations****"); TextIO.putln(); TextIO.putln("You have escaped from the maze."); TextIO.putln(); userMenu(); } else{ movesTaken++; redrawMaze(); plyrMoves(); } } //end of plyrMoves method /**direction, method * */ public static char direction(){ TextIO.putln("Enter the direction you wish to move in and the distance"); TextIO.putln("i.e D3 = move down 3 spaces"); TextIO.putln("U - Up, D - Down, L - Left, R - Right: "); dir = TextIO.getChar(); if (dir =='U' || dir == 'D' || dir == 'L' || dir == 'R' || dir == 'u' || dir == 'd' || dir == 'l' || dir == 'r'){ spacesMoved(); } else{ loadMaze(); TextIO.putln("Invalid direction!"); TextIO.put("Direction must be one of U, D, L or R"); direction(); } return dir; //returns the value of dir (direction) } //end direction method /**spaces method, gets the amount of spaces the user wants to move * */ public static int spacesMoved(){ TextIO.putln(" "); spaces = TextIO.getlnInt(); if (spaces <= 0){ loadMaze(); TextIO.put("Invalid amount of spaces, try again"); spacesMoved(); } return spaces; } //end spacesMoved method } //end of MazeGame class

    Read the article

  • create a simple game board android

    - by user2819446
    I am a beginner in Android and I want to create a very simple 2D game. I've already programmed a Tic-Tac-Toe game. The drawing of the game board and connecting it with my game and input logic was quite difficult (as it was done separately, canvas drawing, calculating positions, etc). By now I figured out that there must be a simpler way. All I want is a simple grid; something like this: http://www.blelb.com/deutsch/blelbspots/spot29/images/hermannneg.gif. The edges should be visible and black, and each cell editable, containing either an image or nothing, so I can detect if the player is on that cell or not, move it... Think of it as Chess or something similar. Searching the internet during the last days, I am a bit overwhelmed of all the different options. After all, I think Gridview or Gridlayout is what I am searching for, but I'm still stuck. I hope you can help me with some good advice or maybe a link to a nice tutorial. I have checked several already, and none were exactly what I was searching for.

    Read the article

  • XNA C# Platformer - physics engine or tile based?

    - by Hugh
    I would like to get some opinions on whether i should develop my game using a physics engine (farseer physics seems to be the best option) or follow the traditional tile-based method. Quick background: - its a college project, my first game, but have 4 years academic programming experience - Just want a basic platformer with a few levels, nothing fancy - want a shooting mechanic, run and gun, just like contra or metal slug for example - possibly some simple puzzles I have made a basic prototype with farseer, the level is hardcoded with collisions and not really tiled, more like big full-screen sized tiles, with collision bodies drawn manually along the ground and walls etc. My main problem is i want a simple retro feel to the jumping and physics but because its a physics simulation engine its going to be realistic, whereas typical in air controllable physics for platformers arent realistic. I have to make a box with wheel body fixture under it to have this effect and its glitchy and doesnt feel right. I chose to use a physics engine because i tried the tile method initially and found it very hard to understand, the engine took care of alot things to save me time, mainly being able to do slopes easily was nice and the freedom to draw collision bounds wherever i liked, rather then restricted to a grid, which gave me more freedom for art design also. In conclusion i don't know which method to pick, i want to use a method which will be the most straight forward way to implement and wont give me a headache later on, preferably a method which has an abundance of tutorials and resources so i dont get "stuck" doing something which has been done a million times before! Let me know i haven't provided enough information for you to help me! Thanks in advance, Hugh.

    Read the article

  • Help to organize game cycle in Java

    - by ASIO22
    I'm pretty new here (as though to a game development). So here's my question. I'm trying to organize a really simple game cycle in my public static main() as follows: Scanner sc = new Scanner(System.in); //Running the game cycle boolean flag=true; while (flag) { int action; System.out.println("Type your action please:"); System.out.println("0: Exit app"); try { action = sc.nextInt(); switch (action) { case 0: flag=false; break; case 1: break; } } catch (InputMismatchException ex) { System.out.println(ex.getClass() + "\n" + "Please type a correct input\n"); //action = sc.nextInt(); continue; } What's wrong with this cycle: I want to catch an exception when user types text instead of number, show a message, warning user, and the continue game cycle, read user input etc. But instead of that, when users types wrong data, it goes into a eternal cycle without even prompting user. What I did wrong?

    Read the article

  • Physics-perfect (or somewhere near) 3d sound engine

    - by passcod
    I'm new to game programming, although I have some years of experience in console/web development. My problem is not so much that I can't find what I'm looking for, it's just that I don't have the terminology to actually perform a successful search. I am looking for a physics engine which has great focus on sounds. In fact, I do not care at all for anything else. What I mean is better explained by an example: Suppose a 1st person type game. You are facing North, and someone somewhere around you throws a flute at you (nevermind the absurdity of the situation). The flute spins while it is on its way, making sounds through its holes. There is a wind of say, 5 knots South. I imagine a physics engine will be capable of calculating the trajectory of the flute, as well as the direction it takes after it hits. What I want is for the physics engine to calculate the precise sounds it will make, from any listener's perspective. Does any such engine exists? If there are several, which one would be best for the example above?

    Read the article

  • Game engine lib and editor

    - by luke
    I would like to know the best way/best practice to handle the following situation. Suppose the project you are working on is split in two sub-projects: game engine lib editor gui. Now, you have a method bool Method( const MethodParams &params ) that will be called during game-level initialization. So it is a method belonging to the game engine lib. Now, the parameters of this method, passed as a reference the structure MethodParams can be decided via the editor, in the level design phase. Suppose the structure is the following: enum Enum1 { E1_VAL1, E1_VAL2, }; enum Enum2 { E2_VAL1, E2_VAL2, E2_VAL3, }; struct MethodParams { float value; Enum1 e1; Enum2 e2; // some other member } The editor should present a dialog that will let the user set the MethodParams struct. A text control for the field value. Furthermore, the editor needs to let the user set the fields e1 and e2 using, for example, two combo boxes (a combo box is a window control that has a list of choices). Obviously, every enum should be mapped to a string, so the user can make an informed selection (i have used E1_VAL1 etc.., but normally the enum would be more meaningful). One could even want to map every enum to a string more informative (E1_VAL1 to "Image union algorithm", E1_VAL2 to "Image intersection algorithm" and so on...). The editor will include all the relevant game egine lib files (.h etc...), but this mapping is not automatic and i am confused on how to handle it in a way that, if in future i add E1_VAL3 and E1_VAL4, the code change will be minimal.

    Read the article

  • Farseer Physics Samples and Krypton how to reference game

    - by Krell
    I'm sure this is totally simple and yes I am new at this. I am trying to set up Krypton inside farseer. 1. create a new Krypton engine in my sub screen aka AdvancedDemo1 : PhysicsGameScreen, IDemoScreen Via this.krypton = new KryptonEngine(this, "KryptonEffect"); The problem is the KryptonEngine(this wants reference to Game game, I cant seem to reference it from FarseerPhysicsGame : Game So how would I do that? or 2. I can put it directly in FarsserPhysicsGame but again I cant seem to figure out how to reference FarseerPhysicsGame in AdvancedDemo1. or 3. I can put it inside the public FarseerPhysicsGame() and do Componenets.Add(krypton) [which works] HOWEVER I cant figure out how to reference the compoenet once it is added. You should be able to stop reading here , but for more detail I simply took the Farseer XNA Samples went into FarseerPhysicsGame.cs and deleted all the screens and menus except AdvancedDemo1 so there is one option and I just click that to load into the advancedDemo1 and thats where I want to put the lights from krypton. Thanks. Edit: Figured out 1 solution though I am still curious about others. Solution 1 I was able to use ScreenManager.Game(not sure why it was there but Ill try to figure it out later)

    Read the article

  • Mixing Objective-C and C++: Game Loop Parts

    - by Peteyslatts
    I'm trying to write all of my game in C++ except for drawing and game loop timing. Those parts are going to be in Objective-C for iOS. Right now, I have ViewController handling the update cycle, but I want to create a GameModel class that ViewController could update. I want GameModel to be in C++. I know how to integrate these two classes. My problem is how to have these two parts interact with the drawing and image loading. GameModel will keep track of a list of children of type GameObject. These GameObjects update every frame, and then need to pass position and visibility data to whatever class or method will handle drawing. I feel like I'm answering my own question now (talking it out helps) but would it be a good idea to put all of the visible game objects into an array at the end of the update method, return it, and use that to update graphics inside ViewController?

    Read the article

  • Implementation of Race Game Tree

    - by Mert Toka
    I build a racing game right in OpenGL using Glut, and I'm a bit lost in all the details. First of all, any suggestions as a road map would be more than great. So far what I thought is this: Tree implementation for transformations. Simulated dynamics.(*) Octree implementation for collusion detection. Actual collusion detection.(*) Modelling in Maya and export them as .OBJs. Polishing the game with GLSL or something like that for graphics quality. (*): I am not sure the order of these two. So I started with the simulated dynamics without tree, and it turned out to be a huge chaos for me. Is there any way you can think of such that could help me to build such tree to use in racing game? I thought something like this but I have no idea how to implement it. Reds are static, yellows are dynamic nodes

    Read the article

  • component Initialization in component-based game architectures

    - by liortal
    I'm develping a 2d game (in XNA) and i've gone slightly towards a component-based approach, where i have a main game object (container) that holds different components. When implementing the needed functionality as components, i'm now faced with an issue -- who should initialize components? Are components usually passed in initialized into an entity, or some other entity initialized them? In my current design, i have an issue where the component, when created, requires knowledge regarding an attached entity, however these 2 events may not happen at the same time (component construction, attaching to a game entity). I am looking for a standard approach or examples of implementations that work, that overcome this issue or present a clear way to resolve it

    Read the article

  • Physics engine that can handle multiple attractors?

    - by brice
    I'm putting together a game that will be played mostly with three dimensional gravity. By that I mean multiple planets/stars/moons behaving realistically, and path plotting and path prediction in the gravity field. I have looked at a variety of physics engines, such as Bullet, tokamak or Newton, but none of them seem to be suitable, as I'd essentially have to re-write the gravity engine in their framework. Do you know of a physics engine that is capable of dealing with multiple bodies all attracted to one another? I don't need scenegraph management, or rendering, just core physics. (collision detection would be a bonus, as would rigid body dynamics). My background is in physics, so I would be able to write an engine that uses Verlet integration or RK4 (or even Euler integration, if I had to) but I'd much rather adapt an off the shelf solution. [edit]: There are some great resources for physics simulation of n-body problems online, and on stackoverflow

    Read the article

  • D, Vala or Go for game development [on hold]

    - by Sheosi
    I'm looking forward to choose some compiled language for my 3D engine. The engine it's written in C++, however I would like to help coders by using a language which is good for games. I came with these three: Vala, D and Go. The engine is being made to write as less code as posible, also the "main" language it's going to be Lua so any of these will be the "advanced" one (mainly things which could affect performance or . Because of all this and the fact that I heard that Go is good for small projects I thought it would be a pretty good option, however it does not seems to be made (at least originally) for games and also some say I can have trouble with garbage collection in games. So what do you think? Do you have any experience with any of these three in games? How was it?

    Read the article

  • Car engine sound simulation

    - by Petteri Hietavirta
    I have been thinking how to create realistic sound for a car. The main sound is the engine, then all kind of wind, road and suspension sounds. Are there any open source projects for the engine sound simulation? Simply pitching up the sample does not sound too great. The ideal would be to something that allows me to pick type of the engine (i.e. inline-4 vs v-8), add extras like turbo/supercharger whine and finally set the load and rpm. Edit: Something like http://www.sonory.org/examples.html

    Read the article

  • Implement 2x speed in tower of defense type game

    - by Siddharth
    I was currently developing tower of defense game and I want to implement 2x feature for my game. Game usually run with 1x speed that was normal speed of the game. Here what 1x and 2x mean : 1x - mention normal speed of the game, 2x - mention the game object moves with double speed means user experience the fast game play. I want to implement such functionality for my game. The functionality that I want contains in the game Medieval Castle game that was available in the market. https://play.google.com/store/apps/details?id=com.nova.root&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5ub3ZhLnJvb3QiXQ.. The screen shot also shows the 1x and 2x button in that game. I think for 2x speed of the game I have to increase the speed of each object that were in the game. So any member please help what to do for that implementation. Only idea become enough for me.

    Read the article

  • Title of a specific retro game with color absorption

    - by Rene B
    I am looking for the title a free multiplayer (on one machine) DOS game i can't remember Players are steering (with cursors/WASD keys) kind of ufos which looks like donuts from top-down view. These 'ufos' attract colored particles. When your particles collide with particles from other players (in a different color), the colors will mix. If the particles are more your color than the other players color, they will start following you. The only remaining player (with the most color particles) wins the game. Can you please give me the game title? THANK YOU!

    Read the article

  • How to make this game loop deterministic

    - by Lanaru
    I am using the following game loop for my pacman clone: long prevTime = System.currentTimeMillis(); while (running) { long curTime = System.currentTimeMillis(); float frameTime = (curTime - prevTime) / 1000f; prevTime = curTime; while (frameTime > 0.0f) { final float deltaTime = Math.min(frameTime, TIME_STEP); update(deltaTime); frameTime -= deltaTime; } repaint(); } The thing is, I don't always get the same ghost movement every time I run the game (their logic is deterministic), so it must be the game loop. I imagine it's due to the final float deltaTime = Math.min(frameTime, TIME_STEP); line. What's the best way of modifying this to perform the exact same way every time I run it? Also, any further improvements I can make?

    Read the article

  • Small-Scale Physics Engine

    - by user1276078
    I'm entering Android game development, and I already have a computer version of a game I want to publish. The thing is, I want to make this as good as it can be. With that said, I need a physics engine, really to only do one thing. That one thing is to make a parabolic movement of my main character as he's jumping in the air. Currently, my computer version simply makes the guy move up at a 45 degree angle, and as soon as it hits the ceiling, down at a 45 degree angle. I need a physics engine/library that would accomplish that, it has to be in java since that's my best language, it has to be 2D, and it has to be able to work on Android. Which physics engine/library could accomplish all of that?

    Read the article

  • Game World Design [on hold]

    - by GameDev
    I have one doubt about world game developing. I want to do a kind of platform game mixed with RPG (Side Scroll). What's the best to draw the world, - Draw everything than use the camera to move around the world - Draw just what you see as the player moves draw the new stuff. I'm new at this and didn't had any course for it. So if anyone can help me thanks :) PS: Any recommendation to learning game concept, like drawing world theory, play etc.. (not code and i want to 2D and i only see books for 3D stuff)

    Read the article

  • Using XNA to learn to build a game, but wanna move on [closed]

    - by Daniel Ribeiro
    I've been building a 2D isometric game (with learning purposes) in C# using XNA. I found it's really easy to manage sprite sheets loading, collision, basic physics and such with the XNA api. The thing is, I want to move on. My real goal is to learn C++ and develop a game using that language. What engine/library would you guys recommend for me to keep going on that same 2D isometric game direction using pretty much sprite sheets for the graphical part of the game?

    Read the article

  • How should I invoke a physics engine?

    - by ymfoi
    I'm new to writing games. I'm planning to write a 2D battle game which may require an physics engine. Suppose I've written one, but how can I combine it with the main routine of my game? Should I attach it directly to the graphics render routine or put it in an individual thread? I've spent much time looking for some common approach, but found nothing. So can you reveal some basics idea for me, a newbie? Thanks! P.S. There're many other problems I have to deal with if I choose to start a separate thread for the physics engine, for example, the lock problem, while from my intuition, I guess I'd better separate the render and the physics engine.

    Read the article

  • Career in Game Development

    - by cantbereached
    Hello, I currently study computer engineering and I want to lead my career towards game industry which I always want to be a part of. But I am not sure where to start. I applied some of the companies in the industry for internship and so but most of them wants experience and some work in game developing. Many asks whether I developed a simple game or something similar which I haven't done so far. I am proficient at C, C++, Java, JS, HTML etc. Any tips from people experienced in the industry on where to start ?

    Read the article

  • Simple 3D Physics engine as a part of graduation project [on hold]

    - by Eugene Kolesnikov
    I am working on my graduation project and one part of it is to simulate the motion of a rigid body in 3D space. I can use either already written physics engine or to write it myself. It's quite an interesting challenge for me, so I would like to do it myself. I am able to use either C++ or Java for programming (prefer C++). I am using Mac OS X and Debian 7. Could you suggest any guides or tutorials how to do it, can't find it anywhere... More precisely, I need a very simple engine, without collision detection, and many other things that I do not know, I just need to calculate the forces and move my body, depending on the resultant force. If you think that this task is still very difficult or there is no such tutorial, please suggest me some good and simple engine.

    Read the article

  • How do I know if my game's average game session time is too small?

    - by you786
    My game has only one life, and the aim is to stay alive as long as possible to get as many points as possible (it's an endless runner). Using Google Analytics I found that players are staying alive for an average of 17 seconds. I could easily increase or decrease this by manipulating acceleration or starting speed. The question is, should I change it at all? Is there any research or general ideas on the best playing time for a game like this? I would also like to know about any research about how long an ideal mobile game session should last.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >