instruction
stringlengths
33
29.4k
I know this may be an odd question, but I have the opportunity to take a graduate class that teaches how to do empirical research. I've taken a Human-Computer Interaction class in the past where it was important to perform empirical studies to find out how users interact with your application and study what improvement...
(i'm on OPENGL) i have a mesh O (object) and a mesh T (terrain). i know a single triangle in T and i want to orient O to be aligned to that triangle (torate O to align to T in that point). i have only the normal in the triangle. how can i achive the roation matrix? i have thought this algorithm: // pseudocode float[] n...
I'm very interested to learn how to make 2D and 3D games, but I'm very new to this field so I am wondering if companies like Playfish, Zynga and other producer of games on Facebook are using publicly available game engines to make their games or if they're building their own game engine or what? What game engines or te...
I'm working on a real-time game based on a grid. Each player can move a single square at a time. A server tracks the game state and notifies clients of changes. It's possible for two players to make a conflicting move, such as attempting to move to the same square. How can I fairly resolve such conflicts when they happ...
A lot of games use motion controls, be it Wii, Kinect or otherwise, but for most of them, this control scheme seems forced. What are the games that benefited the most from using motion controls (as in, if they were to be controlled by a traditional controller, it would detract from the experience)? Having such examples...
I have a very simple effect file shown below. I am using this to draw 2D lines, however it is not behaving how I expected and I can't seem to get my head round why. If I draw a line that goes from 0,0 to 100, 100 for example, I would expect it to draw a line from one corner of the screen to a little way in. I would exp...
I'm currently studying opengl shaders but I can't figure out something: how to apply different shaders to the objects, for example, a teapot rendered using toon shader and another one in the same scene using a very reflective surface and other distorted from a noise function, like in this video http://www.youtube.com/w...
I just fixed a bug where rays starting and ending in an octree node were not detected as octree node hits (because the ray doesn't hit the sides). I'm changing the code to check if a ray starts in the octree node, then it is an automatic node hit. Any reason to not do this?
I would have thought that if the object is on-screen that this function should return screen coordinates. When used in conjunction with the directX draw text function, it works fine. Textual overlays track the 3D objects perfectly, however consider the following code: D3DXVec3Project(&xyCoords, &HeadPosition(), &viewpo...
I have served Google and I found that there are many 3D game engine also I have another question here Do Playfish and Zynga use Flash game engines? and I know that away3D is used for social media games on Facebook but I'm confused now which one is the best and will be good and easy to start with as I'm very new in gam...
I'm writing a simple class to draw all the debugging lines I have in my scene at once. The code in the draw loop is this so far: (If I put for example, 2 instead of temporary2DVerts.size() where I have marked with //THIS LINE, the code works fine.) when I run the code below the line breaks //HERE. Access violation read...
Considering there are many games out there that use some sort of a server that contains a list of current games/servers, is there an existing library I can use instead of writing my own master server? I only wish to store game/server data (server name/ip, num players, game-specific data...). Thanks!
I've developed a while back in XNA but I'm a bit rusty. I've started working on SL XNA but have a problem I can't explain while trying to load content (model -fbx- or texture). I place the image named redRect.jpg in the Content project by right-click -> Add existing item and I've made sure all the properties are ok: A...
I am trying to optimize my HTML5 game engine and have noticed that currently a majority of the time taken in the game loop can be taken when drawing transformed tiles. I think this is because each transformed tile saves the state of the canvas, applies a transform, draws the tile, then restores the state of the canvas...
A comparison of graphics libraries and their respective programming languages. A.K.A. "Which do I pick? With a twist." I'm a long time professional programmer who never gave up on programming as a hobby. 3D programming has always appealed to me, but after some trial and error I always came back to (and got stuck on) th...
I'm developing in my spare time a game like Minecraft. In fact, it isn't "like Minecraft", because I'm trying to make it a close as possible copy of it (meant as exercise for myself at the age of 16 and simply because of it is fun to me). Of course, I'm not copying the code using the Minecraft Coder Pack (MCP). I start...
Was looking for some online articles that might have a good idea or two in how to approach this but not finding much. Most of it deals with the various ways to generate and follow a path to a known destination type. Basically the idea is that you have an existing node graph and want to utilize that data in order to loc...
I was playing with raymarching using distance fields in GLSL sandbox and got stuck with a strange problem with artifacts. Click here and take a look at the spheres generated in corners, they have strange artifacts plus they "flicker". Is the mod operator, for domain repetition the culprit here?
Does anyone know of any good (and preferably free) Sprite Animation Toolkits/Libraries for iOS development? This library should be able to handle the collision detection and the movement of the sprites. Back in the 90's there was a Pascal library called Sprite Animation Toolkit by Ingemar Ragnemalm that handled a lot ...
I started making a small multi-player avatar chat to start my self with flash and multi-player. Everything worked fine when I was using arrows to move but when I started using the mouse something goes wrong. Bit more info: When two or more users are connected at the same time and both on the users try to move one user ...
I'm considering purchasing courses from Game Institute, specifically, the Foundation Studies Package. Has anyone here taken their courses? If so, do you feel they are a good value? If you can, please be specific as to what you benefited from them, and their strengths and weaknesses. Though I am most interested in reinf...
So recently i've been changing my XML files that i'm using in-game, to add in a bit more data to the files but i've also changed the way in which i load & save files, by now using the XDocument API. *Previous Thread/Topic: Xna, writing XML </Asset> end element So now that i'm all done, i've come to trying out the new ...
HI i am a software engineering student in his second-last year. I am proficient with C,C++,C# and java programming languages, and being a student of engineering I have studied calculus, vectors etc in both 2D and 3D & various other mathematical, probability and statistical topics. I have made several 2D games, my most ...
I want to include the drawing of other vectors of vertices in the following code, in a number of places it seems easy enough to simply add or multiply size()s of the two vectors, for instance in the first check. But then it gets a bit fuzzy simply because of a lack of understanding. Should I add them together to create...
Well, I am creating a Minecraft like engine in XNA, and since I first implemented the block selector (the cube that allows you to select blocks in 3D space) it has always been very inaccurate. Here is what I mean: And here is the code that does the selecting (note that I have tryed to ceil then floor the vectors but...
I know this would be a beginners question (some of you might think) but I would like to know different approaches for this. I have a game with lets say 20 unlockable items, at the main menu I have a button where the user can go to an activity and view the unlockable items. So I would like for it to have a "Locked image...
I would like to use a Perspective projection to create the following effect in XNA: Cubes are simply made up of 8 vertices and drawn using DrawUserIndexedPrimitives(). Any extra suggestions, are also welcome.
I am laughing at myself ignorant on this. Google didn't produce an obvious answer. Could someone explain what orthogonal map and isometric map are, and how they are different?
How can I retrieve the camera's world-space position from its view matrix? The only answers I've seen to this question suggest the translation is in the last row/col but this wouldn't work since the matrix contains [x (dot) right, y (dot) up, z (dot) look]
I have a scene that contains mutiple objects. How can I import it in XNA and maintain each object position? Right now I export the scene in .fbx and load it in a model like this: cube.model = contentManager.Load<Model>("cub"); But the objects don't retain their position and are all gathered in one point. I need a met...
How to create a splash (loading) screen in cocos2d for Android? I need a loading screen that shows my app name and after that the next scene will show automatically. Thanks
Transport Tycoon is a simulation game where you control a transport company, place railroad tracks and trains, airports, bus depots, boats etc. Now the game is about 15 years old and I remember running it on a 486sx25 with 4Mb of RAM without any problems. I was recently thinking about modern simulation game requiremen...
I know this is a potential dupe of this question, but the last answer there was 18 months ago and a lot has happened since. There seems to be some uncertainty about XNA in Windows 8. Specifically, Windows 8 by default uses the Metro interface, which is not supported by XNA. Also the Windows 8 store will not stock non-m...
I'm rolling my own 3D engine, in JavaScript, and using only canvas drawing, no WebGL. This is another Minecraft clone; I love boxes, don't judge me. So far, everything works wonderfully, except for one thing: in 3D, when some vertices go behind the near clipping plane, their projection on the screen comes out weird (as...
I am currently trying to look into techniques that allow the calculation of arbitrary cross-sections of a 3D object or rendered volume. However, I have been unable to find much on the topic. I know of some software packages, such as the SolidWorks CAD package, that employ such techniques; as seen here: Does anyone kno...
From what I understand about time based Euler Integration is that you will set a number of pixels you want your object to move in the space of second and then the value will be regulated based on the frame-rate of the machine your running the game on. What I'm having issue with is this You will set your acceleration ...
This is not a question about how to implement a component based system. I have my own system implemented and working fairly well, just can't figure out a good way to split some entities to fit the componnet based paradigm. The entity is fairly simple, it can walk,jump and fire. It can get into some states like "frozen"...
I have got some problem with defining collision between objects in my game using bullet physics. I know that objects are colliding with each other simultaneously and I don't have to do anything more. However I need to be noticed when one object collides with one of the rest. It is quite awkward written so I will tell w...
I'm having an app built, I'm not a programmer and I dont know exactly what to specify. I want it to work on iPhones and iPads and iPod touches and also on Android devices - tablets as well as smartphones, and the Kindle Fire. What backwards compatibility do I need to specify, at a sensible level?
I've implemented simple 3D game physics engine. I already have decent collision detection in place, now I'm trying to figure out the collision response part. I'm using impulse based method to calculate the post-collision velocities. This works pretty well, however, it does not completely prevent the bodies to keep inte...
So I am using the Flash IDE. And I am trying to make a preloader on Frame 1 so that it displays and loads progress before anything else is exported/loaded. So all my assets from the Library are on Frame 2 and all Actionscript Code is Exported in Frame 2. But my Main Document class calls on other external classes that h...
I'm using velocity to move my character, I just add/subtract 0.4f and then update the players position in the update loop. I was wondering, when would be the best place to check for collision? Do I go ahead move the player, and then if I colliding push him out of the wall until there's no collision? Or do I check colli...
So the title basically says it all. I'm looking for software that would help me to create sprite animations that I could use with cocos2d by allowing me to pose a a sprite and the software create key-frames between the sprites( basic tweening ). Any ideas?
I have a pretty simple character rig animation. How can I export the raw data of that animation? I'm looking for some way to export a raw text array of data that tells exactly what every joint does on every frame. This means rotation, translation, etc. EDIT: Thanks for the answers so far. We are looking for a way to ge...
When I use this RenderTarget: renderTarget = new RenderTarget2D(GraphicsDevice, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height, false, SurfaceFormat.Color, DepthFormat.Depth24); and draw something to it: graphicsDevice.SetRenderTarget(renderTarget); // some drawing code here graphicsDevice.SetRender...
I want to create an object than only moves along the the X and Z axes, while keeping the Y-axis disabled (it's like movement in 2D, and the object wont fall down). I'm currently using a 6 dof constraint to restrict movement in the Y-axis, but it's not working: btRigidBody* zeroBody = new btRigidBody(0, NULL, NULL); // ...
I'm making a simple 2d game in OpenGL ES and I want to add movement buttons to it. What's the best way of going about this? In previous projects I've simply added UIButtons to the view but I hear there are performance implications in doing so with OpenGL ES so I'm wondering what the possible alternatives are if so.
As many people recommended, I am using Tiled map editor to create a map for my game and it's great particularly because libgdx framework also provides with API for maps from Tiled. I understand I can define collidable tiles or not in the map editor so I can deal with any collision in my code. But I am currently in a si...
When exporting a model from 3ds Max as FBX to import it into XNA, what metrics should I choose to make 1 unit in 3ds Max equal to 1 unit in XNA? For example: I have a sphere model with 1m radius exported to XNA. When drawing I use: Matrix[] transforms = new Matrix[model.Bones.Count]; model.CopyAbsoluteBoneTransformsTo(...
For my game, I need text-to-speech. Since it's Android, I decided to settle for MP3s, since the range of words spoken is few. For my prototype, I'm using Google Translate to generate the audio since it has awesome pronounciation across multiple languages. But can I use it in production? What if I sell my game for $1 on...
I am creating a stock market simulator for an event in my college. Supposing I have 20 companies in it all starting with a common base price, I need a formula to calculate the changes in the fortunes of a stock based on how many shares are bought or sold.
I'm trying to embed music in my XNA game's .exe (with resources) but compiling them as a sound effect stores the music in uncompressed form, which results in a 16 MB .exe. I can compress my music with wma, and compile it as a song, which unfortunately (in my case) leaves the music as a plain .wma file. Basically, I wan...
This days I'm trying to create a 2D character controller with unity (using phisics). I'm fairly new to physic engines and it is really hard to get the control feel I'm looking for. I would be really happy if anyone could suggest solution for a problem I'm finding: This is my FixedUpdate right now: public void FixedUpda...
The trouble is that with game jams sometimes loads of people participate, but at the end they say "Right! Bye!" and you never hear from them again. If a cooperative element was introduced, the reward from the jam would not only be a game, but a new friend to create games with. How do you go around implementing such a d...
For school I need to make a little game with UDK, the concept of the game is: The player is the headguard, he will have some other guard (bots) who will follow him. Between the other guards and the player are some prisoners who need to evade the other guards. It needs to look like this My idea was to let the guard bots...
I am currently learning Box2d, a 2D physics engine within libgdx. But Box2d seems to be in every game framework these days so I am not really talking about libgdx. I understand Box2d comes with lots of new concepts such as shape, bodydef, body, fixture, sprite, joint. But I think I can slowly but surely manage to lear...
Every time I consider making my code strongly exception safe, I justify not doing it because it would be so time consuming. Consider this relatively simple snippet: Level::Entity* entity = new Level::Entity(); entity->id = GetNextId(); entity->AddComponent(new Component::Position(x, y)); entity->AddComponent(new Compon...
Are there any pratical examples of database implementation for an MMORPG in CouchDB? Even a detailed thesis? I've looked but found very little on practical examples and not even find any good UML examples and plus I see a little bit of an issue with the lack of schema and design by UML. Maybe It's more of a paradigm ch...
Some of the music I've made for my game have note bends in them (1xx Portamento up)...The problem is that when they play in my game, the note bends and then goes right back to original note instead of staying at the new tone it bends into. I believe this to be an issue with SDL_Mixer and not with the XM file itself sin...
I am currently on chapter 3 of the book "Learning XNA 4.0". At the end of this chapter is a section on changing the animation speed of sprites. timeSinceLastFrame += gameTime.ElapsedGameTime.Milliseconds; if (timeSinceLastFrame > millisecondsperFrame) { timeSinceLastFrame -= millisecondsperFrame; //...
In order to define boundary of each tile, I need to have individual image of the tile. Is there any way to extract each image of tiles from a tileset?
I recently started using Version Control with my projects (even though I'm working alone on them). I find that it gives a nice way to keep history of the whole development process (with issue tracking) and allows me to keep backups for my projects along the way. As I slowly discover the features and advantages of using...
I am just getting into game development and I would like to know which engine would be best to learn first. In terms of my current skills, I know a good deal of javascript, but not much beyond that. This is all a learning experience for me (I am an extremely fast learner). I am using HTML5 canvas right now as that's mo...
I am attempting to make a map editor for my game, just so I can visualize how the end result would be. To my world I can add cubes (2 triangles) or corners (1 triangle), which are then added to a list of the vertices to draw, and the indices are added to a list of indices. Everything draws fine here, and I can set diff...
I could operate with the angles, but I do not have the angles calculated yet (and would like to avoid having to do that). It would be possible to calculate and cache the local-coordinate-frame angles, though. This is a routine that is run on every vertex of every convex polygon within the convex decomposition of every ...
I'm using a 3d game engine, that uses a 4x4 matrix to modify the camera projection. The matrix is in the regular 4x4 format: r r r x r r r y r r r z - - - zoom The description for the matrix class says: A transformation matrix. Matrices are pre-multiplication, as in: x' = M*x. What does this mean?
I am a college student, and game development is a little hobby for me. I am writing a new game and I have been looking for a new approach to developing the game engine as to make it more flexible (and allow to provide myself with a solid foundation for future endeavors). I found a few articles about how rather than rel...
I'm about to start developing a sidescrolling game where the player's goal is to travel as far as he can in the horizontal axis before touching down. Note that I do not need to ever travel back on the horizontal axis. I'm developing this with the AndEngine for Android which uses OpenGL and Box2d. Before starting, I ne...
Say I have a framework with characters that can run and walk and of course, stand still. Am I right in thinking that animation blending is the process of smoothly transitioning between these by generating dynamic animations at runtime? If so, what is the basic theory of how this works, and how would I implement it?
I have been using Stage3D to create some 3D app in Flash. One of the items on my list is the ability to take a screen shot. Flash makes it easy to grab the stage content, but I can't find a way to grab the stage3D content. In DX I just used D3DXSaveSurfaceToFile. Anyone know of a way to do it in as3 and flash 11?
Let say company x makes massively multiplayer online strategy games. The game y is updated adding a feature z, but developers forgot to add server-side verification or it was bypassed (using alternative UI). Update allowed users to double their units as many times as they like. After about a day this bug was fixed. A l...
I'm having trouble finding documentation on SDL_gfx, and I can't figure this out. I've managed to use SDL_gfx to automatically cap the framerate, and I it's working a lot better than my manual attempt (combining SDL_Delay and SDL_Getticks). Now I've been trying to learn more about it, and I stumbled onto something. He...
I am developing a mobile game for Android. It is a 3D jumping game (like ski jump) where wind plays a important role so i need to simulate it. How could I achieve this? The game uses libgdx for rendering and a port of Bullet physics engine for physics. To simulate the jump I have 2 spheres which are placed at the start...
I am working on an android game with a top down style view similar to the original GTA's or a scrolling version of Legend of Zelda. I have recently begun designing some prototype levels for the game which vary between a corridor style dungeon similar to diablo or an open area with obstacles similar to Zelda. My questi...
I want to start learning how to make games in XNA, but I have no idea where to start! If someone could advise me on what pieces of software I need and some good books or tutorials to look at, that would be most helpful. As for my current coding knowledge, I have some good experience with Javascript (in conjunction with...
I am creating XNA/Silverlight game in Windows Phone Mango. Testing with the emulator in both the Release and Debug mode. From the main page, I call a settings page written in Silverlight. Then I back out without making any changes. I enter the XNA page, the touch does not work properly. If I start the app, then enter t...
I'm hard-coding my levels and coding each level in its own class...The problem is that I need to have a pointer that points to the class of the current level. I don't know how I would go about doing this. I ideally want to have a vector that stores the levels, and I'm working on a level managing class to load, update...
I'm writing a simulation program and now I'd like to visualize the results in 3D. All I need is N tetrahedrons moving inside rectangular cuboid. I have already calculated coordinates of tetrahedrons at each step. Possibility to move camera would be nice :) So, I'm searching for a code sample I can adopt or docs.
I know that there is the Texture.getTextureData() method, and that it returns a byte[], but I have no idea how I could use this data to find the color data at a specific pixel.
I'm starting development of a 2d isometric (tiled, roguelike) game and I'm brainstorming which kind of data structure I would use to store runtime data like tiles and entities, but I don't want to use a 2D array (as the world will be huge). How could I handle the rendering in such a case?
I have got problem implementing collision callback into my project. I would like to have detection between two specific objects. I have got normall collision but I want one object to stop or change color or whatever when colides with another. I wrote code from bullet wiki: int numManifolds = dynamicsWorld->getDispatche...
I've read Valve + Gafferon and hundreds of pages from Google, but for whatever reason I can't get my head around client prediction. To my understanding, the basic problem is: Client A sends input at T0 Server receives input at T1 All clients receive the change at T2 At T2 however, using client prediction, Client A is...
So I was reading through my copy of GPU Pro 2 and I came across a chapter for building a rendering pipeline for real-time crowds. The implementation uses render targets on the GPU to update agents and finite state machines while also performing frustum culling and level of detail sorting. With this approach, the test c...
I know that this is a difficult question and I hope I can convey my meaning. Over time I've used many different engines from XNA over Unity to Panda3d and even tried native directX once. My final impression is that an engine basically serves to do this: implement a scene graph offer classes like actor to add them to t...
i was able to compile and link V8 against my game and code interpretation works fine. However I want to divide my code and the game loop should exist in one thread and the scripting engine should run in a second thread alongside my game loop. I am using SDL and therefore tried this code to spawn a new thread SDL_Create...
I've hit a little snag in my game. It's a 2D platform game and I need to check for collisions against the level. I'm using GLEED2D to create the map. I'd like to do per-pixel collision checking, but I don't know how to get the texture color values out of the Level.cs file provided by GLEED2D. If any one can point me in...
Is there a way to determine, or preferably calculate/predict, the the stride of a line of a DirectX 11 Texture2D resource when using SharpDX? (E.g. Can we say the stride of a line is always a power of 2?)
so like the title says i'm trying to think of ways that i can basically improve my level/map data. Currently it's "alright" but i don't feel it's great. There's certain things that i'd like to-do to improve on it, but i have concerns on things that i have in mind. So i guess i'm looking for seconded opinions. For some...
I'm using Bullet and want to take some action once all objects in a dynamic world have reached 0 velocity (or at least a value that's very close). I was trying to iterate over all of them all the time and when a counter equals getNumCollisionObjects() then do that action. But it's a complex procedure and I'm beginning ...
I'm trying to write my level classes by having a base class that each level class inherits from...The base class uses pure virtual functions. My base class is only going to be used as a vector that'll have the inherited level classes pushed onto it...This is what my code looks like at the moment, I've tried various thi...
I'm using Box2D. I think it's something to do with wall's fixture definition, but when a ball goes toward a wall at a 45 degree angle, I would expect it to bounce off at 135 degrees, but it always goes 90 degrees against wall. Why would this be?
An OIS::Mouse is required to create an SdkTrayManager: // Constructor in SdkTray.h SdkTrayManager(const Ogre::String& name, Ogre::RenderWindow* window, OIS::Mouse* mouse, SdkTrayListener* listener = 0) : However, it's only used in the refreshCursor method: mCursor->setPosition(mMouse->getMouseState().X.abs, mMous...
And will the job oppurtunities in games development field be good?? Which course can i prefer in these both??
I have a problem at the moment loading in a texture for a larger model in the content pipeline. Now it seems that I need to make a proxy object, which is fine, however looking at the SpriteSheet example provided by Microsoft they seem to use the ContentSerializerRuntimeType attribute to bind the proxy class to the real...
I'm using a 3D game engine, that uses a 4x4 matrix to modify the camera projection, in this format: r r r x r r r y r r r z - - - zoom Strangely though, the camera does not respond to the Z translation parameter, and so you're forced to use X, Y, Zoom to move the camera around. Technically this is plausible fo...
In terms of game engine modeling, please give your pros and cons for two types of interfacing: class MySceneObject_Model1 : public IRenderable, public IScriptable, public IAnimatable { ... } class MySceneObject_Model2 { protected: IRenderable* m_ptrRenderable; IScriptable* m_ptrScriptable; IAnimatable* m_ptrA...
Can anybody refer me some pdf or ebook that i should follow for basic 2d programming and texture ,shaders and other gaming elements details in depth.By which i can easily get through the 2d game programming. Thanks, Balraj.
I want to change the normal Unity splash screen to be customized for my game and every time I change the splash image in the player setting it does not appear. So how can I do that please?
I just did the online tech test for Lionhead and found it a bit defeating. There were questions that required you to work out the answers to recursive algorithms that accepted arrays as arguments and made multiple calls each run through, thus splitting off into exponentially more versions. This all had to be done on pa...
I made a program that simulates an assembly line using the XNA 4.0. I made a 3D model, and divided it into 5 positions - start, 3 workstations, and end. These positions represent the places on the model that (in real life) would be covered by some type of sensors. Whenever an object gets to one of these positions, it ...