instruction stringlengths 33 29.4k |
|---|
I have an actor named ball and I want to move it in a straight line which is created by actor ball's X and Y coordinate and cursor's X and Y coordinate. I have Move To behavior in gamesalad but I don't have exact idea how to move the ball with two Cartesian coordinates ball and cursor.
|
I'm really trying to up my game in game mathematics and now I'm working on enemy movement and a bit of AI. I have an enemy with two modes attack and avoid, based on an integer avoid variable that's either 1 or 0.
On avoid I want it to hover by the player, moving back and forth at a distance until it is set to avoid.
... |
I have a moving actor named ball and I want to move it in the opposite direction of my mouse's position.
In my code in Move To behaviour for X-axis location I write
-game.mouse.position.X
and for Y-axis location I write
-game.mouse.position.Y
But it's not working properly.
|
I have a simple question I think, if point a is to the right of another point I a dirx to be 1, otherwise -1. Likewise for a diry var, if it's above the other point I want it to be -1 otherwise 1. This is what I've worked out so far:
dirx = (abs(disx+1)/(disx+1))*-1;
diry = (abs(disy+1)/(disy+1))*-1;
The disx and disy... |
Consider the following situation. In a game you can perform crafting: i.e. create new items from existing ones (like in Minecraft). I have following game entities (simplified):
item: Atomic part.
recipe: A list of items resulting in other list of items.
What would be best structure to store all the recipes in the gam... |
I have simple mechanism for testing of two balls colliding:
private static boolean isColliding(float firstBallX, float firstBallY, double firstBallRadius, float secondBallX, float secondBallY, double secondBallRadius) {
final double a = firstBallRadius + secondBallRadius;
final double dx = firstBallX - se... |
I have a straight line passing from points A(2,-1) and B(4,5). I want to find a point C that is on the line and outside A-B.
|
Can someone give me a detailed
explanation about frame rate and fps concepts?
|
Does an engine using a vector field exist?
What I mean is that instead of calculating intersections, for example one could calculate the vector field generated by gravity and for the ground and let the object follow those fields.
What are the advantages and drawbacks of this kind of game engine?
|
I'm trying to make my first real time game.
I'm having problems with the movements using the mouse though. If close to theX axis, the player is moving fine, but if close to the Y axis(going southwards) he moves fast even though I'm taking into consideration the x coordinates.
Edit: I rewritten the code following your a... |
In a 3D environment I have an object with a displacement x that I know I need to traverse in a given time interval. I have the object's heading and elevation and I want to figure out the distance the object needs to travel on the x/y/z axis to move x units in the given direction. How can I calculate this? Are there two... |
I am wondering if I can (if possible) make a vertex shader that will always make the pixel shader draw everything in 1 pixel, at position 0,0.
I know this sounds crazy, but it's needed in the situation I'm in right now.
Let's say that I am drawing a line with 2 vertices that each have the color blue. For every vertex, ... |
Say there is a card game, and it has cards that arc out, and has certain types of memberships with certain features such as premium members being allowed to chat, or use private game rooms etc. If I, from scratch created a card game (for example, Hearts) that had similar arced cards, and had similar basic and premium m... |
First off, I know exactly what my drawing problem is, and I have various ideas on how to approach solving it. I am here to figure out how to adjust which frame is drawn so that the isometric "illusion" is maintained.
I am writing a 2D, birds-eye view game that takes place in space. I am trying to use isometric graphics... |
Possible Duplicate:
Why do we use scripts in development?
I just starting learning iOS game development. I plan to make games using the cocos2d framework. While reading game dev related articles, blogs, books.. I've noticed scripting languages (such as Lua) are often used in game development. I'm wondering if it's w... |
Can a fragment shader make per-fragment decisions on whether the fragment updates the depth buffer or not, even if the fragment is not discarded and the color is written?
|
I've got a XBox360 controller which I'd like to use as input for an application.
What I can't work out is the best-practice way to expose this via an interface.
Behind the scenes, the class which handles the controller(s) relies on polling button state.
I initially tried something link:
Event ButtonPressed() as ButtonE... |
Say I have a recursive algorithm, for example one that generates a random tree:
// Pseudocode, just a simple algorithm: it isn't perfect.
function generate_branch(angle, length, current_depth, max_depth) {
var branch = Branch(angle, length); // creates a new branch
if (current_depth == max_depth) {
return branc... |
For example, lets say we have an enemy class in my Android game project. I am initializing the enemy bitmap to be used with certain sprites in my game loops init. I am then calling the respective classes init, which is passed this loaded bitmap.
What is the process associated with initializing resources and classes in ... |
I'm about to start the first real phase of my game development which will consist of the acquisition of information, resources and the definition of where I want to go and what I will need for that. I just want to make sure that I'm prepared as best as possible before I actually start development.
I don't like the thou... |
A well known limitation of using the XNA Content Pipeline is that it is not included in the XNA redistributable. So, if you want to create an editor for your game, the designer must download the whole deal: your editor, your engine, XNA Game Studio and Visual Studio Express. Even then, I'm not sure you can compile your... |
We've been trying to replicate the most common blending modes that are available in Photoshop and Quartz 2D, but we've only come up with 3 and that's after some long searching online.
For anyone interested, here they are:
Multiply = GL_DST_COLOR, GL_ONE_MINUS_SRC_ALPHA
Screen = GL_MINUS_DST_COLOR, GL_ONE
Linear Dodge... |
Right now, each node of my octree contains a list<Triangle*> (pointers to mesh triangles).
So basically an octree query returns poly soup.
Sometimes I want to query the octree for entire objects however. Each Tri has a pointer to its "owner object", but should I park the object references in the same octree (ie give e... |
When a user arrives at your main menu on your mobile touch phone game. What do you want them to see? What do they need to see?
Start, About, Load, Leaderboards, and Settings are just a few of the options that I "could" put on the Main Menu. The question really is what "should" be there and why?
My game is about survivi... |
I'm casting a ray in Box2D using b2World.rayCast how can I get the normal of the wall which was hit? Or better yet - the line start and end points?
The information returned is:
Fixture (fixture hit, and parent body)
Point ( Location of hit )
Normal (Normal pointing at new direction of ray - not the normal of the edge h... |
According to the Wikipedia page about voxels, "[...] the position of a voxel is inferred based upon its position relative to other voxels (i.e., its position in the data structure that makes up a single volumetric image)."
How should one implement such a data structure? I was thinking about an octree but I'm wondering... |
Suppose I have a Spacecraft object in 3D space, controllable by the player. I want it to update its own trajectory, so I give it a function for that (actually it might be inside a controller component associated with it). No problem until this point.
For this function I want to use a scientifically tested, accurate N-b... |
I've decided I want to write a central ResourceManager/ResourceCache class for my hobby game engine, but am having trouble designing a caching scheme.
The idea is that the ResourceManager has a soft target for the total memory used by all the game's resources combined. Other classes will create resource objects, which... |
I'm a web developer with a keen interest in game development for the iOS platform. I develop mostly with Ruby for the day job but I have dabbled quite a bit with Java in the past, random world generators, platform games, space invaders etc, never anything serious though and only using Java2D.
It seems to be an extremel... |
For example, say you want a character animation and a health bar animation. Since these require different algorithms, should they be in the same class?
They both re-use some of the same code but having them both in one class for me requires MANY parameters to be sent in upon instance creation.
This could just be a lack... |
I've been researching processors and graphics cards, and I discovered that GPUs are way faster than CPUs. I read in this one article, a 2-year-old Nvidia GPU outperformed a 3.2GHz Core I7 Intel processor by 14 times in certain circumstances. If GPUs are that fast, why don't developers use them for every function in a g... |
I'd like to efficiently capture a "screenshot" of my OpenGL ES iPhone game. I put screenshot in quotes because I really want to move the screen contents into a pixel buffer that I can eventually use to create a mov file using AVFoundation.
Currently I'm taking the screenshot with this method from Apple. The resulting... |
So I'm adding the basic mechanic of making frail/breaking tiles, those that break apart and disappear after the player has walked ontop of them. Now I thought this would be as easy as...:
//Breaking tiles represents the 2d array number, that describes the breaking tiletype.
if( TileWeAreStandingOn == breakingTile){
... |
I been working with scrolling this week but I recently encounter a problem that I don't understand why it's happening.
In a 2D scroller I want to scroll a tilemap pixel per pixel which gives a smooth scrolling in the game, but I encounter a weird problem, when the movement of the map corresponds with the exact size of ... |
I am rewriting a game I made to use a (custom) collision manager that uses the minimum displacement method. As of now, my simple manager can only recognize and act on a couple of shapes - Circles and AABB's. Those were pretty simple to implement, but I've run into a problem: My game also needs to be able to have bitmap... |
Of course, it goes without saying that this can only work when the puzzle is randomly generated (say, something like minesweeper/bejeweled) and not hand-designed levels (such as trainyard, theseus & the minotaur etc).
I am currently thinking that this can instill a sense of urgency to the player and make them feel more... |
I have a set of boxes which create a sort of path, they don't intersect very smoothy and to help that process I'm trying ot find a way to get an angle between them that can make it easier to generate another box between the intersection points.
Here's a pic of what I mean, the crudely drawn yellow arrows are basiclaly ... |
I am beginner in game development and want to work with either unity or cryengine because they have thier own player and we can play on web also with the player installed. I am confused with which to start. please answer this in terms of flexibity, visibility and speed, which one would be better?
|
I have been working on a material system and for the most part everything works just fine, however, I hard code the shader that will be used. Obviously this causes a problem when I want to have the materials be saved through the material editor.
What I ended up doing was having the material save "attributes". These att... |
There's some issues that I've come across in my Perlin noise-based game. Take a look at the attached screenshot below.
The white areas you see are walls, and the black areas are walkable. The triangle in the middle is the player.
I've implemented physics in this game by drawing it onto a texture (white or black pixels... |
I am looking to develop an in-browser game in Unity3D, but I would like to write my builder tools for my project on a more powerful platform.
The assets I am building for the game are not traditional 3D models, so I'll probably be creating my own format. I was thinking about writing something in Blender or Maya, but th... |
Imagine a game world where loads and loads of entities are dynamicly loaded all the time, I would represent that as a list of entities perhaps, but what about removing them?
While when adding i could be pushing back the new entity, i could have the need to remove anywhere in the container. To avoid searching the eleme... |
How did they make the terrain in trine? I think they took a polygon approach. It doesn't seem that they used a heightmap because it is in all three vectors, or a voxel method because it doesn't have overhangs and cliffs. If it is polygon-based (I assume it is), how in the world would you texture the whole thing?
Noti... |
I'm working on a game in XNA 4 and I recently switched to a deferred shading implementation following this guide. A strange white outline is showing up on my models now and I'm not sure whats causing this. I thought maybe it was a lack of precision on the normal render target or the depth render target but increasing... |
I just installed Source SDK. Made a multiplayer mod from a template using Source Engine 2007. I'm currently using VS2008.
I was wondering which folder I should work in. For example weapons, which files I should change?
Is it "\src\game\server\hl2\weapon_crowbar.cpp"
or "\src\game\shared\hl2mp\weapon_crowbar.cpp"
or "\s... |
I started programming many years ago. Now I'm trying to make games. I have read many recommendations to start cloning some well known games like galaga, tetris, arkanoid, etc. I have also read that I should go for the whole game (including menus, sound, score, etc.).
Yesterday I finished the first complete version of m... |
In a single-player game, when trying to build an entity out of components specified in external scripts, what do you think is more desirable to happen when one of the components is ill-formed:
Should the engine skip over that component and let the entity live in the game world with only the components that were well w... |
I am have now this code: http://jsfiddle.net/DK67k/2/ In here is 2D tile map and when you click on tile you get coordinates on alert. But for get precises coordinate you need click on top left tile(tiles is 16x16) and if I click on bottom right tile I am get second tile coordinates.
Maybe anyone have idea how to fix th... |
I'm currently working on a generator that generates rooms in biomes and i was wondering what is the fastest way of checking if a certain position is already occupied.
I've got 3 possible ways of doing this:
1. Use nested foreach loops to directly loop through all rooms and check the position. (ugh)
public bool IsOccupi... |
I'm new to games programming and I'm working on a C#/XNA project.
Something I'm spending a lot of time on is debugging. Obviously as games run in a loop finding the exact iteration that a bad condition has occurred can be tricky.
Spending time setting up conditional breakpoints certainly helps but eats up time.
Are th... |
Basically, I am creating a large iPhone game (with an overwhelming amount of 2d graphics).
I am concerned about the game file size.
Since the iPhone game will accept Retina and Normal display, we need 2 versions of each image (one HD and on normal). Therefore, it is necessary to resize our image files (it is not a good... |
How do you guys create your game graphics for iPhone? Considering you need a retina version and a nomal one?
Do you create a big version of your image, save HD, then resize to smaller version, and save Normal?
Or do you create a vector image with say, fireworks, save HD, then resize, then save Normal?
|
I downloaded the CryENGINE SDK, and I tried the map Forest from within the editor and it worked fine. However, if I launch it from the Launcher using the console it looks like this:
I can use the weapons (although they are invisible) and interact with objects despite not seeing them. I also did my own map and had the... |
I've seen a lot of games that define the entity components in script files, but when they configure each entity and specify what components it has, they use some other file format (like XML). Why do they do that?
I'm asking mostly to see what others' rationale was for this. I also configure my entities outside of scrip... |
Given a fairly static voxel array, what is more efficient: using the CPU to pre-generate a VBO to render the voxel faces (ignoring more advanced forms of rendering like marching cubes for now) or using a geometry shader on the GPU to generate the faces on the fly?
I'm not that worried about updating changing voxels but... |
Does anyone know anything about the technology behind the "Zombie Highway" iPhone game?
What 3D engine does it use, especially what kind of tools did they use for the UI animations, transitions, etc.?
Also, when you go to the settings screen, they are using the native iPhone keyboard and controls. Do you think that's a... |
I'm currently trying out the various free SDKs out there (Cryengine3, UDK, Source) however all of them are mainly designed for FPS games. I was wondering if there are other AAA 3D engine SDKs that are aimed towards RTS games?
|
Imagine a game world like in Dungeon Keeper or Sim City with an (possibly rotatable) 3rd person view, where the game world can be accessed in all dimensions (in discrete steps). For example digging into the ground and accessing a whole new layer, but with the possibility of visible connections between the layers, like ... |
SAT is a decent way to determine collisions between arbitrary convex polygons. You'll even get the vector that is needed to resolve a collision.
To resolve collisions between complex (non-convex) shapes, I was thinking about some sort of compound-shape which consists of several convex polygons. If a collision occurs in... |
I just played minecraft and its awesome. I wanted to make game for years. I'm just not very interested in visual part and very interested in programming and making smart stuff. Mostly i make c/python/php programs with no interface at all. Now i think i found what i was looking for.
So my question is: how can i make sim... |
So, just to clarify, because I'm still fuzzy on the terms for perspectives in older games myself, examples of an oblique perspective can be seen in many older RPGs (Earthbound, Final Fantasy, Secret Of Mana, etc.).
I've seen many games created in this perspective that utilize a more action-oriented style of gameplay in... |
The title is a bit confusing, but I couln't think of how to explain my question in a short phrase. So here it is:
Whenever I'm writing game engines, wheter it's physics/tilebased etc, I always get to the point where I'm not sure how I should manage things. Should entities in the world handle on their own, or should the... |
Possible Duplicate:
How is 2D lighting implemented?
I'm attempting to create a 2D game in 3/4th perspective (like Pokemon and the older Zelda games). The time has come for an attempt to create a lighting engine for it. Honestly, I've got no clue where to start. I've looked all over trying to find the math behind the... |
I need an editor to plot a polygon over the texture for of a ship in my game.
It would look like this..
Where the red is the collision outline and the image is the texture.
I want to store the polygon like texture coordinates eg top left is (0, 0) and bottom right is (1, 1).
Are there any tools (free) that does some... |
What is Corona & Which programming language is used to develop an application in corona?
What physics Engine is corona using?
and any other information that is absent in their site?
|
I'm now working on an XNA 3D game, and I want to add animated models in it. I came across this example. I see there is one FBX file and a few texture files in the content project, and that in the code you can choose which "take" to play. In this code it is "Take_001". Please tell me: When I create and animate my own 3... |
I'm trying to create vertex and index buffer for a cylinder (in OpenGL, but it shouldn't matter). I think my vertex buffer is fine (I checked drawing with GL_POINTS). Here's the code that builds it:
int sides = 10, slices = 40;
float radius = 3.5 * 10.0;
numVertices = sides * slices;
Vertices = malloc(sizeof(Vertex) *... |
I have a simple jBox2D (Java) implementation of a world with couple of Circle bodies that at the begining are static.
I want to make them movable when the user touches the circle. But I want them to be movable from the point where it's touched to its logical velocity direction.
How do I set the velocity / direction ... |
My problem today is this:
I have many civilians going around, they are classes stored by an arraylist.
The idea is when they see another civilian panic, they'll start to panic and it will spread.
First I call each classes Step() function by looping through an iterator. Then in the Step() function it goes through anoth... |
I'm writing a platformer engine with XNA and was wondering what method for handling collisions I should use. Would I be seeing some performance issues if I were to try and have PerPixel collisions? Should I be using per pixel collision handling or rectangle collision handling?
|
I would be very grateful if someone could tell me how the graphics (and in particular, the lighting effects) for this game, Orbital, are created. Would it be OpenGL?
For some background: I'm new to this, and I really like these style of graphics, but I've no idea where to begin -- I'm just trying to figure out which di... |
I'm using PIX from the DirectX SDK to monitor my XNA application. I want to see the polygon count a model loaded in the application and was told this was information I could get from using PIX.
Problem is, I'm not sure how. I've looked through the documenation so maybe I'm just missing something obvious or maybe this ... |
Although it isn't necessary to exclude things like graphics and audio packages, I'm most interested in the organization of the folders for classes that deal with AI and game state. I'm thinking something like this in Java using packages as the example:
import com.rpg.characters;
import com.rpg.characters.antagonist;
im... |
So far I couldn't find anything on google so I'm asking here:
I need to connect two iphones or more to each other for a multiplayer game, what features does iphone api provide? is there some kind of bluetooth device or equivalent in iphone or should i just search over the wireless network connection? and what api shoul... |
I'm in a bit of a dilemma regarding how certain engine components — like camera and UI — know who to follow, whose health and other attributes to represent on the screen.
How do you architect a system where does communication between those components and the entities take place? I could have a separate entity that repr... |
I'd like to know how many parallel units for processing vertices a GPU has.
This Wikipedia page provides a GFLOPS and clock speed, for example for the Radeon 5850 "Broadway PRO", you get 1000 GFLOPS. Assume running a vertex shader is 100 flops, then that means you can process 1000e9 / 100 = 10e9 vertices per second.
I... |
Possible Duplicate:
What tools do you use for 2D art/sprite creation?
What do you folks suggest for creating sprite graphics and sprite sheets?
I fiddle with pixelformer and tilestudio.
Pixelfromer has a kicken interface, it is quick and easy to make graphics, but a bit cumbersom if you want to make a spritemap.
Til... |
I am planning a simple MMORPG, but even though it's a small, open source project, I'd like to have the best quality database. Which would be the best database software to use?
Examples:
SQL - MySQL, PostgreSQL, MSSQL ...
NoSQL - MongoDB, CouchDB ...
|
I can't seem to find any well executed code examples for Android joystick controls.
Whatever it may be, algorithms, pseudo code, actual code examples, strategies, or anything to assist with the design and implementation of Android joystick controls; I can't seem to find anything decent on the net.
What are some well ex... |
I don't have any idea about the box2d collision detection in android. I googled and got results that suggest to use the contact listener but I don't know how to use it in android java.
|
I would like to know if there is a C++ game engine that I can use for free to prototype some ideas I have.
I have experience in C++ and have spent some time now playing around with different rendering engines such as Ogre3d and irrlicht. I don't want to re-invent the wheel and spend the time building my own engine.
I h... |
As part of a game design class I'm taking this semester, I'm developing the basics of a game engine. I shared what I had in the GameDev chatroom, earlier, and everything was working as expected.
Then, because I knew it needed it, I started work on refactoring the core classes within my code. I modified the ancestor Gam... |
I've been meaning to transition from 2D games to 3D games for some time, now. I have the most experience with RTS games, so I will be doing that.
On one hand, there's a lightweight renderer; Irrlicht. However, considering it's a renderer and not a game engine (only basic collision, etc..) , I would have to write most o... |
In my Direct3D 11 application, I am using several sampler states to retrieve texture data. Some of them are used in all pixel shaders, some of them are only used in very specific ones.
The question may seem simple, but I was not able to find any decent information on the topic-
Are there any penalties (performance or o... |
My guess is that it is derived from version 1.10 of the OpenGL Shading Language, document revision number 59. Found it here, page 7:
http://old.siggraph.org/publications/2006cn/course16/KhronosSpecs/ESLanguageSpec1.10.11.pdf
The differences are also listed there with underlined text.
Can anyone confirm that it is based... |
I'd like to know how others have handled the issue of storing the entity's position. (Or maybe it's not an issue and I just make it too complicated.)
I'm undecided on whether to store the position of each entity in the world map file or in the entity's script file. From what I figured, both approaches have their own go... |
How would you go around creating a reusable weapon class? I can't really wrap my head around creating a class, which will work for both melee and ranged weapons.
Example given, that you have a knife, an RPG, and you have an ordinary pistol. How would you go around creating a class all three can inherit from?
|
The question is about how to handle data about entities, but not particularly useful to the entity itself. An example of such data may be the external script that controls the entity's behavior or the path to the animation file — such data is gathered when loading the entity and is no longer useful until you save the g... |
Currently my game has an Activity for the splash screen then it starts the main class activity then it starts a menu activity then from the menu there is an activity for each option (only two at the moment), Start and About.
Splash --> Main --> Menu --> (Start, About)
The start then sets a Content View for my game to ... |
I'm learning character animation with DirectX 9, and I'm new to 3D programming too.
I'm trying to use examples with my model that I'll be working with. They are from the book Character Animation with Direct3D, example 3.2 — hardware skinning.
Why loading of the Mesh and rendering works good:
Skinned version of the exa... |
The terms scripts and scripting appear to be used interchangeably on the Game Development Stack Exchange, but other than reading questions about a scripting language choice, I don't understand the relationship between scripts and scripting, and the core language. What does a script typically do, when would it be used, ... |
I'm wondering if opengl can automatically manage offscreen rendering. I mean if it can detect and ignore sprites and textures if they are rendered out of screen.
if it makes any difference i'm targeting opengl-es 2.
|
I've just been using Unity and chose to learn it by making a Pong game which sounded simple enough as a "hello world" type of game. My goal was to try and encompass enough of the built in engine without needing to write scripts but I ran into a few problems.
Here is my setup so far:
Paddle Game Object:
Box Collider
R... |
I'm currently working on path-finding for my game and need help with finding an efficient algorithm to calculating the all-pairs shortest paths in a weighted undirected graph (each vertex in the graph represents a way-point on my map, and each edge represents the distance between pairs of way-points).
I have considered... |
I'm developing an editor for my game, and now it's time to make a visual scripting system to let designer modify behaviours.
This video shows what i have done and the problem
to resolve the link between nodes I'm using an A* path finding,
when a path is set, I add a penalization bonus to each cell of the path, to av... |
I'm diving into the world of game development on PC and have a language agnostic question in regards to controller output.
I have in my possession a Logitech Driving Force GT. This particular steering wheel controller has force feedback (aka vibration or rumble) and the ability to turn the wheel through the game.
What ... |
I have a space shooter game for Android and I want to implement it as a live wallpaper. Any ideas on how this can be done?
Or better yet can anyone help me / provide a template that calls a "ship" object that fires missile? I'll do the rest from there onwards. I just need it as a starting point for learning Android.
|
I have a non-tile-based top down shooter game, and I have enemies set up. However I need the enemies to move to the player. Pathfinding algorithms will mean the enemies will just hug the wall. The map has many walls and objects for cover.
How is it done in other games and what should I do?
|
I am developing a 2D space game with no friction, and I am finding it very easy to make a homing missile orbit its target. I am curious about anti-orbiting strategies.
A simple example is a homing missile that simply accelerates directly toward its target. If that target were to move perpendicular to the missile's traj... |
I've been working on implementing variance shadow mapping for my game. I was able to get a spot light working with variance shadow mapping with a gaussian blur applied to the shadow map to reduce the aliasing. Now I'm trying to implement point lights but I'm not sure how to adapt the gaussian blur to work with the th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.