Game Programming

Game programming is the software development of video games. Game programming requires substantial skill in software engineering as well as specialization in simulation, computer graphics, artificial intelligence, physics, audio programming, and input. Like other software, game development programs are generated from source code to the actual program by a compiler. Source code can be developed with almost any text editor, but most professional game programmers use a full integrated development environment (IDE).

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi all,

As a basic scenario of my problem:

Say I have a circle on a 400px by 400px form. The centre of the circle is at 200x and 200y, the circle has a diameter of 100px. (Though the diameter and centre positions are variable)

I will have dots randomly moving around the form these will be stored in an array as X,Y coordinates. I need to iterate through the array and determine if any given X,Y coord' is within the circumference of my circle. I then need to know the distance of a given X,Y coord from the circles centre position.

I lack the mathematical skill to think how best to go about this. Whatever the solution it needs to be quick as the X,Y dot coords' are constantly moving. I know there's plenty of resources on the internet, I've probably read them, math isn't a strong point of mine.

Thank you in advance for any help,

Craig

FYI: The actual program is to simulate a mobile (cell phone) network and consists of multiple circles acting as masts the dots being mobile phones. I just need to determine when the mobiles are within range of a mast so a solution to the above simple scenario should put me on the right track.

0
Hi,

I'm trying to find out the process of calculating a projectiles trajectory in 3d space (i specifically just need the parabola - the path traveled so that i can draw it). To give a scenario, I have a canon at coordinate A (240,0,120) and a point i'd like to hit at B (100,0,50). Assuming there is no wind resistance, gravity is a value of .3, and the canon is aimed vertically at 45 degrees, how can i calculate the proper velocity that the cannonball is shot, and the rotation of the canon base so that it is aimed directly at coordinate B, so that it hits the target. The variables I know are:

x1 = 240
y1 = 0
z1 = 120
x2 = 100
y2 = 0
z2 = 50
gravity = .3
angle (vertical the cannon will initially shoot at) = 45 degrees

So how do i get the velocity and rotation knowing these values?

I've attached an snippet of code that i'm working with to create arcs (in processing/java).  when i start drawing this arc, i translate to the first coordinate first, then start making the arc.  i would like to know how to pass it the right "rot" (rotation) and "vel" "velocity, in order to hit another target

Thanks.


[code]/*
my variables that i know currently, and am sending the arc constructor (the arc is translated before the arc object is drawn):
*/

PVector g = new PVector(0,.3);
int points = 4;
float ratio = 200;


Arc arc = new Arc(points, ratio, ?, ?, g);
pushMatrix();
translate(250,0,40); //coordinate A
arc.draw();
popMatrix();


class Arc {
  [/code]…
0
hi there
I asked similar question but no joy.
could you recommend to me how can I create GUI for openGL application like
attached picture?
I am using Netbeas on ubuntu as a ide.

regards.
0
i need the recursive php function to form an dynamic multidimensional array to list the files and subfolder from the root directory in below format.
in the below example here docs.zip as parent of doc2.txt file and inner dir,inner.txt as parent dir of child.txt ....etc likewise it continues the n no.of childs  and parent nodes.Kindly look into the screen short.. Kindly guide me to resolve this.....

      $tree->name = 'root';
      $tree->member[0]->name = 'doc1.txt';
      $tree->member[1]->name = 'text.txt';
      $tree->member[2]->name = 'docs.zip';
      $tree->member[2]->member[0]->name = 'doc2.txt';
      $tree->member[2]->member[1]->name = 'inner.txt';
      $tree->member[2]->member[1]->member[0]->name = 'child.txt';
      $tree->member[2]->member[1]->member[0]->member[0]->name = 'child.txt';
      
      $store->label = 'name';
      $store->items[0] = $tree;

echo "<pre>";
print_r($store);

Output:
Printed Array structure:

stdClass Object
(
    [label] => name
    [items] => Array
        (
            [0] => stdClass Object
                (
                    [name] => root
                    [member] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [name] => doc1.txt
                                )

                            [1] => stdClass Object
                                (
                                    [name] => text.txt
                          …
0
We are developing a touch screen beauty-salon software. The suggested platform is to use Delphi and .net. I am not in programming so I have no idea what this is.

Our vision of the end product is something like a restaurant (food ordering) software but more lively, like the iPhone interface.

Can someone suggest the best language to use in this case? Anyone interested in taking some freelance jobs?

Thanks.
0
Hi all,

I am looking for some software (Freeware if possible) where I can add textures to different part of some 3d models. (.3ds format).

Hope you can help

thx
0
I have 10 space ship in Autodesk 3ds Max.  When I export them in DirectX, they are all fine except 1.
he appear WHITE.

I made a screenshot as I don't want to publiquely give the .X file

what did I did wrong in 3ds on this only ship ?  all others are fine.
[embed=doc 229281]
0
I am trying to make a two player game.
How would I think about the way the players change after each move?
0
Hi,
Briefly I want to do what matlab do. Or what echolizers do using delphi
Is it possible to convert .wav files to graphic like I summirized in the header of this message...
Thank you

0
how do i publish a vb.net 2005 application
0
Experts,

     I am trying to set up opengl so that I can start to manipulate 2 & 3 D programs. I'm not sure where to start? I think I need to download Opengl SDK but cannot find a copy of this. I am running WinXP and opengl is not included on my PC. How do I get started using Opengl and opening a Simple C (3D app)? I have installed eclipse as my IDE.

Thanks, MissyMadi
0
I just installed a Nvidia GForce 9400 card and now I am getting a NOT OPTIMUM MODE Recommended Mode:  1280x1024 60Hz.  I can't seem to boot into safe mode and need suggestions on how to correct the problem.

Thank you,
0
Hi Experts,

I am an expert in web development (ASP.NET). We are planning on doing some web games, but we don't know what is the best programming technology that we can use for that?

I need your opinions, experts, on that.

Thanks.
0
I am Implementing the paintComponent method where I use the Graphics drawString method but the Strings are upside down.

I am also using

g2d.translate(0, getHeight());
g2d.scale(scaleX, -scaleY);

so that the origin is the lower left corner instead of the upper left corner.  This is because I want to add zooming both in and out by changing the magnitude of the numbers in the scale method call.  How can I do this and make my drawString draw the Strings right side up?

Thanks
0
What is the best way of designing a flicker free ticker tape with VB.Net?

So far I tried as follows:
- Changing X location of the label control in a separate thread
- Some anti-alias techniques for the controls
- DirectX DrawText and bitblt methods

but the text still flickers.

Any recommendation and/or source code will be appreciated.
0
Hello!

I am desparately searching for a way to make a graphic (may be a bitmap, PNG, or some other kind of graphics created with tool of choice, like Paint.NET) easily transparent. I did not have any programming experience with Windows or graphic programming (like games) before. So, it is more difficult to find a solution. I read about GDI in http://www.codeproject.com/KB/graphics/gditutorial.aspx?msg=3268035 where it is shown how complicated it is, compared to a switch "make transparent" I am dreaming of... :-)

Today, some colleague told me that using PNG files, it is possible to make it transparent by setting the a parameter of the RGBQUAD to the "transparent" value (= 255). I am not sure how this can work, as I use the Graphics class and the Image class for the representation of the picture to be made transparent.

Does anybody has experience with this? Can you even show me an easy way to make it transparent, like changing in the ColorPalette a color to "transparent"? Paint.NET shows that the white background is already selected as the transparent color (RGB = 0xffffff).

Thank you for the information!
0
Hi guys I would like someone to help me put all this together.
It.s supposed to be a text based chess game capable of AI. I am stuck here because it is returning null when the     pieces.isValid(Baseboard[curY][curY].toString(), desY);    is called
Feel free to change anything. If their is any possibility of getting this up to speed I will appreciate it.


[embed=doc 226533]
[embed=doc 226534]
[embed=doc 226535]
0
Hello!
 
I am in trouble, as I have to make a bitmap image transparent in a GDI+ project. I confess that this is my first GDI+ project. I had never programmed any Windows applications before, an no other application for a game. Although the application I have to implement is not a game but a medical software, technically it is a simple 2D GDI+ game.

GENERAL:
The software has a core written in Microsoft Visual Basic, on which I do not have access. This core program enlists all the subprograms that can be started. The core part calls for each subprogramm DLLs that are all written in C++. All the windows are full-screen and have no border (with the standard minimize, maximaze & close buttons). The windows of the subprograms do appear on the task bar on the bottom of the screen, when you use Alt + Tab & select a running "normal" windows program or when you click on the "Start" button, like all other Windows applications. But when you click on these symbols, no window will appear. So, it seems to be an abnormal window... This may be the cause for my current problem.

----
Currently, I am working for a client of my company. As I am not experienced in this GDI subject, I am adapting an existing GDI project to the new functional specification.
 
Up to now, I have a background bitmap, where I place several ship bitmaps. But as the ship bitmaps are not transparent, the slightly changing water color of the background is not equal to the water color of the ship rectangle. So, …
0
We are currently using Java 2D API's to draw rectangles, strings and ovals through implementation of a class where we implement it's paintComponent method.  These rectangles represent Tanks in a battle scene where a user can specify the angle (heading or direction of the tank) and the position in the x,y coordinates of each tank in the scene.  Right now the view is above the scene looking down like an observer above along the z-axis.

We are thinking about doing a 3D Scene where the observer's position can change in relation to the scene in  other words I guess he would be able to rotate the scene in different directions using the mouse.  What would be the best and or easiest way to do this?

Thanks
0
[root@eqws-069 plug-ins]# g++ whatisCmd.cpp -p whatisCmd.o -I /usr/autodesk/maya/include
g++: whatisCmd.o: No such file or directory
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/iostream.h:31,
                 from /usr/autodesk/maya/include/maya/MIOStream.h:73,
                 from whatisCmd.cpp:47:
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
/usr/autodesk/maya/include/maya/MTypes.h:233: error: redeclaration of C++ built-in type ‘bool’
/usr/autodesk/maya/include/maya/MTypes.h:237: error: expected identifier before ‘false’
/usr/autodesk/maya/include/maya/MTypes.h:237: error: expected `}' before ‘false’
/usr/autodesk/maya/include/maya/MTypes.h:237: error: expected unqualified-id before ‘false’
/usr/autodesk/maya/include/maya/MTypes.h:237: error: expected declaration before ‘}’ token
0
I read in Dr Dobbs that there's an emulator for CUDA development, but I've had no luck actually finding it. I'm hoping someone might have better luck than me...

Thanks!
0
hi there,

is there any way to build polygonal models using C# out of vertex coordinate informations? are there any examples?

ex:

1) I get coplanar coordinates of vertices from a separate program
2) a line should be created joining the vertices into a single line
3) that line should be extruded in 3rd D using a constant

hope I was clear enough, if not, let me know...

thanks in advance
0
I searched several  2D/3D game engines for iphone. I did not has experience of OpenGL.

Which one is good for network (multi-players through internet), multi touch and spin game motion?

Which game engines are good and have good support?

 
0
I recently reformatted my inspiron e1405.

I reinstalled windows XP and installed updates from Microsoft.

It currently reads as Windows XP Home Edition Service Pack 3.

I installed “Rome: Total War”.

When I tried to play “Rome Total War” I got the following error message:

“Rome Total War failed to find DirectX 9, which is required for the game to run
Please reinstall DirectX ”

I bring up the Rome: Total War launch screen.

I click on “Extras”

I click on “DirectX”

Box entitled “Installing Microsoft® DirectX® appears.

I follow the instructions.

“The components installed are now ready for use”

 I bring up the Rome Total War” launch menu.

I click on “Play Rome: Total War”.

“Rome Total War failed to find DirectX 9, which is required for the game to run
Please reinstall DirectX ”

I download the file dxsetup.exe

I run the program.

I get the following message

“DirectX setup has determined that a newer or equivalent version of DirectX
has been installed already.  No installation is necessary.”

Where am I going wrong?

Microsoft DirectX web installer says my pc has DirectX.

“Rome: Total War” says I need to install DirectX.

What should I do?


0
Hi Experts,

I am having a few problems with 3d rotations and wondered if there is a genius out there who can help!  The issue is I need to find the _local_ pitch, roll and yaw of a vehicle in 3d space, but all I have is its pitch / roll and yaw as a _global_ orientation (radians, yaw = left right/y axis, pitch = tilt up down/x axis, roll = bank left right/z axis).

For instance, if the vehicle is pointing forwards (yaw = 0) and tilted up 1.47 radians, the p/r/y is 1.47,0,0.  However, if the vehicle is pointing in the opposition direction in the global coordinate system, the p/r/y is -1.47,0,3.14.  Similarly, there is of course a problem when rolling (banking) the vehicle - if say it was pointing forwards and rolled 90 degrees to the right (global coords 0,1.47,0), its own local yaw axis is now the equivalent of the global pitch axis, which renders the values somewhat meaningless.

In addition to this problem (and this is separate but related), I also need to find the x,y and z _local_ velocity of the vehicle (meters per sec) from a global velocity value for it that I have (in the same units).. I asked a friend if I needed any additional information apart from the global pitch,roll,yaw and global xVel,yVel,zVel to find the corresponding local values, and he said it should be calculatable from this but I'd need to know the order in which the rotations we applied to the object in the first place to get it to where it is - he stated there are 2 common orders but a number …
0

Game Programming

Game programming is the software development of video games. Game programming requires substantial skill in software engineering as well as specialization in simulation, computer graphics, artificial intelligence, physics, audio programming, and input. Like other software, game development programs are generated from source code to the actual program by a compiler. Source code can be developed with almost any text editor, but most professional game programmers use a full integrated development environment (IDE).

Top Experts In
Game Programming
<
Monthly
>