Jump to content
  • Advertisement
Sign in to follow this  
CarlosNYM

Where to start?

This topic is 4075 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone! I am an aspiring video game maker, like many others on this site, but I guess you could hardly call me aspiring because I am very new to this subject. I am a sophmore in highschool and I only have 1 year of javascript/HTML experience but ever since I took the class I have wanted to jump into the world of coding and being a gamer myself making video games. Even though I am new, I realize that making games is insanely hard and takes a lot of hard work and experience. But I am willing to work at it if it means I could acctually make a game. Before reading my questions I wanted to say that I have read the FAQ on Beginners at this site but I still have a few questions. What language should I use? Now, I know that know one can tell me a definite answer but theres a couple I am thinking about. I started doing C++ but I haven't learned much, just loops and strings and condition statments and all that noob stuffso maybe I should continue there. I could do Java but I am going to learn that in school next year. I could do C# because of the XNA program but I'm not sure if thats really a starter language and I don't own an XBOX 360. One more thing, The more I do tutorials for C++, the more I'm confused on how these apply to video games. I learn these lessons but all im getting is Numbers and phrases in a command prompt. I know you can't expect to deal with graphics so quickly but I was wondering whether there are any good tutorials out there for any of these languages pertainng to game development. Thank you very much for any help I can get. I look forward to being a member here and getting to make some fun games!

Share this post


Link to post
Share on other sites
Advertisement
the way C++ applies to video games is that you use "alternative libraries" for things like graphics.

for instance, you have a monster on the screen, for him to move, you set his position on the screen using variables like x and y, then to make him move, you take one away from x. c++ doesn't have any built in graphic handling, but there are a bunch of libraries that do all the grunt work. once you get fairly comfortable with c++(if thats the route you wanna take) then check out SDL and www.lazyfoo.net, SDL is a library that handles everything from graphics to sound, to networking. so bust your hump doinf all the annoying console stuff and when you move onto graphics it'll start making alot more sense.



as for languages, i've only been programming for 3 months, so i'm definatly not hte one to ask, i use c++

Share this post


Link to post
Share on other sites
Quote:

One more thing, The more I do tutorials for C++, the more I'm confused on how these apply to video games. I learn these lessons but all im getting is Numbers and phrases in a command prompt. I know you can't expect to deal with graphics so quickly but I was wondering whether there are any good tutorials out there for any of these languages pertainng to game development.


Most of todays games rely on the system API and other APIs, such
as DirectX and OpenGL for hardware performance. These APIs can be
used to create both 2d and 3d video games.

You can also a)Use low level C/C++ to create graphics yourself (Not
recommended for games--very hard), or b)Write your own software renderer
(Very hard, but alot of games have this)

Basic C/C++ concepts--loops, functions, pointers, classes, varables, enums,
constants, strings, etc.. are used almost everywhere in games. If you want
to understand where or how they apply to games, search the forums! Seriously[smile]
Alot of members here use C++. Looking at their code should give you some ideas.

From C++, your next step is choosing an API or an existing game engine.
I personally recommend learning an API, such as DirectX or OpenGL. Keep
in mind these APIs are quite complex.

There is also SDL and Allegro, Although I dont have experience with them[smile]

Share this post


Link to post
Share on other sites
Thanks, yea I have heard of SDL but the tutorial isn't very...accomodating to newbs. I couldn't follow it. Made me sad :(

But I havent read it a while so maybe ill get it now.

Share this post


Link to post
Share on other sites
you're right, he dives in a bit fast, but in all honestly(and i mean no offense) its cause you haven't spend enough time learning the language, don't get me wrong, i did the same thing, and i ended up getting aquainted with functions and classes while learning SDL,i knew the form and whatnot, but there's something about applying them that makes things alot clearer.

spend another couple weeks(well just roughly ... 20 - 30 hours) only the console stuff, i know its boring as hell but you have to really understand whats going on, cause i know how it is, all i can say is start slow and try to really understand what he's doing. trust me those tutorials are amazing once you get hte hang of it, i've learned about 70% of what i know from those tutorials.

Share this post


Link to post
Share on other sites
Ok, I'll give them another shot.

Recently I have been going through the tutorial on cplusplus.com but once it got to arrays I started to fall off and when I got to classes I kinda gave up. I really need a good tutorial that is easy on newbs. Also pointers make no sense to me as well. Any one know of a good one?

Share this post


Link to post
Share on other sites
pointers aren't that tricky. If you can give common sense answers to the following questions about the windows file system then you can understand pointers:

do you know how to make a shortcut to file?
do you know how to double click on a shortcut to open a file?
If you delete the file and then double click on the shortcut will the file open?
If you delete the shortcut does that delete the file?
If you copy a file and then modify it, and then you double click on a shortcut to the original file, will you see the modifications?

Now the only tricky thing is the syntax. C++ inherited some counter-intuitive pointer syntax from C. You'll get used to it in a few months.

Share this post


Link to post
Share on other sites
I have time to spare, so this may help you with arrays and pointers.

As you know, all programs must be loaded into memory to be executed.
We refrence memory cells by "addresses", where each address represents
a byte in memory.

Address 0 is the first byte in memory.

Because your program is in memory, each of it's routines, varables, etc.
can be refrenced by a memory address - Where it is located in memory.

Because of this: Every function and varable has an address.

In C++, you can print the address of a varable or function to find
where it is at. You do this with the Address of (&) operator:

int i=0;
std::cout << &i << std::endl; // prints address of i


In C++, If you declare two varables next to each other, they are litterally
next to each other in memory. Your program can access any memory allocated
to it by the OS
.

A Pointer is a varable that stores a memory address. This might not
seem to usefull, but it is. Coinsider video memory. In order to draw a
pixel on screen, you need to access video memory directly. How do we do this
using normal varables? We cant.

The only way of accessing memory is by knowing an address for it to "point" at.

In C++, A Pointer is denoted by the Pointer ("*") operator.

unsigned char a; // normal varable contains data
unsigned char* p; // pointer varable. Its data is a memory address.


In the above, "p" is a pointer. Using the Address-of (&) operator, we
can make it point ("Store the address of another varable") to 'a':

p = &a;


Now the pointer p contains the Exact address of varable a.
This means pointer p points to varable a.

Now, because they both referr to the same address, you can indirectly
modify 'a' using the Indirection (*) operator:

*p = 0; // Because p "points to" a, this changes the value of a!


In short and sweet:

unsigned char* p=0; // p points to address 0 (Indicates bad pointer)
p = &a; // get address of a, store in pointer--pointer is good
*p++; // increment the data pointed by p (The varable a)


You can assign absolute addresses to pointers as well:

unsigned char* p = 0xA000;

In the above, the pointer points to address 0xA000... The beginning of
video memory.

Linear Addressing

Remember that two varables placed one after another is litterally right
after each other in memory. Linear Memory just means that varables
in memory is right after each other.

For example, Lets say you have 3000 vertex points to store. One way of
handling this is creating varables right after each other:

Vertex v1;
Vertex v2;
Vertex v3;

// etc...

Vertex v10000;

This is ALOT of typing. Because these varables are right after each other
in memory, This is an example of Linear Addressing
.

This is ALOT of code to type! An Array is just a Pointer.
An array is just another way to represent Linear Memory, like the
above.


Because creating 10,000 varables is bad, we can create it in an array with
alot less typing:

Vertex array[10000]; // This is the same as the above code!

This code (And the above) are both linear memory. Because of this, They
both are the same.


They provide us a better solution then typing and working with 10,000 of
the same type of varable.

To refrence, lets say, the 1st vertex, use the Subscript operator:

array[0]; // The first vertex

Computer memory Always starts counting from 0. Its not a C++ "thing".

The actual name of the array represents a pointer (Hence, It stores an
address
of the First array element.

Hope this clears things up a bit[smile]

Share this post


Link to post
Share on other sites
Download the Java Sun Tutorials and read the OOP section.

I know your not learning Java yet, but those tutorials explain OOP very well and the syntax for classes and such is almost identical to C++ so you should be able to follow the source pretty well.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!