game-development

hardware buffering using SDL, question about how it works

I'm deciding to do my first game, its going to be simple but I want to use c++ and I chose SDL for my learning. So my question is about how the "buffers" are handled when writing code. I'll post my related code at the bottom. Ok, so basically the way I understand it is that SDL takes care of which buffer is actually being drawn to the s...

image subdirectory in c++

Basically, I was hoping to sort of keep my files sorted instead of having them all in the same folder as my executable, but referencing files in sub folders relative to my executable has proven difficult. // DEFINES #define IMAGE_BACKGROUND "\\content\\images\\background.bmp" #define FONT_MAIN "\\content\\fonts\\sai.ttf" The above cod...

Drawing an image in this method?

private void pictureBox1_MouseDown(object sender, MouseEventArgs e) { NumberOfBets++; if ((e.X >= 40 && e.X <= 125) && (e.Y >= 0 && e.Y <= 26)) { bettingStatus[0]++; for (int x; x < 10; x++) { Graphics graphic = (???) } } I'm trying...

Basic Game Archecture Question

Hey Folks, I'm building a simple 2d game,and I'm wondering if some better coders than I can suggest a good way to design its basic architecture. The game is pretty simple. There are many types of units on the screen which shoot, move, and perform hit detection. The screen zooms in and out, and there is a menu UI bar on the side of the s...

Game framework architecture - view components or MVC?

I'm trying to build a very light re-usable framework for my games, rather than starting from scratch each time I start a game. I have a component driven architecture - e.g. Entity composes a Position component and a Health component and Ai component etc. My big question is whether my model composes view components to allow for more tha...

Guides on 3D Programming Concepts?

I'm trying to move my game development into the third dimension, but I'm having a bit of troubles understanding what I actually have to do. I've created a 2D MMORPG before using C and SDL, which wasn't too hard. But I can't seem to find any useful resources explaining how 3D programming actually works. I have a basic understanding of the...

How to generate a random number in C?

Is there a function or will I have to use a third party library? ...

Who is a good host for a realtime TCP/IP game server?

I a trying to set up a real time game server that runs a game I am writing as a C# .NET 3.5 service. The game is similar to classic pong so I need to send real time feedback to both clients through a persistent socket connect to the server. This is an example of how it is coded. http://www.codeproject.com/kb/IP/socketsByBobJanova.aspx ...

Handling combat effects in game development

I'm trying to nut out a highlevel tech spec for a game I'm tinkering with as a personal project. It's a turn based adventure game that's probably closest to Archon in terms of what I'm trying to do. What I'm having trouble with is conceptualising the best way to develop a combat system that I can implement simply at first, but that wil...

C++ for Game Programming - Love or Distrust?

In the name of efficiency in game programming, some programmers do not trust several C++ features. One of my friends claims to understand how game industry works, and would come up with the following remarks: Do not use smart pointers. Nobody in games does. Exceptions should not be (and is usually not) used in game programming for memo...

What is Vertex and Pixel shaders?

What is Vertex and Pixel shaders? What is the difference between them? Which one is the best? Thanks! ...

Modern C++ Game Programming Examples

To what extent are modern C++ features like: polymorphism, STL, exception safety/handling, templates with policy-based class design, smart pointers new/delete, placement new/delete used in game studios? I would be interested to know the names of libraries and the C++ features they use. For example, Orge3D uses all modern C++ feat...

Embedding Flash in 3D-rendering binary

I want to embed Flash (2D GUI) in my 3D game C++ application, and it must be portable. Rendering Flash is not enough, I need user action callbacks. I found Hikari for Ogre3D, but I guess the technique it's based on only works on Windows? (It uses OLE.) Further, from what I've heard (unverified) CryEngine uses Flash. Almost forgot the o...

Game network physics collision

How to simulating two client-controlled vehicles colliding (sensibly) in a typical client/server setup for a network game? I did read this eminent blog post on how to do distributed network physics in general (without traditional client prediction), but this question is specifically on how to handle collisions of owned objects. Example ...

Looking for a good AI book that uses examples in C++

Hello all. I've searched over the posts I could find on "What's the best AI book" and I found all the responses I expected to see, but I did not find what I was looking for. I'm interested in a book that I can use in a teaching environment that explains AI topics such as Neural Networks, Genetic Algorithms, Decision Tree learning, Indu...

How can you prevent bogus high scores from appearing on a global high score list?

Suppose you are designing a PC game that keeps track of high scores. In addition to keeping local scores, a global high score server is set up that is accessed by the game over the internet. Players should be able to submit their high scores to the global high score list right after they have completed a game, or later, from their local ...

Implementing Terrain destruction like Scorched Earth Game on iphone or Java

I'm looking for an example of how to implement 2D terrain destruction that you see in games like scorched earth or on the iphone iShoot. I'm looking to implement a game that needs to do destructible terrain and render it using OpenGL (LWJGL in Java) and using OpenGL ES on the iPhone. ...

How do games handle saved content?

I don't see an answer to this question here on SO which makes me afraid that it's incredibly simple and I'm just missing something but here goes. Background, feel free to skip: I need a single course for my bachelor's degree that I skipped out on years ago. Theoretically it's Computer Graphics, but since I left it has become more Game...

Making a game trainer in C++?

Ok so i've messed with games before, but now i would like to make a trainer only problem is that there memory adresses changes every time i play it on a different computer or restart the game. Now i need to find a pointer but have no idea how. So how do i find the pointer to the adress for ammo for any weapon with a memory scanner like ...

Porting to which gaming platforms?

I'm developing a pretty portable indie game engine and also a "demo" game to go with that. In the future I would however like to make a more comprehensive game to deploy on some different platforms. The details on the future game is less important, I'm more into the "how" than the "what" -- genre and content is irrelevant to me. So what...