instruction stringlengths 33 29.4k |
|---|
I've watched quite a few Blender tutorials, but I have yet to see examples of how to swap out sub-models. So my question is, how do you swap out equipment on a character model? Specifically I’d like to be able to dynamically add/swap clothing and items held by a character model in XNA. Ideally the items would follow th... |
I dont understand how exactly stencil buffer works in openGL. One aspect that confuses me is why do we use a bit operator there in glStencilFunc. Some text say that is is used to achieve multiple stencil planes but I am not sure how that can be done. Can anybody please explain the whole procedure of stencil buffer calc... |
Lately I have been working on a game that i plan to make online. I have used different libraries to make this game as far as i could, but I feel that I should rethink on how Im sertting this game up, so I planned to start over. The libraries that I have used are SFML, OpenGL, and Bullet Physics, along with GLM to load ... |
I'm trying to build a interface that the user can move his finger around the screen an a list of images moves along a path. The idea is that the images center nevers leaves de path.
Most of the things I found was about how to animate using CGPath and not about actually using the path as the track to a user movement.
I ... |
I want to ask, is there way to load in xna all content from folder ?
For example in my content I have:
Images/hero
Images/car
Images/tree
I want to make something like this
Dictionary<string,Model> models = new ...
foreach(string name in content.getNames("Images"))
{
models[name] = content.load<Model>("Images\\"... |
I can easily rotate sprites using the Draw method. However I would like to simply rotate a Rectangle (the structure) so that I can get the coordinate of the four corners of the rectangle. How can I do that?
|
After this question, I need some more help.
How can I find out which side of a rectangle a collision came from and react accordingly?
The blue arrows are the paths that some circular objects would follow if before and after colliding with the box.
How can I calculate this?
|
Hey so I'm making a pong game with SFML and in the process made a function that takes a Time, Speed, Angle of movement, buffer for the movement on the X axis, and buffer for the movement on the Y axis.
I then implemented this function into my custom mySprite class, more specifically into it's update() function which u... |
I am currently doing some work in cocos2d-x and am thinking about using their box2d implementation for things like collision detection (but not necessarily response), range detection, and other things like that, which are not strictly physics based.
Is it worth doing this? or would I be better off just writing a simpl... |
Lets say, to simplify the problem of online games a bit, my goal would be to run a near identical simulation on multiple computers in sync. Would sending commands be a good idea?
Now if only sending commands is not good, should all the physics entities be sent every half second or so?
I'm wondering this because my game... |
Good Morning StackOverflow, I'm having a bit of a problem right now as I can't seem to find a way to render part of a texture transparently with openGL.
Here is my setting : I have a quad, representing a wall, covered with this texture (converted to PNG for uploading purposes). Obviously, I want the wall to be opaque, ... |
I am coding in C# using Windows Forms and the SlimDX API to show the effect of a pixel shader. When I am setting the pixel shader, I am getting a black output screen but if I am not using the pixel shader then I am getting my image rendered on the screen. I have the following C# code
using System;
using System.Collecti... |
I have spent the last 48 hours reading up on Object Component systems, and feel I am ready enough to start implementing it. I got the base Object and Component classes created, but now that I need to start creating the actual components I am a bit confused. When I think of them in terms of HealthComponent or something ... |
I recently asked this question on how to calculate a level based on experience:
Algorithm for dynamically calculating a level based on experience points?
I am using the following calculation to determine the players level:
decimal experience = 1829;
decimal rawLevel = (decimal)(.06 * Math.Sqrt(experience));
decimal lev... |
Various versions of DirectX are available on both Windows and Xbox. Are the libraries the same on both platforms? Obviosly I'm talking about the interfaces — such as the ones for working with windows, input, etc —, not their actual implementation.
|
I'm making a (non-isometric) side scrolling 2D game and I want each fragment that I draw to cast a small drop shadow when it is near another object. What sort of algorithms are used in fragment shaders to cast shadows in 2D games?
|
If I sat down long enough, I'm sure I could make this happen, but I don't want to reinvent the wheel if I don't have to, especially if XNA has patterns in place for doing this.
For now, I'm working in a very low resolution world, minecraft style. Everything is a simple cube that's 1x1x1. Currently I can move and look a... |
I decided it was time to stick in a bit of multiplayer into my game, but came across my first hurdle when i quickly downloaded an example from the XNA website.
It prompted me with a login to live. However i really DO NOT want my game to use live accounts.
This is PC btw.
Basically i wanted to know, is it possible to ha... |
I'm writing a 3D game which is going to inlcude some dynamic meshes.
For now, my code looks like this :
private float[] mVertices;
private FloatBuffer mVertexBuffer;
public void onDrawFrame(GL10 gl) {
// first clear the screen of any previous drawing
gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER... |
Garry's Mod has a copy-protection trap that shows this error:
Unable to shade polygon normals
It made me wonder if such a problem could ever actually exist. Can polygon normals be shaded? Is a failure to do so detectable and reportable?
|
The question isn't the greatest wording ever sorry.
I have been learning about and prototyping some texture and terrain generation stuff and have run into something perhaps you can help me with.
How it works:
I am procedurally generating a terrain height map. It can scroll endlessly in any direction. (image 1)
I clamp ... |
I am trying to make my own game for fun, it is basically a 2d side scrolling shooter, with dynamically generated enemies, levels, loot, and some other things. Currently I have dozens of XML files that define pretty much everything when it comes to the content, along with some constraints to keep things sane. Often time... |
For my game,
Everything inherits from Entity, then other things like Player, PhysicsObject, etc, inherit from Entity. The physics engine sends collision callbacks which has an Entity* to the B that A collided on. Then, lets say A is a Bullet, A tries to cast the entity as a player, if it succeeds, it reduces the player... |
I can do picking with triangle-accuracy for non-animated models, but I also have animated models in my game. How do I do picking on animated models?
I use code based on this project for animation.
My first idea for doing it is:
Calculate ray
For each model
If model bounding sphere collides with ray
For eac... |
I have created an ogre application using the ogreappwizard. When I try to compile the solution I get an error saying that Parameter "basePath" cannot be a relative path..
I followed all of the instructions, and have tried reinstalling both the Ogre SDK and the appwizard.
I am losing my head here. What is going on?
|
I have a game ready to be implemented (Class Diagrams and other UML stuff are good).
Here are some characteristics:
MMO.
Browser game and download-game.
Multiplatform.
With 2D graphics.
Real time.
Point-and-click.
With an online database (duh!).
What language should I use?
|
I intend to use the Mersenne twister to generate a level using a seed , but I also want to make fixed levels, so for now I'm using XML to store data of the level (~40 numbers).
However, it would be awesome if I could get the seed of a specific level by reversing the process.
I guess if I used my own pseudo-random numbe... |
So I'm a brand new noob to the world of game dev and I'm starting off by trying to write my own game using C++ and openGL. I'm getting into loading models etc and while searching around for "the best format" I'm finding that most of the common formats are intended for porting between modelling applications and not nece... |
I am implementing MMO where player flies in space on his starship controlling it with arrow keys and cooperate with other players.
I want to implement it so that player will be able to dodge his ship from rocket or something else, so I am trying to predict whole game state on client side using the same world simulating... |
I'm currently developing a small 3D impulse-based physic engine for a CS project. It uses GJK for collision detection and is kind of stable at the moment. Nevertheless, I'm not satisfied with my collision response as rigid bodies appear to gain more and more momentum with each bounce, although only under some configu... |
I'm really struggling to get a strong grasp on how I should be handling collision response in a game engine I'm building around a 3D ball physics concept. Think Monkey Ball as an example of the type of gameplay.
I am currently using sphere-to-sphere broad phase, then AABB to OBB testing (the final test I am using righ... |
Is there a tool out there that you can give a 3D model file, and it will output 2D renders of it from various angles? For example if you were making a 2D RPG but you want to make your character look nice, you might make the character in 3D and then just render the character from 8 or more angles into images which then ... |
I've implemented a sprite batch class that uses a sampler array so that I can select a texture to use based on the gl_PrimitiveID. The idea was to be able to draw sprites that use different textures in a single draw call. I've managed to get it to compile the shaders and run, but the sampler indexing part does not seem... |
I need a scenario for a small dialog-based game / interactive story. The game would be used as an example to be shipped with a middleware tool we're developing.
I would like to buy an existing story (it should be dynamic of course — with branching dialogs etc.), or hire someone to write a new one.
Please advise, where ... |
I've just now tested rendering a lot of sprites using XNA's SpriteBatch class. What I basically do is this:
Somewhere in the code, I have a list which contains all sprites that have to be rendered. I prefilled this list with 2500 Sprites, all of which have the same rotational angle, texture, position etc.
I then draw ... |
I'm development a network card game, and for now i've two players connected but there is a problem with one of them, this one can't do anything on the game. Looks that screen was blocked. I'm think that is because a code i used before.
That code is:
if (InvokeRequired)
{
this.Invoke(new Meth... |
I want to start writing games using ogre in combination with the CodeBlocks compiler but am struggling with the installation. I got the latest version of the compiler as well as the ogre engine from their respective websites. I have installed the compiler but cannot find my way in the integration of ogre though I read ... |
Hello can you make a 3d game like minecraft using java?
|
I'm writing a little embedded language for another project. While game development was not its original intent, it's starting to look like a good fit, and I figure I'll develop it in that vein at some point.
Without revealing any details (to avoid bias), I'm curious to know:
What features do you love in a scripting lan... |
Possible Duplicate:
Famous Games Written in .Net and XNA
Im learning XNA hoping to create a real world game out if one day, i.e. not just learning it to learn game programming.
But are there any successful real world XNA games out there?
(Maybe this question could be turned into a community wiki to a list can be ma... |
I am not asking for full support but do any of the current gen support C++11? I know VS C++ supports lambda and the auto keyword and I believe gcc supports both as well. Do any of the current gen consoles or handheld (3ds, sony vita) support it?
|
I've got multiple buffers in OpenGL holding data on position, normals and texcoords.
I also have an equal number of buffers holding distinct index data for each of those buffers.
I quite like this format (indvidual indexes for each buffer) utilised by COLLADA since it strikes me as optimally efficient at accessing each... |
I'm planning to create a simple math multiplayer game and I plan to just use Ajax for the server/client communication but I'm not sure if this is sufficient or if I need a socket server.
The game will look like this:
2-4 users
all get a simple math task (like: "37 + 14")
they have to solve it as fast as possible
first... |
Recent days, I've been spending significant time in discovering chances of profitability of AppStore for developers.
I have found many articles. Some of them are highly optimistic, while other are extremely skeptical. This article is extremely skeptical. It even claims to have backed its conclusions by objective sales... |
I currently struggle with creating the database structure for my RPG.
I got so far:
tables:
area (id)
monster (id, area.id, monster.id, hp, attack, defense, name)
item (id, some other values)
loot (id = monster.id, item = item.id, chance)
spawn (id = area.id, monster = monster.id, count)
It is a browser-based game li... |
Well, I have to say that Unity is a really nice thing that can save one a dozen of hours on coding (letting instantly work on gameplay). But what's the idea of forcing
(EULA) any party, which made over 100k last fiscal year, to purchase Pro instead of using normal edition!?
It feels that this kind of licensing provide... |
I am playing around with the bloom shader from the XNA sample page, to do some glow shading. I am rendering primitive vector-ish squares of linelists/linestrips, on a background. However, I am facing a few problems.
With a black background and white squares, I can actually see the squares. However, with a white backgro... |
The A* algorithm is used by enemies to have a path to the goal. It's working but when sometimes I placed a tower in a grid (randomly) it produces a stack overflow error. The A* algorithm would iterate the enemy and find its path and pass the list to the enemy's path.
I added debug logs and the list that I'm getting it ... |
How does one usually handle animations that are for going between a game object's states? For example, imagine a very simple game in which a character can only crouch or stand normally. Currently, I use a custom Animation class like this:
class Animation{
int numFrames;
int curFrame;
Bitmap spriteSheet;
//... vario... |
I'm just starting really getting my head around component based design. I don't know what the "right" way to do this is.
Here's the scenario. The player can equip a shield. The the shield is drawn as bubble around the player, it has a separate collision shape, and reduces the damage the player receives from area eff... |
I was thinking of how to implement overriding of behaviors in a component based entity system. A concrete example, an entity has a heath component that can be damaged, healed, killed etc. The entity also has an armor component that limits the amount of damage a character receives.
Has anyone implemented behaviors lik... |
In a 2D game, I simply want to draw the trajectory of an arrow in flight. With the code below, the trajectory (the parabola) looks right, but the angle (or rotation) or the arrow isn't.
float g = -9.8f;
float x = (launchVelocity * time);
float y = (launchVelocity * time) + (0.5f * g * (float)Math.Pow(time, 2));
float ... |
I want to draw the depth buffer in the fragment shader, I do this:
Vertex shader:
varying vec4 position_;
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
position_ = gl_ModelViewProjectionMatrix * gl_Vertex;
Fragment shader:
float depth = ((position_.z / position_.w) + 1.0) * 0.5;
gl_FragColor = vec4(depth, ... |
I am working on building a HTML5 RTS game, and my current state is that I am building the Campaign mode of the game, and want to define the gameplay (The Scoring, Unit Behaviors/Attributes).
I am searching for links/articles/books about how to define the gameplay, for me this:
The scoring
Figuring out levels of contro... |
What are the formulas which represent the horizontal and vertical displacement of an arrow in flight (as well as it angle)? I would like to make sure that I take into consideration the arrow's fluid dynamics and center of gravity.
|
I have two classes in my game, a Main Menu and the main playing screen. How can I swap through classes? E.g I click on "New Game" in the menu class and it changes it too the Game class. A transition animation explanation would be nice.
|
See the diagram first:
When my AABB physics engine resolves an intersection, it does so by finding the axis where the penetration is smaller, then "push out" the entity on that axis.
Considering the "jumping moving left" example:
If velocityX is bigger than velocityY, AABB pushes the entity out on the Y axis, effect... |
How can I detect clicks on a texture (which will be a button in my game) which has the form of a triangle or circle. I only know the rectangle solution which uses the position, width, and height; which won't work because clicks will be detected on transparent pixels.
I have heard of pixel-perfect collision, would that ... |
By graphic adventure, I mean point & click LucasArts-type games.
Those games have a mostly linear structure in nature, and usually don't offer as many variants as other games types like action, rpg, strategy, which makes this genre difficult to implement a multi-player feature.
I'd like to know if there has been any at... |
In your game assets do you make room for explicit sanity checks, or do you have some generally expected bounds which you assert?
I've been thinking about how we compress data and thought that it's much better to have the former, and less of the latter. If your data can exceed your normal valid ranges, but if it does it... |
My friends and I were talking about an adventure game. There will be a surplus of possibilities in the game and the player can pick from this wide variety of choices at each stage to do something. There will be consequences for each decision and that may or may not end the story.
The result would be somthing like this... |
I'm loading a simple 6 sided cube from a UV-mapped FBX model and I'm using a BoundingBox to test for collisions. Once I determine there's a collision, I want to use the normal vector of the collided surface to correct the movement of whatever collided with the cube. I suppose this is a two-part question:
1) How can I d... |
I have implemented A* Path finding to decide the course of a sprite through multiple waypoints. I have done this for point A to point B locations but am having trouble with multiple waypoints, because on slower devices when the FPS slows and the sprite travels PAST a waypoint I am lost as to the math to switch directio... |
I want to create a render target that is 32-bit, with 16 bits each for alpha and luminance. The closest surface formats I can find in the DirectX SDK are:
D3DFMT_A8L8 // 16-bit, 8 bits each for alpha and luminance.
D3DFMT_G16R16F // 32-bit float, 16 bits for red and 16 bits for green.
But I don't think either of th... |
I'm new to game/graphics development and I'm playing around with particles (in 2D). I want to draw particles close to each other as a blob, just as liquid/water. I do not want to draw big circles overlapping as the blob won't be smooth (and too big). I don't really know physics but I assume what I want is something loo... |
I am working on a small text-based game in Java. I am trying to understand the concept of how to color the output without needing to use JNI. C++ has the ability to modify the console directly and also make system calls but as far as I can tell JAVA doesn't because of its ability to be system independent.
Is this poss... |
I am looking for a server technology that supports AMF (because I plan on using an as3/flash front end).
I would like to develop game logic / simulations that run on the server. Small number of users and logic at first, but that will grow.
I might use this for some simple turn based / simple tests, but I am hoping thi... |
I have a problem with a game i am programming. I am making some sort of security game and i would like to have some visual line of sight. The problem is that i can't restrict my line of sight so my cops can't see through the walls. Below you find the design, in which they can look through windows, but not walls. Furthe... |
I have some height-map sampled on a regular grid stored in an array. Now, I want to use the normals on the sampled vertices for some smoothing algorithm. The way I'm currently doing it is as follows:
For each vertex, generate triangles to all it's neighbours. This results in eight neighbours when using the 1-neighbour... |
In large procedural landscape games, the land seems dull, but that's probably because the real world is largely dull, with only limited places where the scenery is dramatic or tactical.
Looking at world generation from this point of view, a landscape generator for a game (that is, not for the sake of scenery, but for t... |
In a grid-based game I am working on, I want to add objects that occupy more than one tile of the grid. Are there any algorithms or techniques to find paths for this kind of objects?
|
I'm making a game based on a 2D grid, with some cells passable and some not. Dynamic objects can move continuously, independent of the grid, but need to collide with impassable cells.
I wrote an algorithm to trace a ray against the grid, that gives me all cells that ray intersects. However, actual object are not point-... |
I'm trying to figure out which language I should begin learning. I've only been programming for about 6 months, with languages like PHP, Java, and C#. I want to learn how to dev games, and while I know in most cases the answer to this would be through C++ (at least, I would think), though I'm still curious about what O... |
But, I'm not quite sure where I should start from here. I know I have to go and grab an engine to use with some prebuilt libraries, and then from there learn how to actually code a game, etc. All I have right now is some "program Tetris" tutorial for C++ open right now, but I'm not even sure if that will really help me... |
I'm creating an FPS game. I'm writing my own game engine. So far all the backend stuff is going great. I'd like to support md2 as the native file format for 3D Objects, but I also want to use skeletal meshes. Does anyone know if the md2 file format supports skeletal meshes?
In-case you need to know, I'm going to use bl... |
Not sure whether this is an LWJGL or math question. I want to check whether a shape is on-screen, so that I don't have to render it if it isn't. First of all, is there any simple way to do this that I am overlooking? Like some method or something that I haven't found? I'm going to assume there isn't.
I tried using my t... |
I want to be able to control the game via keyboard while the game does not have focus... How can I do this in XNA?
EDIT: I bought a tablet. I want to write a separate app to overly the screen with controls that will send keyboard input to the game. Although, it's not sending the input DIRECT to the game, it's using the... |
On the Source engine (and it's antecessor, goldsrc, quake's) the game objects are divided in two types, world and entities. The world is the map geometry and the entities are players, particles, sounds, scores, etc (for the Source Engine).
Every entity has a think function, which do all the logic for that entity.
So, i... |
I have raw image data (may be .png, .jpg, ...) and I want it converted in Android without changing its pixel depth (bpp). In particular, when I load a grayscale (8 bpp) image that I want to use as alpha (glTexImage() with GL_ALPHA), it converts it to 16 bpp (presumably 5_6_5).
While I do have a plan B (actually, I'm pr... |
I have seen some Voronoi shatter videos on Youtube.
What is your experience with it?
What are the pros and cons in time complexity, resource complexity, implementation difficulty...?
Does it emulate how a real material would react?
|
I am doing a ray-casting in a 3d texture until I hit a correct value. I am doing the ray-casting in a cube and the cube corners are already in world coordinates so I don't have to multiply the vertices with the modelviewmatrix to get the correct position.
Vertex shader
world_coordinate_ = gl_Vertex;
Fragment shader
ve... |
I have started to make a fantasy 3d fps swordplay game and I want to add animations. I don't want to animate everything by hand because it would take a lot of time, so I decided to use procedural animation.
I would certainly use IK (starting with simple reaching an object with hand ...).
I also assume procedural gene... |
Does anyone have a good algorithm for generating a random y position for spawning a block, which takes into account a minimum and maximum height, allowing player to to jump on the block.
Blocks will continually be spawned, so the player must always be able to jump onto the next block, bearing in mind the minimum positi... |
I am creating a tile based isometric game.
The problem we are having is with depth sorting, we tried a lot of methods but none work.
They all do a great job but its not perfect, they seem to bug sometimes.
We have tiled objects of different sizes, like 2x2, 2x6, 3x4. This makes it so hard.
We are trying to avoid slici... |
I've been reading about collision detection and I saw that the first part was a coarse detection which generates possible contacts using bounding box hierarchies.
I understand the concept of splitting up your objects in groups, to speed up the detection phase, but I'm a little confused on how do you actually build the ... |
I am making a little 2d overhead RPG type game just for fun. I have almost all the basic stuff set up, but I just need a little help on level creation. I can already make a level and place each tile how I want it, but having to place each tile gets annoying after a while.
I noticed that in a lot of games, even extreme... |
I'm rendering textured quads to an orthographic view in XNA through hardware instancing. On Nvidia graphics cards, this all works, tested on 3 machines. On ATI cards, it doesn't work at all, tested on 2 machines.
How come? Culling perhaps?
My orthographic view is set up like this:
Matrix projection = Matrix.CreateOrth... |
I have developed a game on Android. Now I want to play it on wifi or 3G. I have game packets which I want to send form client (mobile) to server then to another client (mobile).
I don't know how to write code in Java to send the playPackets continuously to server and receive the playPacket continuously from the server ... |
I read that most servers handle more than 50 requests per second. Is this true? how many requests can a normal server handle?
How do MMOG manage requests having to update player actions instantly?
|
I'm adding movable crates to my game and I need some help with my movement code. The way I've set up my movement code the crate's X and Y are moved according to a vector2 unless it hits a wall. Here's the movement code:
if (frameCount % (delay / 2) == 0)
{
for (int i = 0; i < Math.Abs(cSpeed.X); i++... |
Okay, so I know I need to set the path to the native files. I can do this in Eclipse, by going to the VM arguments and using -Djava.library.path=, but when I export, it says that the VM arguments aren't kept after exporting, but it can be set in the console while running it. I am running Mac OS X. How do I set that usi... |
I'm thinking that the straight-forward way would be to just iterate through the objects and just find the maximum and minimum coordinates on each axis, but this seems a little bit unoptimal.
Is there a faster, more efficient way of doing this?
|
I have only previously made flash games, using MovieClips and such to separate out my animations from my game logic. Now I am getting into trying my hand at making a game for Android, but the game programming theory around separating these things still confuses me. I come from a background of developing non game web ap... |
I and our other devs have ATi graphics cards. However we have encountered that some shaders that compile without warnings on ATi don't compile at all on nVidia. The problems are trivial to fix, but often go unseen.
My question is, how can I make sure that my shaders will compile everywhere?
|
I have a SpriteFont in XNA, which has the standard 126 characters that are usable.
However i would like to use the "ಠ" symbol in the game.
So is there anyway of adding just a few more symbols that the spritefont accepts?
|
I'm a programmer. I have a great draftsman, but I don't know how to take his drawings to 3D.
My gut feeling is to have him draw different view angles, then work based on those, adding each dimension to the model turn. But really I'm just guessing here.
How do I do this methodically and correctly?
|
I'm currently bad at drawing. If I want to create something looking acceptable, it usually takes me hours and hours to fiddle around just to get the basic looks right.
I think that I'm not completely skill-less, I just lack simple drawing techniques..
Am I a hopeless case?
Where is a good place to start out in drawing... |
We are using Cocos 2D for Android and are unsure if it's a good thing to execute our non-ui tasks on the Cocos thread as a way to get the animations in our game to pause.
What is the recommended practice?
|
If I were to buy, say this song: http://www.youtube.com/watch?v=3fumBcKC6RE, strip/find/get the instrumental, and use that instrumental in a game I'm making, as a theme, say for a recurring boss fight, and then sell this game, would this be illegal?
This is hypothetically speaking.
|
Assume you're writing matrix code that handles rotation, translation etc for 3d space.
Now the transformation matrices have to be 4x4 to fit the translation component in.
However, you don't actually need to store a w component in the vector do you?
Even in perspective division, you can simply compute and store w outsid... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.