instruction
stringlengths
33
29.4k
I'm trying to build a simple world editor and I would like to implement a camera similar to what's used in 3ds Max, Maya or even Unity. From what I can figure out from Unity, the panning behavior seems to be relatively simple : the camera is moving on the plane defined by the camera position and direction. However, rot...
I have a small project I've coded for Android that uses a small about of NDK/JNI code. I'd like to share this code between two projects but I'm having little luck so far. First off, I've tried to refactor off the NDK specific code into a library which I think link to both projects using 'project->java build path->sour...
In relation to Heightmap, Voxel and Polygon (geometry) terrains: What are the main differences between all these three? Can you form a "smooth" terrain with Voxels, I mean, can you for example get a smooth mountain with Voxels, or Voxels are limited to cubes? Performance wise, a world 2000x2000 units, what would be fa...
I am looking for a function to generate a random tile-based map as the visual boundaries of the map change (by going through the map). I want the map to be infinitely large, and have maze-like structure. However, if the world is infinite, going back to where a player has already been before raises a problem. The game m...
I'm programming a Bomberman in Java (my first game) and I'm having problems with the player's sprites and position in the map. I'm using a 2D integer array to represent: Unbreakable blocks Explodable brick walls Free spaces Player itself (not sure if this is correct) By now I could correctly place every background ti...
When I export my Mudbox mesh (level 1), with its skeleton selected, to a .fbx and import it into unity, I don't get the bones/joints/skeleton/whatever under my mesh in the hierarchy. Am I missing something?
Title says it all. What's efficient way to draw a lot of textured cubes in XNA4?
I am trying to make a pong game that uses a burger as a ball and a plate as its paddle. I have everything right except that the burger goes right through the plate. Can anyone help me? using System; using System.Collections.Generic; using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; ...
can anybody help me to convert this objective-c code to android java. - (void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { if (_mouseJoint != NULL) return; UITouch *myTouch = [touches anyObject]; CGPoint location = [myTouch locationInView:[myTouch view]]; location = [[CCDirector share...
I was thinking about a game engine development, I understand as engine the main program that can develope next duties: Receives parameters. calculates what is needed. Delivers results. As an example lets say I'm writing an sports game, so I was thinking that instead of starting with something big I could start with ...
I'm trying to mimic FindGameObjectsWithTag with FindGameObjectsWithName. I know using tags is faster, but I'm trying create a way to search for objects I spawn with a child object I name on instantiation through the inspector. My goal is create multiple enemy spawners. My current spawner has a drag and drop variable fo...
I've managed to find a USB driver to connect to the PS3 controller in OSX, and as reported here, can connect to the controller via Bluetooth. I've verified that the input is working properly via Snes9x. Anyway, that's just background for my actual question. Is there any way to access the PS3 HID, via C++, on the Mac? I...
I'm curious how the sphere effects were done in Osmos from Hemisphere Games. Any ideas how the resolution independent zoom in was achieved? Edit, more specifics on questions: How do you render the spheres so they look good at full zoom out, and full zoom in? How would one make the nice particle effects in 100's of sp...
I don't have the cash to stump up for a PS3 or 360 devkit, but the G3, G4 and G5 macs are running with PowerPC chips, which I believe is virtually the same architecture as the 360, and only missing the SPUs from the PS3, so I would like to know which Macs would be good for profiling code with. I'm after a machine that ...
D3D10/D3D11 drops support for point primitives. I'm trying to render a set of points for quick and dirty debug, any suggestions/quick hacks for getting large size points to show up in D3D11?
I'm trying to construct an editor in C# that exposes game components to IronPython, so it may create the game object definitions to be used within the editor: C# Exposes the components to the python script (Spatial, Movement, SpriteView, etc.) IronPython creates the game object definitions (or templates) by attaching ...
I've been working up a game engine similar to Terraria, mostly as a challenge, and while I've figured out most of it, I can't really seem to wrap my head around how they handle the millions of interactable/harvestable tiles the game has at one time. Creating around 500.000 tiles, that is 1/20th of what's possible in Te...
This question is a "follow-up" question from my previous one, regarding collision detection and resolution, which you can find here. If you don't want to read the previous question, here's a brief description on how my physics engine works: Every physical entity is stored in a class called SSSPBody. Only AABBs are s...
I have a perlin noise generator as shown below. public class ImprovedNoise { private const int GradientSizeTable = 256; private readonly Random _random; private readonly double[] _gradients = new double[GradientSizeTable * 3]; /* Borrowed from Darwyn Peachey (see references above). The gradient t...
I am trying to generate an ellipse outside two points (two-dimensional vectors). Is there a formular for that, or a cool way of doing that in C# XNA? What I am trying to do is have a particle circle around one player and another.
I'm trying to make a tile-world adventure game on iOS similar to Zelda Link to the Past on SNES, and one issue I've run into is having my camera move beyond walls revealing the rooms on the other side. I like the way Zelda handled room changes where once you went through a door the screen would slide over to show the n...
How did the folks at EA DICE create destructible environments in Battlefield Bad Company 2 and Battlefield 3? Did they just assemble the buildings out of predefined sub-regions, that break apart when there is an explosion or something similar? I can't think of anything else.
How can I make extremely huge terrains in Unity? It seems like I can set width and length to large values. But the Heightmap resolution only goes up to 4097 and the Detail resolution only goes up to 4048. Any ideas?
I'm writing code in XNA 4.0, and part of my game entails drawing a textured grid of cubes. It is working, but the problem is the memory usage is growing way too rapidly. Each cube has 8 points, and each point is a VertexPositionTexture. A 16x9 grid takes 50MB memory, and that is just the grid and lines, no textures or ...
As a mental exercise, I'm trying to imagine projecting an arbitrary 4D mesh onto the screen (2D). I'm guessing a single 4D triangle would still consist of only 3 points, however each of those 3 points would be defined by column with 4 dimensions. Would it make more sense to define a projection matrix to map 4D space to...
I have a VertexBuffer that I am remapping on a per frame base for a bunch of quads that are constantly updated, sharing the same material\index buffer but have different width/heights. However, currently right now there is a really bad flicker on this geometry. Although it is flickering, the flicker looks correct. I kn...
I'm messing around with XNA in a very simple Minecraft-esque world I'm making and I'm wondering how I can do the "breaking the block" visuals in XNA. If you're unfamiliar with the game, you begin interacting with the cube and based one what tool you're using, the block will take X amount of time to break. There's about...
In the new version of Unity 3.4, unity announced that they would now support procedural materials (which is awesome, by the way). While I was researching it, I found this in the manual: Allegorithmic's Substance Designer can be used to create Procedural Materials, but there are other applications (3D modeling apps, fo...
In XNA, how can I draw a sprite on the screen that inverts the colors behind that sprite (i.e. the colors that would appear if the sprite weren't in the way of them)? I feel this is the best technique for an aiming cursor in a game, but I'm unsure how I can achieve this. I'm open to other ideas for aiming cursors if th...
I have successfully made a Perlin noise algorithm on the GPU. It works as expected, and generates great results. Now, as part of the physics calculations in my game, I need to replicate the exact same algorithm on the CPU, so that I can (given an X, Y and Z coordinate) determine whether or not that is inside a wall, or...
I currently read out XML data with the following scheme: Position x,y,z I try to add one new Vertex for each position node and add it to a Vertex array. Then I try to render this list of vertices so I get all those lines connected to represent a "path" through space. (Space is 3D) What I tried so far: [STAThread] ...
I am trying to implement dual-pass alpha sorting using Ogre material scripts, as part of my debugging attempts I want to compare two PIX captures, but when I attempt to debug a pixel in PIX, previously working 'geometry' is not displayed correctly. My 'reference' blended geometry which works consistently, consists of a...
I'm making a little RPG multiplayer game where each player can travel long distances. Traveling from point A to B can take up to 10 minutes and – once initiated – is an automatic process. Now, I am not quite sure how to go about this on the server-side, the server has to be the one telling the clients that the travelin...
I'm planning to buy animated 3D assets to render and use as 2D sprites in my game, but i don't know anything about 3ds max or own any software. How do i render the animations (i need top-down ones) to turn them into a bunch of pngs? From there i already know how to create a spritesheet. I assume there is a more stream...
I'm currently trying to teach myself OpenGL... and quickly discovering that the Immediate Mode taught in old OpenGL tutorials is basically obsolete... which leads me to VBO's... which I kind of get but would like to start learning them in context. What is the workflow involved in taking a 3D object from Maya or 3DS Max...
I am looking for an example site with a Perlin Noise implementation in both CPU and GPU, that generates somewhat the same results in those two places. I see many CPU implementations of Perlin Noise, but they don't match up with the GPU implementations that I found. The reason I need this is for physics. The map is gene...
What are the technologies (programming languages and engines for example) used to create "Metal Gear : Snake Eater" and "Metal Gear : Guns of The Patriots"? Is it usual to keep those things secret?
At any time, a game will likely have many objects rendering textures. So what is a texture? an image for example?
How can I generate a terrain heightmap from the perlin algorithm? I am trying to make a terrain generator (like World Machine). This is the source code I have for the perlin. The only thing that I can't figure out is how to use the perlin algorithm to generate a heightmap image.
I have a good grasp in C++ and C and have also experience developing AAA game using C++. Now, I'm shamelessly thinking to dive into mobile game development either in iOS or Android. Unfortunately, I don't know objective-C and java and neither have courage to learn it. So, As above mentioned reason, Is there any possibi...
Most of the papers i've read base their terrain in some form or another on a quadtree. See this at page 38: http://www.slideshare.net/repii/terrain-rendering-in-frostbite-using-procedural-shader-splatting-presentation?from=ss_embed Doesn't the first point contradict the bottom two? How can you have a fixed 33x33 verte...
I was wondering if anybody knows about any good pieces of equipment fit for recording sound effects for games. If you can, also tell please me the price range for professional equipment.
I would like to port my 2D flash game to Android and iOS. Is there any cross platform engine you could recommend? Corona is the only promising one I have found so far.
So, basically I'm looking for a way to get some 3D models and animations for my game. I know this is kind of vague, but I don't need a precise answer, the details would be like this: The 3D models are for humanoid units, but there could be some alien-ish units too. The level of detail of the units would be similar to ...
How can I implement gravity? Not for a particular language, just pseudocode...
I'm looking for something like an alternative to XNA - I don't care whether it's a 2D or 3D engine. It's not because I dislike Windows or am anti-Microsoft; it's because I like running Linux, code in Linux completely (for C# I use Mono, obviously), and by no means have any hardware to actually support programming in XN...
I've been struggling with a decision regarding whether or not to implement a scene graph in my game. I have some use cases that call for such a tool, but I haven't been able to get through some of the implementation details. Some background: I'm writing a space shooter type game targeted at mobile platform (Android, pr...
I'm trying to figure out a way to do "bullet holes" but actually apply the texture at the shader level? If I'm dealing with a model which doesn't have a "flat" face I'd like to be able to wrap the "decal" across the model. Anyone point me at a tutorial that will do something similar to this.
I'm writting a code in OpenGL and using two computers - an old and a new one. On the old computer (which I use for debugging/creating implementation for the old GL) I have GeForce 5500 FX. Before windows reinstall on it, I had NVIDIA drivers with OpenGL 1.5. And everything worked perfectly. Games made quite good FPS, e...
I'm writting a code in OpenGL and using two computers - an old and a new one. On the old computer (which I use for debugging/creating implementation for the old GL) I have GeForce 5500 FX. Before windows reinstall on it, I had NVIDIA drivers with OpenGL 1.5. And everything worked perfectly. Games made quite good FPS, e...
We all read job vacancies via the internet like GitHub jobs or StackExchange Careers 2.0 for example. You know, web app development, iOS/Android jobs and many other things. We even read about jobs ads in Google, Apple or any other big company. Why don't we read about "Game Developer" vacancies? Is the demand for game d...
These days, I'm focusing on games development on the iOS. C++ is the lingua franca for games development but seriously, I prefer to code in C programming language, not in C++. So for iOS games development, are C and Objective-C sufficient for creating games?
I've been using SDL 1.2.14 for awhile without using many of the features from newer OpenGL versions. I'm now interested working only with the 3.3 API (not using the deprecated functions, etc... that's the latest my graphics card supports), but I'm having trouble getting set up. Here's some information about my develop...
Starcraft II restricts me from running multiple instances, but if I run the second instance sandboxed in Sandboxie, it works. What might account for this? How might I replicate this behavior for my own games?
It appears that if a image is undersized for covering the model it's set to cover, it anti-aliases instead of stretches. How can I control this behavior?
OK i have decent amount of knowledge of C++. I want to make cool games for iPhone using unreal engine and I have access to UDN. But everything seems cluttered on UDN. I have downloaded source from there. It would be great if someone can provide information about How to get started and list of resources. Thanks!
I have a bounding box in model space and I want to intersect it with a ray. I have tried to transform the ray like this. Rotating and scaling works well, but transition does not. Here is my code: Xbouding = new BoundingBox(new Vector3(50, 10, 10), new Vector3(120, -10, -10)); ray.Position = Vector3.Transform(ray.Posit...
Different sound effects are played differently across different speakers. For example, when I use my laptop speakers, sounds are notably softer and low pitch sounds often become inaudible unless I turn my volume up from 20% to 80%. Yet if I try to increase the sound's amplitude, when I plug in my Creative T10 speakers,...
For 2D top-down style sprites, what commonly used spritesheet formats are available? By a sprite sheet format, I mean this: for any RPG Maker sprite sheet, you can count on all the walk animations being in the same place on the image between characters. For Final Fantasy 6's characters, you could open all their sprite ...
I am trying to implement the collision detection and response in 3D car racing game. I have a car model, for collision I am assuming my car as a cuboid. my collision detection with walls is quite good and the response is also good. My model has a velocity, position, acceleration and orientation. I am using matrix to sa...
While a library like SDL provides a cross-platform wrapper API for threading, I think it would be naive to assume that this leads directly to easy development of games across vastly different platforms (desktop / mobile). What is the best way to tackle developing in this way (given any cross-platform threading API) con...
I'm building an Island. I use the classical heightmap solution : with a hill-building function, avoiding the corners of the map, I make altitude. Then, perlin noise give me some climatic variables to handle the biomes. Now, I'm facing two challenges who are, in some way, connected : In Dwarf Fortress, one of the neat ...
ForPlay is lauded as a pretty amazing accomplishment by Google's own. But I'm holding off on making any solid judgements as yet... I'm wondering if anyone has used this and has found any major flaws? I'd like to know what these are. Considering that the code is written in Java and is compiled for Flash, Android and HTM...
As a Direct3D developer I can use the ID3DXSprite class (in D3DX library) for drawing 2D graphics. What's the best way to implement this functionality in OpenGL?
I just started reading about games, and I'm going to develop a game where a person is moving around on a 2D map. My preferred language is Java. Is that suitable to develop games? I'm going to develop a desktop app and need some help to get started. Can someone please give me some good resources for newbies?
What pros or cons should a beginner be aware of when deciding between a 2d game engine (like Slick2D/Flixel/FlashPunk) and a 3d engine (like Unity) for 2d game development? I am just getting started in indie game development, though I have dabbled a bit with Game Maker, Flash, and XNA in the past. I've heard a lot of p...
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?
I had a concept for a game come to me this morning but I can't figure out how I'd go about implementing the movement. The general idea involves the left and right controls causing a sprite to go round the center of the plane/(or the centre of the game area) in an orbit rather than moving left and right and the up and d...
Are there (or can someone recommend) any minimalistic JavaScript based libraries for sprite(s) manipulation? Preferably DOM oriented.
Following on from my question about moving a sprite in a circle, assuming that you have a maze which is shaped like a a set of circles with holes in them and barriers between them. Location of a sprite is stored in polar coordinates and then translated into cartesian coordinates to be rendered. I'm going to assume that...
How can I draw a 2D sprite to look like it's at a particular placement in the 3D world? My goal is to use this as loose items in the world. Minecraft Example: https://lh6.googleusercontent.com/-HMk5tW_cI-Y/TiYx71XkwtI/AAAAAAAAAZQ/jeaTfiMW1Ow/2011-07-19_20.26.18.png
I realize that this will depend on a game-to-game, situation-to-situation basis and that this is not a very technical question, but I remember hearing in a tech podcast a few years ago that inflated numbers of points (e.g. 1000 points vs. 1 point) was preferable in games because it was either a standard or because it h...
I know that what both glEdgeFlagv and glEdgeFlag do is toggle boundary edge status, but my question is why does the v version exist when the documentation specifies that the only difference is that glEdgeFlagv takes (quoting from documentation): a pointer to an array that contains a single Boolean element, which rep...
So I'm trying to code a game using the Model-View-Controller pattern, and therefore have a need to separate the models for my game objects with their sprite representations. The problem that I'm running into is with PyGame's sprite class. For example, let's take the code below for a Tank object in my game. class Tank(P...
I was recently listen to a talk that Jonathan Blow gave, you can find it here. In the talk, he was talking about what data structures he (and he seemed to imply many others) use, and why. Which is to say that he simply used arrays to store data, and use the naive approach to find data in it, meaning iterate through t...
I have an idea for a first person shooter game and I have plenty of free time to work on it. I know java and objective-c very well and I also know autodesk inventor (which is similar to 3ds max). How would I go about starting to develop a small fps? What programming language should I use? What modeling/animation softw...
I'm using OpenGL on windows (have been for a while now), and I've come across a strange issue. Once every so often, the rate at which frames are presented on the screen drops to roughly 10 fps. However, my framerate counter stays at the usual framerate (2000fps in the menu, 300fps in game). My framerate counter is base...
In my game, I need a way to produce convex polygons from pngs of objects. For example, a maple leaf would result like this: Essentially right now, the way my algorithm works is by putting all pixels that have an alpha of 255 in a list. I then create a convex hull from this list, and finally optimize the hull with a gr...
I know there is already a thread asking for example 3d games written using Qt. What I'd like to have a discussion about is whether or not Qt is a good framework for game development. In my experience Qt is a joy to work with and thanks to QML and QML/3d it's looking like it could be a viable framework for game developm...
I'm working in Flash AS3, but pseudo-code or any other language is fine. How can I make a circular progress bar? Akin to the ship bars in Pax Britanica, you can see them in the screenshot here. Apart from making them frame by frame, is there some obvious solution I'm missing here? I'm seeking the equivalent of stretch...
I have static objects and movable objects. The collisions are detected using the separating-axis-theorem. For example, in this situation I have two static objects (in red): and a movable object between the two: My algorithm is able to compute the collision between two of these objects, and it also spits out a perfect...
I'm implementing a basic skill and attribute system, though I'm having second thoughts about how I should go about it. For example, I could use a Dictionary/HashMap which uses SkillType enums to represent keys, and integer values representing the values. But should I do this? public class Skills { public IDictiona...
I'm trying to figure out how to draw good looking lines using XNA on the WP7 platform. By good looking I mean something not skinny and flat that a simple primitive gives you. A nice gradient, or texture or something applied. It would be pretty easy if the lines were all straight, but I need to be able to make 45* and 9...
I'm trying to start OpenGL programming on a Mac, which brings me into unknown territory on a lot of things. During the day, I'm a Web Developer, working in C# and before that in PHP and Delphi, all on Windows. During the night, I try to pick up Mac/OpenGL skills, but everything is so different. I've been trying to look...
Possible Duplicates: How closely can a game resemble another game without legal problems Legal issues for a "fangame" of a commercial franchise? I want to do a mobile version of an old game I used to like called Bow And Arrow (video, game). There's a project already port it in Ruby. I'm wondering if I can do a remak...
I'm looking at creating a real time strategy/tower defense mashup game for facebook (and other platforms like google+) along the same feel, but of course different mechanics, as backyard monsters. The model animations will hopefully be fairly thorough, with maybe three different animations (walking, attacking, resting...
I'm interested in developing a game who's background music changes with the mood and scenario of the game's action. Of course many existing games do this (halo for example), but I was interested in any resources/papers/articles talking about the techniques to develop a system like this. I have some ideas, and I underst...
I have an object that has a dynamic body. Currently, I'm setting it's position to follow the sprite when the parallax layer move. After a certain event, the object suppose to fall to the ground. That's when I set it to Awake. But as the object falls and the parallax is moving, how do I control these factor? When the ob...
I am working on a 2D game with sprite sheets. I might be completely overlooking something here, but I can't figure out for the life of me how to use sprite sheets with z-buffer testing. Here are the conflicting issues as I understand them: A sprite in a spritesheet will have transparent pixels all around it that defin...
I'm planning my first game and am planning on using the engine set out in Beginning Android Games, as it deals with a load of stuff that is just noise at the moment to me (because I've no real world experience yet). There's no real time restraint - this is a learning experience more than a real world project, although...
I'm interested in path finding between multiple maps - could be indoor/outdoor maps, different levels in a building etc but the main restraint is that there are one (or more) ingress/egress points between the different maps. I've looked and couldn't find any good solutions, yet I'm aware of several games which use sim...
Are there any platform or language agnostic (preferably step by step) tutorials regarding creating hexagonal grid based maps/games? I'm mainly interested in grid/tiles basics and not advanced game engine stuff. So far I have found these: Hexagonal grid for games and other projects Hexagonal grid math
Let's take some old popular at a time but abandoned game: WorldRacing/HiOctane/Constructor/any other. Say I with a team want to revitalize said game and bring it to year 2011 without major changes and then work on improving it (e.g. add multiplayer). Also it is important to keep the game's spirit, assets, story, music,...
So I'm attempting to learn Python by way of Minesweeper. I've got experience with SDL, so I figured playing around with PyGame sounded like a fun way to learn the syntax of the language. Anywho, I'm having an issue in uncovering adjacent open squares as you would in a normal game of Minesweeper. I click on a cell wit...
I've come across a C++ Sample of from Programming Game AI by Example. For the most part it is fairly understandable, the only thing confusing me is the reference to "m_pVehicle->Heading()" I'm not sure what it means by heading. If anyone could clarify this, I would really appreciate it. Vector2D SteeringBehaviors::Pu...
I have everything I need to make a Mario type game. I just have no idea how to design the levels to make it challenging or fun. Any tips? The only way to kill enemies is by jumping on them, so I thought it would be too hard to make a boss. I was just going to make the last level long. Is this a bad idea?
Possible Duplicate: Effects to make a speeding spaceship look faster I am currently developing a racing game akin to F-Zero in that the race is held at very fast speeds. The player is therefore placed in a 3rd person view. Graphically, I'm thinking of using motion blur and lowering the camera angle when the ship is ...
So I was watching Ikaruga: http://www.youtube.com/watch?v=Aj23K8Ri68E And then raystorm: http://www.youtube.com/watch?v=TQ4V0G5ykAg After looking at their 3D backgrounds for a little bit, it appears that they use a lot of repeated segments. How would one start with the development with such systems? Would there be edi...
Does anyone have any insight or experience into the successfullness of placing Facebook or Twitter "share" buttons within an iOS game? For example, when a user gets a high score, presenting them with the option to share their score via Facebook or Twitter. My reservations/bias against including Facebook or Twitter but...
i wanna walk to terrain... first i created the terrain void desenha_terreno(float px, float pz){ for (int z = 0; z < iwidth-1; z++) { glBegin(GL_TRIANGLE_STRIP); for (int x = 0; x < iheight-1; x++) { // for each vertex, we calculate the grayscale shade color, // we set the texture coordi...