instruction stringlengths 33 29.4k |
|---|
I'm trying to create projectiles which bounce/ricochet off one another when they collide in mid-air.
All projectiles are spherical and have identical size, mass, and speed. Each has two vectors: one representing its current location and the other its direction and speed. (Vectors, here, basically being <x,y,z> tuples... |
I'm currently working on a tile-based 2D platformer similar to Terraria in some ways, although I'm having difficulty with the terrain generation. I have some basics done, although they do not come out as anything useful.
I have tried a few different techniques like Perlin Noise and read about some others such as Midpoi... |
I realize this question is complex and subjective, but bear with me for a moment.
I firmly believe that video-game software is essentially different from, for example spreadsheet software, as from a user point of view, some games have more similarities with film art than with regular software. However, when it comes to... |
In aviation, runways are named according to their magnetic orientation seen from the pilot's perspective. For example: a strip of asphalt oriented along the east-west axis will be named 9 for the pilot coming from west (east is at 90° from North) and 27 for a pilot coming from east (west is 270° from North).
When seve... |
If you are a solo programmer creating a game, what do you do for the graphics and art part?
Should I work with graphics artist to draw the characters and the environment? I don't know how to draw any way.
|
Given the image below, I need to detect the most optimal sequence on the board (the green line). The blue/red lines represent possible, but not the best moves.
Here are the rules:
You can move to any tile that is the same, and is your neighbor (diagonal is valid)
Once you have visited a tile, you can't visit it again.... |
I want to rotate the canvas circularly on its center axis based on user touch.
i want to rotate based on center but its rotating based on top left corner .
so i am able to see only 1/4 for rotation of image.
any idea..
Like a old phone dialer .
I have tried like as follows
onDraw(Canvas canvas){
canvas.save();
// ... |
When I execute this code it gives me the Exception Glthread 8 Java.lang.null.pointer
MouseJointDef md = new MouseJointDef();
md.bodyA = _body;
md.bodyB = _body;
md.target.set(locationWorld);
md.collideConnected = true;
md.maxForce = 1000.0f * _body.getMass();
_mouseJoint = (MouseJoint) _world.createJoint(md);
_body... |
I am currently doing the tutorials in the book: "learn iPhone and iPad cocos2d Game Development" by Steffen Itterheim and have been running into problems with the code for the DoodleDrop tutorial, chapter 4. I have tried to find the source of the problem but i am not able to do so.
Here is the code i am using:
#import ... |
I have a 10x11 array in my game. What is the best structure and way to store the connections between the elements of the array?
Some info about the connections:
they are simple (2 elements are connected or not)
an element can be connected with its 8 neighbours
when I move from one position to another I need to add tha... |
I'm making a 2D platformer similar to Terraria, although I'm having some problems with some collision detection code. I'm using the code from the AppHub Platformer sample, but tweaked so it fits with my character size and tilesize. Although, I am having a few problems:
If I box myself in, and then jump. Instead of jus... |
I want to make a similar browser online multiplayer game like "Dueling Network" (link below) but for a different TCG.
What technologies you believe they used to create it?
Could anyone kindly refer to any good resources/books to start from, so that eventally (not soon) I myself can create something very similar to the ... |
I've read a lot of tutorials, but it just doesn't seem to work. Here's the code as suggested by a tutorial, using the built-in AlphaTestEffect class:
Matrix projection = Matrix.CreateOrthographicOffCenter(0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height, 0, 0, 1);
Matrix halfPixelOffset = Matrix.CreateT... |
Can you recommend a scripting language which allows me to easily parse "one-liner" types of scripts (they're just commands, really)?
For example, a C/C++ function which simply sets the value of a 2-dimensional vector (position, for example):
void SetVector(Vector2 &vector, float x, float y)
{
vector.x = x;
vect... |
I am drawing a Texture2D onto the screen and have the need to rotate the texture forward, in a 3D way. I'm using the SpriteBatch Draw() method and it only allows limited 2D rotation around the Z axis. From tons of research online I have boiled down the solution to passing either an effect or matrix to SpriteBatch's B... |
Would finishing an entire course about C# at HomeAndLearn.co.uk and then jumping into XNA be a wise path to take?
Ultimate goal is to create a multiplayer 2D game.
|
The code below compiles fine on the Flex 4 SDK on Fedora 15. Mouse-click opens the dialog box, I click okay, and a file is saved, but the file is empty. I run the same SWF file (that was compiled on the Linux machine) on a Windows machine, and the created file contains the expected data.
Then I broke the FileReferenc... |
The problem: An autonomous ship starts at the outskirts of a solar system, and wants to move to a moving target, which is one of the planets. There are also many other planets moving at the same time, and these should be considered the only obstacles. I want to find the optimal path to the target. To keep it simple, th... |
I am a bit confused about what I need to move a basic square. Should I use a translation matrix or just change the object vertices? Which one is better?
I use a simple vertex shader, gl_Position = myPMVMatrix * a_vertex, along with a VBO.
|
I'm running box2d in C++ and hooking it up to C# via p/invoke. All physics stuff occurs in C++.
My problem is that bodes know when they are colliding and do so with great precision. However if I have two boxes which are 10x10 units, one located at the origin and is static while another is set 30 units in the sky 4 unit... |
I'm trying to implement a scene graph for my 2D game in XNA, and I was looking for a way to draw every object while saving only the local transformation of the object. This seems a bit like glPushMatrix. If such a function exists I can just push a matrix for every node and then call the draw function for all its childr... |
In my game I have 2+ forms and 4+ usercontrols.
Where should I declare, lets say a textbox that I use in form2, but I need to modify it in form1.
Should I make them public in their own form/usercontrol or should I make a static class with all the controls?
(Edited to clarify my question)
I want to know the most used an... |
I'm starting to create my own side scroller, in Java. I think I've read that, when you create a game in Java, there is something you can extend your class with, like GamePanel.
Is this true, or can you just use JFrame for your Java games?
|
To know when contacts happen we can derive from b2ContactListener and implement our own solution which is great. I'm wondering is there anyway we can cancel a contact, that is to say when we hit begin contact we call a function or do something to destroy the contact before it has a chance to be resolved?
My game logic ... |
I'd like to draw a 2Dimensional coordinate system using C#. Unfortunately, in terms of a graphics rendering engine, XNA is out of the question since I'm running Linux. Thus, is this possible without XNA? How exactly would I go about doing this? My goal is to have something which allows the user to click on any specific... |
I'm making a text-based RPG. One thing I've been trying to implement for a long time now is the ability for the player to move North, South, East, or West. I have my code placed in a MoveBehavior class, which exists in my main Character class.
The problem is that, while my algorithm should work in theory, the locatio... |
I have a SpriteBatch that is set to draw to a RenderTarget2D that is 500 pixels larger in both height and width. Whenever I draw to a point outside of the physical screen dimensions, it will not draw the object.
I am performing some 3D transforms on the texture so I need the areas outside the screen to be drawn. I have... |
I started my journey to learn games programming from the scratch (I'm a software developer but not in gaming field), I'm targeting iOS games development.
Currently I'm ready "O'reilly iPhone Game Development", then I'm considering reading "Apress Learn iPhone and iPad Cocos2D Game Development".
Am I on the right track?... |
I am building an MMO and want to add NPCs. The thing is I don't know the basic design. What does the calculations, the clients or the server? I would understand the server calculating events and reactions, but when it comes down to pathfinding and position and movement of player, who calculates that?
Who calculates the... |
in a previous question asked here:how-to-create-a-hexagon-world-map @Tim Holt has provided code that does the job that i'm wanted to do, the only difference I would like is to have it as squares rather than hex. Is this easy to convert, or is there a better way?
thank you.
|
I recently did the programming on a game that was just released and i've decided that for my next project I want to do something a little bigger scale. I plan to develop a game to be sold on Steam, it will be 3D. I've done large-scale games in Flash and a small game in C++ written with OpenGL. I realize that flash-b... |
My game involves a level with deformable terrain and units that can travel in any direction but are slowed down by uneven terrain. Normal A-star should work fine in most cases, except on flat land where no matter how the general purpose pathfinder worked it would not send units on a direct path. Theta-star would work i... |
I'm looking for a tutorial about how to implement a horizontally scrolling background with various objects that auto-scrolls as your character/player moves just like various car/motorbikes games.
I'll have images for various obstacles, objects along the path. I'm concerned if I load everything on start of game. /i woul... |
As I read in OpenGL matrices are column major. It means that if I create a 16 element array first four elements are the first column in matrix. Is it the same for Direct3D or any transformation's required.
|
I am looking for a simple real-time OpenGL based render engine to show a 3D model on screen.
I prefer using 3DS Max's 'shader' materials (real-time materials) for editing.
Do you know any good simple API to include it in an OpenGL screen? Is there a simple tool to export from 3DS Max to that tool?
|
If I have a map in my platformer game and I want my character be able to jump on some platform, for example. Is there an easy way to tell the game where the platforms are and where the player can jump to and start jumping from?
Also, for games like Super Mario Bros and such, are the maps made in .txt files ? I watched ... |
I was bored and dragging my game window around the screen and noticed something interesting.
When I drag my game window over to my secondary monitor, the screen updating just completely freezes.
Is there something I need to do to enable updating on a screen other than the primary monitor?
|
we are in the process of porting a game from iphone(made with cocos2s) to android(using the andEngine), and it has been a pain to do. So for our next project (a 2d game) we are thinking about using some multiplatform engine/framework. For now we are thinking about testing both unity, marmaled(former airplay sdk) and co... |
Does anyone know what language or platform is used to develop apps for Google+?
I'm hoping Python, but I know google has a lot of other mediums they could use for this. I'm fine with hearsay as I know the game portion of google+ is pretty new.
|
I'm working on a project for which I will need to create a large item database, with plenty of different types of items which will all have different data structures and attributes. I'm hoping to either find or implement a tool which will help my collaborators and I create item data collaboratively, something like a d... |
i need to import model from two separate files.
I have
dog.mesh
pet.material
dog.mesh contains vertices (converted to GeometryContent) and string "pet.material" (reference to .material file)
My MeshImporter that handles .mesh files returns NodeContent (one of children should be MaterialEffectContent)
Problem is, that... |
I've checked intelisence and googled for it but it seems there is no 3x3 matrix in xna. I'm just wondering should I just write a matrix class for xna to work freely with matrix class?
by the way I'm trying to multiply vector3 into 3x3 matrix to have both rotation and translation in one matrix class.
|
Let's say you have an n-by-m grid. Some squares are occupied, some are not.
You want to know where in the grid you can fit arbitrary shapes such as to not hit an occupied square. The shapes would variable, and could be x-by-y rectangles, trapezoidal-ish shapes, etc.
Are there algorithmic approaches to this?
|
Just started and after pondering with registered users' table everything came to a halt.
So far I've got:
+----------------------+
| tblUsers |
+----------------------+
| userID(primaryKey) |
| username |
| password * |
| accountStatus ** |
+----------------------+
* hashed
** 0... |
I've recently purchased the Orange book( GLSL ) and am wondering if it is important at all to read through the red and blue books as well?
Any thoughts?
|
I'm working on my first XNA 2D game (overhead view), and I'm pondering how to manage the difference in position on screen vs. the position of a sprite on a global map.
The solution I'm currently thinking about is having the map keep track of everything on it, the player, other sprites, etc. The sprites will know where ... |
I have a tile based game that is in a semi-isometric view created by a transformation. The tiles are created by a Texture2d rendered on a 3d surface.
I am using the following code for transformation:
View = Matrix.CreateLookAt(new Vector3(0, -1.1f, 1.6f), new Vector3(0, 0, 0), new Vector3(0, 53, 0));
Projection = Matri... |
These lines work (compile fine):
float4 offset = HeightMap.Sample(HeightSampler, input.Texcoord);
input.Position.xyzw += float4(0, 1, 0, 0);
These do not (any use of offset together with input/output Position causes the error):
float4 offset = HeightMap.Sample(HeightSampler, input.Texcoord);
input.Position.xyzw += off... |
What game engine/graphics engine should I use for my first indie game?
I'd like to add that this is not my first game, I've previously used Allegro for 2d development (pong, chess and stuff).
I am open to suggestions for other engines.
I was thinking about a game like "The legend of Zelda" for the NES (just to give yo... |
I created a FpsCounter DrawableGameComponent (linked to code, it's longish). It works great: It displays 60.0 fps normally. If I artificially slow down the game loop, it drops.
My 'game' at the moment is a single keyboard-controlled sprite, so it should be possible to render more frequently than 60 frames a second.
I f... |
I have a tile based engine and in the middle of translating out the example wall avoidance alogrithm in the book AI programming by example. I was wondering if the method below can be modified so that it takes a rectangle instead of vector C and D and still produce the same output ?
/-------------------- LineIntersecti... |
I'm looking at creating a tower-defence-style game on Android, developed in Java. I'm spending a lot of time trying to just get a background image (drawn onto a canvas) that pans/zooms within the bounds of the screen etc. that I will eventually draw my game onto.
It seems to be a lot of work just to get theses basics w... |
I have tiled map 100*75 and tiles are 32*32 pixel.I want to use batching for performance .I don't figure it out , because of my game needs scrolling and every frame i draw 22*16 tiles (my screen is 20*16 tile) .I thought that batching tiles for every frame .Is it good or any suggestion?
edit :to more clarify
I want to... |
Seeing as today's machines have insane computing power and near endless memory, it's tough for a hobbyist programmer to actually hit the limits of his machine without doing something totally boneheaded. This raises a question: Is there a machine (be it a computer or a console) from the past that would be a good learnin... |
Possible Duplicate:
XNA Tile from Screen Location
I have a tile based game that is in a semi-isometric view created by a transformation. The tiles are created by a Texture2d rendered on a 3d surface.
My map Image: http://balancedcms.com/Capture.PNG
I am using the following code for my transformation:
View = Matrix.C... |
I'm an iPhone app developer. I want to get into iOS gaming. The question is-should I start with learning 2D like Cocos 2D or Corona SDK before learning 3D gaming like Unity? I'm more interested in 3D gaming, but do you think that knowing 2D gaming is a prerequisite to learning 3D development?
|
I'm currently trying to make a fairly simple game in JavaScript and it isn't going too well.
Before I started, I thought I'd only need to know three things (on top of what I already know) which were:
How to 'spawn' an object (i.e. a bullet) by pressing an on-screen button.
How to make that bullet move across the scree... |
I'm reading up on 3D game development for the iPhone. I'm looking into programs like Unity for 3D development. My question is are these the best ways to go for 3D development for the iPhone-Unity or say Shiva? Is it common to use other 3D programs like Maya? What would be the disadvantages of using Maya or 3DsMax-or is... |
Say i had a Monster class
public class Monster {
}
Now this class has a set of properties like
int health
int speed
int weaponDamage
which details the core information about the monster.
in addition it also needs gui information stored in the model. probably something like this:
int positionX;
int positionY;
int po... |
This is the complete code I am currently using for my camera. It is incomplete and only partially understood by me (I am working off an example), but I have managed to hack some functionality with some brute force, only to realize I went about it all wrong.
using System;
using System.Collections.Generic;
using System.... |
In order to get components to be able to update every frame (and leave this functionality out of components that don't need to) I got the idea to make an UpdateComponent component. Other components like MovableComponent (which holds velocity) would inherit from the IUpdatable abstract class. This forces MovableCompon... |
For example, your game has 100 enemies (on different teams) running around and their AI wants to inspect the nearby entities to see which it should attack. What is a fast way to organize those entities so that each enemy does not have to calculate the distance between itself and all other entities?
In short, what is a... |
The game I'm working on currently has a Client in Flash AS3, and a Server in C# (multithreaded).
Currently I use mySQL to handle logins (Raw access: no middleman for accessing the database) which seems to be extremely quick.
My question is would using a mySQL database be quick enough for a fairly simple real time game?... |
So If you set it to like
abcdefg
it will come out like
bcdefg
Here's changing the message
Here's the result
Here's the code
//Set Welcome msg
else if (Type == 6)
{
if (Character.Network.Stall.isOpened) return;
short length = Reader.Int16();
Character.Network.Stall.WelcomeMsg = Reader.Text3();
Cha... |
I'm trying to build a very simple rhythm game (as a one-off art installation, not a commercial project) demonstrating a novel controller, but I've got an extremely short timeframe to do it in. Are there any open-source rhythm games or frameworks out there that I could use instead of writing such a game from scratch?
I ... |
There's a heck of a lot of free games available out there, some of which are as good as games that you have to pay for. My question is, what makes the difference between a game that people will be willing to pay for, and one which is best left as a free to download/play online game subsidised with advertising?
|
I saw this checkers game and I wondered how the A.I. was implemented.
How should I implement an A.I. for checkers (draughts, dama, dame)? Are there any known algorithms?
Very thnaks full to all. I m very wonder to see this Tic Tac Toe game tutorial blog post.
So, i want dama game algorithm open source code and blog po... |
I'm writing a game which uses obj files. I created an object in blender and I applied texture without UV coordinates and my question is: how to export this object to obj file, but with texture coordinates?
|
There's this game, that I've been wanting to make for quite some time. It's a project that I've started and had to abandon in the middle a couple of times. However, this time I'm determined to finish it. I want to make a RPG (tile based) game, I'm okay with having it be 2D but am considering something in the middle of ... |
For the independent game studio Mode 7 it took 4 years and 3 developers plus contractors. Do you think it could have been done faster (according that you have played it) ?
What would it take to just make a clone of that game ? for another indie that is, not for a big studio.
|
So I'm creating a game and I would like to know how to perform resource streaming (rather than loading the whole file into the buffer) for things such as my maps, sounds, music, etc. I'm using C++ and DirectX9 if in case you need to know.
|
I have a successful puzzle game and I'm thinking about doing a new version and bringing that new version to FB, and selling it using FB credits. Does anyone have ideas on what the FB credits price point should be? I have some idea, and obviously I know what some of the virtual goods price points are, but I'm curious wh... |
Here John Carmack claims that PCs are still slower that current gen console hardware because of the overhead.
"A lot of it's driver overhead issues, where there's so much that we
do in the game, all of this dynamic texture updating where on the
console we say 'alright, we've got a new page of data', we put that
... |
Is there a language similar to Arduino language (c++ language with fewer functions) for software visualization?
|
I'm creating a platformer and have implemented per-pixel collision detection. However, this has caused 2 obstacles that I've yet to figure out. The first obstacle, which this question is about, is that I don't know how to efficiently find the point of impact (my other problem will probably be a different question on th... |
I tried using the methods on lazyfoo's site for frame rate independence. One problem I'm having though is that my game is running at different speeds on different computers. The differences are drastic. For example, on a Core 2 Duo 2.4 ghz 2gb ram PC, the ball will move extremely fast, but the paddle moves slowly. On a... |
Look at this sprite sheet.
It is clear that frame 1-3 are the "jump up" frames after which the last frame will be fixed until the "peak" of the jump (when gravity starts pulling back). When moving back down frame 4-7 are used and it all ends with an "idle" frame (which is not shown here in this jump sprite).
My questi... |
I have an attack class that has the basics like damage and cost and works in the game. Originally I slapped it together to the the ai targeting algorithm so you choose your attack and you see the enemy take damage.
The problem is now I want to animate the attacks I find they don't conform to a single pattern like the ... |
I asked this question on stackoverflow but assumed this might be a better area to ask it as well for a more informed answer.
My problem is that I am trying to create a camera class and have it so that my camera follows the proper RHS, however the Y axis seems to be inverted since on the screen the 0 starts at the top.
... |
I'm developing a map kind of simple game using slick 2D library, and I want to get the current location of the user. When the user runs into a special location (ex: hole) to indicate that is dangerous. How can I achieve this? I'm a new comer to games.
|
@Override
public void mouseMoved(int oldx, int oldy, int newx, int newy) {
super.mouseMoved(oldx, oldy, newx, newy);
}
we can get the mouse location in this method via newx, newy . i want to know is there any such way to get the location in slick2D? when we press the arrow keys and move a image of a man on the game... |
First of all, I am a beginner developer so please don't get me wrong. I just want to know what programs do high end games use. By high end I mean games that me and you would buy, say Splinter Cell, Starcraft, WoW, GTA and the list goes on. Do they use Visual Studio? Unity? I have no idea :P
PS: Sorry for the tags, not ... |
Let's say I have a background and a set of entities.
I have managed to draw the background into a Texture2D using a RenderTarget
I have also managed to draw all my entities into another RenderTarget
Now I want to take these two Textures and render them on the screen as so:
// Top-level rendering
entitiesSystem.Process(... |
There's breaking news about Zynga being sued over some very obvious implementations. This is making me think that the game industry is full of landmines to be stepped on at every turn. What input does everyone have to minimize the damage?
Latest:
http://www.gamasutra.com/view/news/36657/Zynga_Sued_Over_Prize_Redemption... |
I've been reading about Entity Component design and thought it's pretty neat.
I've been trying to write a quick 2D engine in XNA.
I think I've laid the proper groundwork for registering and updating entities, since I've created some "PositionComponents" that seem to work with my Camera Entity (an Entity that simply own... |
I'm using the "Zig-Zag" approach to drawing my isometric map (as seen here https://stackoverflow.com/questions/892811/drawing-isometric-game-worlds). Now I need to do collision detection on the irregularly shaped map.
All I need to know is how to figure out if point (x, y) is colliding with the zig-zag isometric map.
|
I'm curious about the data structures used when programming older games like Super Mario Brothers for NES and Super Mario World for SNES. My understanding is that games of this period were written in assembly. Did the programmers define/use any data structures?
For example: when a group of coins appears on the screen... |
Completely read Head First C#.
Should I read something else or get personal with XNA from here on? Got links?
Edit: Hobby. Interested in 2D and 2.5D gamedev for personal fun, nothing serious. Multiplayer(in 2D/2.5D games) is also a very interesting topic for me. Basically not sure where to go now from here.
|
When I first created my code, there were quite a few cases where I would get horizontal and vertical gaps between tiles when displayed. I put this down to rounding issues with floats and just moved on to other things. Now that I've revisited the issue, I can't seem to get it working properly, even after trying my harde... |
I've ported my engine to iOS and have been using the C++ version of Box2D. Everything runs fine except on collisions, it seems Box2D and Farseer handle collisions somewhat differently.
Anyone know what these differences are exactly and if I can disable the difference and make them mimic one another?
Initial behaviours ... |
Disclaimer: I am a professional games programmer, and use quaternions most days but they are close to black magic to me. I am relatively at home with math but imaginary numbers always confused me. I tend to treat quats as useful and end up reversing multiplications more than once. I try to reason about them like I woul... |
I'm creating an XNA game that requires a huge space for players. Currently, the test heightmap I'm using is 4096x4096, and is saved as a 4-bit BMP.
What I'm trying to do is take that huge heightmap file and render it in the game. The problem I'm running into is the fact that it's inefficient to load the entire terrain ... |
What is the most common way of handling mouse clicks in games?
Given that all you have in way of detecting input from the mouse is whether a button is up or down.
I currently just rely on the mouse down being a click, but this simple approach limits me greatly in what I want to achieve. For example I have some code th... |
I am working on a game that uses simple 2d vector graphics. I want a tool that will let me visually draw things like arbitrary polygons by placing points.
A perfect tool would present a grid that I could scale larger or smaller (ie: the window is 10 units across or the window is 20 units across). It would let me draw a... |
I am creating my own game engine just for fun and brain development. I have chosen various free and open-source libraries to integrate and now I have come to the engine architecture.
I intend to use server-client architecture and I prefer to be more "data-driven" so I can organize my game state in MySQL database. I rec... |
i'm going to describe what need to be done... "there are circular areas marked in a map, large areas a person can easily move in to them and out of them" what i'm trying to do is deciding weather the person is moving in to or moving out of that circular area. i can get the user location and see weather it falls inside ... |
If this is not the right place for this question, could you please direct me to a more suitable site/forum?
I'm a beginner in game development (and in the use of this site). I've worked with C++ only for rather small scientific simulations, so I can "code" but I've never done a full-blown design of an OO program, much ... |
In Minecraft when you look at water the deeper you view the darker it gets. Does anyone know how to code something like that?
Minecraft with effect
similar game without effect
|
I have a enemy in my game that is supposed to chase the player around the world and I thought it be a good idea for the enemy not to pass through the walls like a ghost, the levels are tile based, I've initially gone with the wall avoidance since a tile is essentially four lines, but I'm beginning second guessing the i... |
I'm not quite sure what I need to do, but I have a ball falling from the sky and it needs to bounce when it hits an object. Do I configure the ball in some way or do I need to setup a spring object or possibly do something on collision?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.