instruction
stringlengths
33
29.4k
Can you give me hint to any good sky box example in OpenGL ES 2.0? I have found only OpenGL and does not work for me. I am doing it this way: Initialization: glUseProgram(m_programSkyBox.Program); glGenBuffers(1, &skyBoxVertexBuffer); glBindBuffer(GL_ARRAY_BUFFER, skyBoxVertexBuffer); float vertices[24] = { -1....
This question might seem a bit vague but it is hard to formulate properly. I will try as best as I can. So here goes... For many years I have been trying to create games but I haven't managed to finish even a single one. The main reason, among others, was that the game creation process lacked focus. There never was a c...
I'm building a 3D tic-tac-toe game and this is what I've implemented so far: 3D renderer with texture mapping Playing against the computer Playing online (multiplayer) Now I'm a little lost what I could add. Obviously, tic-tac-toe isn't that exciting or advanced, but I just miss something to salt it a little bit. The...
Myself and two colleagues are working on making our first indie game for PC and, we decided to use Cocos2D + PyBox2D. We decided this based on what we've seen of Cocos2D-iPhone games, but I'm not sure if Cocos2D-iPhone is just a port of the Python version with a few more features, or if it's far more advanced than the...
i'm doing a simple game/application with some minimal 2d graphics: png textures and ploygons with standard glVertex calls my setting: glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0, w, 0, h); glMatrixMode(GL_MODELVIEW); glEnable(GL_TEXTURE_2D); glEnable(GL_BLEND); glBlendFunc( GL_ONE_MINUS_SRC_ALPHA, GL_S...
I'm not asking for code or anything, just some advice on what to google, because I have no idea what to call this process. I made a video player (with full controls) with python and DirectX and would like to just simply import the rendering of the display into a c++ DirectX fullscreen app. That way, it can be customiza...
I am using the PictureBox class to create a checkerboard, and it not really working all that well. I've created the loop: PictureBox[,] squares = new PictureBox[10,10]; for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { squares[i, j] = new PictureBox();...
I would like to play around with games that use scripting to see how much easier it makes development. What --simple-- C++ or .NET game may i download and play with using a scripting language. I dont really care which scripting language it is.
I want to import a skinned and animated character model built with bender into an android game. The animations can be: idle, walk, run ...etc I've seen a related question but it's only about importing a static model: https://stackoverflow.com/questions/204363/is-there-a-way-to-import-a-3d-model-into-android But I don't...
Are there any real MMOs where the server engine is based on .Net?
So, the standard way to transform vertices and then pass to the fragment shader in GLSL is something like this: uniform mat4 u_modelview; attribute vec4 a_position; void main() { gl_Position = u_modelview * a_position; } However, I am working in 2D so there is redundancy in the 4x4 matrix. Would it be more effici...
I'd like to make game, where one part is managing planet (building cities, factories, roads, etc.) but I'd like to avoid 3D - only what I want is nice 2d. But if I represent planet's surface as a grid, it will be strange to move near poles (if I go up, I won't appear in the bottom of the map, but in the top - only in ...
I have created a view (derived from UIScrollView) where the cells are drawn and zoom occurs. Everything is drawn with OpenGL ES 1.1. Zoom is specified by adding of a calculated new distance which is passed by fingers (sliding apart or moving together), which is multiplied by a constant coefficient: fNewZoom += fDistanc...
I am writing a game for android. We have an orthographic view setup, but the characters (ships, projectiles, etc). The enemies / characters will be able to rotate about the x axis. The problem is that I want to do the collision detection as if it were in 2d using sprites, meaning that if i have a ship with a top down v...
The moon is drawn with two draw calls, but both draw wrong on the xbox so I'm just displaying one draw for simplicity. This is how the moon should look on the PC: How it looks on the XBOX: The texture flickers, disappears, looks like a gradient from bottom to top, lines run through it, and so on as the camera moves ...
How different is Programmer Analyst from Game Programmer? I took the first one as my major but want to go with game development industry. Is it possible to transition from one to another? EDIT: There is a single class about game development in this major
I have heard of many plugins/browser technologies that are useful for games, but I didn't dive into any of them yet because I've assumed that omni-support wasn't quite there. By omni-support, I mean all browsers and all OSs. Since we've recently had many new game-specific plugins pop up (e.g. Unity), new web standards...
Let's say I am in a battle with four trolls, and I have the highest initiative, so I attack first. Should I randomly choose a troll to attack? Proximity to each troll does not matter (it is not a factor in the algorithm). I remember playing an older RPG (I think one of the Final Fantasy games on N64), and the attacks a...
I basically want my camera in 3D move automatically. Currently, I have linear movement which is rather dumb, so I'd like to do a bouncing movement. However, what is a good equation for bouncing? I mean, for a circle you can do y = sqrt(1 - x^2), but if I were to have a bouncing graph, what would the corresponding formu...
Let's say I have an xml file which looks like this <Weapons> <Weapon> <Name>Pistol</Name> ... </Weapon> <Weapon> <Name>MachineGun</Name> ... </Weapon> </Weapons> Would it be possible to use a custom importer/writer/reader to create two files, Pistol.xnb and MachineGun.xnb which I can load individually with...
I've done a reasonable number of small hobby projects using DirectX 9 but it's time to move to DirectX 11 now. I have Frank Luna'a book on 3D programming using DirectX 10 but nothing on DirectX 11. I believe they are pretty similar, but was wondering if anyone could enumerate the main differences at a code level that I...
I'm currently making a 2D Worm-clone in XNA, and have regrets about the way I've made my camera. I declare my camera in my Main class and the camera follows the player. In my draw I then begin my spritebatch using my camera transformations. The problem is, EVERYTHING needs to be drawn in Main because they need to be dr...
I've been researching this extensively. We have a game that's 90% complete, using custom game logic in iPhone 4.0. We've been asked to import a 3D model and have it animate when various events happen in the game. I've put together an OpenGL view (based on Eagl and several examples), and used Blender to import the mode...
I am curious on how to handle collision detection involving a moving target and user input. Basing myself in the mobile space, I get events from a set framework, but I do wonder about the amount of lag involved. Say the object moves faster and faster, then position of the input and the object is very important. What I ...
After trying to use red5 for my turn-based multiplayer game, I've decided to give AMF a try using amfphp, because of the expensive media server hosting solutions. (With AMF all I need is a web server). The game is a simple turn based game. It uses Box2D for physics. Its similar to pool or billiards. More than two users...
I'm trying to load MD2 models (stolen from Cube) and my loader seems to be loading the models fine, but I can't say the same for the drawing of the model. Here's my code: typedef float vec3_t[3]; struct md2_t { int ident; int version; int skinwidth; int skinheigh; int framesize; int num_skin...
Has anyone tried a free app/game with Apple's iAds with an in-app-purchase to remove the ads? Just wondering if this works. A friend mentioned that some apps do this... is this a common and/or "user-friendly" monetization method? Assume the ads are "tastefully" on the home screen and not in the actual game itself.
I want a company that can store in a database of it's own the stream of clicks each user does (my game is programmed in action script), of course I will define what data and when to store it. Bear in mind that I am talking about a game that will have millons of users a day.
Currently in my project, the way I handle user input events is through the OS Framework, then create a generic object - basically combines all types of input: keyboard, mouse, touch, trackball, etc. all together - this object gets queued and then on update gets processed. The queuing of objects is done on the UI thread...
My favourite game genre is quest/adventure and I am a C++ game programmer and game designer from Europe. I visited a lot of job search & employment websites, but did not find any with a function to search a company by genre preferences. Such prefered genres are defined by company's released titles, current active proje...
Currently I have the follow states: Need To Run Run Need To Walk Walk Need To Fight Fight Am I misunderstanding it and mixig possible actions with states ? I mean, to me Need To Run would either return true of false telling wether I should procced to the Run action or not and same goes for the other needs. While I am ...
We are three people who are going to make a simple game in Java as a school project (University, first year). The game has to be object oriented. We don't have much time, 10-20 hours tops. None of us has any experience in game development, but we all have fair skills in Java. We can choose exactly what kind of game, an...
I've gone over this again and again, and my result is obviously wrong when viewed in-action. Here's the initial formula I converted (first one): http://en.wikipedia.org/wiki/Range_of_a_projectile and here's my C# code: float CalculateMaximumRange() { float g = Physics.gravity.y; float y = origin.position.y; ...
I'm looking for some open source game controls. Especially I'm looking for a thumb screen joystick to move a character on the screen, something like a touch circle. Are there any open source implementation of what I'm looking for?
I am an MPhil student in Computing Science working on the problem of camera control in graphics. Though the literature of camera control dates back to the end of 1980s, the majority of them (up to my knowledge) is mainly academic and rarely used in games. Now part of my thesis should be dedicated to camera control meth...
I'm currently writing a 3D game in C++ with OpenGL and I'm coming to the part where to load 3D models in. Therefore I'm looking for popular file formats and techniques to display static meshs and render animated meshs. I've already found quite a large number of possible formats and techniques, like keyframe animation...
I'm currently working on an online Java game.I am not an experienced game programmer, having only worked with web applications, so far. Currently, I am building the messaging system between the client and the server, and I came across a big "what if". Currently, the messaging system uses a custom solution and Java NIO...
I am working at a small game studio developing games for iOS and Android. We do the full journey here, from idea to finished product and we have funding to do so. However, with the smartphone market being a bit of a lottery for small developers we are looking into getting into a publisher deal. What I am wondering now...
Situation I've got a large map divided into 16*16 parts (comparable to Minecraft) for x and z. For every part a VBO is generated and stored using GL_STATIC_DRAW. Problem The technique described above works fine and with good performance, however it restricts (due to the nature of GL_STATIC_DRAW) modifications that may ...
I'm porting a C++ game to Android using the NDK and there's one bottleneck that's really slowing down the code: gluScaleImage(). Does anyone know of a faster way to scale image textures?
I'm making a story-intensive game (RPG) for the iPhone and want to distribute it over the AppStore. But AppStore Apps have the potential to be distributed internationally, so I need kind of legal advice - maybe someone of the independent developers here was already in a similiar situation. I'm planning to use an book (...
When animating for the Android platform is it a better practice to create a sprite sheet with multiple states for each sprite on a single picture or should I instead export individual images for each character/state/etc.? Which option gives me a smaller file size for resources and which is easier for the programmer to ...
I am working on a RPG using the JMonkey engine. While I was conceptualizing the map, I realized I would have a problem with the terrain. My problem is this: I want to have a click to move interface, and have the player move in increments of 1 world unit (wu). This is actually rather reminiscent of a tile based engine, ...
I'm still at the very early stages of my game design -- nowhere near actually needing the sprites yet -- but a thought occurred to me: What's the best way to approach sprites of different dimensions? In context, my game will use sprites to represent different space ships (long-range plans include a 3D engine with actua...
I currently can rotate around a pivot point by first translating to the pivot point then performing the rotation and finally translating back to the origin. I do that easily enough for the shoulder in my example. However I cannot figure out how to also add in a rotation around the elbow for the forearm. I've tried the ...
I'm trying to print the coordinates of a drawn square upon movement. The problem is that the x value doesn't get refreshed on screen. This is the code I have: #include <allegro.h> BITMAP *buffer; void update_screen(void) { blit(buffer, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H); // blit the buffer to the screen } i...
What I'm wondering is how complete your design documents typically are before beginning the implementation of a project? I'm talking about medium to very small projects with a very small team here where even fully fleshed out the entire document may only be a few dozen pages. Do you start with a rough framework and sta...
I have a theory on AI that I would like to write a "whitepaper" about. The distinction I want to explore in AI is learning vs. strategizing. My question is, where can I read other material about this subject? Let me give a chess example. Let's look at a chess AI as a max-tree, where capturing an enemy unit adds that un...
I want to resize my texture. I am using cubemap to compute reflection. I want to use this cubemap to draw skybox. Skybox is drawn but I want to resize texture down, because it is dilated. As I wrote in my previous question (question), to draw skybox I use shaders: //vertex shader uniform mat4 modelViewMatrix; ...
I'm trying to get a lens texture to rotate around the circumference of the circle and although I picked the centre of the circle as the rotating point of the lens it doesn't work. private float angle; //Initialize Method circlePosition.X = vp.X + vp.Width / 2; circlePosition.Y = vp.Y + vp.Height / 2; lensPosition....
I'm writing a BSP viewer for a university project. So far I have the main geometry loaded properly, and the PVS working. Now I'm trying to apply the lightmaps, but I can't seem to get the texture coordinates for the lightmaps calculated properly. According to here: http://developer.valvesoftware.com/wiki/The_Source_Eng...
I want to try adding shadows to a 3D XNA game. I've set up some testing environment with one light and one camera. However, I'm running into artifacts with my approach. I'm using the shader code from http://pastebin.com/zXi0hmsU to render the final result and http://pastebin.com/rY4Gcj9N to create the shadow maps. The ...
Anyone know any free or non-free RTS engine that can be used for iOS game development?
Am looking for ideas on how to do the following: I want to write a simple "world" in Java. One which I could start and then add new objects later at a later date to simulate/observe different behaviours between existing objects. The plan is then to code up newer objects after watching the old ones for a while and then ...
Do you think it's possible to go straight from Experienced C++ programming (5 or so years) straight into learning DirectX 3d? I mean....i'd be starting with the basics, im more interested in setting up Demos (like getting a good water demo and such) than actually doing a full fledged game. Do you think this is possible...
I have developed a game engine in c/c++ and DirectX. I have a tile engine for the maps, animated player/npc sprites, talking to the npc, menus, and level changing but there is no game, it just feels empty. I have looked around and keep hearing buzzword answers but I want to know how to implement a story in my game. Som...
I know that its just the background that scrolls and the player pretty much stays centered. What I am wondering what technique is more correct when I am implementing a large side scrolling map (I am not using tiles like some other questions I have found). using a very large map 16000 pixels map, and scrolling that. ...
For the background render in my code I need to perform an operation that essentially acts like calling glClear(GL_DEPTH_BUFFER_BIT) except that it needs to use the current stencil buffer to mask out parts of the screen. The other requirement is that it has to work on fixed function pipeline systems, preferably back to ...
I'm new to Unreal Development. In a nutshell, how do I create a button, install it in a basic game, and capture the button click event?
In a game I'm developing for a client a key game concept involves moving around on a map. In this case the sizes and shapes and such of the various countries are irrelevant: moving from one country to an adjacent country counts as a single step. I'm trying to figure out the best data structure for internally representi...
My Google-fu is failing me: is there a site in the same vein as Rent a Coder, but for hiring artists? In particular, I'm looking for a site which fits the following criteria: Allows me to specify the style and scope of the work I'm looking for beforehand Allows artists to "bid" on the project, including time and cost...
I was originally thinking of creating a game with Python and SFML. I understand Python is slow compared to C++, but how is it compared to Game Maker? The main reason I ask is I recently played a Game Maker game (The Iconoclasts) which ran at a fairly bad frame-rate on my computer (GMA 950). I'm worried I would have sim...
It's best-practice to not to create lots of short-lived temporary objects the heap as it'll eventually force a garbage collection during game-play. It is best to create short lived value objects. Where does this leave us with event handlers? My game object fires events quite frequently, so I don't want to create new...
I'm trying to get my head around scrolling a 2D map that uses a physics engine. If I was to launch a projectile, would I actually be applying the physics to the background images rather than the projectile itself? I'd like to keep the projectile at the center of the 'camera', but I'm not sure how to do this in Silverli...
I have to add sound to a game and I found that you can use xact. That's fine, however why not just use Content.Load? Besides the tweaking of the sound, are there any other advantages to using Xact?
I've run into an issue with my Mega Man engine, and the structure of my game loop is making it very difficult to fix. With Rush Jet, or any falling platform, Mega Man needs to stay attached to the platform as it falls. Right now the best I can do (without resorting to workarounds like magic forcefields that pull him do...
I'd like to use a SQL Express file or something similar for a UDK demo. Is there a standard method for accessing data in a local relational database file? I understand that the best method may involve creating a class library and using the DLLBind feature, but I'm still a bit unclear on how to pass data to controls in...
Does game programming use the method of 1) using time as the main controller to let objects interact with each other, so each step, let 1 object send messages to N objects, and the second object to any number of objects, and 3rd, 4th, until all objects done, and that's it, and display the results on screen (or think of...
To test a program for iPhone or iPad, seems like the only way is to join the Apple Developer program and pay $99 per year? Can you also jailbreak the iPhone or iPad and be able to test it?
Does SpriteBatch in XNA draw to the screen only when a sprite would appear on the screen? Say I have 5 identical sprites placed exactly on top of each other, is SpriteBatch able to determine that it only needs to draw one? Also, say I have a large map that I've tiled off the screen in every direction. Does SpriteBa...
I'm working on a basic first person shooter. I would eventually also like to publish it on Xbox Live. If I do this, will I still have access to parties (invite and chat)? Does Microsoft provide servers for multiplayer, or do I have to provide my own? Am I free to connect my own server IP from the Xbox system within ...
I have absolutely no idea about game developing but want to know following things about internet sweepstake games: Click on demo and play any of the game. What technology (programming language) is used to develop these games. e.g. Flash, Silverlight, etc. If I wish to develop such game(s) what is the best technology t...
I've recently started completing games and accumulating "assets" -- graphics, sound effects, textures, 3D models, etc. that I can build on and reuse from game to game. Is there a great, free place I can store an unlimited amount of this content? Ideally, I would like to categorize my content (by game) and tag it (eg. i...
I am trying to draw a simple 3D object generated by Google SketchUp 8 Pro onto my WebGL app, the model is a simple cylinder. I opened the exported file and copied the vertices positions, indices, normals and texture coordinates into a .json file in order to be able to use it on javascript. Everything seems to work fine...
I am looking for a good physics engine to use with an Ogre game I'm writing. I would prefer for it to be free, open source, mature, simple to use, easy to learn, and flexible. I'm currently thinking of using either Newton, Bullet or ODE. What are the general pros/cons of each?
I've been reading Real-Time Collision Detection and for loose octrees it recommends expanding each node's AABB length by a factor of 2, making its expanded volume 8 times as large. I am surprised that it needs to be this large, and there must be quite a lot of overlap and unnecessary child node traversals due to this ...
How do I parse StarCraft 2 replay files (.sc2replay)? Is there an API? I know of Sc2gears, but it doesn't quite fulfil my needs.
From the StackOverflow post (it was recommended I move this): So, I'm working on a game engine, and I've made pretty good progress. However, my engine is single-threaded, and the advantages of splitting updating and rendering into separate threads sounds like a very good idea. How should I do this? Single threaded game...
I know the iPhone App Store limits how large an app can be in general and there are also limitations with AT&T over the size it can be to transmit over a data plan vs WiFi. I have no idea what, if any, these limits are for Android apps and what I'm finding online is a mix of different numbers. Does anyone know these nu...
I'm trying to scroll my background forever and so I'm using the background image twice. When the first one goes off screen, it should relocate to the end of the second one. However, there seems to be a black bar inbetween the two images and so it seems that the image is not being moved into place quick enough. What wou...
I'm creating a text RPG in Java, but I think this applies for a GUI as well with regard to the data structure. Each Level is a tiled map. Each Tile object has an (X,Y) coordinate, and references to adjacent tiles, but my question is with regard to storing object and NPC data on that Tile object. Depending on the size o...
I've been coding 2D games exclusively for a while, partly because I have very limited graphics skills, partly because it takes less effort to make something look great, and partly because I have very limited time in which to code. I have an idea for a very simple 3d kids game that I'd like to build; it would be based ...
As a hobby programmer, how can I incorporate a continuous-improvement-like process like Agile's retrospectives in my processes? I've tried bullet items of three good/bad things at the end of each project, but I feel it's not enough. And I feel that a sprint retrospective is overkill. Where's the balance? How can and sh...
If I use mouse coordinates to select a sprite does XNA provide a built in way to return the top-most sprite on the screen at a coordinate? I am trying to highlight the selected sprite, but when iterating through my sprites at the specific mouse location there can be multiple sprites found. The way my game works any on...
I don't know if I'm doing something wrong or missing anything but I want to simulate sun light, like in a sunny day. When the object is facing the directional light, it's well lit and there's no problems there. If I go around the object and look at it's back, it's dark. It's not too much dark because I'm using GL_AMBIE...
1st Question is I want to write a board game for iOS and Android so I'm coming up with CoronaSDK and AirPlay. Since I have a mac, development platform is not an issue but the problem is which one should I choose. I'm fluent with PHP and web languages and familiar with C but it's a new language for Lua. I know a lot of ...
I am planing to create a 2D RTS game on iPhone using cocos2d, besides the tile map, any other suggestion for storing the map details for the game? Would be nice if a GUI editor is also provided.
Is it a really bad idea to have my Game1 class as static? As at the moment in my Game1 class I have a class called TileHandler which handles everything to do with my current set of tiles, and AnimalHandler which handles all my animals (surprisingly). Now if I am in AnimalHandler and want to check if a tile is walkable ...
I have set up all the config files to my game classes and am able to launch the game to test everything. Although when I package the game, it still runs the UT deathmatch game? What other lines in the config files should be changed to make it default to my game and default map once published/packaged?
I have done tiled maps and tile sets quite often, but in a rather simplified way. My tile sets were linear images of the size (tile_width * num_tiles) * tile_height, so I could find an index easily by using val src_pos = (index * tile_width, 0). But in reality, I've come to notice, tile sets are actually fully sized im...
I have set up all the config files to my game classes and am able to launch the game to test everything. Although when I package the game, it still runs the UT deathmatch game?? What other lines in the config files should be changed to make it default to my game and default map once published?
Achievements are everywhere now — Xbox Live, iOS Game Center, many individual games, and even in social communities with gaming elements like Stack Overflow. A common user request of Stack Overflow is to show progress toward badges. This has been denied by SO, as seen in this uservoice request, where Jeff Atwood made t...
Disclaimer: It may be that I'm already doing all the "right" things, but just don't have enough traffic for it to pay off with people giving feedback. My question is: how do you attract early and quality feedback into games, from end-users? Ideally, I'm looking at a model where the seed of an idea comes from you (or fr...
My screen resolution is 640x480 and I have two Vector2 objects located at (10,10) and (600, 320). How can I connect these two objects and extend the line to encompass the whole screens width, how can I get the Y for the intersection at the center of the width (320)?
If I'm doing a turn-based card game, what kind of technique do you use to support multiplayer gameplay over Internet? Is it socket? If it's socket, which SDK (CoronaSDK etc.) can provide solid socket library? Can Unity3D can be used solely to support what I need without using other socket servers like SmartFox or Elec...
Are there good resources ( manuals, tutorials, etc ) to start studying the code of the Quake 3 engine beyond the code itself? I'm very interested in know how it's structured for educational purposes and maybe to do some modifications.
I'm trying to reproduce several sounds in a game I'm developing in AS3. The game is like a TD game, and when I got 10+ of the same tower firing at the same time, I hear a horrible: "PRRRRRRRRRRRRRRRRRRRRRR"... How should I manage this problem? How do PC games (specially RTS ones) manage this in order to hear something...
I've written a fair number of games that have RPG-like "levelling up," where the player gains experience for killing monsters/enemies, and eventually, reaches a new level, where their stats increase. How do you find a balance between player growth, monster strength, and difficulty? The extreme ends of this spectrum are...
I am able to play a video in windows in my project, but the same code fails on the XBOX at the _player.Play(_logo) line. The error message is: "An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Xna.Framework.dll" Relevant code: public LogoScreen() { TransitionOnTime...
I'm trying to creating a field of view for the camera I'm making for a game. It rotates around a circle for 180 degrees while the head moves accordingly. I'm going to bound the field of view within an isosceles triangle using the method described on this website. The problem I'm having is that I don't know how I'm goin...