Ok. so im starting to learn the C programing language, my hope is to be either a programer or game programer either as a job or for fun.
so i have some simple question about how it works.
1. To make an image on a screen.. Does the language say "put a red pixel here and a blue one here" or does it say "take this image i made in photoshop and put it at these coordinates"?
2. If i am making a program and it needs a bunch of images, does it compile these images in one file or do i need include all of them with the compiled exe.
3. What are the advantages of C++ for games versus the python language or Dark Basic which is made directly for games.
4. in a game, is the code just there to tell it were to place this object... or make its own shape and colorize it with set pixel colors. or to just load a pre-made animation based on what the player does on the keyboard... or make the axis of the character move this way based on a list of coordinates when the player hits the button?
i hope you guys can help me understand it a little more
C/C++ Programing
- AFuzySquirrel
- Posts: 362
- Joined: Fri Jun 22, 2007 9:04 pm
C/C++ Programing
[Setting BIPD Variations][url=httphttp://forums.halomods.com/viewtopic.php?search_id=442547533&t=67770][Alumina BETA][/url]
I'm not positive about questions 1 or 2, but here's what i know for the others:
3: c++ is object oriented, unlike basic (which i think is procedural mainly.). i'm not sure about python, although i do know it works at a higher level than C++, because i seem to remember from somewhere that all the variables it uses are strings, whether they simply contain a number or not. this would mean python would be less efficient than C++ (but maybe easier to code in?). i don't have alot of information because i've never tried programming in python. however, it does seem that major game developers do prefer c-based codes over python from what i can tell.
4: the code is what actually runs the game, it's the engine itself, both figuratively and actually. for example, the source engine is the code that runs all the source games, essentially the same engine at the core between half-life 2 and day of defeat. the biggest difference would be the different environment variables for the program, and the resources it works with, like models and bitmaps and sounds.
once you are proficient enough at programming, you can use it to do whatever. one group (in the vicinity of middle europe i think) created a short fps to demonstrate the advantages of procedural programming. the entire thing was less than a megabyte because they had no resources at all, and just created everything with code itself. so basically, once you really know what you're doing, you can have the code place the object, tell something else where to place what object, generate the object from a function, or class and place it in the game world, or lots of other things.
now i know some c++ myself (just now trying to figure out functions taking structs as arguments/returning one ) so i know the general syntax as long as things don't stray too far from basics, but i'm no guru. i'd suggest you google for sites geared towards programming games with whatever language you're interested in, or just a site offering tutorials for the language you pick.
3: c++ is object oriented, unlike basic (which i think is procedural mainly.). i'm not sure about python, although i do know it works at a higher level than C++, because i seem to remember from somewhere that all the variables it uses are strings, whether they simply contain a number or not. this would mean python would be less efficient than C++ (but maybe easier to code in?). i don't have alot of information because i've never tried programming in python. however, it does seem that major game developers do prefer c-based codes over python from what i can tell.
4: the code is what actually runs the game, it's the engine itself, both figuratively and actually. for example, the source engine is the code that runs all the source games, essentially the same engine at the core between half-life 2 and day of defeat. the biggest difference would be the different environment variables for the program, and the resources it works with, like models and bitmaps and sounds.
once you are proficient enough at programming, you can use it to do whatever. one group (in the vicinity of middle europe i think) created a short fps to demonstrate the advantages of procedural programming. the entire thing was less than a megabyte because they had no resources at all, and just created everything with code itself. so basically, once you really know what you're doing, you can have the code place the object, tell something else where to place what object, generate the object from a function, or class and place it in the game world, or lots of other things.
now i know some c++ myself (just now trying to figure out functions taking structs as arguments/returning one ) so i know the general syntax as long as things don't stray too far from basics, but i'm no guru. i'd suggest you google for sites geared towards programming games with whatever language you're interested in, or just a site offering tutorials for the language you pick.
ASPARTAME: in your diet soda and artificial sweeteners. also, it's obviously completely safe. it's not like it will cause tumors or anything. >.>
always remember: guilty until proven innocent
always remember: guilty until proven innocent