• Create Account

# greenzone

Member Since 24 Jun 2011
Offline Last Active May 26 2016 03:19 PM

### #5117597computer information systems in game programming?

Posted by on 17 December 2013 - 10:44 AM

Well if you don't have a CS degree you need to have had a job in programming for years or a project or a group of projects that show you know what you are doing. It absolutely does not matter what your degree is in, unless it is DIRECTLY transferable as far as skill developed in that degree that are needed, such as degrees in engineering or maths. You will have to take programming classes and/or work hard to learn the programing and make games while your earning that degree. It is not an easy venture by any means if you don't have that CS degree but if your passionate about it and are not afraid of hard work you can do it. Good luck and i hope you one day make and epic game

### #5111694placing constructor in private

Posted by on 24 November 2013 - 05:20 PM

lol so then it is to prevent un-initialized values that would cause a violation of the invariant of this particular situation?

I am not sure if this helps but here is the example of usage by the author of said instance. I mean just to clarify and perhaps concertize an answer.

```int main()
{
Resistor r1(50), r2(70); //Define Resistors
Capacitor c1(200),c2(300); //Define Capacitors

ICChip ic1; //Create a Chip

PCB pcb1; //Make  PCB Object and add the Resistor, Capacitors and ICChip on it
pcb1.AddChild(&ic1); // Duplicate child entries are ignored.

cout<<"\n=========== Printing the PCB Spec =========="<<endl;
pcb1.PrintSpec(cout);
float v =110, i = 5;
cout<<"\n=========== DoFunction(110,5) of PCB =========="<<endl;
pcb1.DoFunction(v,i);
cout<<"\n=========== Removing c2 from PCB =========="<<endl;
pcb1.RemoveChild(&c2);
cout<<"\n=========== Printing the PCB Spec =========="<<endl;
pcb1.PrintSpec(cout);

return 0;
}
```

### #5111655placing constructor in private

Posted by on 24 November 2013 - 02:06 PM

I am currently studying the design patterns described by the Gang of Four. The Composite Pattern, is what I am currently trying to concertize mentally. While doing this I was looking at an example of its implementation shown here. If you notice in the portion were they are implementing the leaf classes of this pattern they place a generic version of the classes" constructor in private and they place an overloaded version of the constructor in public. Trying to figure this out on my own I came across a forum post that describes the various reasons one might place the constructor in private here by Kerido. Of those 5 examples I am certain its not B or E. But out of A,C, and D I am not sure. I place portions of the code I am talking about to reduce having to hunt through the posted link above. Also the explanations of  A, C, and D (reasons to have a constructor in private) I'll past below the class in question.

```/*
* Capacitor is a LEAF class which is directly inherited from the -
* ElectronicComponet class.
*/
class Capacitor:public ElectronicComponent
{
float capacitance_muF; //Capacitance value in micro fared.

Capacitor(){} // Point in question. Why are they doing this, in this context?
public:
/*
* Constructor - initialize the capacitance value.
*/
Capacitor(float muF)
:capacitance_muF(muF)
{

}
/*
* Prints the Capacitor's specification.
*/
void PrintSpec(ostream& ostr, string prefix = "")
{
ostr<<prefix<<"Capacitor ("<< capacitance_muF <<" muF )"<<endl;
}
/*
* Performs the Capacitor's real function of modifying  input Voltage & Current.
* Now I just put a printing of Voltage and current as place holder.
*/
void DoFunction(float& voltage, float& current)
{
cout<<endl<<"Capacitor Input ("<<voltage<<" V ,"<<current<<" Amp)
Capacitance ="<< capacitance_muF<<endl;
}
};
```

A. Your class instances are created in a static method. The static method is then declared as public.

```class MyClass()
{
private:
MyClass() { }

public:
static MyClass * CreateInstance() { return new MyClass(); }
};
```

C. (Only applies to the upcoming C++0x standard) You have several constructors. Some of them are declared public, others private. For reducing code size, public constructors 'call' private constructors which in turn do all the work. Your public constructors are thus called delegating constructors:

```class MyClass
{
public:
MyClass() : MyClass(2010, 1, 1) { }

private:
MyClass(int theYear, int theMonth, int theDay) { /* do real work */ }
};```

D. You want to limit object copying (for example, because of using a shared resource):

```class MyClass
{
SharedResource * myResource;

private:
MyClass(const MyClass & theOriginal) { }
};
```

Any thoughts on the matter would be nice thanks

### #5105969Defered Render structure.

Posted by on 31 October 2013 - 09:32 AM

```
uniform sampler2D ColorBuffer, NormalBuffer, DepthBuffer;
uniform mat4x4 ProjectionBiasInverse;

void main()
{
gl_FragColor = texture2D(ColorBuffer, gl_TexCoord[0].st);

float Depth = texture2D(DepthBuffer, gl_TexCoord[0].st).r;

if(Depth < 1.0)
{
vec3 Normal = normalize(texture2D(NormalBuffer, gl_TexCoord[0].st).rgb * 2.0 - 1.0);

vec4 Position = ProjectionBiasInverse * vec4(gl_TexCoord[0].st, Depth, 1.0);
Position /= Position.w;

vec3 Light = vec3(0.0);

for(int i = 0;        i <(YOUR 100 LIGHTS);           i++)
{
vec3 LightDirection = gl_LightSource[YOUR 100 LIGHTS].position.xyz - Position.xyz;

float LightDistance2 = dot(LightDirection, LightDirection);
float LightDistance = sqrt(LightDistance2);

LightDirection /= LightDistance;

float NdotLD = max(0.0, dot(Normal, LightDirection));

float att = gl_LightSource[YOUR 100 LIGHTS].constantAttenuation;

att += gl_LightSource[YOUR 100 LIGHTS].linearAttenuation * LightDistance;

Light += (gl_LightSource[YOUR 100 LIGHTS].ambient.rgb + gl_LightSource[YOUR 100 LIGHTS].diffuse.rgb * NdotLD) / att;
}

gl_FragColor.rgb *= Light;
}
}
```

### #5082336Programming interview FAIL

Posted by on 01 August 2013 - 05:04 PM

So I have read many of the FAQ and how to break into the business of games on this forum which are very informative. After much reading I went and looked at questions that interviewers ask to find out if programmers know how to program and OH MY GOD. I have to admit I am kind of speechless lol. I thought I knew something, wow WAS I WRONG.

I have recently, completely written my own game engine using C++, Opengl. It can import any type of geometry file type. I have a fully operational scene graph to manage my game objects and animations.  I have written a math library that include Vectors, matrices, quaternions, and the combination of all these into my own Rigid Body Transformation class which i thought was totally awesome lol. I have created glsl shader programs to implement effects such as bump mapped textures, specular, Cube map shadows, Ambient occlusion, super sampling, and even vertex displacement for like cool distorted lens affects. I am also using physX for all my collision detection, character controllers, projectiles and what not. All while trying to keep the cleanest and commented code calligraphy.

I am so passionate about learning how to be a better programmer and the whole game development process but after reading this article I feel like a complete failure.

Five-Essential-Phone-Screen-Questions

I do how ever feel like I could probably accomplish many of the exercises form this article

Programming-Interview-Questions

I guess my questions is what do I do just keep studying and continue making programs to prove myself. Is making programs really enough to show like i know how to program? and on top of making things do I also need to crack open my copy of "The Art of programming" while knocking out every one of those topics discussed in that Five essential articles. I think at this point i need to pic and choose my battles. Like what is the hierarchy of importance or do i just need to know everything?

### #5058310GLSL lingo comparison/evolution chart

Posted by on 01 May 2013 - 09:22 AM

I actually found this to be a quite nice condensed form.

GLSL Predefined Variables By Version

Its shows all versions and then tells you if it is deprecated and then shows the alternative methods.

### #5053865Opengl 3+ rendering to a texture

Posted by on 16 April 2013 - 09:25 AM

If i want to render to a texture in opengl 3+ can i uses the same vertex shader and fragment shader that I use to handle other regular loaded textures or do i need to create a separate vertex shader and fragment shader just for the handling of the frambuffer texture?

Posted by on 11 March 2013 - 01:55 PM

Ok so i am working on this program using PhysX and one of the samples that comes with the library has a while loop that runs in the rendercall back function. like so

int nbActors = gScene->getNbActors();
NxActor** actors = gScene->getActors();
while(nbActors--){

NxActor* actor = *actors++;

///render all the stuff with physics

}

What i dont understand is that while loop. whats going on there exactly. from what i would guess its like incrementing through the number of actors and running the loop for each one but im not sure. could some one explaine this use of a while loop and or perhaps the use of the decrementer as something being passed like that.

Thanks

Posted by on 12 September 2012 - 03:52 PM

Both responses where very very helpful. in fact i have experienced this problem with I/O when trying to load geometry. the process of loading geometry hangs up the entire program and the more complex the geometry the longer the wait. So from what i understand threading would allow me to load geometry on the side of my program with out halting the main thread? I am assuming it would still take time but it would not stop one from continuing interaction with the main program being run by the main thread?

### #4970930Game Career Planning - Early Learning Stages

Posted by on 18 August 2012 - 04:07 PM

Ok, I am going to attempt to meet you half way with your crazy ambition lol. I will say this, its crazy people like yourself that change the world my friend lol. but with that said there is A LOT of wisdom being dispensed here. I completely appreciate your wanting to understand and be involved with all aspects of the game development process from artist to programmer. When examining the industry one will find an overwhelming dichotomy between programmer and artist/creative designer. but with that said there are few legit reasons for this extreme bifurcation. One reason is there are the different types of minds. talented programmers often excel in Maths and problem solving skills and often lack the creative artistic abilities or understanding. Talented artisans on the other hand often lack skills in logic and problem solving. NOW with those of us who are in the game with out talent need to develop SKILLS. in order to do this it requires hours and hours and hours of focusing on these skills in order to master them. with that said its very hard for many if not most people to master the skills of being an good artist and a good programmer. Its like working both sides of the brain hard core. Most people don't have DaVinci abilities. also the scope of a project often dictates the focus of the people working on the project. If i where making some "brilliantly beautiful massively epic in size" game I would require help from many people. people that can do different things to maximize their contribution to the game. i mean i would want the best art in the game so i will find the best artist. i want the smoothest game mechanics so i will get the best person or people that specialize in that. I would not want some body that can do a little of everything. I mean some people make a living just writing shaders for games. To be specialized is not to be less ambitious it just means you have become focused on one topic until your an expert above most above most in understanding that topic. the same applies to game artist many of them have studied and practiced just being an artist for many many years. the programs that many artists use can consume your time in learning just those let alone programing the the creative tool on top of being the artist using it.

Now with that said i thought i should share some of my situation just to give you a heads up. I completely feel the same way as you as far as trying to be a one man army. I to want to create my own indi game company by myself. but I will say i have no interest in recreating photoshop or 3dsmax in the process. I think my own game engine is ambitious enough potentially too ambitious but i have yet to get discouraged. I have a masters in graphic design and I been straight programming like a maniac for 2 solid years now and I am still in the process of producing my first game. a year project that you focus on and massage until it is very clean and worked out is good advice.

Posted by on 23 June 2012 - 09:21 PM

### #4952197Something more than a beginner and looking for a little help getting started

Posted by on 23 June 2012 - 08:46 PM

### #49519518 Months and I Still Can't Get Skeletal Animation Working! Urg!

Posted by on 23 June 2012 - 02:20 AM

oh did not realize this person was banned never mind

### #49519508 Months and I Still Can't Get Skeletal Animation Working! Urg!

Posted by on 23 June 2012 - 02:09 AM

where you ever able to fix this issue and if so what was causing the problem? going over your code i cant seem to think where the issue would be.

### #4950841Game Maker, Unity, or Blender?

Posted by on 19 June 2012 - 11:27 PM

Take the c++ class if you can. Its a lot easier to learn in a class environment then it is on your own. questions that can take days to figure out can just be answered quickly by your professor or a fellow student. also it will be a lot of help in the long run even out side of game making. plus you are in high school you dont have to pay for virtually the class which you will in university or college.

PARTNERS