instruction
stringlengths
33
29.4k
Long story short: I've switched to a third person - top down perspective. The camera is fixed and looks down at the player. How can I implement 3d aiming ? The player needs to aim left and right as well as up and down. details: I've ditched the first person perspective in my current project - I wouldn't call it a game ...
Possible Duplicate: Can you access Kinect motion sensing from XNA? bunch of questions: Is it possible for me to create a Kinect application using XNA and deploy it to Xbox360 platform? What should I use, will Kinect SDK for Windows be okay for this task? What about licenses, is it free to use or should I pay for l...
Today I came across a tutorial about color picking and I implemented it on my machine. But there is a problem: when I disable the texture and draw the object I want to pick with its picking color, it turns to black (the first colorID) and then switches to the texture which I am placing on pick. That is the case when I ...
Alright, just finished most of my early UI stuff and I wanted the windows to have some transparency. So I expanded my application to initialize and bind blend states so that my UI shader could implement alpha blending. I was initially having no luck but I got the blend state configured to achieve my purpose, however th...
I'm looking for a tool that can help create a Flash-based animation given a spritesheet -- basically the reverse of Spriteloq. I'd like to take a sheet like the one below, import it into Flash, and then use Spriteloq (or a similar tool) to re-export as an optimized sheet that is compatible with the game engine I'd like...
In a lot of racing games (Burnout Paradise, for example) when a collision is about to happen, the game play automatically switches to slow motion and carries on in slow sequence until after the collision is complete. I always thought this was for the effects. You don't want to miss any part of the collision! But one of...
Most game development (game design, art, programming, etc.) can be done by one person with relatively little equipment: A game designer needs a pencil and paper, an artist Photoshop or Paint, a programmer a laptop and compiler. Sound is different: External noises are a big problem, sound effects can't be made with inst...
I'd like to understand why I get a completely different result when I replace the effects of a model (as suggested by How To: Draw a Model with a Custom Effect) with a BasicEffect that I instantiate myself: var basicEffect = new BasicEffect( game.GraphicsDevice ); basicEffect.EnableDefaultLighting(); foreach (var mesh ...
How can I draw a model with a color (and still be aware of the lighting)? This is really straight forward when you can use shaders, but on Windows Phone you can't.
I just installed the latest Panda3D packages on a Mint 12 32-bit virtual machine. Then I downloaded and configured Eclipse and tried to run the Asteroids sample project. The window is created properly. But after rendering the scence once the game freezes. This happens with the other sample apps, too. Here's the error l...
I am making a Bukkit plugin that takes the player to a "FunZone" and allows them to do just about anything. I don't want data transferred between the two worlds. So far I have got most everything stopped. Here's the problem code: Integer normInvSize = player.getInventory().getSize(); Integer i =...
my game with panda3d is slowly taking form. It's still a mere testcase but I'd like to improve its visual. Since the assets from my previous projects don't fit this game I've used placeholders for the player and enemy models. Now the moving cubes and spheres are starting to annoy me. The game is still very small and I'...
I know this sounds silly but I would like some objects to follow physics while others not to collide each other. I tried to achieve them by setting their position exclusively. But then it will ignore all physics. Is what I am trying to do even possible?
Here is a litte sample that I drew in Blender to visualize what I am planing to create: Cone with spheres sample I already have the code to generate the cone and the spheres as mentioned in my former Post Combine 3D objects in XNA 4. I thought that it would be nicer to generate a model and add these models to the sceen...
Architecture description I'm creating (designing) an entity system and I ran into many problems. I'm trying to keep it Data-Oriented and efficient as much as possible. My components are POD structures (array of bytes to be precise) allocated in homogeneous pools. Each pool has a ComponentDescriptor - it just contains c...
I'm currently in the planning stages for an Web and iPhone game. I'm developing it with Adobe AS3/Air. I was wondering if it's possible for people to be able to play the Web version, save their state of play and then pickup again where they left of on the iPhone version? (and visa versa) how that would be achieved? the...
I've created plenty of 2D games and now that I've gotten my hands dirty working with 3D in opengl I want to start a game. The issue is I don't know how I can store all the map data. Not only the terrain but the textures and objects in the world, lighting, what's intractable etc. it seems that it'll get way to big if I ...
Alright so my question is about texture manipulation in Flash Stage3D / Context3D using AGAL for the shader language. But I'm pretty sure this could be applicable in other situations involving GPU programming. So the goal is, if I wish to have a "scrolling" animation on a certain tile (like a tile of water), can I stil...
I apologize in advance for my English.I'll try to explain my problem. I am working on new version of the Risk game. I want to change the attacking algorithm to make it more similar to real life war. The sides which have more armies must have the advantage over the weaker side. These are the original board game's rules ...
I am creating a minecraft like terrain engine in XNA and have had some collision problems for quite some time. I have checked and changed my code based on other peoples collision code and I still have the same problem. It always seems to be off by about a block. for instance, if I walk across a bridge which is one bloc...
I found out about this using a debug renderer. When the game starts, everything is in order. But when a collision happens, the sprite's rotation is way larger than its body. The sprite and body match when the body is completely horizontal. The sprite's rotation origin seems far distant from where it should be. Here's ...
I am making a 2D scroller game where the player controls an airplane via the accelerometer I would like to know if it is possible to scale in and to scale out the sprite/airplane using the accelerometer z axis. I would like to know how to do this to create a depth illusion. Any suggestion, tutorial recommendation, and...
For every game I've made, I just end up placing all my game objects (bullets, cars, players) in a single array list, which I loop through to draw and update. The update code for each entity is stored within it's class. I've been wondering, is this the right way to go about things, or is a faster more efficient way?
I've been working on D3D 10 for about 6 months and I have accumulated a basic framework. The thing is I get frame rate spikes. Even when I have a simple cube on the screen each side with its own texture, every now and the the frame rate drops suddenly. Any tips to try and find out what is causing it?
This may be classed as a slightly subjective question but there is very little information on this at the moment, so I just thought I would ask here incase anyone has any experience with this. I am working on a simple(ish) game for XNA at the moment, but there are quite a few situations where I am wishing I had depende...
How can i make my meshes be drawn taking in account which one is in from of another? i.e. if i have a mesh that is farder than another it should be drawn behind the second. Is there a way to do this in xna that is more standardized or do i have to calculate for each mesh myself? If i have to calculate for each mesh by ...
I have a 3D box in which I have some holes. The thing is that when I look through the holes, I can't see the wall of the box that should appear as the inner wall. How can I draw this as well?
I recently posted a question about the kinds of things to expect in game programming tests for games companies as I found myself unprepared for some of the topics. There are two things I can say about myself, and I think these probably apply to a lot of people. 1. I went and did a course at university that, although go...
I was wondering what peoples approaches or thoughts were on automating performance testing in XNA. Currently I am looking at only working in 2d, but that poses many areas where performance can be improved with different implementations. An example would be if you had 2 different implementations of spatial partitioning,...
after switching to a third person view I was intrigued to make my new project isometric. Since I haven't really started yet this isn't much of a problem. Work so far was merely testing movement and camera control. As I'm using panda3d I just need to update the camera to render in orthographic perspective. I have to adm...
I'm a music composer and I have to give my first job for a game. They are working in Objective C in Xcode, it's a game for iPhone/iPad. I need to know the proper audio format to give programmers since .mp3 or .aac make gaps at the start and end of the loop and .Wav or .Aiff are too heavy. I'm working in Windows7 with S...
I used this command to create a line: local myLine = display.newLine( 0,-110, 27,-35 ) How can I get the coordinates from myLine? I've looked here and here but the closest thing I could find is myLine.x and myLine.y, which appear to be x1 and y1 (not sure), but I can't figure out how to get x2 and y2. I want this info...
Alright, I'm having a hard time getting a bool packed and aligned into a hlsl constant buffer and I'm not sure why. Here is the buffer in hlsl cbuffer MaterialBuffer : register(b1) { float3 materialDiffuseAlbedo; float materialSpecularExponent; float3 materialSpecularAlbedo; bool isTextured; }; And he...
Do i really have to tell somewhere in my game documents that "there is no warranty for this software for any damage" etc? I see it a lot in almost every program, if not all, but is it really necessary, can someone sue me if i forgot to add that line of text and their GFX card burns out when they play my graphics-intens...
I am writing a breakout clone (my first game) and am totally stuck as to how I figure out which side of the brick was hit. I have a collision detection method that looks like this: DetectCollision(Object a, Object b) x = distance(a.x, b.x); y = distance(a.y, b.y); if (x is smaller than the combined width & ...
A few years ago, when the HTML Canvas element was still kinda fresh, I wrote a small game in a rather "unusual" way: each game element had its own canvas, and frequently animated elements even had multiple canvases, one for each animation sprite. This way, the translation would be done by manipulating the DOM position ...
I'm building a 3d software renderer for grins to learn the math and rendering concepts. I've implemented the basic drawing of polygons with some basic optimizations like back face culling and frustum culling. Its going pretty well for it being java and all (15k polygons at 30fps at 1900x1080) but I want to implement an...
I'm currently working on my first space shooter, and I'm in the process of making my ship shoot some bullets/lasers. Unfortunately, I'm having a hard time getting the bullets to fly vertically. I'm a total noob when it comes to this so you might have a hard time understanding my code :/ // Position Bullet Function ...
I'm trying to find a solid architecture for authenticating users against a database. I have a game client, which I plan to serve up a request with. The transport doesn't really matter, but at this point I'm thinking HTTP and leveraging either SSL or WS-Security to ensure the encryption of data over the wire. I'd like t...
I'm trying to find a research resource for MMOs -- preferrably where people send papers to be published, have conferences, etc. If nothing else, just a repository of articles would be nice. Is there a site like that? I'm assuming it would be a subconference of a bigger group.
In Direct3D 11 there is a two-stage shader compilation process; you first pass the HLSL source code into D3DCompile, which outputs a "blob" of bytecode. You then take this blob and call CreatePixelShader or another of the CreateWhateverShader methods to finally get an object that can be bound to the D3D pipeline and u...
I'm looking for suggestions on this Say you have a cube map. You want to rotate it as efficiently as possible. You can render the cube map, rotate the camera, and render the scene to another cube map. But it would be faster to rotate the cubemap by operating on the texels. I'm using D3D11, and I need to read the texels...
I'm going to create a game. Well, a set of games, but they will accrue little by little. So, at the beginning there will be one game. The game will be written in C# with WPF and WCF techs, including server-side game processing, statistics and so on. And yeah, I just have quit my current job in one company, so I need to...
I've been working on some hobby projects the last 3-4 years. Just simple 2d and 3d games. But lately I have started a bigger project. Soo in the last couple of months I've been trying to design a game object class which can be the base of all my game objects. So after much try & die testing I turned to Google which qui...
I have just made my first game for iOS and submitted it to app store. I was thinking of porting my game to Android also. I would like to know things one need to do/remember to port game made for iOS in Unity to Android. How to handle different screen resolutions and pixel densities, optimizations required, etc. Any oth...
I want to enable my program to load "savegames", and I followed the tutorial on MSDN, but when I run my code, I get the NullReferenceException error. I use an xml file as my savegame data container, and it works, but at this point I have to rebuild my game every time I make some changes to that xml file, and I want to ...
I would like to convert touch/click input (2D coordinates) to 3D coordinates by dropping the Z axis (would like to move only up/down, left/right (Z is the axis for depth). The problem is that the coordinates i get from input (2d) aren't corelated with the 3d actual space. Does XNA provide a way to do this?
I am planning an isometric business simulation game where the player sees an office with the usual furniture such as desks, whiteboards etc. Characters (Staff/NPC's) within the game should interact with these objects by performing some pre-defined tasks such as typing on the keyboard at the desk or writing on the white...
Developers are found on coding forums, artists are found on art forums, etc... but where to find someone who is good at making trailers? Is there some community of "trailer makers"? Should I look for someone in a game enthusiasts forum? Any hints where to look at? ...let me also mention that we have very low budget, an...
I'm working with Panda3d and recently switched my game to isometric rendering. I moved the virtual camera accordingly and set an orthographic lens. Then I implemented the classes "Map" and "Canvas". A canvas is a dynamically generated mesh: a flat quad. I'm using it to render the ingame graphics. Since the game itself ...
I need to map a partially transparent texture on a flat quad with panda3d. With the quad as a canvas I'd like to create something like sprites positioned in the 3d coordinate system. I wanted to render a tree. As you can see the color values of the trees border have been stretched over the texture. How can I change th...
This is a slightly vague one but I am currently looking at a couple of areas of my current framework, such as spatial partitioning and UI based menus, and with UI menus it makes sense to have an event based system so you can tell if the user has clicked on it etc... its like your own small version of winforms. However ...
Possible Duplicate: Are there existing FOSS component-based frameworks? What open source game engines with component-based design of game objects do you know? And which best of them? I mean best not in Graphics or Physics, but best in context of Behaviour, Messaging, etc. This question is the result of inspiration b...
If I had a Vertex Shader constant holding one float value, like: 255.000255 Where: The first 3 numbers are actually red (255), next three are green (000), then the last three are blue (255). ... Could I separate those values and pass them to a vertex-variant register for the Fragment Shader? I'm thinking it would invo...
I'm writing my own clone of Minecraft (also written in Java). It works great right now. With a viewing distance of 40 meters I can easily hit 60 FPS on my MacBook Pro 8,1. (Intel i5 + Intel HD Graphics 3000). But if I put the viewing distance on 70 meters, I only reach 15-25 FPS. In the real Minecraft, I can put the vi...
There is a game currently in development in C# (using Direct3D for graphics) that I want to make mods for. Ideally, I would like to make the mods in C#, but after that I am lost. How would I (or other people) put the finished mod into their version (client) of the game? I know that for Java this is pretty simple (as sh...
I'm try to convert the 3D Objects created in the Maya or 3D Max to Simple OpenGl object anyone please guide me how can I do so???
Where can I find google sketchup pro MD5 (The doom3 model format) exporter/importer? If there isn't one what modeling program can I use to export/import MD5 models?
I'm using the marching square algorithm (2D version of marching cubes) to generate vertices. I end up with vertices arranged in a grid. I want to enable destructible terrain, and the way i was planning on doing this was to start simple - have one vertex buffer with the whole map, and edit the bits that change. In cases...
I've been reading about component based entity-system for couple days now and I'm not quite sure if it is worth implementing in my next game. I haven't started making the game yet, but I have bunch of ideas for it. In my imaginations the game will be very similiar to QUBE and Portal (1). 3D puzzler, no enemies, no weap...
I've wondered how to get basic collision detection working in an isometric game. I'm using panda3d which has very comfortable support for bullet, ode and a small builtin physics framework. The problem is that these naturally don't work with flat images. I'm using dynamically generated quads as canvases in the 3d coordi...
I am in a situation where I am writing a framework in XNA and there will be quite a lot of static (ish) content which wont render that often. Now I am trying to take the same sort of approach I would use when doing non game development, where I don't even think about caching until I have finished my application and rea...
Does a game have to have built-in functions to accept and run lua scripts, or can I design Events and Hooks using Lua on any game I please, akin to the days where C code could be used to hook into the WinAPI using dlls? The reason I ask is, I am trying to create a background application that will perform events and hoo...
Hopefully this will be a simple answer, but as RenderTarget2Ds are Texture2Ds under the hood I was wondering how it handles swapping in and out. Lets say you create a default one and assign it as the render target at the start of your Game.Render(). Then at a few points during your render process a new RenderTarget is ...
I am currently generating my level data, and saving to disk to ensure that any modifications done to the level are saved. I am storing "chunks" of 2048x2048 pixels into a file. Whenever the player moves over a section that doesn't have a file associated with the position, a new file is created. This works great, and i...
Currently I am working on a 3D visualization app. A requirement of my app is that host's graphics card supports Shader Model 3. How can I check for Shader Model 3 support? I know that these versions are supposed to support these models: DirectX 8.0 - Shader Model 1.0 & 1.1 DirectX 8.0a - Shader Model 1.3 DirectX 8.1 -...
I have made many Android applications and games in Java before, however I am very new to OpenGL ES. Using guides online, I have made simple things in OpenGL ES, including a simple triangle and a cube. I would like to make a 2D game with OpenGL ES, but what I've been doing isn't working quite so well, as the images I dr...
I am creating a Minecraft Terrain engine in XNA, and want to create a large blob/cluster of blocks, in a random sort of blob thing, shaped somewhat like the stuff under the Volume Rendering heading on the following page: http://paulbourke.net/geometry/blob/ This post might be somewhat like my post How can I generate fl...
I have a shooting game made in Java. It's based on time, i.e you have to shoot the objects before the time runs out. Everything is working fine, except that I'm trying to implement an algorithm to generate levels. I implemented one that increases the number of game objects and increase their speed, but I don't know how...
Imagine a 3D sandbox game like Minecraft with third-person isometric graphics. If the camera only moves in two dimensions, and doesn't rotate, then a large portion of the world will always be occluded e.g. caves, areas behind mountains and buildings, etc. Obviously this isn't acceptable. I'm trying to figure out how su...
I am doing some tests with animations in Cocos2D using sprite-sheets. The animation works ok except that the anchor-point is in the center. I need to put it in the bottom. With the code below i am not able to add an anchor-point to my sprites, after quite a few tests. Would someone nice be able to help me with this? -(...
I'm working on a game with a replay system, so I need the game logic to be deterministic. A part of this is collision detection and I'm having a bit of a conceptual problem here. (I'm programming in Python but I think my question is more general than that.) I need collisions to be solved in a deterministic unbiased ord...
How to use Input in OpenTK 1.0? There is not much info around, some classes are unfinished. What I want to achieve, is to be able to use input not only in OnUpdate function, but also in other classes created by myself.
In an hexgrid based game, I render all terrain tiles as a separate model, reusing the same texture objects on all similar tiles. The tiles is a pretty simple model. When the terrain is set to be at 20x20 or more (so 400 tiles), the game really slows down. The "slowdown point" is about the same on my i5 laptop or my i7 ...
I've been working on a 2D game using SDL. I've noticed the objects look blurry and glitchy when they're moving, so I was thinking about using OpenGL to render the graphics. Would this help? What are the pros and cons of using OpenGL for a 2D game?
I have this nice drawing: http://bildr.no/view/1085283 I know the ball's center and the rectangle's center, but how do I know (programming C#) what side of the rectangle the ball is? By my drawing, the answer in this case should be the right side.
I am an aspiring tools developer currently in university. Normally I use both C++ and C# to and from but as my time at university is coming to an end, what language and technologies are worth focusing on? With tools I'm not only thinking simple data-file editors, but level editors and such as well. I have tried searchi...
TLDR: I'm looking for an efficient way to detect collisions between irregular/small objects that are not a full tile size (like small cans) and a free-moving character in a 2D game. I'm planning to design a 2D RPG-style game in XNA. It will be similar to the style of Chrono Trigger (pictured below) -- I will explain w...
Some days ago, I've felt a need to add a camera to my game, it's a puzzle. That would let me move the board, zoom in and etc. This gave me control to do boards muuuch larger, soon, more complex puzzles. But today when i was implementing such a toolbar, I've found which problems the camera gave me too. In logic, it is s...
I am designing a simple billiard game with box2d. I think I can easily simulate hitting left or right side of a ball. Since box2d is not 3D, however, I am not sure how to simulate hitting upper or lower part of ball with a cue. In case you are not familiar with the game. If the ball is hit on its upper part, it's still...
I'm currently creating 2D game from top perspective. I'm having problems with bullets. Yes, I currently simulate their movement so user can see them (about 2x ). Moving them with // this is static Direction = new Vector2(mouse.X, mouse.Y) - new Vector2(player.x, player.y); Direction.Normalize(); Speed = 900f; //this ...
How would I create and implement a texture of text that wraps around a 3D model? The texture will just be white and you should be able to add text to it, but I need to create this so that when the texture is wrapped around a model of a person, the person is then composed of lines of text and the lines should not be dis...
Background Information I'm using the python-ogre SDK, located here, under Windows 7. The SDK seems to have its own interface to the python 2.7 interpreter, judging from the fact that the generic interpreter (the one located in C:\python27) must be present in order for the SDK to function. If the generic python 2.7 int...
For a spritesheet with non-uniform sprite dimensions, how can I get the bounding-rectangles for each individual sprite (i.e. the blue boxes in the following image / I only drew a few examples)? What I would like to determine are: offset_x, offset_y, width, height So far, I have only used spritesheets on which all spri...
I'm looking for some IRC channel to talk about game development. Anyone know some?
I am trying to do some GUI work with unity but am having some issues. I call a window with this code: fortuneRect = GUI.Window(0, fortuneRect, fortuneWindow, "Your future"); and inside the window I have a button if(GUI.Button(new Rect(10, 10, 150, 20), "save fortune")){ Debug.Log("save fortune button press"); ...
In XNA, you can see that to draw a rotated sprite with SpriteBatch, you'll need a float describing the angle in radians. I'm used to making games in OpenGL. I just want a rapid prototyping environment in XNA, but I'm a little lost. It's my preference to always use Vectors to store my rotation, to do vector math, et cet...
I can't create a shader when trying to use shaders with sfml. The function glCreateShader(GL_VERTEX_SHADER); causes a segmentation fault. At first I googled it and found that it does that when the program does not have an opengl context. I tried SDL first but the poor documentation and "look at the header to know what ...
Or is it smart enough to know I have asked for it before and return an in memory copy created from the first call? For example if I have a projectile's texture: Texture2D projectile; If then I call: projectile = ContentManager.Load<Texture2D>("bullet"); every time I want fire a new projectile - am I mallocing this on...
I am currently using the Cocos2D framework for creating my game but I just happened to come across GameSalad and was amazed by this video. GameSalad claims to allow you to create games without writing a single line of code. So I ask myself, what is the catch? What makes Cocos2D better than GameSalad? What are the pros ...
I am trying to build and run Doom 3 from the open source release in order to better understand how the engine works. Unfortunately I am not able to run the game from the binary I built. I just get the console, but cannot run the actual game. Here is what I did: Downloaded the source code from the game repo Downloaded ...
Meaning: how do I build my animations/system so that I can have swords blocking each other? I honestly believe this is the hardest part of a game: I need animations to interact with each other. If a monster uses attack 1 on hero 2, then both NPCs have to play a different animation based on, A, How big these NPCs are. ...
I am currently undertaking a project where I need to program AI for Go (the Asian strategy game) and I would like to know, how do I start? I am aware of the many approaches to AI for their applications to Go, such as the neural network, machine learning (supervised learning, etc), the Monte-Carlos method, or knowledge ...
I am developing a small multiplayer game where players move through the map and interact with each other. The game is written in VB.Net. When I tested my game with players on a LAN everything worked pretty smoothly. Testing it on the internet with players from the same country worked pretty well, without lag, also. The...
I´ve got a question regarding TileMaps. Each level in my game is going to be determined by the length of the tile map. I would like to create a map that will be about 5 mins (in length) long. I want to add depth to my map so I will be making individual layers to create that depth illusion via ParallaxNode. Each indepen...
I've got a tile based game that has notions of moving up, down, left, right and the diagonals (by alternating horizontal/vertical movement). I've found that if I use the default ThumbStick<Direction> buttons that XNA provides I'm often moving diagonally instead of in a straight line. E.g. moving the thumbstick left, of...
Is there scenarios where this is actually good practice? Or does it slow down performance? Example: //Vertex format is: //X, Y, U, V var myXYs:Vector.<Number> = new <Number>[ -1, -1, 1, -1, 1, 1, -1, 1 ]; var myUVs:Vector.<Number> = new <Number>[ 0, 0, 1, 0, 1, 1, 0, 1 ] //Create actual VertexBuffers....
Possible Duplicate: 2D graphics - why use spritesheets? Something like this file from here: I haven't write game with animated gif before.... So I wonder why. When I unpack some game, I see them in this kind of format as well. Why they are not divide them into individual bitmap? When they are using it, do they IMPO...
I am creating a soccer game. Now I want to shoot the ball and create an after-effect resulting in a curved path. I tried several things, but nothing seems to work. I am using a 3D tool, but the camera is from the top. I especially want to create a curve of the ball with the effect to the left or right. What is the best...
Much to my shame, I have never written a proper unit test, only small unorganized test programs that I would then dispose of after the test succeeded. I don't really have a clear idea of how unit testing should be performed in a game project. (My language is C++.) Should I have a separate project for each subsystem in ...