How to alter image pixels of a wild life bird? Hello so I was hoping someone knew how to move or change color and position actual image pixels and could explain and show the code to do so. I know how to write pixels on a surface or screen surface usigned int ptr static cast lt unsigned int gt (screen pixels) int offset y (screen gt pitch sizeof(unsigned int)) ptr offset x color But I don't know how to alter or manipulate a image pixel of a png image my thoughts on this was How do I get the values and locations of pixels and what do I have to write to make it happen? Then how do I actually change the values or locations of those gotten pixels and how do I make that happen? any ideas tip suggestions are also welcome! int main(int argc , char argv ) SDL Surface Screen SDL SetVideoMode(640,480,32,SDL SWSURFACE) SDL Surface Image Image IMG Load("image.png") bool done false SDL Event event while(!done) SDL FillRect(Screen,NULL,(0,0,0)) SDL BlitSurface(Image,NULL,Screen,NULL) while(SDL PollEvent( amp event)) switch(event.type) case SDL QUIT return 0 break SDL Flip(Screen) return 0


Can I create relative filepaths to images in an XCode SDL project? Can I create relative filepaths to images in an XCode SDL project? I have to use absolute filepaths as it is, but it would be much easier if I could make the filepaths relative.


Unable to detect continuous keypress event in SDL I am developing a game using SDL, and am unable to do continuous motion for my object when a key is held down. I'm calling SDL PollEvent() to retrieve all events during a frame, and passing each resulting SDL Event structure into this function void Avatar handle input(SDL Event keyInput) if( keyInput.type SDL KEYDOWN ) Adjust the velocity switch( keyInput.key.keysym.sym ) case SDLK LEFT Move(1) break case SDLK RIGHT Move(2) break The problem is that when I hold down the right or left arrow keys, the avatar only moves once instead of moving continuously for as long as I hold down the key. How can I make the motion continue for as long as the key is held down?


How do I access the pixels of an SDL 2 texture? How exactly can one get to the RGBA pixel arrays of SDL 2.0 textures? Does the texture need to be specially initialized and locked down?


Is SDL2 alone capable of dynamic (or deferred) lighting? I'm talking about JUST SDL2, not OpenGL or DirectX. Would drawing deferred lighting bulk the CPU up and how would it be done?


Background color gradient with SDL I want to create a menu for a game using a color gradient as the background. Is there a way to create a gradient background instead of using an image for it (since I don't know what size the window will be, using an image is no option). Please note I need to achieve this using only the C standard library and the SDL, no other library and no C .


Scaling an SDL Surface I want to create a button for a game's UI. The background uses a gradient and then I blit a surface on top of the gradient and use SDL SetColorKey to delete the unwanted pixels. The surfaces are not the same size the clipping mask is 200 x 50 and the gradient 1 x 50, so I need to stretch the gradient to the same width of the cliping mask, I can't use a wider image because the purpose of doing this is to save memory and storage and using the same gradient image on multiple clipping masks of different widths. I found I can use SDL BlitScaled but I need to blit the surface to itself and it appears to be useless because the surface remains the same size, am I doing something wrong? Is there a way to do it without blitting the surface to itself? SDL Rect final size final size.w 200 final size.h 50 final size.x 0 final size.y 0 SDL BlitScaled(gradient surface, NULL, gradient surface, amp final size) do some stuff with those textures SDL CreateTextureFromSurface(renderer, final button surface)


Fast texture pixel access using SDL2 People have asked questions on fast pixel manipulation, but I'm looking to read the RGB color values of each pixel. I've heard of SDL RenderReadPixels but in the docs it says WARNING This is a very slow operation, and should not be used frequently. Is there an SDL2 function that returns an array of all the pixels of a texture or an SDL2 routine that I can use to loop over each pixel?


SDL2 for hardware accelerated graphics? I am attempting to make a 3d game using SDL2 just to learn and have a bit of fun. I was wondering if there is any way to get SDL2 do calculations on GPU. I have read that SDL2 Textures uses GPU for calculation, but is there any way to get it to do calculations from my functions using GPU? For example, if I have a function multiplyVectorWithMatrix, and there is a bunch of additions going on in that function, how would I get SDL2 to do those additions using GPU rather than CPU?


SDL 1.2 reports wrong screen size I have a multi monitor setup with two displays, both 1920x1200. In games, I can only select resolutions 1920x1200 (like 2560x1200) which makes games unusable. Full screen doesn't work either because it switches one display to 800x600 which means I can't reach the close button... I have to kill the game and then, I have to restore my desktop because all windows are moved resized. How can I force SDL to use any resolution that I want?


Why does SDL2 blur pixel art even with SDL HINT RENDER SCALE QUALITY set to 0? I am working on a game with SDL2 and having trouble turning off linear filtering when upscaling textures. My game has a bunch of 32x32 tiles. I used SDL RenderSetLogicalSize so that there is a one to one pixel mapping (i.e. my logical size is n 32 x m 32.) However, when the the whole scene is upscaled to fit the actual screen, it seems to be interpolated (blurry). I saw these two other posts (1, 2) which recommended using SDL SetHint(SDL HINT RENDER SCALE QUALITY, "0") . I did that, but nothing seems to change at all. It returns true and it is in fact changing the hint, but the rendering just doesn't change at all. I even tried setting it with priority but nothing changes. Any idea how to fix this? I am on Windows if that's relavent.


Is there a way how to handle multiple SDL PollEvent loops without clearing the event queue? Is there a way how can I handle more SDL PollEvent while loops for one SDL Event, without taking the events off from the event queue? Let us say I have something like this void Game processInput() SDL Event event SDL PollEvent( amp e) Engine InputManager processInput( amp e) GUI Library InputManager processInput( amp e) And then the engine processes the input in function like this void Engine InputManager processInput(SDL Event e) mainEvent e while (SDL PollEvent( amp mainEvent)) switch ( mainEvent.type) case SDL KEYDOWN Engine InputManager pressKey( mainEvent.key.keysym.sym) break case SDL KEYUP Engine InputManager releaseKey( mainEvent.key.keysym.sym) break However, this while loop clears the whole event queue, and another input manager (my GUI, for example) does nothing because it no longer has events in the queue. Is there a possible way to handle this situation?


Are SDL games trivially portable from Linux to Windows? I have a small game made with SDL2 and I want to port it to Windows. Would I hav eto write a lot of ifdefs to port it or will the very same code work on Windows and Linux? Or is it more complicated? Sorry if these are silly questions. I couldn't find existing resources on porting SDL games between desktop systems and I've never done this before!


What exactly does SDL RenderSetClipRect do? I assumed that this function would move the area which is clipped out of conceptual space and copied onto the renderer (and subsequently drawn to the window) i.e. change the origin of rendering but it doesn't seem to do this. Anybody know how it works?


SDL Multiple keyboard support I am making a game with multiplayer split screen mode using SDL. Basically, I like the idea of having each player plug in his own keyboard to the PC, set custom controls via options and being able to play it with controls that he likes. However, there's a problem. This code gets the keyboard event SDL Event event SDL PollEvent( amp event) SDL Event has member SDL KeyboardEvent key, which has member Uint8 which. In short event.key.which According to this, it should represent keyboard device index, however, I've tried connecting three keyboards to my PC and press the buttons at the same time and the result wasn't satisfying they all had same keyboard indexes. Is there a solution to this? Or am I missing something?


Blender modelling for a C game? I want to know if it were possible to integrate models created with Blender into a game written in solely C .


frustum culling and exporting a big scene model Let's assume that I created in Blender a race track with landscape. I can export it to single wavefront obj file and then load in my graphics engine using assimp but it doesn't allow to use frustum culling. Should I split such big scene too seperate objects or some model formats allow to split object within single file. How graphics engines load such big scenes ? Do you know some useful techniques articles ?


Blender How to unlock transform on bone I was trying to create IK constraint following a Nathan Vegdahl tutorial, and everything was nice and shiny, until i tried to actually move a bone. It's not moving, only rotating. I see that transform lock panel on location is grey and completly locked, and i have no idea what's wrong.


Exporting Blender bones' transform matrix I use this simple python script to export bones transformation bones armature.pose.bones for eaach bone in bones SystemMatrix Matrix.Scale( 1, 4, Vector((0, 0, 1))) Matrix.Rotation(radians( 90), 4, 'X') if (bone.parent) Export babylon.write matrix4(file handler, "matrix", bone.parent.matrix.inverted() bone.matrix) else Export babylon.write matrix4(file handler, "matrix", SystemMatrix bone.matrix) I'm using a left handed Y up system but I should forget something about rotation because the result is not correct ( Original (under Blender)


Correct way to export from blender to ogre format? When I export from blender to ogre using the blender2ogre add on, I'm not getting anything besides a scene most of the time and when I get a mesh I never get a material. Is there something wrong with my export procedure or what else could I be doing wrong? Update I can export the basic cube from blender to ogre but when I download a model and try to export it I don't get the meshes. Update 2 I tried again and selecting the model in Blender does the difference like the answer here says. I can export an alien and get the mesh and material I rename the files ls workspace DungeonWorld2 assets objects creatures alien Cube.001.mesh Material.002.material Material.005.material Cube.001.mesh.xml Material.003.material Cube.001.skeleton.xml Material.004.material dev dev OptiPlex 745 ls workspace DungeonWorld2 assets objects creatures alien alien.mesh Material.002.material Material.005.material alien.mesh.xml Material.003.material alien.skeleton.xml Material.004.material dev dev OptiPlex 745 But how do I actually load the material since the alien now turns up in the game with no material but it does render the mesh Spatial model3 assetManager .loadModel("objects creatures alien alien.mesh.xml") model3.scale(0.3f, 0.3f, 0.3f) model3.setLocalTranslation( 40.0f, 3.5f, 20.0f) rootNode.attachChild(model3)


Blender arm rig not working the way it should I just bought a pair of arms from the unity asset store and imported them into blender, the IK seems to work just fine untill i use a Child of constraint on another bone(which is supposed to be a weapon) on the arm's wrist bone the bone rotates but it wont move. I'll leave a video of it right here, https www.youtube.com watch?v jfLmG2sQ 10 EDIT the wrist bone seems to follow the child WHEN i disconnect the wrists parent, but if i do that the IK doesnt work in general. Appreciate all help, thanks in advance )


Why is my model exported from Blender vanishing when using it in UE4 mobile? My 3D models and animation vanishes when I preview it using the mobile view port. However they work just fine for the desktop viewport. I usually model the characters using MakeHuman and import them into Blender. In Blender I animate them and then I import the model animation into UE4. The problem is that my model animation works when I preview it using the shader meant for desktop amp consoles. When I preview my animation using the openGLES2 shader, my model vanishes. Anything I import form belnder vanishes when I view it in a mobile viewport. I cant figure out why this is so? Have any of you experienced this before ? Can you guys let me know how I can correct this issue? Also, if I upload the models from MakeHuman into UE directly, I can upload the files properly in UE. But, when I try the workflow MakeHuman Blender UE with not much modifications to the models in Blender, the models are not visible in the openGLES2 shader. I am not sure why this is happening in Blender and why the models coming out if it is affected. Any help would be appreciated.


Blender 2.5 Using a Bezier Circle to set Bezier Curve as the Bevel Object I'm trying to follow the tutorial found here. Around 5 40 (ish) in the video, he adds a Bezier Circle. He then adds the existing Bezier Curve as the Bevel Object on the Circle. This makes the Curve go around the circle creating the 3D chess piece. I'm trying to do the exact same thing, but it's not working. I am using Blender 2.5 however too. When I set my curve to be the Bevel Object of the Circle, my Bezier Circle is just becoming a larger gray disc of goo. I was expecting it to be a 3D chess pawn. You can see a screenshot of what mine looks like Before Bevel Object is Placed After Bevel Object is Placed For the record, the name of my Bezier Curve is "BezierCurve" and the name of my Bezier Circle is "BezierCircle". Thanks in advance, Andy UPDATE 1 I just added a plan unchanged Bezier Curve and unchanged Bezier Circle and performed the same steps and it does work. Something must be wrong with my Bezier Curve in that it isn't being projected correctly around the Circle. UPDATE 2 Just realized that when I set the Bezier Curve handles to "Automatic" using the V shortcut (only for Blender 2.5), then my Circle no longer imitates the 3D curve. I need Automatic I think in order for the Bezier Curve to not be wavy. With Automatic, it does a slight curve directly from point to point. Thoughts?


independent lighting per mesh in blender In Blender, is it possible to assign lighting objects effects exclusively to a single mesh? For instance, if I place two meshes next to each other, and two lights (one shining on each mesh), I would want each mesh to not cast a cast any shadow on the other. For example, in the following rendered image from a "test" star system view The rings are casting shadows on the right most planets. I want the rings to only cast shadows on their own planet. Is this possible?


Where is the "Scripts Window" menu in Blender 2.59? I'm trying to import a script into Blender, and I have the script in my directory and I pushed F8 to reload scripts, but the instructions for running this script say In the "Scripts Window" run "Scripts Export OGRE Meshes". I've seen other similar instructions for other scripts. But the toolbar only contains "File Add Render Help." Changing the "screen layout" to Scripting doesn't reveal any additional options, either. I'm sure I'm just missing something obvious. Please help!


Blender models appear in UDK asset manager, but not in game I am new to UDK and blender. I am using UDK3. I have tried the following so far Making the mesh origin, (0,0,0) Making the parent bone origin (0,0,0) Parenting the root bone with the mesh I have tried exporting in the following file formats .psk .fbx Both fbx and psk import into the UDK asset manager, and are viewable in the asset manager. I have also previewed my weapon Im importing against a chracter model, and it appears to be slightly too large (which is easy to fix). Many other forums mentioned for other people that the models might be displaying but be very very small. I have tried viewing in 3rd person 1st person (Weapon factory, and giving weapon via console command) I have made the blender file avaliable here http www.fileswap.com dl m1BiH78Gba The code is just standard wizard generated code and has worked previously for other weapon models. Any ideas or clues about how I can go about trouble shooting this would be greatly appreciated.


Importing a File Containing Two Objects from Blender into Unity Leads to a Single GameObject Not Two I have two separate objects in a Blender file (say a cube and a sphere). Unity import this file (OBJ type) as a single gameObject which is not want I want. I want cube and sphere to be two separate gameObjects.


Skeletal Mesh Cloth Simulation bug (UDK), unexpected behaviour When I try to move to the left (A) the pawn and the cloth move to the left, and when I move to the right (D) the pawn and the cloth move to the right too... Why the cloth always goes in same direction than the pawn? I would expect the cloth to go in the opposite direction, like dragged by the pawn. To anyone who's experienced with pawn with cloth simulation please help me T T Flag model for testing Flag bug


Blender to UDK 3 How to smooth Static Mesh I've created a bed cover model for my small game and here is how it looks like in blender http imgur.com T88Mnbs but whenever I import it to UDK it looks like this http imgur.com OMXBno3 it looks smooth in Blender but when I import to the Udk it doesn't Why is this happening? And I use .fbx to export from blender...


What's the rationale for different coordinates systems? Could someone explain to me why Blender and other 3D modeling apps switch axes? If I export model with Blender, then exporters do following things for the same model The 3DS format applies this transform matrix 1.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 1.0, 0.0 , 0.0, 1.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 1.0 The Collada format applies this transform matrix 1.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 1.0, 0.0 , 0.0, 1.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 1.0 The OBJ format (default) transforms axes just like a transform matrix was applied, but OBJ format (Forward Y, Up Z) gives the original values that I see in Blender. The PLY format also does nothing and I get same values I see in Blender. PS Question was edited. I do not ask why there are different coordinate systems. I understand that. I do not understand why Blender and other switch axis silently when model is exported. People in comments say It is easy to fix model after export There are people who needs that. Actually I never seen these people and if it easy to fix then it is more easy to switch axis for those who really need that switch. I would love to hear someone who say that axis switch is important and he she needs in real work (not in theory)


Blender How to "meshify" an object I made from Bezier curves I made a star shape using Bezier curves, and extruded it (see pic below) What I want to do is give it a rounder look not just around the edges by using beveling. I want it to kind of look like this (well, that shape anyway) How would I go about doing this? Please keep in mind that I am extremely new to Blender. I thought that I could somehow turn this star into those default shapes that have tonnes of squares which I could pull out, and apply a mirror to it so that the same thing happens on both sides. I really don't know how to do it, and would appreciate your help.


How are 3D game levels built? I am wondering what is the best most common practice in 3D games (mostly shooters) like Quake or Doom. How are the levels built? With larger, open spaces the answer is probably some kind of terrain editor, that is what I understand. But what about things like houses or closed areas? I see two main solutions. One is to make a whole house, factory, dungeon (or generally a level) in other tool, like Blender, and then put it in the game. Other is to make the most simple elements like walls, floor, doorways and make the level from them (like Lego blocks). Is one of the ways more common? More "industry standard"? Are there some obvious advantages or disadvantages?


Blender Bones get enlarged in export import process I have a rig in blender that I want to export into a different blender project. For some reason, when I do that, some of the bones get enlarged. All the scales are applied. Why might this be happening? I've no clue why this might be happening, as this problem seems exclusive to this project and one other project, where one bone out of the whole armature gets enlarges, but here is the information I can provide Some differences between the projects where this happens and the others is that the ones where this does happen have animations, and a pose library. However, this does not seem to cause the problem, as deleting the animations and poses doesn't change anything. This problem happens when I export import the project as an FBX. I usually export the project to unity and in order to compensate for the unity blender rotation, I follow this guide 1. I rotate the armature 90 on the x axis, apply rotation. Then rotate the armature 90 on the x axis but only apply the rotation to the mesh. I export the project as a FBX, with unity unit scale, no leaf bones, and the 3rd and 4th box under animations checked off. This also does not seem to cause the problem, as not rotating the armature and such doe not change anything.


Stretched textures in Blender First of all I'm relatively new to Blender. I discovered a weird bug in Blender 2.78c. On my object some textures are stretched although they are UV mapped. Since I have no clue why this is happening I took some screenshots which hopefully explain the problem. I tried various things, but found no way to solve this. Things I tried Unwrap again Apply Rotation and scale Manually adjusting verts in UV map Looking for "dead" verts somewhere in the model Does anyone know this strange behavior? Edit I uploaded my .blend file http pasteall.org blend index.php?id 47124 merged screenshots due to low reputation P


Blender modelling for a C game? I want to know if it were possible to integrate models created with Blender into a game written in solely C .


What is the simplest way to export a bezier curve created in Blender to a text file? I have created a bezier curve in Blender. I'd like to export this curve to a text file. What I need is Control point handles, three points in total. Example 2.3333,4.3942, 55.333 , 0.3234, 2.4234, 4.0332 , 2.534, 6.S234, 12.0332 I have tried to export the scene in Collada format but it doesn't seems to include curves information. What is the easiest simplest way to export this curve to some readable text file format ?


Change text of bus destination sign at runtime I have rigged a bus in blender and imported it into Unreal. Now I want to change the text of the destination sign at run time. How can i do this?


Level design modular vs single project I'm working in Blender and UE4 for a while now... I always have the dillema of how to create my levels. My two ideas are a) modular like lego blocks. Create a wall, a floor, wall with hole for a window etc inside blender, and then, in UE4 make a level out of them. The advantage here is that I can arrange them however I want. The disadvantage is I always have a problem getting the elements to fit properly. Even if I scale one element up or down, everything else starts falling apart. b) single project make a whole object like a room or house in blender. Then everything connects nicely, but I'm always worried that it will be harder to edit, and I usually end up messing something. For example, whole house looks great, but inside the game a window is way too high, or the doors are too narrow to go through. My question What should I do should I stick to one method and try to fix the disadvantage? If yes, how would I do that? Is one of the methods considered "better" or the "industry standard"?


Can't load own .obj files from Blender to DX11 I'm currently trying to import objects to my game. My problem is that I'm able to load objects from online sites but it doesn't work for my own objects. It gives me an error Debug assertion failes. Expression vector subscript out of range. So I watched the value of my vector and realized that the faces are empty. The difference between my obj and these from the internet are that in mine the faces are like f 53 51 69 51 54 51 And in the files from online they look like f 3551 5154 3181 3666 5155 3182 3543 5151 3178 What do I wrong at exporting my blender object. I took a screenshot of my settings I hope you can help me.


Blender wont export textures (materials) to OGRE3D .mesh i am exporting a model from BLENDER to OGRE3D using the blender2ogre script. the desigre output is a single .mesh file but i know there should be also materials scripts that i should copy to my ogre path. the problem is that blender does not export those files for me it export only 1 mesh file (after i joined all objects) this is the model. in blender it looks fine but in my demo Ogre app it looks like i can use a little help here.


Can't move bone on blender. "Location" transform grayed out I'm trying to move a bone on Blender. I can't do anything with it at all. I've searched through the menus and noticed the Location transform is grayed out.


Locating different models in a single scene I have a curiosity. Say I wanted to create a big forest using Blender, in this forest I'd like to have a campfire or several campfires. What I could do is create the entire scene in Blender with campfires included and of course in engine I would add a fire effect to it. Now what I do not understand is how can I actually find the fireplaces' locations in the engine? Since it's all in one scene, I can't just say getLocation on the model. I guess what I'm asking isn't how to do it per say, but what the "professional" way is. Do professional game developers fiddle around with coordinates until they find it? Do they load the campfire on top of the scene as a separate model and move it until it fits the scene? Just in case it is important, I am using jMonkeyEngine.


How can I prevent resizing of an Ogre3D object once imported into jMonkeyEngine? I created an object in Blender Then I exported it as a mesh.xml file and attached it to the game scene Note The gray color is the ground. In the game I end up with have a smaller, horizontal tower. Any suggestions? Note I exported the file with "Force Camera", "Force Lamps" and "Export Scene" unchecked and "Swap Axis x,y,z".


Blender Edge Split Alternative What other options alternatives are there to "edge split" for smooth shading low poly game models. As I understand it, edge split does what it say's, its splits the mesh therefore increasing the vert count. I have considered manually marking the edges as sharp however I would imagine this leaves artifacts on the model(in game) ? Cheers.


How do I correctly import an animation from blender into UE4? I have animated a conveyor belt in blender. When I import the animation to UE4, the conveyor belt does not move correctly. What am I doing wrong? Here is a link to my blender file Blender File


How to export an IK structure created in Blender 2.8 to Godot 3.1? I created this IK bone structure in Blender 2.8 and exported as .escn As you can see, in Blender it's working ok. Now, how to use it in Godot? I've tried export with .dae (native) .dae (Better Collada) .escn .glb None of them worked... Is there any tutorial for using imported IK in Godot?


what are texcoord tags in mesh.xml file in Ogrexml format? I exported a 3d model from blender 2.79 and using ogrexml import export plugin. but the texture will crash and UV map not working in that format. I made the model by four parts head body hands shoes and they have 4 material and 4 textures, so I made a texture atlas for it and join them in a mesh to More optimization. I think removing other UV maps has a problem because when I check the model.mesh.xml in a note editor and every vertex has 3 texture coordinate tags and I compared it with a normal correct model that looks good in the blender and in ogrexml format, it has one texcoord tag inside of vertex tag. 1 what are texcoord tags? are they using for UV maps in ogrexml format? 2 how can I clear blend files from other unused uvMaps to avoid exporting them with the model?


Blender Unity materials problem I have a pproblem with materials and their texture. I have a model with 1 material called 'Car Jack', after i put my .blend file into unity, unity adds 'Car Jack Car Jack UV', which is white material without textures. I have the only one UV map, called 'Car Jack UV'. What is wrong with Unity Blender?


Getting .mesh .skeleton from Blender2Ogre export I have downloaded the add on blender2ogre from this source http code.google.com p blender2ogre And I have created a simple mesh, with walking animation (similar to the gingerbreadman tutorial). My question is, whenever I want to export the project, I can only see the .scene export format. There is no option whatsoever to export as .mesh and .skeleton. Also, how can I export the walking animation separately, in other words, if my project have couple more animation, how can i separate those during export?


Good way of handling class instances in game development? I'm a new indie game developer, and I've made a few games, but often times when coding I wonder "Is this the way most people do it? Am I doing it wrong?" because I'd like to become a game developer some day, and I really want to get rid of bad practices in time. The way I'm doing it right now is like this include lt some libraries gt include "Some classes" int main() Class1 a Class2 b Class3 c a.init() b.init() c.init() game logic Now as I see the game grow, I have more and more classes to initialize and create instances of. This is clean but I'm not sure if this is standard practice. Is this a regular way of creating instances of your game classes or is there a cleaner and more efficient way to do it?


is wisdom of what happens 'behind scenes' (in compiler, external DLLs etc.) important? I have been a computer fanatic for almost a decade now. I've always loved and wondered how computers work, even from the purest, lowest hardware level to the very smallest pixel on the screen, and all the software around that. That seems to be my problem though ... as I try to write code (I'm pretty fluent at C ) I always sit there enormous amounts of time in front of a text editor wondering how every line, statement, datum, function, etc. will correspond to every Assembly and machine instruction performed to do absolutely everything necessary for the kernel to allocate memory to run my compiled program, and all of the other hardware being used as well. For example ... I would write cout lt lt "Before memory changed" lt lt endl and run the debugger to get the Assembly for this, and then try and reverse disassemble the Assembly to machine code based on my ISA, and then research every .dll, library file, linked library, linking process, linker source code of the program, the make file, the kernel I'm using's steps of processing this compilation, the hardware's part aside from the processor (e.g. video card, sound card, chipset, cache latency, byte sized registers, calling convention use, DDR3 RAM and disk drive, filesystem functioning and so many other things). Am I going about programming wrong? I mean I feel I should know everything that goes on underneath English syntax on a computer program. But the problem is that the more I research every little thing the less I actually accomplish at all. I can never finish anything because of this mentality, yet I feel compelled to know everything... what should I do?


How to implement zombie AI? We need to make a zombie videogame for a semester project and I was wondering about what are considered nice algorithms techniques for implementing zombie AI that don't take too long to implement. The project is a videogame product, involving other stuff as physics and multiplayer, so we have limited time, so what I'm specifically looking for is A quick amp dirty way to implement zombie AI (I'm thinking on neural networks or perhaps even fuzzy logic) Common ways of implementing and optimizing zombie AI The ideal way of implementing zombie AI (I imagine it would involve pathfinding, or even swarm intelligence?) General advice on zombie AI Considering that the quick amp dirty implementation would perhaps be a place holder for another and better algorithm technique. Thanks in advance.


Relevant file paths for reading in from a file? Working on something in XNA, need to be able to read in data from a text file for something. Trying to figure out how I can shorten this pathname down, so instead of it always checking there, it just checks in the directory where the actual program is. I tried doing " Data Zone " filenamestring ".txt" as my path but it didnt work. What I have that works Sub loadFromFile(ByVal fileNameString As String) If System.IO.File.Exists("C Users user documents visual studio 2010 Projects asdf asdf asdf Data Zone " fileNameString ".txt") Then MsgBox("It found it.") Else MsgBox("Could not find it") End If End Sub While this works, unfortunately this will probably only work on my machine. How do I shorten the file path so its flexible and relevant to the directory where the program is actually located at?


How are the same items generated with slightly different attributes? Consider games like Destiny. How do they generate weapons that have the same skins and names, but different attributes? Two people can have the same weapon or armor piece, but have different attributes on these pieces based on luck or drop rate etc. How is this accomplished programmatically?


try to create CCSpriteFrame but get nil values I'm trying to animate a CCSprite in cocos2d v3 following this question, but I'm getting the following error message in Log Terminating app due to uncaught exception 'NSInvalidArgumentException', reason ' NSArrayM insertObject atIndex object cannot be nil' This is my code NSMutableArray animationFrames NSMutableArray array int frameCount 0 for(int i 1 i lt 9 i) CCSpriteFrame spriteFrame CCSpriteFrameCache sharedSpriteFrameCache spriteFrameByName NSString stringWithFormat "hero d.png", i animationFrames addObject spriteFrame ERROR OCCUR THIS LINE frameCount if (frameCount 8) break The problem is that all spriteFrames are nil, but I don't why. I already tested the i values with NSLog, and also tried to add hero 1.png to a CCSprite object and works fine. I also tried to add all fixed hero 1.png in all frames to verify if the problem was with i variable. But didn't work also.


What is an OO way for my input layer to act upon objects? I'm building a top down RPG specifically to practice Object Oriented thinking and design. I am keeping in mind coupling, single responsibility, and so forth. One design issue that's been bugging me is how to ultimately have objects talk while maintaining the loosest coupling possible. As an example, I'm designing the input class now, which will be made up of two layers, like so The conundrum is that I don't know how to bridge that gap between Input and HeroActor, which is initialized from the PlayState class, which is also where the hero.update() method is called. Let's say Keyboard has just executed public void keyPressed(KeyEvent e) switch(e.getKeyCode()) Some cases case KeyEvent.VK UP Assume InputEvent.INPUT1 is a defined enumeration in InputEvent inputHandler.passInput(InputEvent.INPUT1) break Some more cases I've basically landed here public class Input public void passInput(InputEvent e) switch(e) Some cases case InputEvent.INPUT1 ???????????????????? Some more cases My ideas have been Pass a reference to the instance of HeroActor to the Input object, then have Input directly call the moveUp() method on the HeroActor instance. case InputEvent.INPUT1 actor.moveUp() My instinct tells me this is bad OO design as it tightly couples the two classes. Make the instance of HeroActor global and basically do the same as above. Even worse OO design. Write a registerInput(Input inputHandler) function in the Actor class, like so public class HeroActor extends Actor Existing fields and methods private Input inputHandler public void registerInput(Input inputHandler) this.inputHandler inputHandler Still, then the HeroActor would have to poll the inputHandler every frame to find out if any actions have applied to it. I'm in the same situation trying to figure out how to write the collision engine without passing it specific references to the player's HeroActor instance or the dozens of EnemyActor instances in the PlayState constructor. Any help would be greatly appreciated. My request is not for specific code, but rather common techniques for handling the many objects in a game without ending up with a god object. I've seen some material suggesting an Observer pattern being applied for things like the input layer above, but before I go too far, I'd like some feedback from the community since I've got so many different answers among all of my Googling today.


How to setup a client to work with a remote server or a local included server? I'm working on a Networked multiplayer game, but while developing and for testing I want to set up a local server that acts like the multiplayer server. My thought is to approach the server as a proxy setup. Creating a class that the client sees and essentially allowing it to either load the server code in itself or to use a networking layer. Is this a good approach? Are there other approaches to look into? What pitfalls should I be watching for? Update A bit more specifically I need to do this because I am targeting the Ouya and I can't guarantee a network connection, or even a spare machine to run the server on. And inside Android it is more difficult to setup and launch a service rather than include my server code right into a client build.


What makes a good educational game? I'm currently creating a game framework engine for educational games. My hope is that this can be used in elementary schools. It is of course extremely important that the games are both fun and educational. Any ideas what should be in my initial requirement specification? What makes a good educational game? Which platforms should I target?


Should a server run all maps in one loop, or a thread game loop per map? I'm working on a real time multiplayer browser based game. The game is top down on variable size tile based maps. There is no central map where all players come together, the entire game plays out in multiple maps. (Player chooses one on login, but has the ability to switch whenever they want). Let's take the following loop that runs on the server side of things let tick time Duration from millis(500) e.g. Tick 2 times per second. let mut next tick Instant now() loop let now Instant now() if now gt next tick Parse user input Update state Update to state to users in map next tick tick time else let wait time next tick now sleep(wait time Duration from millis(1)).await In my 'map based' gameplay scenario, would it make sense to spawn a thread for every map where one of these loops runs? Or would it be recommended to have only a singular thread with a singular game loop that updates every map? Or is there perhaps a better, already existing, pattern for this?


Why are there fewer glitches in current day games? I remember that almost every single game in the early 2000s had at least a few amusing glitches, mostly related to animations, that often produced funny situations. I also remember that game magazines used to dedicate a section with the funniest screenshots people sent in. As an example, I was just playing Far Cry from 2004 and out of nowhere, whenever I killed some bad guy, instead of dropping to the ground they'd start playing the running animation. This was getting me confused since I was trying to shoot them down from a large distance and didn't understand why they weren't dying. I've rarely seen stuff like this in current day games. Was there some change in the technique used to develop games that would make these programmer mistakes less likely? P.S. I'm not talking about RPGs and other inherently complex genres. I'm talking about games like Far Cry shooters like Battlefield 3, Modern Warfare 3, even Mass Effect. I've seen plenty of glitches in games like The Witcher 2, Skyrim, etc.


Is it possible to program the entire logic and flow of a game without ever touching a graphic's engine? I'm not interested in rendering engines or level design, but I'm very interested in programming the AI that drives all of the characteristics of game play. I'm thinking of how the d20 system drives the rules behind D amp D games. Is there a person that programs that logic, and is it possible to program almost all of an API without ever touching a graphic's engine? I'm a software engineer by trade (Java with some C experience), so I'm looking to use those programming skills.


What math should all game programmers know? Simple enough question What math should all game programmers have a firm grasp of in order to be successful? I'm not specifically talking about rendering math or anything in the niche areas of game programming, more specifically just things that even game programmers should know about, and if they don't they'll probably find it useful. Note as there is no one correct answer, this question (and its answers) is a community wiki. Also, if you would like fancy latex math equations, feel free to use http mathurl.com .


What are standard methods for organizing game code? Grouping by standard "kinds" of methods? I've made a few games, and am getting faster and better organized each time. I'm well out of the "just make it work" phase and working on methodology and readability. I need some tips on code organization though. I don't mean patterns I'm having great success with MVC but the organization of methods inside the classes themselves. I've noticed that methods in my state models can usually be grouped into four categories (1)constructor destructor, (2)data access (3)actions (4)events. My controllers usually have c d and input methods. My views usually have c d, view updaters, and event listeners. I feel like I'm reinventing the wheel though someone must have spelled out "these are the common types of methods" somewhere before, right? Storage has Create, Read, Update and Delete (CRUD), so what are the equivalents for objects? EDIT Found some cocoa specific advice here http www.mactech.com articles mactech Vol.21 21.07 StyleForCocoa and some generic advice here https stackoverflow.com questions 73045 whats the best way to organize code 73081 73081 I'm going to use that as a foundation, modified for game specific stuff. More info still appreciated if you have any.


Limitations of p2p multiplayer games vs client server I am reading up on multiplayer game architecture. So far most of the articles i've found deal with the client server model. I'd like to know what are the limitations for using a p2p architecture? what "class" of games are possible (or more common) to implement using it? which aren't? and in general, what are its main differences and limitations against the client server model.


How do I implement a racing clock that shows elapsed time? I'm wanting to make a old school timer like the picture below. How would I go about doing this in VD? I have tried it doing it with code bellow. The problem with this is that it starts with just seconds only adds the minutes section when you reach 1 minute. Dim StartTime As DateTime Dim PlayTime As TimeSpan Private Sub Form1 Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load StartTime Now() End Sub Private Sub tmrCountUp Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrCountUp.Tick PlayTime Now() StartTime lblTime.Text PlayTime.Hours amp PlayTime.Minutes amp PlayTime.Seconds lblTime.Text lblTime.Text 1 End Sub


How to make gravity in Blitz3D? I am making a game in Blitz3d and I made simple gravity, however once the object falls on the ground, it goes through it very slowly. The ground is a plane and I have collision on it. This is a pretty old engine, and not a lot of people are using it but I decided to use it because it's easier than Unity3D for me and it's very basic and customizable. Here's my code AppTitle "FPS" Graphics3D 800,600,32,2 SetBuffer BackBuffer() SeedRnd MilliSecs() HidePointer Objects Global player CreatePivot() Global camera CreateCamera(player) Global cube CreateCube() Global light CreateLight() Global plane CreatePlane() Global cube2 CreateCube(player) col plane 1 col player 2 col cube 3 Vars gravity .00001 plx 0 ply 0 plz 0 pldx 0 pldy 0 pldz 0 Textures CameraClsColor camera,135,206,250 box LoadTexture("models box.png") dirt LoadTexture("models dirt.jpg") Object Details EntityType cube,col cube EntityType player,col player EntityType plane,col plane EntityRadius player,1.2 EntityRadius plane,1 PositionEntity player,0,10,5 PositionEntity cube,0,1,5 PositionEntity light,0,2,0 PositionEntity plane,0,0,0 EntityTexture cube,box EntityTexture plane,dirt ScaleTexture dirt,5,5 CameraRange camera,0.25,200 Called Functions While Not KeyHit(1) Cls Collisions Collisions col player,col plane,2,2 Collisions col player,col cube,2,2 If ply lt 2 Then ply 0 pldy pldy .39 EndIf If ply lt 1.8 Then pldx .6 pldx pldz .6 pldz If KeyDown(57) Then pldy 2 EndIf pldy pldy gravity plx plx pldx ply ply pldy plz plz pldz PositionEntity player,EntityX(player) plx,EntityY(player) ply,EntityZ(player) plz control() RenderWorld() UpdateWorld() MoveMouse GraphicsWidth() 2, GraphicsHeight() 2 Flip Wend End Functions Function control() If KeyDown(42) Shift (for running) If KeyDown(17) And KeyDown(30) W and A MoveEntity player, 0.15,0,0.15 ElseIf KeyDown(17) And KeyDown(32) W and D MoveEntity player,0.15,0,0.15 ElseIf KeyDown(17) And KeyDown(30) S and A MoveEntity player, 0.15,0, 0.15 ElseIf KeyDown(17) And KeyDown(32) S and D MoveEntity player,0.15,0, 0.15 ElseIf KeyDown(17) W MoveEntity player,0,0,0.15 ElseIf KeyDown(31) S MoveEntity player,0,0, 0.15 ElseIf KeyDown(30) A MoveEntity player, 0.15,0,0 ElseIf KeyDown(32) D MoveEntity player,0.15,0,0 End If Else Walking If KeyDown(17) And KeyDown(30) W and A MoveEntity player, 0.1,0,0.1 ElseIf KeyDown(17) And KeyDown(32) W and D MoveEntity player,0.1,0,0.1 ElseIf KeyDown(17) And KeyDown(30) S and A MoveEntity player, 0.1,0, 0.1 ElseIf KeyDown(17) And KeyDown(32) S and D MoveEntity player,0.1,0, 0.1 ElseIf KeyDown(17) W MoveEntity player,0,0,0.1 ElseIf KeyDown(31) S MoveEntity player,0,0, 0.1 ElseIf KeyDown(30) A MoveEntity player, 0.1,0,0 ElseIf KeyDown(32) D MoveEntity player,0.1,0,0 End If End If While KeyDown(16) Q RotateEntity camera,MouseXSpeed(),10,10 Wend While KeyDown(18) E RotateEntity camera,0, 10, 10 Wend TurnEntity player, 0, MouseXSpeed() 6.0, 0 TurnEntity camera, MouseYSpeed() 6.0, 0, 0 If EntityPitch(camera) lt 70 RotateEntity camera, 70, EntityYaw(camera), EntityRoll(camera) ElseIf EntityPitch(camera) gt 70 RotateEntity camera, 70, EntityYaw(camera), EntityRoll(camera) EndIf End Function If there's some one who can actually help me with this, I would appreciate it.


Experiences of test driven devleopment in large projects I've used TDD in personal projects, but I wondered if anyone had any experience of using this approach across a large team? Was there resistence to the test first approach? Did you keep code coverage high for the whole project? How did coverage survive fixing those two in the morning and you ship in four hours crash bugs? Did you run tests on all platforms, or just assume that passing on one meant passing the others? I love the decoupled code that TDD produces, and the large suite of regression tests you get for free, but if you only have a few in the team who don't want to contribute tests, won't everyone suffer?


Best solution for "level string"? I have a game that generates a random level map at the start of the level. I want to implement some way to save and load the level. I was thinking maybe XML would be a good option for saving all the variable, then it would be easy for me to build something that can parse that XML and generate the exact same level. But XML is probably overkill for my needs. I remember back in the day with the old Sega console that didn't have the ability to save your game (I think the Worms game did it too), that they would give you a bunch of character that you could write down. If you punched in that string later on, it would load the exact level. Would a "level string" be a good option? Would it be some kind of "base60" conversion? How would I implement this?


Are there cases where globals singletons are useful in game development? I know that having global variables or singleton classes creates cases that can be difficult to test manage and I have been busted in using those patterns in code but often times you gotta ship. So are there cases where global variables or singletons are actually useful in game development?


Do retail games use "inversion of control" and "dependency injection"? Many of the more diligent software developers I know are moving to inversion of control and dependency injection to handle references to objects. Coming from a Flash games perspective I don't know all the ins and outs of AAA studios, so are these used in the retail game world?


What is "tools development?" I have been looking at different jobs in the games industry and a lot of the jobs that I have seen advertised are for a "Tool Developer" position. I do not know what this actually is. Could someone explain what this is to me please? And if anyone has any links to material that would help me understand it more then that would be very much appreciated.


What should a game engine do? I'd like to improve my skills try something new and I'd like to start with 3D. I have read Starting programming in 3D with C but I have question about engines What should engine do? I know it is abstraction layer above 3D API (i.e. OpenGL or DirectX) but what should it exactly do?


Time critical events based on framerate Problem Description Basically, I've made a "programming game" in which I've made my own scripting language. It is a completely standard Lunar Lander game, though instead of directly controlling the lander using keyboard input, it instead fires a sequence of commands you have provided through the scripting language I made. This all works, and I've hit a critical problem. So essentially, using the scripting language, you specify something like After 5 seconds, activate thrust for 10 seconds, and then after 2 seconds, rotate the lander for 4 seconds. The goal is then to chain together a sequence of commands which will get you to land the lander safely. Of course, this comes with one problem. If you repeat the sequence of commands, each command will have to be fired at exactly the same spot in the level, that is, after x amount of seconds, but also with the lander being in the exact same spot. If you did not use timer based movement, sure you could indicate that a command should activate after 5 seconds, but the lander moving at 60 FPS would have moved way further than a lander moving at 30 FPS. Why of course, I thought I would simple just make the lander use timer based movement so it is independent of FPS (I am using the very standard approach of taking the amount of time passed last frame, and multiplying it to a constant move speed). Then I would count seconds using the system clock. So the after x amount of seconds, the lander would be in the same spot in the level when the command activates. Unfortunately, this approach do not work. Every time I run a sequence of commands, they will be activated with, sometimes very slight, variations, making it impossible to actually get a consistent and reliable path for the lander. My Question So my question is, am I tackling this problem a completely wrong way? What exactly do you do when it is absolutely critical that timed events defined by the user will activate at exactly the same time and spot in a level? I seem to be quite stuck with this question.


What should I consider when evaluating libraries, engines and frameworks for making a game? I'm going to make a game. I've noticed that there are a lot of game engines, libraries, and frameworks available out there, and I'm having a little trouble deciding which one to use. I'm already pretty good with some programming languages, but there are others which I don't know at all. I'm not against learning new programming languages, if that'll help, but my real goal is just to make my game. What criteria should I use to compare engines, libraries, and frameworks against each other, so that I can decide which one will allow me to be the most productive to finish my game?


Engine for a Football Manager Type game (data driven, menu clicking) A friend and I had started developing a football manager two years ago, but ultimately squashed the whole thing because we found ourselves in a mess with developing UI and saving loading. The basic game loop of simulating matches and advancing days until the match day was already done. We also had a e mail system up and running (for receiving messages which might need decisions trigger events). In our lack of of knowledge, we tried building the game in GameMaker2. It made saving all the objects (a Team has 23 Player, a league has 20 Teams, there are several Leagues) a nightmare. Also, UI development (things like scrollbars for example) ate up incredible amounts of our time and still everything looked relatively bland. Short GameMaker2 seemed not suitable for the type of game we wanted to build. There must be a better engine system for developing a manager type game. Most of the game is spent in menus, There's no time critical interaction going on. Since we've benched the project, I started working a legit software development job and I have gained some skills which I hadn't have before, like knowledge of databases and a heap of Python experience. It has me looking at the game again. Now I see it as having a 'data backend' and an point and click frontend, with game design elements, like tough decisions, events and goals as the driving force in the middle. We want nice looking menus, where players can set the training schedule, make the line up for match day, talk to players executives whoever. The other necessity is managing all data objects, which there will a lot of. A league might easily contain 400 players which all need to have stats and so on and so forth. I see a relational database for this, but maybe there's something smarter regarding game development? So my Question is What is a suitable game engine development stack for developing data heavy, non real time menu clicking type manager games such as a football manager?


What are good games to "earn your wings" with? I believe that in order to become a good game developer, you need to make games. From a programmer's perspective, what are some good entry level games to get your hands dirty? What skills and challenges do each of these games teach you?


Are there any clever methods of regulating bandwidth usage for voice chat payload packets? For example, suppose my code can determine that upstream bandwidth is unusually limited. And suppose I'm using a fully connected mesh topology combined with a UDP like protocol for voice chat. Is there an established way to reduce the risk of packet loss so that the voice playback will either be solid or muted, but not jittery or choppy? This must be a solved problem in the VoIP world, but I'm not sure where to look. EDIT To clarify my abuse of the term jitter I mean, if two UDP voice packets arrive out of order, the audio would sound jittery in a colloquial sense (i.e. I mean packet jitter, not audio signal displacement). The choppy sound I'm referring to is related, where a UDP packet is lost instead of arriving late and causes a gap or jump in the audio. When I refer to muting the playback, I don't mean as a function of source input to avoid background noise. I mean on the receiving end of the conversation, if there's high packet loss, just stop playback instead of playing choppy audio.


Recursive dungeon maps as represented by an elastic 2d array I came up with a method for recursively generating simple dungeon maps by starting with one room and recursively connecting new adjacent rooms randomly to it. Maps are represented as two dimensional arrays where each cell contains a value of 0 15. 0 represents no room while each direction is represented by north 1, east 2, south 4, west 8. I wanted to start with a single non room ( 0 ) and then expand the 2d array as necessary to fit the generated map. The difficulty I face with this tree like recursion is that if the arrays have to be unshifted to add rows and columns to the left and top of the map, I have to adjust the current position of the function, what row and column it is at. This makes it so that separate branches are not aware of array index adjustments from other branches, only their child functions will know because they have the adjusted position passed to them as their row and column arguments. Is there a way to do this? I tried storing row and column offset values outside of the recursion, but it did not work for some reason.


Lua as a stand alone for game programming like Python? I've used Python before with PyGame to make games, but PyGame doesn't seem to be so popular anymore, and there arent that many good resources for it. I hear lots of buzz about Lua as a fast scripting language to be used inside of projects made in other languages. I work much faster and enjoy the higher level programming that is Python, so that naturally leads me to Lua, which seems to be getting a lot of attention recently. I know it's been around for a while but I think WoW add on creation made it more popular.. Can Lua make games on its own as a stand alone language with any 2D or 3D libraries, or is that not really the Lua domain? I won't bother asking about 3D in Python here, I'll make a new question for that. Thanks!


What language was used to write Starcraft II? Total newbie question , but what language was used by blizzard to crate the Starcraft II game play? I've been playing it for the last couple of days , and I'm constantly astonished by the complexity and the performance of the game. Is it an in house language , or do they use some flavor of a know language?


How do I draw text once a countdown ends? I created a countdown in Game Maker using a variable of time. The countdown works properly and is displayed at the proper coordinates. However, when the countdown reaches zero, I want to make the countdown disappear and display "GO" instead. How can I do that?


Should a server run all maps in one loop, or a thread game loop per map? I'm working on a real time multiplayer browser based game. The game is top down on variable size tile based maps. There is no central map where all players come together, the entire game plays out in multiple maps. (Player chooses one on login, but has the ability to switch whenever they want). Let's take the following loop that runs on the server side of things let tick time Duration from millis(500) e.g. Tick 2 times per second. let mut next tick Instant now() loop let now Instant now() if now gt next tick Parse user input Update state Update to state to users in map next tick tick time else let wait time next tick now sleep(wait time Duration from millis(1)).await In my 'map based' gameplay scenario, would it make sense to spawn a thread for every map where one of these loops runs? Or would it be recommended to have only a singular thread with a singular game loop that updates every map? Or is there perhaps a better, already existing, pattern for this?


How to replace texture maps on models in a packaged game? I'm trying to do an experiment. I'd like to do some object masking to the assets inside of a game, so during run time, when you are playing, they're texture maps are replaced by the masks. The masks will literally be just color maps. They are supposed to be labels for a machine learning program. Preferably if one could replace the texture maps with color masks during runtime that would be better.


How to Duplicating and updating component data in systems I am new to game development. Coming across the ECS (entity component system) pattern I generally quite liked the idea. I have implemented the current version of my engine using the OOP style approach. In other words, Components are objects that have both state and behaviour and methods that can be polymorphic. My entity manager also means that when a SpriteRenderComponent has been added to an entity, entity.GetComponent lt RenderComponent gt () will return a reference to the SpriteRenderComponent. Of course, the problem with this is that components have to communicate with each other. E.g. the draw method will access the TransformComponent's transform data. Now I have dug a bit deeper and found that most sources recommend the pure ECS approach where the entities are an id or a list of components, components are just structs with public data and the systems are where all the magic happens ie where all the functions are. Of course, components don't depend on each other and the same is ideally true for systems as well. So now when I want to draw a sprite I create a SpriteRenderSystem which knows how to draw a sprite. The problem is that drawing concerns all kinds of drawable things e.g. to sort them depending on a zOrder and layer. This is what lead me to the idea of nodes as objects that are local to the system. So now the SpriteRenderSystem would add a 'SpriteRenderNode' to the RenderManager. The SpriteRenderNode could inherit from an abstract RenderNode and implement the virtual draw method. The SpriteComponent would only hold the data specific to the sprite such as colour. The vertex array and all the other stuff that is purely related to rendering is kept encapsulated in the derived RenderNodes. Problem 1 In order to be drawn by the RenderManager, the SpriteRenderNode would need to know and therefore store its transform data. The only way to keep this data up to date would be to copy the entity's transform component's transform data to the SpriteRenderNode every frame. I am not so much concerned about performance here but about the practice of duplicating the data in the systems. It feels like this is a violation of general good programming practices though I can't see any immediate reasons why it may prove harmful. Problem 2 Taking the data out of the components. From what I understand, the data should live in the components. However, taking the above presented idea a step further, there may be cases where storing data in components isn't necessary at all. Such an example may be an animation system which may simply store and update animation nodes for each entity and then change their components such as texture, position... The problem with this is that it would take away the ability to save the game by simply serialising all the components. As you see I am quite confused about how a good pure ECS should look like. Any help would be much appreciated.


Where does the game code fit into the engine? I was wondering if somebody could tell me how the game and the game engine fit into game development. What I specifically mean is, the game engine does not actually contain a game. Do game developers build an engine, then create a new class that inherits from the engine, which becomes the game? For example, class ShooterGame public Engine I'm not sure about where the game code fits into the engine.


Tangible benefits to speed coding your personal game projects I noticed a few programmers setting time sensitive challenges for themselves, usually in the area of "write game of type X in Y amount of time" or "write X number of games giving only Y time for each". What are the tangible benefits for setting your workflow in this manner to speed code for a while? It feels like you have to trade off efficient code to get something done quick. And I suppose adding a final layer of polish isn't a big priority in these challenges, so it's okay to use programmer. I've made some simple 2D scrolling shooters and puzzle games a few years ago and out of stupidity I deleted most of my code. So now I'm curious about using the speed coding approach to get a couple simple things done again, and get myself more into game logic.


What are some great papers publications relating to game programming? What are some of your favorite papers and publications that closely relate to game programming? I'm particularly looking for examples that are well written and illustrated, and or have had a profound influence on the industry. (Here's one example in this GDC talk, Bungie's David Aldridge mentions that a paper called "The TRIBES Engine Networking Model" was the starting point for Halo's network code.)


Engine programming, is it supposed to be enjoyable? Now this might sound like a silly question and I apologize if this sort of question is not suited for stackexchange. But I am genuinely wondering this, and I feel like I get alot more proffesional awnsers on here. I'm getting into game development and have only worked solo since my study is not primairly about games. I'm only interested at 2D games atm, so am not really in need of any external engines for physics and rendering and such. So usually write the engines myself. I absolutely hate writing things as quadtree's and pathfinding algorithims, most of the time I wish I could just skip those parts and move on to programming the actual gameplay elements. Things that happen in the background don't really interest me at all. But at the same time, I can't stand it I don't know whats how everything is happening in the background. My dislike might be explained by my weak mathematical skills. My motivation gets me through, but it can take alot of time before I grasp the technical solution behind a problem. Now is it normal to have such a dislike towards engine programming? Or do you (people who also work solo) enjoy programming the engine?


What makes a good educational game? I'm currently creating a game framework engine for educational games. My hope is that this can be used in elementary schools. It is of course extremely important that the games are both fun and educational. Any ideas what should be in my initial requirement specification? What makes a good educational game? Which platforms should I target?


What should a game engine do? I'd like to improve my skills try something new and I'd like to start with 3D. I have read Starting programming in 3D with C but I have question about engines What should engine do? I know it is abstraction layer above 3D API (i.e. OpenGL or DirectX) but what should it exactly do?


How to manage in game factions, alliances, federations, etc So this question is code or engine agnostic but, I m looking for ideas on how a game can keep track of a pre determined number of factions or alliances. For example, say I made a space game that has 2 major and 3 minor federations of planets. A planet may join or leave a federation, but the federation itself may have an alliance or be at war with another (actually, to keep it simpler, I think all these changes will solely be reliant on the player s actions). However, I would also like to keep track of such diplomatic endeavours on the individual level as well. Say the player has joined one federation that is at war with another. If the player should encounter another ship of the opposing federation, that ship becomes hostile. On the other side, two ships have an alliance, they might help one another. What is the best way to keep track of all this? One way I was thinking was creating a manager that holds all the Federation classes (which hold the status it holds with all other federations say less than 0 and the federations are at war more than x amount, there s an alliance). Meanwhile, each player ship holds similar data in its class, along with its current alliance to whatever federation. Is my thinking logical in this or are there better ways of managing such things? Many thanks.


How can I transmit move information from player to player in a web application? I am trying to create an online chess game using ActionScript and Flex. It works well when I have two players on the same PC, but I want to publish it as a web app. How can I transmit a move or action from one user to another, such that the other user sees what the first one did?


Language agnostic game programming books Possible Duplicates Game programming books that don 39 t teach programming? Must read game development books Does anyone know any good language independent game programming books? I don't currently know anything about game programming or practices any good books on stuff like scene graphs, handling sprites, layers, collision detection, effects, events? I'm a college student without the time to learn a new language so the concepts need to be language agnostic enough they can fit into the languages I know Javascript, Python, Scheme Lisp and some light Vala (I'm considering using HTML5 or PyGame). I would use C books but my OS is Linux and I don't know about the whole mono thing when most C books use XNA. Also I know that game programming is an extension of general programming, but I think I've got that down. Like is there a cookbook of some sort?


Large game project, local variables I'm hoping that some experienced programmers can give me their point of view. I'm writing a large game in Windows with dx11. So far, I've got global objects of the class that interfaces with dx11, the class holding the position of the camera, the terrain data class, and a few other classes. In future, if I kept going with this way, I'd also have objects for all the game data, and so on. I'm thinking it might be best to rejig the code to only have local variables, because generally this is regarded as a Good Thing, but mainly because I personally have come to prefer using them. Here's some rough c ish pseudo code of how I imagine local variables would be implemented WinMain() cDirectX dx cCamera cam cTerrain terrain ... while (msg.message ! WM QUIT) ... gameLoop(dx, cam, terrain, ...) void gameLoop(cDirectX amp dx, cCamera amp cam, cTerrain amp terrain, ...) ... renderTerrain(dx, terrain) ... Is this (very roughly!) a good way to organise such a project? I suppose WinMain is the only function where the locals can be instantiated? The only disadvantage I can see is that top level function calls (by which I mean, functions like gameLoop(), functions at the bottom of the call stack) will have very long lists of arguments. Perhaps this doesn't matter. Thanks, Paul


Object oriented approach to debug mode I'd like to introduce a way to turn off on debug messages and in game tooling (tweak menus, for example) without non game related branches, e.g if(DEBUG MODE) show tweak menu some message console.log("In this function") Is there a more reusable approach to this problem?


How to make gravity in Blitz3D? I am making a game in Blitz3d and I made simple gravity, however once the object falls on the ground, it goes through it very slowly. The ground is a plane and I have collision on it. This is a pretty old engine, and not a lot of people are using it but I decided to use it because it's easier than Unity3D for me and it's very basic and customizable. Here's my code AppTitle "FPS" Graphics3D 800,600,32,2 SetBuffer BackBuffer() SeedRnd MilliSecs() HidePointer Objects Global player CreatePivot() Global camera CreateCamera(player) Global cube CreateCube() Global light CreateLight() Global plane CreatePlane() Global cube2 CreateCube(player) col plane 1 col player 2 col cube 3 Vars gravity .00001 plx 0 ply 0 plz 0 pldx 0 pldy 0 pldz 0 Textures CameraClsColor camera,135,206,250 box LoadTexture("models box.png") dirt LoadTexture("models dirt.jpg") Object Details EntityType cube,col cube EntityType player,col player EntityType plane,col plane EntityRadius player,1.2 EntityRadius plane,1 PositionEntity player,0,10,5 PositionEntity cube,0,1,5 PositionEntity light,0,2,0 PositionEntity plane,0,0,0 EntityTexture cube,box EntityTexture plane,dirt ScaleTexture dirt,5,5 CameraRange camera,0.25,200 Called Functions While Not KeyHit(1) Cls Collisions Collisions col player,col plane,2,2 Collisions col player,col cube,2,2 If ply lt 2 Then ply 0 pldy pldy .39 EndIf If ply lt 1.8 Then pldx .6 pldx pldz .6 pldz If KeyDown(57) Then pldy 2 EndIf pldy pldy gravity plx plx pldx ply ply pldy plz plz pldz PositionEntity player,EntityX(player) plx,EntityY(player) ply,EntityZ(player) plz control() RenderWorld() UpdateWorld() MoveMouse GraphicsWidth() 2, GraphicsHeight() 2 Flip Wend End Functions Function control() If KeyDown(42) Shift (for running) If KeyDown(17) And KeyDown(30) W and A MoveEntity player, 0.15,0,0.15 ElseIf KeyDown(17) And KeyDown(32) W and D MoveEntity player,0.15,0,0.15 ElseIf KeyDown(17) And KeyDown(30) S and A MoveEntity player, 0.15,0, 0.15 ElseIf KeyDown(17) And KeyDown(32) S and D MoveEntity player,0.15,0, 0.15 ElseIf KeyDown(17) W MoveEntity player,0,0,0.15 ElseIf KeyDown(31) S MoveEntity player,0,0, 0.15 ElseIf KeyDown(30) A MoveEntity player, 0.15,0,0 ElseIf KeyDown(32) D MoveEntity player,0.15,0,0 End If Else Walking If KeyDown(17) And KeyDown(30) W and A MoveEntity player, 0.1,0,0.1 ElseIf KeyDown(17) And KeyDown(32) W and D MoveEntity player,0.1,0,0.1 ElseIf KeyDown(17) And KeyDown(30) S and A MoveEntity player, 0.1,0, 0.1 ElseIf KeyDown(17) And KeyDown(32) S and D MoveEntity player,0.1,0, 0.1 ElseIf KeyDown(17) W MoveEntity player,0,0,0.1 ElseIf KeyDown(31) S MoveEntity player,0,0, 0.1 ElseIf KeyDown(30) A MoveEntity player, 0.1,0,0 ElseIf KeyDown(32) D MoveEntity player,0.1,0,0 End If End If While KeyDown(16) Q RotateEntity camera,MouseXSpeed(),10,10 Wend While KeyDown(18) E RotateEntity camera,0, 10, 10 Wend TurnEntity player, 0, MouseXSpeed() 6.0, 0 TurnEntity camera, MouseYSpeed() 6.0, 0, 0 If EntityPitch(camera) lt 70 RotateEntity camera, 70, EntityYaw(camera), EntityRoll(camera) ElseIf EntityPitch(camera) gt 70 RotateEntity camera, 70, EntityYaw(camera), EntityRoll(camera) EndIf End Function If there's some one who can actually help me with this, I would appreciate it.


Is game software design the same as non game software design? Is the software design process for a game similar to a non game? Do developers create UML diagrams? I ask because of the iterative nature of game development, I wonder if creating a UML diagram would just be a waste.


Effective methods to continuously update movement in a tower defense game? We are four guys making a Tower Defense game as a project in first grade on a university. The game is going to be really simple! Three different towers Three different monsters One map (maybe add some more if we have time) The game has to be object oriented. The class structure is as following Game Drawing of graphic, etc. Level Every level is an object of this class. Each level has a finite number of wave objects (in a list) Wave Contains a list of monster objects. Monster This is a superclass. We make subclasses for the different type of monsters Tower Superclass to the towers. There are subclasses for each type of tower. We are thinking about how to solve the problem that many objects have to do stuff, at the same time, e.g. move one pixel in one direction. What we came up with is the idea of implementing av class Timer, to control when objects do things. I am not sure this is the best way to do it. Could someone give some good ideas about how to solve the continious update case?


Experiences of test driven devleopment in large projects I've used TDD in personal projects, but I wondered if anyone had any experience of using this approach across a large team? Was there resistence to the test first approach? Did you keep code coverage high for the whole project? How did coverage survive fixing those two in the morning and you ship in four hours crash bugs? Did you run tests on all platforms, or just assume that passing on one meant passing the others? I love the decoupled code that TDD produces, and the large suite of regression tests you get for free, but if you only have a few in the team who don't want to contribute tests, won't everyone suffer?


Which programming language should I start with in game dev? I am a front end web developer and I've always been interested in building games. I work primarily with HTML, CSS, PHP, and JavaScript on a daily basis, so I'm not new to coding. I would like to know which language platform would be most useful for me to build a simple, 2D, art heavy game, like something you'd see on the Super Nintendo. Thanks.


'Real' AI that learns in games In my work I analyze and design Evolutionary Algorithms (EAs), but for fun I'm learning game design, and, of course application of EAs in games. So I'm wondering if there have been any games where AI actually works as AI, i.e. learns from past solutions to develop new ones. I suspect it should be something like tic tac toe or chess.


Visually coding rpg dialog trees I am currently using XML to create my dialog trees in my rpg, but doing this by hand for hundreds of different discussions can get very tedious very fast. I was wondering if there is any way I can implement a flow chart udk kismet like system of visually coding these diolog trees. I still want the end result to be the XML because I already wrote the parsing and other logic around the XML. EDIT to give an idea of what I am looking for, here is an example. This was shown to me when I asked this on reddit and it is basically what I am looking for but it is limiting . Really what I am looking for is any dialog software that is already in use for games or software that is graph flowchart like and can be modified to suit my needs.


Is there any online programmer's community, focusing on core game development? I am looking for a stricktly mostly programming oriented game community, focusing on core graphics, middleware, and research. Any suggestions? Edit I am specifically looking for people community group, having expertise in core game engine design programming, directx opengl reservoir.(And specifically targetting the programming part only).(The platforms can be anything from PC to xbox360 ps3 wii and even 3ds.)


How are the same items generated with slightly different attributes? Consider games like Destiny. How do they generate weapons that have the same skins and names, but different attributes? Two people can have the same weapon or armor piece, but have different attributes on these pieces based on luck or drop rate etc. How is this accomplished programmatically?


Store and retrieve different objects on a tile (I hope the title is clear enough, if not feel free to suggest a better one) I'm trying to make a simple tile based map for a college project in Java. But I'm stuck on how to literally place things on my map. On the programming side of things, I still haven't got into graphics on this. As of now I have A "Robot" class, which implements an "Attackable" and "Spawnable" interface, the robot can attack and moved A "Obstacle" class, the obstacle too can be attacked, so it implements Attackable, Spawnable, but it also can be pushed by a robot (methods by the class itself). A "Station", which is nor attacable nor can be pushed, so it only implements Spawnable and other specific methods. A "GameWorld" class which hold the map (a 2D array of Tiles) and various methods. A "Tile" class (which is arrayed to create the map). It has a boolean "Occupied" (which doubles as a collision too). Previously it stored just a single Attackable variable, because both Obstacles and Robot can be attacked, so I just tought it would be easy to just store them as such on the map for when I need to attack something, and then use some other reference to Robot instances when I need to move the robots and have a reference to the station in GameWorld in order to use that. But then I remembered that the Obstacles need to be moved too, so it wouldn't really work. Now I'm thinking about having two maps, basically, an AttackableMap for the attackable object (which would store both robots and the obstacles) and a ObstaclesMap for the obstacles alone (with tiles occupied by robots set as occupied). Which would obviously mean having two tile classes, one to hold each kind of object. But it feels cheap, I think. It uses a lot of memory and I think it might be hard to render at a later time. But having only one map would mean having to check what kind of object I'm getting and I'd have to do loads of casts and I want to avoid that. So, I think, there must be a better way to do this. How do other people do it then? So basically my question is... How can I store different "things" on a tilemap in a better way? Is there some technique widely used? What I've come up with feels rigid, if I wanted to add another kind of object that can be placed on the map (like a mine) I would need to create another map entirely, another tile, write new methods... There must be some flexible (and not too complex) way to have some freedom in this aspect.


Making a game for multiple platforms I am making a game with web, iphone, and android front ends. I want to make them all able to interact well through the back end so that any user can play with any user. To do this I've decided to make an "API" or really just a Ruby on Rails back end (with the rails api gem). Which option fits best 1. Back end First Process would be building entire back end functionality, one feature at a time until it is complete (can always expand missing features later). Can test it using different types of tests. 2. Back end alongside one platform (web) Process would be building one feature in the back end, then using it in the front end to make sure it works. Would be easy to build with web because most Rails projects already have views. 3. Back end alongside each platform Same as option 2, but building the feature in each platform before moving on to the next one. Would allow fixes for cross platform problems as you go along, being able to narrow it down precisely. Essentially I know possible ways to go about it, but have never made an API or cross platform game


How can I mock Google Play purchases? I would like to know what best practices should I do for testing the functionality when a user buy an item power ups via Google Play and purchased with real money? For example, basically, creating a simple test of purchasing and saving an item stored in the inventory during the game using a game money. (e.g. Gil from Final Fantasy series or Zenny from Tron Bonne for the PlayStation 1) I know how to make money purchase update only via game money when I'm programming in Unity3D or Eclipse w LibGDX library. Now, let say I have to create a program that checks the user if actually purchase a power up items using real money. Next, the system needs to check for online status. If connected, it will simply go to the Google Play dialog and asks the user if he she wanted to proceed purchasing of items. If yes and the credit card balance is sufficient, then goes back to the game app and check if the boolean returns true, then item that the user is bought will be saved. Another example is that the amount of real money will be calculated via programming and if insufficient, the user asks to add more real money value by purchasing it via Google Play. If return true, then, the real money value will be reloaded. This concept is basically needed for game developers. However, is there a safe way to test the real money purchase test stuff without using a credit card value or something before the actual publishing of the game app in Google Play along with this feature? Is there a tutorial, start up guide, recommendation or something for this? Please, I would like to know how will I start. Thank you.


What programming language were PS1 games written in? Is there any common language that is used to create Play Station 1 Games? Or how can I find out what programming language is used for one of those games?


Java game in a day or two We are three people who are going to make a simple game in Java as a school project (University, first year). The game has to be object oriented. We don't have much time, 10 20 hours tops. None of us has any experience in game development, but we all have fair skills in Java. We can choose exactly what kind of game, and that is where the problem lies. How high should we aim? There is a competition involved, so we do want to make the best game in the time we have. Is a 3d game unrealistic? Should we use any game engines libraries? What kind of functionality should we avoid?


Good practices while working with multiple game engines, porting a game to a new engine I have to work with multiple game engines, like Cocos2d Unity3d Galaxy While working with multiple game engines, what practices should I follow? For instance, we made a game with Cocos2d and released it on the AppStore. Now we want to port it to other platforms using Unity. What would be the course of actions to follow?


Cross Game Engine Compatibility Multiple Game Engines for one Game I am new to Game Development, infact getting started with it, so reading as much as I can. I came across game engines. Now atleast I have an idea of what a game engine is, and what it does. In order of reading about game engines, I came across various game engines Paid, Freeware, OpenSource. Some are good for physics, some are good for loading images, some for sound. At last, it always comes to performance. Now what comes to my mind, can I use various game engines to develop one game? I mean, one for loading graphics one for animation one for physics. Is this possible? I know, game engine is like a CPU, and what I am talking about is using various CPUs to work on one PC. But whatever it is, can this be done? Cross Game Engine Compatibility?


why is Lua so important ( frequently used ) in game development I have written some small games for fun myself, but never used Lua myself. I have seen people discussing Lua's use in games everywhere. The question is What benefit can I get from using Lua in game development? Can someone explain this a little bit to me?


Does Big O really matter? In academia worst case Big O is taught over everything else. Compared to space complexity, normal case analysis, simplicity over complexity, etc. In particular to game programming and industry, what really matters most and why? References would be very helpful.


Clickable hex grid in c .net I want to create a Windows Form based adventure game where the player clicks a hex on a static map to bring up their next encounter. I have the map already and plan to scan it and convert it to a .bmp file. My problem is that I'm not sure how to tie the map image in with the game code. Unless I'm mistaken, I think I need to use some kind of imagemap control. If that's the case, do I need to plot each hex individually, or is there a way to plot the whole map in bulk? I found this article, but I'm not sure if it's relevant to what I want to do or not. I'm just looking for general information or links to relevant articles. Thanks.


What should audio programmers know? I'm a music composition student also getting a minor plus some in computer science. I love writing music and making sound effects and want to write music for games. But, I also realize everyone and their mother wants to do that. With that in mind, and since I'm already equally in love with programming, I'm interested in looking at focusing some aspects of the computer science portion of my education towards audio implementation for games. What I've done am doing Wrote "MusicManager" classes that are aware of musical timings and a small amount of automated mixing based on game events Reading Who is Fourier? as I work my way toward understanding Fourier analysis and implementing the FFT Learning FMOD Designer and using the designer API in a game (of course not taking a class specifically on this, I'm good for learning APIs on my own) With that background, I've got a two part question. So aside from the things I list above, and the good ole fundamentals of computer science (data structures and algorithms, discrete math, OO structured design), what are studios looking for in audio programmers? Also, G.A.N.G. and Audio Engineering Society lecturers speak as though audio programmers are the next hot thing in games, but do many studios even have or think to hire dedicated audio programmers?


Should items in an RPG be hardcoded or loaded in some other way? Should static weapons (ie.. Iron Sword, Mythril Axe) be their own (static) classes that derive from something like ItemWeapon, which itself is derived from a standard Item class with their own (inherited) methods? Or possibly should there be just a standard Item class, an ItemWeapon class, and then every weapon is just an ItemWeapon instance loaded in at the start of the game? If I was going to do that approach, where would I be loading all the items and weapons into the game? init? If some weapons have special properties such as doing multiple attacks or a different effect, would it be beneficial to make them the separate classes to do it on an as is basis instead of having every Weapon in the game have that function except it doesn't do anything?


What can I do to make sure that I have the energy to work on my game while working full time? I work as a software engineer 40 hours a week and I find that between balancing my personal life and family responsibilities that I have literally no energy to work on game development. What can I do to make more time for my hobby without burning myself out in front of the computer? I am sure there must be someone here successfully developing a game while working as a programmer on the side.


how to breakdown my game project? I am a newbie so when ever i start over i get stuck how to organize things (code) or what should be the order of my work. Can you share your experience of project granularity so i can make my mind what should be done first and so on.


What is "tools development?" I have been looking at different jobs in the games industry and a lot of the jobs that I have seen advertised are for a "Tool Developer" position. I do not know what this actually is. Could someone explain what this is to me please? And if anyone has any links to material that would help me understand it more then that would be very much appreciated.


How can I transmit move information from player to player in a web application? I am trying to create an online chess game using ActionScript and Flex. It works well when I have two players on the same PC, but I want to publish it as a web app. How can I transmit a move or action from one user to another, such that the other user sees what the first one did?


Limitations of p2p multiplayer games vs client server I am reading up on multiplayer game architecture. So far most of the articles i've found deal with the client server model. I'd like to know what are the limitations for using a p2p architecture? what "class" of games are possible (or more common) to implement using it? which aren't? and in general, what are its main differences and limitations against the client server model.


What are windows used for? I have a very general question In games, what use does the programming concept of a window have? Or, in other words, why do some game dev libraries offer interfaces through which to create multiple windows? mdash Why would you need more than one windows in a game? Are multiple windows used as different views states of the game? (I.e. in game, main menu, pause menu, etc.)


How are the same items generated with slightly different attributes? Consider games like Destiny. How do they generate weapons that have the same skins and names, but different attributes? Two people can have the same weapon or armor piece, but have different attributes on these pieces based on luck or drop rate etc. How is this accomplished programmatically?


connecting multiple anti aliased lines together I implemented copied the wu line algorithm from pseudo code on wiki pedia and other places. When drawing a sine wave it breaks down at the point where the line changes from y dominant to x dominant (or vice versa). (I did not copy the endpoint code because it looks terrible and I do not need them for my purposes. ) Does anyone know a solution for this issue? If not I will modify the algorithm myself to get it to work. I am just curious if someone else has run into this and knows exactly how to fix it. Is it possible to implement without the lines being globally aware of each other? Or is this why drawing API's implement moveto and lineto functions? The pseudo code


Game Design Patterns ( think GOF ) literature? Possible Duplicate What are some programming design patterns that are useful in game development? Is there any literature on game design patterns? I'm taking a software design class and would like to learn how some of these design patterns would apply to game development.


What is an OO way for my input layer to act upon objects? I'm building a top down RPG specifically to practice Object Oriented thinking and design. I am keeping in mind coupling, single responsibility, and so forth. One design issue that's been bugging me is how to ultimately have objects talk while maintaining the loosest coupling possible. As an example, I'm designing the input class now, which will be made up of two layers, like so The conundrum is that I don't know how to bridge that gap between Input and HeroActor, which is initialized from the PlayState class, which is also where the hero.update() method is called. Let's say Keyboard has just executed public void keyPressed(KeyEvent e) switch(e.getKeyCode()) Some cases case KeyEvent.VK UP Assume InputEvent.INPUT1 is a defined enumeration in InputEvent inputHandler.passInput(InputEvent.INPUT1) break Some more cases I've basically landed here public class Input public void passInput(InputEvent e) switch(e) Some cases case InputEvent.INPUT1 ???????????????????? Some more cases My ideas have been Pass a reference to the instance of HeroActor to the Input object, then have Input directly call the moveUp() method on the HeroActor instance. case InputEvent.INPUT1 actor.moveUp() My instinct tells me this is bad OO design as it tightly couples the two classes. Make the instance of HeroActor global and basically do the same as above. Even worse OO design. Write a registerInput(Input inputHandler) function in the Actor class, like so public class HeroActor extends Actor Existing fields and methods private Input inputHandler public void registerInput(Input inputHandler) this.inputHandler inputHandler Still, then the HeroActor would have to poll the inputHandler every frame to find out if any actions have applied to it. I'm in the same situation trying to figure out how to write the collision engine without passing it specific references to the player's HeroActor instance or the dozens of EnemyActor instances in the PlayState constructor. Any help would be greatly appreciated. My request is not for specific code, but rather common techniques for handling the many objects in a game without ending up with a god object. I've seen some material suggesting an Observer pattern being applied for things like the input layer above, but before I go too far, I'd like some feedback from the community since I've got so many different answers among all of my Googling today.


What basic non games related computer knowledge should a games programmer possess? So the question will very likely need re phrasing. I thought about asking this for a while, but held off because it's a tad vague. To explain I have been a programmer for 4 years and only begun doing it when I took a university course. Now that I'm working as a programmer, I find that often people assume you know a number of things that I feel people who have been messing around with computers know by default, and I don't. Things like shell commands, how to use subversion, stuff about how websites work at their base level, how to use databases and so on. What I would like to know is some of the basic stuff, the nitty gritty that people in a programming job are expected to have encountered and know how to do. Also, I'm sorry if people feel this question is not a perfect match for the Q and A format please let me know how I can improve it or just edit it heavily. Thank you in advance.


Actionscript 3 Which side of object is hit? I have a two objects colliding with each other. I am testing for the collision with if(ob1.hitTestObject(ob2)) do something . Is there a way to determine which side of the object was hit, i.e. if ob2 is a square, which side of the square was collided with?


Engine for a Football Manager Type game (data driven, menu clicking) A friend and I had started developing a football manager two years ago, but ultimately squashed the whole thing because we found ourselves in a mess with developing UI and saving loading. The basic game loop of simulating matches and advancing days until the match day was already done. We also had a e mail system up and running (for receiving messages which might need decisions trigger events). In our lack of of knowledge, we tried building the game in GameMaker2. It made saving all the objects (a Team has 23 Player, a league has 20 Teams, there are several Leagues) a nightmare. Also, UI development (things like scrollbars for example) ate up incredible amounts of our time and still everything looked relatively bland. Short GameMaker2 seemed not suitable for the type of game we wanted to build. There must be a better engine system for developing a manager type game. Most of the game is spent in menus, There's no time critical interaction going on. Since we've benched the project, I started working a legit software development job and I have gained some skills which I hadn't have before, like knowledge of databases and a heap of Python experience. It has me looking at the game again. Now I see it as having a 'data backend' and an point and click frontend, with game design elements, like tough decisions, events and goals as the driving force in the middle. We want nice looking menus, where players can set the training schedule, make the line up for match day, talk to players executives whoever. The other necessity is managing all data objects, which there will a lot of. A league might easily contain 400 players which all need to have stats and so on and so forth. I see a relational database for this, but maybe there's something smarter regarding game development? So my Question is What is a suitable game engine development stack for developing data heavy, non real time menu clicking type manager games such as a football manager?


Do retail games use "inversion of control" and "dependency injection"? Many of the more diligent software developers I know are moving to inversion of control and dependency injection to handle references to objects. Coming from a Flash games perspective I don't know all the ins and outs of AAA studios, so are these used in the retail game world?