instruction
stringlengths
33
29.4k
I want to make a 2D Point Light in XNA, I was able to find some helpful information but it is too advance for me, since i know nothing about Shaders http://www.soolstyle.com/2010/02/15/2d-deferred-lightning So my best aproximation is use a texture and use alpha blending, but im not happy with this result. So I was wond...
I have been using them as a black box for a while, I'm just learning about of the maths but I'd just like some definitive answers to this question. So far the only benefit I've come across personally is the ability to SLERP between two angles - to achieve the same effect with a vector you need quite an ugly work around...
Is there a method to know if a sprite has left the camera of the stage? or I have to do my operations? :P
I want to generate a terrain through Perlin noise and store it into a .raw file. From Nehe's HeightMap tutorial I know the .raw file is read like this: #define MAP_SIZE 1024 void LoadRawFile(LPSTR strName, int nSize, BYTE *pHeightMap) { FILE *pFile = NULL; // Let's open the file in Read/Binary mod...
I'm trying to learn DirectX and SlimDX but I'm having a terrible time getting started. I'm taking the Triangle tutorial and trying to add color and transformations. Starting with controlling color, I've updated the .fx file to the following: cbuffer cbPerObject { float4x4 gWVP; }; struct vsInput { float4 posi...
I currently have some 2D terrain in my game defined by 2D coordinates with lines drawn in between them (linear interpolation too keep it simple). Now I want to cast a ray from anywhere above the terrain and see if it collides with the terrain for drawing bullet tracers. Here is a quickly drawn example:
Problem Imagine that we have a 2D uniform grid of dimensions N x N. For this grid we have also pre-computed a visibility look-up table, e.g. with DDA, which answers the boolean query is cell X visible from cell Y? The look-up table is a complete graph KN of the cells V in the grid, with each edge E being a binary value...
Everytime I have coded "working" collision, I always went about it very haphazardly and unstructured. If I use Axis Aligned, or Verlet, Or Euler, any or all of these theories, my problems always lie in the edge cases. Let me invent a scenario to better explain my question. Imagine a 2D game, let's use Mario as the best...
Is there a method in Cocos2d like CGRectIntersectsRect, except instead of limiting it to one sprite, it checks for ALL objects?
Can you bring in external music such as mp3s? If so, how? I didn't see anything about this in the wiki Bethesda released. Also how does this work with regards to the Steam Workshop? Don't imagine they would appreciate uploading copyrighted content. I don't particularly care about making a public mod, I just want ...
I'm trying to create a game that mimics Tibia's projection style: (source: mmoginfo.com) , As you can see, a 3d point is mapped to 2d like this: So I've downloaded Three.JS and a lib to create a Orthographic Camera. But I'm getting this: Where, as you can see, the projection is like this: Which is not what I wan...
Which libraries/platforms are available on Linux to start game development?
So I am starting a game with a friend as a small project, and we are considering what game servers would we need. Firstly, the game is a multiplayer(player vs player) game, for example, like an online chess game. However it is real time, so the latency cannot be too high. The players basically take turns, but in a real...
I am trying to simulate the Doppler effect in a game (a car racing game). I am not using a specific sound library that simulates the effect; I only have a callback function where I mix the data. I already figured out how to change frequency of a sample in the mixer function. What I don't know is how much the frequency ...
How would you update the state of a 2D object that is thrown forward(with an arc) facing a target to simulate a 3D(depth) like effect? var ball; //2D ball from a sprite sheet ball.x = 0; ball.y = 0; ball.scaleX = 1; ball.scaleY = 1; ball.throw(); //set ball to a throwing state ball.update(); //update the ball's posito...
I'm trying to get Nifty GUI to work with Slick2D. So far everything is going great, except that I can't seem to figure out how to properly interact with the GUI. I'm trying the example in the nifty manual http://sourceforge.n....0.pdf/download but it doesn't seem to entirely work. The Element controller is being calle...
I am using XNA/C# to load up 3ds Max models exported in FBX format. Is there some way to mark a specific point in the model like the pipe of a gun so I can just refer to it and place a bullet in there directly to make shooting look good?
Is there a resource online which has made the effort to evaluate game user interfaces and estimate their usability (by genre)? (something like what Nielsen does). In-game reviews in magazines unfortunately do not always present an objective and quantifiable point, based on established heuristics or criteria
I want to make several 2D games for mobile platforms, mainly using Qt for iOS, Android, Symbian, MeeGo and whatever supported by Qt. I've made one game already using PNGs. Now I'm thinking of making a game similar to Battle Heart. What do you think is the best option, PNG files or SVG files or other formats?
Does anyone have any ideas how to go about achieving rotational pixel-perfect collision detection with Bitmaps in Android? Or in general for that matter? I have pixel arrays currently but I don't know how to manipulate them based on an arbitrary number of degrees.
I have just started with XNA development on Windows. But as I'm a fan of iOS I had to try porting my test code over to Monotouch on the Mac. I used these instructions: http://www.facepuncher.com/blogs/10parameters/?p=42 But this is so much (manual) work! And it really doesn't answer open topics like: why would I copy ...
If you look closely (scan it on a computer and zoon in) at a carbon pencil line you can see that there are differing shades of gray. I tried looking on the Internet for any kind of algorithm or statistical model for how that gray would be drawn programatically. Does anyone have information on this? Thanks a lot!! I ...
Edit: So i'm going to rephrase the question a bit, seeing as now i think know how i'm going to read this data. Looking at this example as my guide: http://forums.create.msdn.com/forums/p/53404/323877.aspx This is pretty much what i'm currently doing, and to be clear and show you guys: http://pastebin.com/GxqQcBDg, tha...
Possible Duplicate: learning Direct3D 9, 10 or 11? I'm just starting to learn DirectX, and I was wondering what the best version would be best to develop for. I'm trying DirectX 9 right now, but was wondering if I should use 10 or 11... Which version is the most commonly used version for games nowadays? I want to be...
I'm struggling with getting the depth layer to work properly. No matter what I do, the line is drawn over the top of the circle texture. public void Draw(SpriteBatch spriteBatch) { spriteBatch.Begin( SpriteSortMode.BackToFront, BlendState.AlphaBlend, null, ...
I'm creating a block-based game and am ready to start developing the avatar. I would like to use the Minecraft avatar model but use my own higher resolution texture. Can I do this or will I be breaking some law or setting myself up to be sued?
Related: Simple noise generation Understanding Perlin Noise I'd like to generate tileable Perlin noise. I'm working from Paul Bourke's PerlinNoise*() functions, which are like this: // alpha is the "division factor" (how much to damp subsequent octaves with (usually 2)) // beta is the factor that multiplies your "ju...
So I've been prototyping games that if completed would be mobile apps most likely. But, I'm developing them in XNA on the desktop because its the environment I like the most. I know I could target windows phone and be testing the touch interface rapidly on that device but I don't own one and I imagine the build and de...
I am using a kinematic body for my moving platform on x-axis, so I set the linear velocity to b2vec2(5,0). When the player jump on the platform, it works like it is suppose to. But the thing is that my platform is on the obstacle layer and I am moving it with the parallax layer. So if I setTransform the kinematic p...
So basically my question is im making a 2D game with openGL and SDL. So what im trying to do is resize the game and have the openGL quad scale to the size my window becomes. void CApp::OnResize(int w, int h){ textureWidth = (float)w; textureHeight = (float)h; SDLWindow::SetGLWindow(w, h, Surf_Display); } bool SDLW...
I am working on a raycast-based 3D game, using Lua with Löve2D, and I am now currently working on the AI for the enemy. I want to make it like how "DOOM" did it, but I don't know how to handle how and when an enemy can hear your gunshot so they can "wake up" and become alert. The map format is a simple grid, where 1 re...
A question was asked about good, up-to date OpenGL resources, one of the answers was a link to a tutorial about modern OpenGL programming. The tutorial in question uses GLUT and GLEW, but I have read somewhere that GLUT is obsolete. Is that true?
I have downloaded completely different samples with water effects (in XNA) and I've noticed that they all exhibit a common problem: when the camera direction (only the direction, not the position) moves, a noticable and annoying flicker occurs where the water meets terrain. I'm curios to find out more about this. Why ...
I am trying to learn OpenGL, and I just found out that GLUT is obsolete. I already know SDL, and it seems it is a good alternative. Should I use SDL to develop games with OpenGL, or are there any better alternatives. I am new to game development, so I don't know much about the state of the art.
I'm looking for a decent sprite sheet packer. Features: Command line interface for Linux. Effective packing algorithm. Configurable padding between sprites in the sheet. Configurable fixed sprite sheet size (i.e. pack to many sheets). Duplicate sprites detection, preferably with some tolerance to allow for FP errors w...
I am somewhat intrigued by the diagram found here representing 1800 years of cultural history in an imaginary world some guy created. This sort of thing would seem to have strong applications for game development, insofar as world design. It looks like he did this diagram by hand. What I'm interested in is seeing if t...
i have been looking for 3d Bone Animation for plain C# (to be used with Sharpdx or Slimdx) but i did not find anything !!! I just find some for XNA. Any Suggestions! Accept c++ suggestions also
I have a sprite which has Velocity and Position, either stored as Vector2. At each Update cycle, velocity is added to the position. I would like to give the sprite a third vector, Target. New targets may be given at any iteration. I would like the sprite to essentially move in a random walk pattern, however two paramet...
So I have an object moving in a direction towards a fixed horizontal or vertical wall. How do I compute the angle that the object should bounce off at? The object can approach the wall at an arbitrary angle.
I'm an Android developer, and I want to start developing a real-time multiplayer game, like Pocket Legends. Would this type of server be good for a real-time multiplayer action game - http://systembash.com/content/a-simple-java-udp-server-and-udp-client/? I'm absolutly new to server development, so it would be great if...
I have a vector (8,5). It's origin is at (10,9) I can calculate a perpendicular like so: MyPerpendicularVector.x = -MyVector.y MyPerpendicularVector.y = MyVector.x Given that I now know these two axis, how do I make these axis (made up of my new vectors) now my "local" axis? for example I want to plot a vector (2,3) o...
I have a growing sphere in space, and I thought of having a procedural generated texture over it. Since it is growing, I thought a fractal would be a great choice, because more details would be visible the larger the sphere get (and I could mess with some parameter over time to have it animated). A quick Mandelbrot imp...
I am using "Gdx.input.isTouched()" in the render method of my Screen method, to know where is touched, but when the touch is dragged in the screen, it also activates the events i want only when an actor is touched. Is there any listener to know when an Actor is touched, but the event is not the dragged one, im doing it...
I added a sky to my raytracer that gets sampled when a ray completely misses any object. What I'm doing here is if a ray completely misses anything in the scene, it returns the Perlin noise function at (ray.direction.x, ray.direction.y, ray.direction.z) - in other words it "samples a sphere around the origin". But it ...
I'm in the process of creating a web app. I have many randomly-generated non-player characters in a database. I can pull a lot of information about them - their height, weight, down to eye color, hair color, and hair style. For this, I am solely interested in generating a graphical representation of the face. Currently...
I am new to XNA and I am having problems with collision detection when I rotate my sword. I am using a rectangle bounding box approach and I don't know how I can rotate my rectangle together with the sword sprite. http://picpaste.com/pics/f10268c108e885498a4ae603ab030a60.1328941784.png Any suggestions on how can i sol...
We create 3D models in Maya2011 and create PNGs and import the bunch into Adobe Flash CS5 to create a sprite. I read somewhere that sprite-sheets can save space over making the sprite in Flash. How big of a difference does it make? None of our art team has experience in creating sprite-sheets. Is it worth learning it a...
I am creating an editor of sorts that allow you to create 3D voxel models. I just got started and have ran into a few errors. Here is what it is producing: I think the problem has to do with the way I am handling my vertex format (VertexPositionNormalColor) shader or the way either of them are written: struct Vert...
I use distance squared checks for basically all my distance (vector3 length) checking, due to the performance increase from not incurring a square root (like in plain length checks). From the looks of it, squared distance checks work fine in every situation: if x^2 < y^2, then x < y, even when 0 < (x or y) < 1 I am n...
I am thinking about the best ways to render two dimensional objects in the highest detail possible using modern graphics technology and it occurred to me that when I simplify a situation enough, I ought to be able to calculate the exact percentage of coverage of a triangle over a pixel, at least for the cases where an ...
I'm writing an iOS game that uses OpenGL ES 2.0. I have my 'OpenGLView' which contains a - (void)setupDisplayLink { CADisplayLink* displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(render:)]; [displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; ...
I have an iOS OpenGL ES 2.0 game and currently have a CADisplayLink with a :render method. In this render method I do all the game's logic updates and drawing. Is this correct? Or should my game logic go somewhere else - and if it should go elsewhere... where? The reason I'm asking is that I've been writing a game and ...
i have a little promblem. When i connect to my UDP server using localhost as a hostname, everything goes fine, but when i use my ip as a hostname, the client cant connect to the server. What could couse such issue? As i know the server and the client are fine, because i had the same problem with other servers. But if i...
I'm planning to develop a game in which I want to draw 3d models in real time using some given x,y,z coordinates. The coordinates will be given at an average of 30 coordinates per second. Drawing will happen maximum of 15 seconds (450 coordinate sets) For faster retrieval what, is the most efficient way of retrieving ...
When the mouse button is clicked, I want to draw a line from (0, random) to (640, y) which goes through the click position. How would I calculate the y coordinate of the end of the line?
I am testing transitions in cocos2d, and am running into a problem. I have a MainMenu screen which contains a button. The idea is that clicking on the button will trigger a CCTransitionFadeTR transition to a WhackMain screen where there is a CCLabelTTF which displays "Hello World". But when I press the button and sta...
Say I have the following image: I want to tint the yellow parts on this sprites shoulder/arms by a random color. In other questions on this site, they suggest using a chroma key and replacing the constant color with whatever color I wanted, but that solution wouldn't keep the gradient. The other solution I've seen is ...
In my profiler, finding barycentric coordinates is apparently somewhat of a bottleneck. I am looking to make it more efficient. It follows the method in shirley, where you compute the area of the triangles formed by embedding the point P inside the triangle. Code: Vector Triangle::getBarycentricCoordinatesAt( const V...
Does anyone have any clean ideas on testing whether two cubes in 3D space touch? By touch I mean, touch at corners or on a face or on an edge. Say that the cubes are axis aligned and there is no nesting of the cubes. So either the cubes touch or they don't. There is no overlap of the cubes at all (except of course poss...
I've been working on some steering behaviors and ran into trouble with my logic for converting points in world space into points in local space. I had this (it's not optimized for multiple points yet, but that is not the point of my question): public Vector2 WorldPointToLocal(Vector2 point) { var tx = -Vector2.Dot(...
Yesterday, I've read a presentation from GDC Canada about Attribute / Behaviour entity system and I think it's pretty great. However, I'm not sure how to use it practially, not just in theory. First of all, I'll quickly explain you how this system works. Each game entity (game object) is composed of attributes (= data...
I'm developing a game that will require renting a server. The server will be used to host scores, clans, friends(on/off), match making, lobby, and chat. The game/match will be hosted by each player (to lower the cost). How much would a server like this cost? Any hosting recommendation? How much would it cost if the ser...
Alright, I'm not quite sure what is going on with my code at the moment. I'm currently getting around to defining behavior for my particle system, and to better do this I need to know how many particles are in the buffer on the CPU side. (The particles are held in a structured buffer GPU side) So I'm using a staging bu...
I'm currently trying to implement a component-based entity system, where an entity is basically just an ID and some helper methods tying a bunch of components together to form a game object. Some goals of that include: Components only contain state (e.g. position, health, ammo count) => logic goes into "systems", whic...
I'm trying to get into Farseer and XNA. Before I do any real graphics, I want to use the Farseer debug view only. The problem ist, that I don't really know which matrix to use and the other thing is that my objects look "squeezed". But in detail: this.oGraphicsMgr.SupportedOrientations = DisplayOrientation.Portrait; th...
My game outputs a replay file for each individual game and allows the player to watch past games. Just a quick example of what our replay files look like: m 6 2098.25 917.125 -1 0 224 56ööööö843949615 m 2 1715.25 1835.25 1 0 224 44ööööö843949621 m 11 1661.125 1890.875 1 0 224 56ööööö843949627 m 5 1818.125 929.0 0 1 22...
What should you be aware before making a choice?
I've dowloaded Visual C# Express Edition and when it starts up it says "for evaluation purposes only." What does this mean? Does this mean I have to buy the full version to legally sell my game I make with it? Or can I just use the free express edition? I really dont want to make a game and then find out I can't sell i...
Which tools are considered best-quality for compressing textures for use in OpenGL? Which can be used from the Linux commandline? And which lossless compressors give good ratio/speed on compressed textures? (I see that Skyrim's BSA archives are typically only half the size of the DDSes they contain)
I have an online game where players get to shape the world in some way - eg. Ultima Online's housing, where you get to build your houses directly onto certain parts of the world map. These are changes that should persist over time as part of the persistent world. At the same time, the design team are adding new content...
What is the best way to protect run-time memory from such software? We just published an online game (written on AS3, Flash, published on a social network), and pretty much all of the players got max_int money just using a simple memory editor ("ArtMoney").
I'm using reflection to create a manifest of all assets, strongly typed. It's working fine for my own types: I get the type of the asset, if a processor is ran on it I get the output type. Then I check to see if there's a ContentSerializerRuntimeTypeAttribute applied to the type. If so, then I get the RuntimeType value...
I am creating an android game out of a partner based trick taking card game. What are some generic approaches to AI players for these types of games and what are the advantages/disadvantages of each?
In my previous question, I asked whether it is possible to do projective texturing with deferred lighting. Now (more than half a year later) I have a problem with my implementation of the same thing. I am trying to apply this technique in light pass. (my projector doesn't affect albedo). I have this projector View a Pr...
As a lot of people know, Bethesda just came out with their Creation Kit for developing mods to Skyrim. I've been developing for a while, I have a couple of games released including one that's doing well in the App Store. My goal is to get a job at a studio like Bethesda, Bioware, or Valve. Right now my work shows I can...
I was browsing through the list of games Hironobu Sakaguchi has worked on and noticed that he is credited differently from game to game. Just to cite a few games from that list, he is credited as: Director in Final Fantasy 1 to 5, The Last Story Producer in Final Fantasy 6, 7, 9 and Tactics, Lost Odyssey Executive Pro...
I am starting work on a new Android game and I haven't had any experience implementing physics before. I am trying to steer clear of external libraries such as box2d, not just because I think it is overkill for my project, but I also want to code it myself for the experience. I am more just interested in getting 1 ball...
I have implemented an A* library. Its most interesting feature is that it is "interruptible"; for example, you can stop the calculation loop on a game frame, and resume it later on the following frame. The library works by creating "Nodes". Each node holds information about a cell in a grid: what is the cost to get the...
I am having difficulties creating a button that has Dynamic text in it for my interactive quiz game. The text on the button has to change to show a selectable answer based off of what the current question is. I have this all working well with plain dynamic text fields (and multidimensional arrays) but when I try getti...
I made the camera position 10 units from an object, but not behind it. I dont want the camera position behind the object right away when it rotates, I want that when I will rotate the object, the camera position will move slowly until it will be behind the object.
I have component Renderer, that Draws Texture2D (or sprite) Then I have method OnUpdate, and there should be my rendering code, something like spriteBatch.Draw(Texture, Vector2.Zero, Color.White) But first I need to do spriteBatch.Begin();. Where should i call it? And how can I make sure it's called before any Rendere...
I am playing around with the AndEngine Race Game example. I am trying to make the camera follow the car as the player moves around. The Tile Map is larger than the player's screen but the camera does not follow the car when it moves. Here's my code: this.mScene = new Scene(); //this.mScene.setBackground(new Backgroun...
As a quick fun project, I tried writing a solitaire game. But when getting to writing up the rules systems, I felt dirty, because my code felt completely unstructured and inextensible, mainly because my game logic was complete spaghetti code. I've run into this problem before, and always feel awkward when writing this ...
I am implementing an entity system variant that has: An Entity class that is little more than an ID that binds components together A bunch of component classes that have no "component logic", only data A bunch of system classes (a.k.a "subsystems", "managers"). These do all the entity logic processing. In most basic c...
When UV Mapping a polygon/texture, is there name that describes a single polygon on the texture. Does this name differentiate if from the same geometry once it has been mapped to a face? Would sometime like "UV Tile" or "UV Face" be clear?
EDIT: I have tried all kinds of variations now. The last one was to adjust the linear velocity in each step: newVel = oldVel * 0.9f - all of this including your proposals kind of work, however in the end if the velocity is little enough, the puck sticks to the wall and slides either vertically or horizontally. I can't ...
I'm trying to create a simple 3D game and need to constrain the player within the limits of the game world. When the player hits the sides of the world I want the player's ship to bounce off slightly. In effect I'm trying to trap the player within a box, and stop them from escaping through the sides... I've managed to ...
I have very little experience with box2d, but basically it seems to me that it is possible to attach to it a sprite (that is, a bounding box enclosing the sprite itself) and let box2d to check for collisions. Now, suppose that our animation is composed of N sprite (for example, a character walking) and that the sprites...
I want to do slice effect like in Fruit Ninja. Is there any class in Cocos2D like CCBlade? How can I use the CCBlade in Cocos2D on Android?
My OpenGL scene has objects that are positioned at ridiculously far distances away from the origin. When I view these objects, and pan/rotate/zoom a camera around them, they 'jitter'. That is, the vertices comprising the objects seem to snap around an imaginary 3d grid of points. I've read this is a common problem beca...
I'm trying to render to a texture, but nothing is being drawn. Everything before SetRenderTarget is rendered properly, everything after second SetRenderTarget is visible on the screen. Just the part that should have been rendered to a texture is ignored. Below is a Delphi code showing what I'm doing. What am I missing?...
In theory, is it possible to locate an Internet-connected console? After all, Google Maps can find my computer's location. Can a console connected to the Internet be found in the same or a different way?
I have developed an iso engine for a farm game. In general it works fine, but the problem is that it is not always accurate when pressing the tiles, so the tile I wanted to select is not the one picked. Anybody has some ideas how to improve this?
I'm new to game development. What is a good algorithm to model the random flight of a fly? I've been looking at path-finding algorithms, but they don't give any interesting random behaviour.
I was wondering if you could help me: In XNA I have a hexagonal map, and the size of the map currently exceeds the size of the window. There is already code in place to move the 'camera' around the map using the directional keys, which is as follows: if (ks.IsKeyDown(Keys.Left)) { Camera.Location.X ...
The Havok games SDK is cross platform and supports android according to this link http://www.havok.com/solutions/mobile-game-developers I want to explore the sdk but don't know from where to begin, didn't find any resources on how to use Havok with Android. can anybody provide me with links,books, resources on how to s...
I am developing a flash-based game primarily for desktops, to be hosted on facebook platform (like cityville, sims social etc). The gameplay doesn't involve real-time communication between players unlike an mmorpg. Here each player plays in his own world without any knowledge of other online players. I've written almos...
I created an explosion animation within Blender, something as shown in this video. To achieve this I used a particle-system, together with the "Explode" modifier. This kind of animation (simulation) doesn't get exported to other file-formats though and I'd like to export the animation as FBX, so that I can use it in Un...
See an analysis of FXAA here, and the page for SMAA here Now these methods have a drawback which is that they are not capable of improving quality in a physically accurate way, like multisampling does (what I mean by this is that it brings out the sub-pixel details from geometry by super-rasterizing), but they are a te...
My game is a top-down multiplayer shooter where you control a space pod with 4 different weapons that do varying damage. We have all the usual stats like Kills, Deaths, and Damage Inflicted/Taken, etc. However, the one stat we have had trouble with is an Assists statistic, mainly because we can't seem to determine what...