Ok I Am A Noob. How Can I Contribute To Development Games Software And


Mr.Confuzed said:
That sounds like it works great, until you want to use an object.
No, actually it also works fine with objects. Declaring an object constant does not keep you from accessing it's properties or pointers, it only prevents data editing.
Also if you want to work with pointers you can do fancy stuff like this:
Code:
const someClass* const somePointer
Where the first const makes the variable constant (so you cannot assign a new value to it) and the second const prevents you from changing the pointer (so you cannot make it point to another int).

foxblock out
 
Last edited by a moderator:
foxblock said:
No, actually it also works fine with objects. Declaring an object constant does not keep you from accessing it's properties or pointers, it only prevents data editing.
Fascinating, does that only prevent editing from outside the class? If it does, then is there a way to make write-once members? If it doesn't, then wouldn't that break most classes?
 
Last edited by a moderator:
Mr.Confuzed said:
foxblock said:
No, actually it also works fine with objects. Declaring an object constant does not keep you from accessing it's properties or pointers, it only prevents data editing.
Fascinating, does that only prevent editing from outside the class? If it does, then is there a way to make write-once members? If it doesn't, then wouldn't that break most classes?
No it only prevents external access, to create write-once members you would have to do something like this: http://publib.boulder.ibm.com/infocenter/comphelp/v101v121/index.jsp?topic=/com.ibm.xlcpp101.aix.doc/language_ref/cplr038.html
or simply put that in your class header file:
Code:
#define someVar 100
or in case you want some more flexibility you can define the variable private (and as a pointer) and add a public set function, which checks whether the variable has already been set (pointer != nil) and sets it to a passed value in case it has not.

foxblock out
 
Last edited by a moderator:
Mr.Confuzed said:
foxblock said:
No, actually it also works fine with objects. Declaring an object constant does not keep you from accessing it's properties or pointers, it only prevents data editing.
Fascinating, does that only prevent editing from outside the class? If it does, then is there a way to make write-once members? If it doesn't, then wouldn't that break most classes?
It does not only prevent editing from outside the class; the class itself may not edit its contents (The C++ compiler says that "The this pointer is constant" or somesuch). If you want to be able to call a method on a class that is const, you have to declare that method const as well.

I made an example of how all of this works:
http://gist.github.com/304826

EDIT:
foxblock said:
No it only prevents external access
Wait, what? Which version of C++ are you using? A const class cannot edit its own contents (without casting "this" of course)...
 
Last edited by a moderator:
dflemstr said:
EDIT:
foxblock said:
No it only prevents external access
Wait, what? Which version of C++ are you using? A const class cannot edit its own contents (without casting "this" of course)...

Well I wrote that unclear: It prevents external editing and external calls to function which try to edit internal datamembers (or which are not declared const)
Thanks for clarifying.
 
Last edited by a moderator:
Is there any tutorial or book that teaches you game programming (like c++) and in parallel presents you as an example a big game project like for example quake? It would be usefull to see how to think the big picture and some details about the implementation (graphics, levels, animations). Like a book about a game engine...
 
The reason this doesn't exist is because beginning game programming and Quake are incredibly far removed. There are many books that will teach you game programming where you will make simple games by the end (say a sidescroller like Mario) but not something complex like a Quake, most likely.
 
@rapidpoobear I understand that games like quake are complex but i am sure there are some fundamental elements. I also believe that those complex games started from simple ideas and then expanded on those ideas. Thats what am talking about.
 
Yes, they did start as a simple idea, but the step between idea to implementation is huge and requires you to understand the language you want to implement it in.
A book which featured a quake style project as a beginner tutorial would probably be massive and it would devote half of the book to explain these fundamentals.
So you could probably get the same results if you took a normal 'basics' tutorial and after finishing it you could read a 3d graphics tutorial.
 
I can understand your idea - you want to learn by examining a living example and not going through "boring" tutorials.
Though unfortunately the Quake engine is probably more complex than you think and like it was said before, a book would have to start explaining the basics (which probably can hardly be explained using the Q engine as an example) before you can actually understand what's going on.

Best would be a book which starts from scratch with the basics and then develops something similar to the Quake engine, so if you follow the book until the end you will have created and understand a full blown engine.
Sadly I don't know such a book, but it sure would make a good idea to write one.
 
I think this would actually be a series of books, starting with something like Commander Keen and working its way up to Quake. You'd have to get into math, you'd have to decide if you were going to go with the current quake engine(s), which are written in C, or create something specific for the book in c++ or your language of choice. It would be a great series, but I think you're looking at 3 to 4 books, minimum, to be useful.

Now, simply using the existing quake engine and the mod tools already out there for it? That might be one book.
 
For SDL, a book that's getting a bit long in the tooth: programming linux games. A decent enough start. I'd skip a lot of the audio portion of things as that's really getting dated, but pay attention to what he's doing with the 2d stuff. I could wish he spent a little more time with platform style collision detection and what have you, but it gives you a basis to start diving into other people's work.

Also, as many have pointed out, look at the http://www.lazyfoo.net/SDL_tutorials/index.php tutorials. Another really good start to SDL. Some might say a better start, and it's free.

Once done, peel back the code for one of the open source projects here. Study the code, and ask a few questions about it. Or start your own simple 2d game.

3d, well, that's a small library of books if you want to PROGRAM it. A lot of math, some physics, specialized optimized hacks to get the transformations and physics estimates to run quickly, etc. That doesn't even get into the moving target of the 3D libraries. A lot of the sample code out their is using the old fashioned fixed function math, where GLES 2.0 and modern OpenGL is using shaders for just about everything.

For 3d you have a lot of "roles" to fill. Modeler - look up Blender and the tutorials for it. Coder - I'd use Q3 or a similar engine to start, rather than writing one of your own. Math and physics guy, level designer, painter, etc., even for a simple project. You have all that in 2d too, but it's much faster to develop an 8-bit Mario looking character than it is to develop a 3d character that looks anything like a humanoid, never the less animate it, account for collision detection, etc.

Cheers and good luck. Don't let the scope of it scare you away, but I'd start either with 2d, or modding a level for an existing 3d program.
 
Ok in response to that particular thread i decided to make a group on facebook for us. "Newbies Openpandora Devs" its name. Anyone who consider himself a wannabe dev for the pandora and believes that OpenPandora will be the right path to choose come join the group. It will be interesting to see how many people will join and also. If we could join our powers and find a way to exchange knowledge and experience i believe that we can achieve great things. People that are thirsty for knowledge on game development and are willing to provide help to the newer members are also welcome. Let this group be the start of something new!! ;)
 
I joined. I figured it would be interesting to talk with other beginner programmers. It's hard to stay motivated when you're the only one who thinks your project is interesting.
 
Back
Top