Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › What does it take to make a PC Game?
New Posts  All Forums:Forum Nav:

What does it take to make a PC Game? - Page 4

post #31 of 78
Quote:
Originally Posted by AngeloG. View Post
Wow, many great replies and info from you guys, thank you very much. I think the idea that I have to start very small is definitely right, I am considering starting a point and click game so I can start to understand the way characters interact with objects. My first goal is to learn Javascript and C++, from what I gathered.
I'd do C++ first. With that you can establish the ability to modify existing 2/3D engines (free ones like Ogre). Make sure to really know about object oriented programing with classes ect so that you can transition into your own code by calling new objects instead of doing spagetti code. Once you think you are ready, I'd hit up some directx tutorials just to get a feel for interfacing with libraries (your gonna be doing that alot...).
This place is great when you get to that point.

A few major pointers to avoid when making a game:

NEVER EVER EVER USE Sleep()...... If you need to pause, you might need to consider interfacing with a scripting engine instead of hard writing all the game mechanics.

Release your "new's" when you are done... games are based on creating a frame of objects and making the transition to the next frame of objects using some kind of guidlines (actions, animations, you name it). The target is to do this many times a second, so memory managment is a must. (I can explain that more if you need it.)

Beware the Globals/Threading. Threading may seem like a godsend when you get to it, but it will screw you over very quickly without planning. Threads kick in and out based on the OS, not at your discretion. If you read/write from the same thing between two threads.... Your code is KAPUT o.O

--David--
Power
(22 items)
 
  
CPUMotherboardGraphicsRAM
intel 4770k Gigbyte GA-Z87X-UD5H EVGA 680 SuperClocked+ 16gb corsair platinum 1600 
Hard DriveHard DriveHard DriveHard Drive
Crucial M4 256 SSD Samsung Spinpoint F1 Samsung Spinpoint F1 Western Digital Red 2Tb 
Hard DriveHard DriveOptical DriveCooling
Western Digital 320Gb Western Digital 320Gb Asus DvD Drive Corsair h100i 
OSMonitorMonitorKeyboard
Windows 7 Professional x64 Dell U2311H Dell U2412M Logitec G110 
PowerCaseMouseMouse Pad
SeaSonic X750 Gold 750W Corsair 550D Logitec MU0007 Mionix Sargas 320 
AudioOther
Asus Xonar DG M-Audio BX5-a 
  hide details  
Reply
Power
(22 items)
 
  
CPUMotherboardGraphicsRAM
intel 4770k Gigbyte GA-Z87X-UD5H EVGA 680 SuperClocked+ 16gb corsair platinum 1600 
Hard DriveHard DriveHard DriveHard Drive
Crucial M4 256 SSD Samsung Spinpoint F1 Samsung Spinpoint F1 Western Digital Red 2Tb 
Hard DriveHard DriveOptical DriveCooling
Western Digital 320Gb Western Digital 320Gb Asus DvD Drive Corsair h100i 
OSMonitorMonitorKeyboard
Windows 7 Professional x64 Dell U2311H Dell U2412M Logitec G110 
PowerCaseMouseMouse Pad
SeaSonic X750 Gold 750W Corsair 550D Logitec MU0007 Mionix Sargas 320 
AudioOther
Asus Xonar DG M-Audio BX5-a 
  hide details  
Reply
post #32 of 78
Thread Starter 
Quote:
Originally Posted by Helmsdg View Post
I'd do C++ first. With that you can establish the ability to modify existing 2/3D engines (free ones like Ogre). Make sure to really know about object oriented programing with classes ect so that you can transition into your own code by calling new objects instead of doing spagetti code. Once you think you are ready, I'd hit up some directx tutorials just to get a feel for interfacing with libraries (your gonna be doing that alot...).
This place is great when you get to that point.

--David--
Thanks for your reply, very useful info. I started watching tutorials of C++ from Wibi, and I grasped the main idea of how the syntax works. I've done strings, integers, float and bole. It is all very interesting and I spend a few hours daily studying. I will check that link out. I am thinking that going back to C for the basics might help. what do you think?
Current System
(18 items)
 
  
CPUMotherboardGraphicsRAM
AMD FX-8350 @ 4GHz Gigabyte 990XA-UD3 AMD Radeon R9 380X Kingston 
Hard DriveHard DriveOptical DriveCooling
Samsung 840 Pro EVO Seagate 500GB LG DVD Burner 3x Coolermaster 80mm + 2 Thermaltake 200mm 
OSMonitorMonitorKeyboard
Windows 10 x64 LG TV LG Flatron W2361V Logitech K200 
PowerCaseMouseMouse Pad
Enermax Galaxy 850W Thermaltake Element S Logitech G502 Proteus Spectrum RGB Steelseries QcK 
AudioAudio
Realtec HDA Lexicon Omega 
  hide details  
Reply
Current System
(18 items)
 
  
CPUMotherboardGraphicsRAM
AMD FX-8350 @ 4GHz Gigabyte 990XA-UD3 AMD Radeon R9 380X Kingston 
Hard DriveHard DriveOptical DriveCooling
Samsung 840 Pro EVO Seagate 500GB LG DVD Burner 3x Coolermaster 80mm + 2 Thermaltake 200mm 
OSMonitorMonitorKeyboard
Windows 10 x64 LG TV LG Flatron W2361V Logitech K200 
PowerCaseMouseMouse Pad
Enermax Galaxy 850W Thermaltake Element S Logitech G502 Proteus Spectrum RGB Steelseries QcK 
AudioAudio
Realtec HDA Lexicon Omega 
  hide details  
Reply
post #33 of 78
You should probably start with a Source mod or a mod for another engine/game. You dont seem to really understand the amount of effort, resources, time, etc etc etc that go with it. Either way, learn the basics and then move on from there.

C++ is something to look into.
Caseless Wonder
(13 items)
 
  
CPUMotherboardGraphicsRAM
q6600 650i Ultra 9600 512 4gb 
Hard DriveOptical DriveOSMonitor
4x500gb caviar black dvd burner Windows 7 x64 19inch 
KeyboardPowerCaseMouse
G15 revision 1 700watt? N/A mx518 
Mouse Pad
none 
  hide details  
Reply
Caseless Wonder
(13 items)
 
  
CPUMotherboardGraphicsRAM
q6600 650i Ultra 9600 512 4gb 
Hard DriveOptical DriveOSMonitor
4x500gb caviar black dvd burner Windows 7 x64 19inch 
KeyboardPowerCaseMouse
G15 revision 1 700watt? N/A mx518 
Mouse Pad
none 
  hide details  
Reply
post #34 of 78
Quote:
Originally Posted by AngeloG. View Post
... I am thinking that going back to C for the basics might help. what do you think?
I started with C. It eliminates alot of the higher level stuff that can get in the way for your first programs. Keep in mind though, all C is valid in C++ but not always the best option. When compiled, some C++ operations are pre written assembly instead of generated assembly like C making C++ much better for use.

A good thing to have with you as your program is a list of Unicode/Ascii Characters and their Hex/Decimal equivalents. Also get to know your Byte sizes. An int is 4 Bytes, WORD is 1 Byte, SHORT is 2 bytes, ect. It makes using things like strings easier when you know where in memory the 3rd letter is in a string from the start of the string.

--David--
Power
(22 items)
 
  
CPUMotherboardGraphicsRAM
intel 4770k Gigbyte GA-Z87X-UD5H EVGA 680 SuperClocked+ 16gb corsair platinum 1600 
Hard DriveHard DriveHard DriveHard Drive
Crucial M4 256 SSD Samsung Spinpoint F1 Samsung Spinpoint F1 Western Digital Red 2Tb 
Hard DriveHard DriveOptical DriveCooling
Western Digital 320Gb Western Digital 320Gb Asus DvD Drive Corsair h100i 
OSMonitorMonitorKeyboard
Windows 7 Professional x64 Dell U2311H Dell U2412M Logitec G110 
PowerCaseMouseMouse Pad
SeaSonic X750 Gold 750W Corsair 550D Logitec MU0007 Mionix Sargas 320 
AudioOther
Asus Xonar DG M-Audio BX5-a 
  hide details  
Reply
Power
(22 items)
 
  
CPUMotherboardGraphicsRAM
intel 4770k Gigbyte GA-Z87X-UD5H EVGA 680 SuperClocked+ 16gb corsair platinum 1600 
Hard DriveHard DriveHard DriveHard Drive
Crucial M4 256 SSD Samsung Spinpoint F1 Samsung Spinpoint F1 Western Digital Red 2Tb 
Hard DriveHard DriveOptical DriveCooling
Western Digital 320Gb Western Digital 320Gb Asus DvD Drive Corsair h100i 
OSMonitorMonitorKeyboard
Windows 7 Professional x64 Dell U2311H Dell U2412M Logitec G110 
PowerCaseMouseMouse Pad
SeaSonic X750 Gold 750W Corsair 550D Logitec MU0007 Mionix Sargas 320 
AudioOther
Asus Xonar DG M-Audio BX5-a 
  hide details  
Reply
post #35 of 78
Quote:
Originally Posted by starpwnage View Post
Eventually, you will be able to make games like amnesia in unity3d, though it is a TON of work, and is EXTREMELY hard...
Depends on if you end up liking programming and problem solving. I don't consider programming to be difficult, it just takes a lot of patience and it takes years to become really good at it.

I had a similar dream as the OP, I wanted to know the ins and outs of every system required to make a video game from scratch. My goal was to make a game engine, and then use that to make a game.

After a couple years I did complete my goal of making a game engine, but I work too many hours at my real job (programming games) to have the time to make my own game.

To the OP, just be patient and don't give up. I wanted to become a video game programmer, so I went to school for it, made my own website, posted up sample games, and started work on a game engine. I wanted to be as ready as possible when I got the call for an interview. I don't think it takes a genius to be a programmer, so just follow that dream to the end and you'll get what you set out for.
Foldatron
(17 items)
 
Mat
(10 items)
 
Work iMac
(9 items)
 
CPUMotherboardGraphicsGraphics
i7 950 EVGA x58 3-way SLI EVGA GTX 660ti GTX 275 
RAMHard DriveHard DriveHard Drive
3x2GB Corsair Dominator DDR3-1600 80GB Intel X25-M SSD 2TB WD Black 150GB WD Raptor 
Hard DriveOSMonitorKeyboard
2x 150GB WD V-raptor in RAID0 Win7 Home 64-bit OEM 55" LED 120hz 1080p Vizio MS Natural Ergonomic Keyboard 4000 
PowerCase
750W PC P&C Silencer CoolerMaster 690 
CPUGraphicsRAMHard Drive
Intel Core i5 2500S AMD 6770M 8GB (2x4GB) at 1333Mhz 1TB, 7200 rpm 
Optical DriveOSMonitorKeyboard
LG 8X Dual-Layer "SuperDrive" OS X Lion 27" iMac screen Mac wireless keyboard 
Mouse
Mac wireless mouse 
CPUGraphicsRAMHard Drive
i7-2600K AMD 6970M 1GB 16GB PC3-10600 DDR3 1TB 7200rpm 
Hard DriveOptical DriveOSMonitor
256GB SSD 8x DL "SuperDrive" OS X 10.7 Lion 27" 2560x1440 iMac display 
Monitor
27" Apple thunderbolt display 
  hide details  
Reply
Foldatron
(17 items)
 
Mat
(10 items)
 
Work iMac
(9 items)
 
CPUMotherboardGraphicsGraphics
i7 950 EVGA x58 3-way SLI EVGA GTX 660ti GTX 275 
RAMHard DriveHard DriveHard Drive
3x2GB Corsair Dominator DDR3-1600 80GB Intel X25-M SSD 2TB WD Black 150GB WD Raptor 
Hard DriveOSMonitorKeyboard
2x 150GB WD V-raptor in RAID0 Win7 Home 64-bit OEM 55" LED 120hz 1080p Vizio MS Natural Ergonomic Keyboard 4000 
PowerCase
750W PC P&C Silencer CoolerMaster 690 
CPUGraphicsRAMHard Drive
Intel Core i5 2500S AMD 6770M 8GB (2x4GB) at 1333Mhz 1TB, 7200 rpm 
Optical DriveOSMonitorKeyboard
LG 8X Dual-Layer "SuperDrive" OS X Lion 27" iMac screen Mac wireless keyboard 
Mouse
Mac wireless mouse 
CPUGraphicsRAMHard Drive
i7-2600K AMD 6970M 1GB 16GB PC3-10600 DDR3 1TB 7200rpm 
Hard DriveOptical DriveOSMonitor
256GB SSD 8x DL "SuperDrive" OS X 10.7 Lion 27" 2560x1440 iMac display 
Monitor
27" Apple thunderbolt display 
  hide details  
Reply
post #36 of 78
Thread Starter 
I hear you guys.

I am very aware of the difficulty and hurdles this goal keeps, but I like myself a challenge. Since it is just a hobby, I have no one forcing me to hurry up, so I have all the time I need to learn anything needed. Obviously free time will be less after I finish University, having a full time job, but if you really want something, everything is possible.

Quick question, what other """things""" are there besides Int main ()? Int is integer, so it focuses on numbers, is that correct? I believe that main () is something like the <body> (HTML) part of the code, so I bet there are other ones besides main?
Current System
(18 items)
 
  
CPUMotherboardGraphicsRAM
AMD FX-8350 @ 4GHz Gigabyte 990XA-UD3 AMD Radeon R9 380X Kingston 
Hard DriveHard DriveOptical DriveCooling
Samsung 840 Pro EVO Seagate 500GB LG DVD Burner 3x Coolermaster 80mm + 2 Thermaltake 200mm 
OSMonitorMonitorKeyboard
Windows 10 x64 LG TV LG Flatron W2361V Logitech K200 
PowerCaseMouseMouse Pad
Enermax Galaxy 850W Thermaltake Element S Logitech G502 Proteus Spectrum RGB Steelseries QcK 
AudioAudio
Realtec HDA Lexicon Omega 
  hide details  
Reply
Current System
(18 items)
 
  
CPUMotherboardGraphicsRAM
AMD FX-8350 @ 4GHz Gigabyte 990XA-UD3 AMD Radeon R9 380X Kingston 
Hard DriveHard DriveOptical DriveCooling
Samsung 840 Pro EVO Seagate 500GB LG DVD Burner 3x Coolermaster 80mm + 2 Thermaltake 200mm 
OSMonitorMonitorKeyboard
Windows 10 x64 LG TV LG Flatron W2361V Logitech K200 
PowerCaseMouseMouse Pad
Enermax Galaxy 850W Thermaltake Element S Logitech G502 Proteus Spectrum RGB Steelseries QcK 
AudioAudio
Realtec HDA Lexicon Omega 
  hide details  
Reply
post #37 of 78
Quote:
Originally Posted by AngeloG. View Post
Quick question, what other """things""" are there besides Int main ()? Int is integer, so it focuses on numbers, is that correct? I believe that main () is something like the <body> (HTML) part of the code, so I bet there are other ones besides main?
The "int" signifies that when that function is finished and "returns" it returns a integer value. Its a way to get data back from a function so you can check for errors or use the new data the function created.

The main() is a function declaration. The main() function is a standard function that every program requires as an entry point, but you can make your own.

To make a new function you need a function prototype and definition.

Example:
Code:
main.h:

#include <stuff>
#include "localstuff.h"

void myFunction();
float mySecondFunction(int firstParameter, int* remoteAdress);
Code:
main.cpp:

#include "main.h"

int main(){
//Work here
float returnValue = 0.0f;
int giveToFunction = 76;
int remoteChange = 99;


myFunction();
returnValue = mySecondFunction(giveToFunction,&remoteChange);

return 0;
}

float mySecondFunction(int localCopyOfVariable,int* pointerToVariable){
//too lazy to make up stuff...

return (float)localCopyOfVariable/(float)pointerToVariable;
}

void myFunction(){
//useless...
}
In this example, myFunction() is declared in main.h. It does not take any parameters (inside the () area) and does not return a value (the void).

mySecondFunction() is also declared in main.h but it is different. It returns a floating point value signified by the "float" and in this example I set a local variable equal to the return value. This function also takes two parameters. An integer value passed by the caller (the part of the program that calls the function) and a pointer. The pointer (though not really developed in this example) can be used to edit data that you don't want to pass to the function. Every time to pass a parameter like and int or float to a function (inside the () area), the system literally makes a distinct separate copy of that data and sends it to another place in your RAM. That means that if you edit that data, you haven't actually changed anything in the whole program, just inside that function. The "*" signifies a dereference or pointer that means that if you edit that data, you are actually going back up to the main part of your program and editing that data. When you pass a value like that you must send the address of the variable, not the actual variable. You do this by using a "&" before the variable name/symbol.

I hope this makes sense at least a little o.O

--David--
Edited by Helmsdg - 6/10/11 at 9:51am
Power
(22 items)
 
  
CPUMotherboardGraphicsRAM
intel 4770k Gigbyte GA-Z87X-UD5H EVGA 680 SuperClocked+ 16gb corsair platinum 1600 
Hard DriveHard DriveHard DriveHard Drive
Crucial M4 256 SSD Samsung Spinpoint F1 Samsung Spinpoint F1 Western Digital Red 2Tb 
Hard DriveHard DriveOptical DriveCooling
Western Digital 320Gb Western Digital 320Gb Asus DvD Drive Corsair h100i 
OSMonitorMonitorKeyboard
Windows 7 Professional x64 Dell U2311H Dell U2412M Logitec G110 
PowerCaseMouseMouse Pad
SeaSonic X750 Gold 750W Corsair 550D Logitec MU0007 Mionix Sargas 320 
AudioOther
Asus Xonar DG M-Audio BX5-a 
  hide details  
Reply
Power
(22 items)
 
  
CPUMotherboardGraphicsRAM
intel 4770k Gigbyte GA-Z87X-UD5H EVGA 680 SuperClocked+ 16gb corsair platinum 1600 
Hard DriveHard DriveHard DriveHard Drive
Crucial M4 256 SSD Samsung Spinpoint F1 Samsung Spinpoint F1 Western Digital Red 2Tb 
Hard DriveHard DriveOptical DriveCooling
Western Digital 320Gb Western Digital 320Gb Asus DvD Drive Corsair h100i 
OSMonitorMonitorKeyboard
Windows 7 Professional x64 Dell U2311H Dell U2412M Logitec G110 
PowerCaseMouseMouse Pad
SeaSonic X750 Gold 750W Corsair 550D Logitec MU0007 Mionix Sargas 320 
AudioOther
Asus Xonar DG M-Audio BX5-a 
  hide details  
Reply
post #38 of 78
Thread Starter 
It does make sense. Very useful. Making progress in C right now, I memoriszed the syntax and now studying on functions and strings.

Also, what exactly is a "C String"? The one defined by %s?
I actually got it, it is actually a call to a parameter set after the quotes close, and a coma follows.

Thank you David.
Edited by AngeloG. - 6/10/11 at 10:34am
Current System
(18 items)
 
  
CPUMotherboardGraphicsRAM
AMD FX-8350 @ 4GHz Gigabyte 990XA-UD3 AMD Radeon R9 380X Kingston 
Hard DriveHard DriveOptical DriveCooling
Samsung 840 Pro EVO Seagate 500GB LG DVD Burner 3x Coolermaster 80mm + 2 Thermaltake 200mm 
OSMonitorMonitorKeyboard
Windows 10 x64 LG TV LG Flatron W2361V Logitech K200 
PowerCaseMouseMouse Pad
Enermax Galaxy 850W Thermaltake Element S Logitech G502 Proteus Spectrum RGB Steelseries QcK 
AudioAudio
Realtec HDA Lexicon Omega 
  hide details  
Reply
Current System
(18 items)
 
  
CPUMotherboardGraphicsRAM
AMD FX-8350 @ 4GHz Gigabyte 990XA-UD3 AMD Radeon R9 380X Kingston 
Hard DriveHard DriveOptical DriveCooling
Samsung 840 Pro EVO Seagate 500GB LG DVD Burner 3x Coolermaster 80mm + 2 Thermaltake 200mm 
OSMonitorMonitorKeyboard
Windows 10 x64 LG TV LG Flatron W2361V Logitech K200 
PowerCaseMouseMouse Pad
Enermax Galaxy 850W Thermaltake Element S Logitech G502 Proteus Spectrum RGB Steelseries QcK 
AudioAudio
Realtec HDA Lexicon Omega 
  hide details  
Reply
post #39 of 78
Thread Starter 
I know this might be a very hard question to answer, but, what are the actual steps going from a programming language like C++ to having an actual 3D or 2D window?

I mean it in a programming sense, like:

1) Write in C++ something, like the physics or interactions.
2) Load DirectX or OpenGL libraries (maybe via headers..?) in order to comply with standard 2D or 3D.(somehow)
3) Create an actual window that hosts the game.
4) Have actual control with the pointer and keyboard over what happens on the window.
5) Insert textures on defined geometrical positions (somehow)
6) Script actions, dialogue.

I know, it cannot be simply explained in plain text, just very confused about going from a source file to an actual 3D window with textures and interaction. Actually telling me which software/knowledge is needed for each step is all I need right now to clear my confusion.

Thanks to everyone helping here.
Edited by AngeloG. - 6/10/11 at 12:22pm
Current System
(18 items)
 
  
CPUMotherboardGraphicsRAM
AMD FX-8350 @ 4GHz Gigabyte 990XA-UD3 AMD Radeon R9 380X Kingston 
Hard DriveHard DriveOptical DriveCooling
Samsung 840 Pro EVO Seagate 500GB LG DVD Burner 3x Coolermaster 80mm + 2 Thermaltake 200mm 
OSMonitorMonitorKeyboard
Windows 10 x64 LG TV LG Flatron W2361V Logitech K200 
PowerCaseMouseMouse Pad
Enermax Galaxy 850W Thermaltake Element S Logitech G502 Proteus Spectrum RGB Steelseries QcK 
AudioAudio
Realtec HDA Lexicon Omega 
  hide details  
Reply
Current System
(18 items)
 
  
CPUMotherboardGraphicsRAM
AMD FX-8350 @ 4GHz Gigabyte 990XA-UD3 AMD Radeon R9 380X Kingston 
Hard DriveHard DriveOptical DriveCooling
Samsung 840 Pro EVO Seagate 500GB LG DVD Burner 3x Coolermaster 80mm + 2 Thermaltake 200mm 
OSMonitorMonitorKeyboard
Windows 10 x64 LG TV LG Flatron W2361V Logitech K200 
PowerCaseMouseMouse Pad
Enermax Galaxy 850W Thermaltake Element S Logitech G502 Proteus Spectrum RGB Steelseries QcK 
AudioAudio
Realtec HDA Lexicon Omega 
  hide details  
Reply
post #40 of 78
Quote:
Originally Posted by AngeloG. View Post
I hear you guys.

I am very aware of the difficulty and hurdles this goal keeps, but I like myself a challenge. Since it is just a hobby, I have no one forcing me to hurry up, so I have all the time I need to learn anything needed. Obviously free time will be less after I finish University, having a full time job, but if you really want something, everything is possible.

Quick question, what other """things""" are there besides Int main ()? Int is integer, so it focuses on numbers, is that correct? I believe that main () is something like the <body> (HTML) part of the code, so I bet there are other ones besides main?
If that's your first question, you've got a long road ahead. I suggest picking up a C++ for beginners book.

The entry point for C++ programs is called main(). This is the function that is called when the .exe begins. A function is something you call to perform a specific action. For example if you want to know if a number is even or odd, you could make a function that did this that you could call whenever you needed.

Code:
// These first two lines aren't worth explaining here, you're better off
// reading a beginner's book.
#include <iostream>
using namespace std;

// bool is a true/false value, that is what this function will return
// Notice the function takes an integer as input.
// So I pass the function a number and it gives me back a true/false
// answer.
bool IsNumberEven( int number )
{
     // The keyword 'return' means that you're passing this data
     // out of the function. This is our bool value.
     return (number % 2 == 0);

     // The part is a bit more advanced, in English it translates to:
     // Does 'number' divided by two have a remainder of zero?
}

int main()
{
     int myNumber = 5;

     // Here are store a boolean value returned by 'IsNumberEven'.
     // Notice I'm calling my function, and giving it 'myNumber', which is 5.
     // The function returns a bool which I'm setting 'isMyNumberEven'
     // equal to.
     bool isMyNumberEven = IsNumberEven(myNumber);

     cout << "Was my number even? : " << isMyNumberEven;

     // Because main() returns an int, we have to return something here
     return 1;
}

Quote:
Originally Posted by AngeloG. View Post
I know this might be a very hard question to answer, but, what are the actual steps going from a programming language like C++ to having an actual 3D or 2D window?

I mean it in a programming sense, like:

1) Write in C++ something, like the physics or interactions.
2) Load DirectX or OpenGL libraries (maybe via headers..?) in order to comply with standard 2D or 3D.(somehow)
3) Create an actual window that hosts the game.
4) Have actual control with the pointer and keyboard over what happens on the window.
5) Insert textures on defined geometrical positions (somehow)
6) Script actions, dialogue.

I know, it cannot be simply explained in plain text, just very confused about going from a source file to an actual 3D window with textures and interaction. Actually telling me which software/knowledge is needed for each step is all I need right now to clear my confusion.

Thanks to everyone helping here.
1.) Writing even a simple physics interaction program takes quite a bit of work. You have to support loading of different shapes whether they be primitive shapes, or non-primitive convex or concave shapes. You have to create an algorithm and some kind of spatial partitioning that will prevent you from having to check collision on every shape against every other shape each frame. For example, if you have 1000 spheres spread over a large area (say a 1km squared area), it would be a waste to check spheres on one corner against the opposite corner since they're very far apart, so you break up the area into quadrants, and you only have to check your sphere against ones in the same quadrant. There are other forms of spacial partitioning you would need, this is just one. There is of course a lot of math and physics calculations, and part of the trick to a physics engine is to approximate reality only as much as is needed for it to seem realistic, a lot of highly optimized calculations, and faking it whenever possible to save on performance.

2.) Using DirectX itself can be a pain to learn at first if you're using C++, I'd recommend a beginners book for that after a couple months of learning some C++ books. If your main goal is just games I would recommend C# and XNA instead, both are easy to learn, and faster to prototype games with IMO.

3 and 4.) Creating a window is just a single function call with a handful of parameters, but again it isn't very straightforward if you're not already familiar with C++. Once you've created the window there is still a lot of work to do, like listening for messages so you know if the cursor is over your window, or if your window is the one that has focus, or if you're in windowed or fullscreen mode, or if the window is being resized, or minimized or maximized. You'll always receive messages from windows about any keys pressed, held, or released, and mouse button events and you can query for cursor position at any time. What you do with those events is up to you.

5.) Once you have a window it isn't too much work to load something like a bitmap to a 2D shape on the screen. Texturing a 3D model is a completely other story, and is many levels of complexity higher, such that it isn't even worth explaining at this point in your learning.

6.) "Script actions and dialogue" is pretty vague. Scripting could be your program interfacing with an actual scripting language, or you could allow your own custom scripts written in something like XML, or just a plain text in a format you've laid out. Dialogue could be in a script, or a database, or a spreadsheet. Depends on how you organize your product. Display text is most easily done through a spritesheet (again, not worth explaining at this point) unless your program is using windows to render your fonts (most games don't do this).
Edited by lordikon - 6/10/11 at 8:13pm
Foldatron
(17 items)
 
Mat
(10 items)
 
Work iMac
(9 items)
 
CPUMotherboardGraphicsGraphics
i7 950 EVGA x58 3-way SLI EVGA GTX 660ti GTX 275 
RAMHard DriveHard DriveHard Drive
3x2GB Corsair Dominator DDR3-1600 80GB Intel X25-M SSD 2TB WD Black 150GB WD Raptor 
Hard DriveOSMonitorKeyboard
2x 150GB WD V-raptor in RAID0 Win7 Home 64-bit OEM 55" LED 120hz 1080p Vizio MS Natural Ergonomic Keyboard 4000 
PowerCase
750W PC P&C Silencer CoolerMaster 690 
CPUGraphicsRAMHard Drive
Intel Core i5 2500S AMD 6770M 8GB (2x4GB) at 1333Mhz 1TB, 7200 rpm 
Optical DriveOSMonitorKeyboard
LG 8X Dual-Layer "SuperDrive" OS X Lion 27" iMac screen Mac wireless keyboard 
Mouse
Mac wireless mouse 
CPUGraphicsRAMHard Drive
i7-2600K AMD 6970M 1GB 16GB PC3-10600 DDR3 1TB 7200rpm 
Hard DriveOptical DriveOSMonitor
256GB SSD 8x DL "SuperDrive" OS X 10.7 Lion 27" 2560x1440 iMac display 
Monitor
27" Apple thunderbolt display 
  hide details  
Reply
Foldatron
(17 items)
 
Mat
(10 items)
 
Work iMac
(9 items)
 
CPUMotherboardGraphicsGraphics
i7 950 EVGA x58 3-way SLI EVGA GTX 660ti GTX 275 
RAMHard DriveHard DriveHard Drive
3x2GB Corsair Dominator DDR3-1600 80GB Intel X25-M SSD 2TB WD Black 150GB WD Raptor 
Hard DriveOSMonitorKeyboard
2x 150GB WD V-raptor in RAID0 Win7 Home 64-bit OEM 55" LED 120hz 1080p Vizio MS Natural Ergonomic Keyboard 4000 
PowerCase
750W PC P&C Silencer CoolerMaster 690 
CPUGraphicsRAMHard Drive
Intel Core i5 2500S AMD 6770M 8GB (2x4GB) at 1333Mhz 1TB, 7200 rpm 
Optical DriveOSMonitorKeyboard
LG 8X Dual-Layer "SuperDrive" OS X Lion 27" iMac screen Mac wireless keyboard 
Mouse
Mac wireless mouse 
CPUGraphicsRAMHard Drive
i7-2600K AMD 6970M 1GB 16GB PC3-10600 DDR3 1TB 7200rpm 
Hard DriveOptical DriveOSMonitor
256GB SSD 8x DL "SuperDrive" OS X 10.7 Lion 27" 2560x1440 iMac display 
Monitor
27" Apple thunderbolt display 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › What does it take to make a PC Game?