problem about game-engine-Collection of common programming errors


  • Zacharias
    android andengine game-engine game-physics
    I am making a game on andengine. A car moving from bottom to top (Across the road), many cars are coming through the road. I want to save the single car by touching and destroying the other cars. I can get the collisions. But when I touch and destroy other cars, i get an exception ArrayOutOfBound after destroying two or three cars. What may be the problem? Thanks in advanceIterator<Sprite> targets;public void addTarget() {Random rand = new Random();int x = (int) mCamera.getWidth() + mTarge

  • Brett Powell
    c# .net assembly executable game-engine
    A new game released has been provided with server files that do not currently have the option of configuring an IP Address/Port for binding. Unfortunately this limits the ability to run more than one instance of the application per machine as it is hard-coded to port “12345”.Many years ago I was using c++ and hex editors to change hard coded values like this and while that knowledge has long since been forgotten, would it be possible to improve this by writing a secondary application to change t

  • user298110
    opengl memory-leaks sdl game-engine
    This is my first “game” I’m working on in C++ using OpenGL for graphics and SDL for the application. My code appears to work as I am able to create a functional application window and fully load and draw a texture with the Devil Texture library. The problem arises at runtime. My Memory usage, according to Windows Task Manager, starts at around 13,900 but steadily grows to about 15,000 after 4 minutes or so and then stops. Is this normal? Is Windows Task Manager an inaccurate way of viewing me

  • Nick Toumpelis
    objective-c game-engine
    if Apple announce their own gaming console as they did in past and i’m sure they will not support C++/C# games. so my question is that Is Objective-C is such fast and powerful to write efficient game Engine ?

  • Drop
    design architecture game-engine entity-system component-based
    I have been looking at game engine design (specifically focused on 2d game engines, but also applicable to 3d games), and am interested in some information on how to go about it. I have heard that many engines are moving to a component based design nowadays rather than the traditional deep-object hierarchy.Do you know of any good links with information on how these sorts of designs are often implemented? I have seen evolve your hierarchy, but I can’t really find many more with detailed informa

  • Dennis Williamson
    c# performance xna game-engine
    I am currently developing a C# .net XNA game engine. I had a question about the design of the engine. First of all I would like to have my engine be able to incorporate my own scripting language. To do so I was thinking I would have to be able to access to all the properties of all the objects in the game, or just the ones I would like to change.The first thing I started doing is trying to be able to access by strings. To do so I made every “Entity”, something that can be drawn to the screen, ha

  • eco_bach
    actionscript-3 game-engine
    I’m curious what advantages if any the Autodesk Scaleform framework has for game development in actionscript? When compared to say, Starling? I assume it also uses Stage3D.

  • shmeeps
    c# xna game-engine
    I would like to implement what I know as a CVAR System, I’m not entirely sure on what the official name of it is (if any).It’s essentially a system used in some programs and video games, where a user can pull down a console and input a command, such as “variable 500” to set that variable to 500. Instances of this can be found in any Half-Life game, Doom and Quake games, and many more. The general idea seems to be to hide the underlying architecture, but still allow protected access, for instance

  • Marvo
    android andengine game-engine game-physics
    I am new to Android Game Development, I am using Andengine for the Game Development. I want to stretch an image by the touching the image.Please note I want to just stretch that part of image which is being touched.

  • n.by.n
    iphone ios cocos2d-iphone box2d game-engine
    I am creating an ‘Endless runner’ using Cocos2d/Box2d where I am using CCFollow to set my camera on the main running character. (YES I am scrolling very deep in X and Y Values). Right now, I have created a part of this game which is already too big. I am generating all the bodies/sprites at once on fixed positions. (Something Like in 1500’s of the X and -1500’s of the Y axis).But it is wrong as for optimization issues and the nature of my game i.e endless runner, where I have to generate random

  • Rustem K
    c++ python tornado game-engine gevent
    We are developing a gamified environment which facilitates learning of ‘boring’ material. Recently, we have launched with the 1.0 release that comprises of the following modules:Django based web portal for learning courses, viewing leaderboard (scoring), personal activity and achievements. Tornado based real-time feeds and notification service. We are utilized sockjs-tornado developed by mrjoes. We took benefit from shared session: if user logged in to django site, he automatically opened a cha

  • Pluto
    compression game-engine blender
    I have been learning the basics of blender for the best part of the day, and I still cannot figure out how to make models(imported) smaller in file size(where their original file size is 2MB+).The reason why I want to make the files smaller is because I am trying to use them in my iPhone application, however the app crashes when the .obj files are over 1MB.Could anybody please help me I have been at this for hours..

  • Nathan
    c++ class pointers game-engine
    I’ve made a 2d game engine, but I’m questioning if one way I did things is the best way to do things structurally. For example, a member of Sprite can have multiple Graphic members. Right now I’m keeping those members in a vector<const Graphic*> (not std::vector, but I will use that for simplicity in the example):class Sprite { private:std::vector<const Graphic*> _graphicList; public:Sprite();~Sprite();void addGraphic(const Graphic* toAdd); //adds a const Graphic* to _graphicListvo

  • rzrscm
    c++ segmentation-fault game-engine
    I’m having trouble figuring out the problem with my code…I’m in the early stages of prototyping a game (my first serious project). It frequently, but not always, crashes with a segmentation fault. Here’s the flow of the program…title screen – press z to start new game player and enemy on screen…enemy takes a life when collided with, there are 4 lives. when character’s life is 0, game goes back to title screen – press z to start new gameThe last step is where the crash occurs…The crash

  • Ahmed Ghazy
    c# xna streaming xna-4.0 game-engine
    I am trying to load many images at runtime and assign each one to Texture2D object to be displayed usnig XNA and i use TitleContainer.OpenStream(“Content/”+fileName+”.png”).When i run the project i face this exception:An unhandled exception of type ‘System.IO.FileNotFoundException’ occurred in Microsoft.Xna.Framework.dll Additional information: Error loading “Content\Background.png”. File not found.Although all images are set in Content.and this is the all code of the method that load image and

  • Lukas K
    access-violation game-engine multi-project runtime-exception
    I have a problem when trying to run my game that uses the Haaf’s Game engine, this exception is thrown: Unhandled exception at 0x72daad10 (TakaGUI.dll) in Game.exe: 0xC0000005: Access violation reading location 0x00000000. This is the method where the exception occurs: Code: void Draw(hgeSprite* sprite, float x, float y) { sprite->Render(x, y); }The function is part of a dll-project that i refer to in my main c++ project. So i’m basically doing this: I create a hgeSprite. I pass it to this m

  • Amel Jose
    android game-engine
    I am new to android game development. Everything works fine on emulators and one of my android device but crashing in my nexus 4…I am trying to obtain the user’s touch using@Override public boolean dispatchTouchEvent(MotionEvent event) {if(!jump){first=true;makeajump();}return super.dispatchTouchEvent(event); }This is where the error occours in debug mode testing on nexus:jcanvas.drawBitmap(mytree, xtree1,height-t1.getHeight(), null);//inside makeajump() line 404it all works until user taps on

  • El Zorko
    c# asynchronous game-engine async-await coroutine
    Is it possible to use async and await to tastefully and safely implement performant coroutines, which run only on one thread, don’t waste cycles (this is game code) and can throw exceptions back to the caller of the coroutine (which might be a coroutine itself)?BackgroundI’m experimenting with replacing (pet game project) Lua coroutine AI code (hosted in C# via LuaInterface) with C# coroutine AI code.. I want to run each AI (monster, say) as its own coroutine (or nested set of coroutines), such

  • Tom Gullen
    javascript game-engine
    Suppose you created an online game in HTML5/Javascript. All the code would be downloaded into the users browser, and they would run the game.What is stopping someone from copying the game onto their computer, and injecting functions and modules to cheat? IE, they could write a function that autoaims at the nearest enemy sprite for example. Is there any fundamental way to protect people from doing this sort of thing by designing your game code in a certain way?

  • Sabuncu
    html5 game-engine
    I have a problem with animation; here is my code:window.addEventListener(‘load’, function(){var Q =window.Q= Quintus().include(“Sprites, Scenes,2D, Anim”).setup({maximize:true});Q.Sprite.extend(‘user’,{init:function(p){this._super({sheet:”user”,sprite:”user”,x:p.x,y:p.y,vx:p.vx,vy:p.vy});this.add(“animation”);},step:function(dt){this.play(“walk”); } });Q.scene(“scene1”,function(stage){var sprite1=stage.insert(new Q.user({x:200,y:20,vx:0,vy:0}));});Q.load(“sprites.json,sprites.png”,fun

  • jack
    android game-engine cocos2d-android
    For updating the scores in cocos2d-android when 2 images intersects, i get error in _label.setText(String.valueOf( myscore)); as The method setText(String) is undefined for the type CCLabel, here’s my code.public void update(float dt) {LinkedList<CCSprite> projectilesToDelete = new LinkedList<CCSprite>();for (CCSprite projectile : _projectiles){CGRect projectileRect = CGRect.make(projectile.getPosition().x – (projectile.getContentSize().width / 2.0f),projectile.getPosition().y – (pro

  • Aldy Syahdeini
    html5 game-engine
    I’m following the quintus tutorial on http://html5quintus.com/, and do some code, this is my codevar Q = Quintus().include(“Sprites”).setup({width:800,height:600});Q.Sprite.extend(“Player”,{init:function(p){this._super(p,{ sheet:”superman” });this.add(‘2d’);}});Q.load(“sprites.json,sprites.png”,function(){var man=new Q.Player();Q.gameLoop(function(dt){man.render(Q.ctx);});});and on the browser I got Cannot call method ‘draw’ of undefined , it’s weird becuase the error occurs in quintus-all.js

  • Liam15
    java arrays error-handling syntax-error game-engine
    I’m trying to design a pretty simple simulation civilization game for school. Right now I’m trying to make it so when you click this button on the control bar you make a new hut instance. I will put error report below and code where the error occurs.Error Report:Exception in thread “AWT-EventQueue-0” java.lang.NullPointerException at controls.Sidebar.clickBuildHut(Sidebar.java:102) at screen_window.Game_Window.mouseClicked(Game_Window.java:248) at java.awt.Component.processMouseEvent(Unknown Sou

Web site is in building