Radioactive-Software Radioactive-Software
Forum to discuss Radioactive-Software Products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Are you using an impostor? and other questions...
Goto page 1, 2, 3 ... 12, 13, 14  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Radioactive-Software Forum Index -> Programming
View previous topic :: View next topic  
Author Message
logic.cpp
Super-Cool-Dude


Joined: 17 Feb 2008
Posts: 88

PostPosted: Sat Mar 08, 2008 11:51 pm    Post subject: Are you using an impostor? and other questions... Reply with quote

Wonder if i would answer these questions if i were you...


1. Did you make the whole engine from scratch? please specify about the following components;

- Platform stuff (ok so your locked on windows directx, are you calling APIs or do you use some other library)
- Networking
- DirectX (r u calling APIs or using other libraries like OGRE or Irrlicht etc)
- Sound
- Input (i hope for your own good that your not using dInput)
- Memory management (did you get down on your knees and re-invent your own variables and lists or/and are you using STL/Boost)
- Physics

2. One thing i bury myself alive about is engine structure, (and) how components 'communicate' with each other, and how to think about components of a game engine in the first place. for example;

- Should input be a component for itself? if all it does is handle the windows process, well i would think the effect of input should be handled by the Game Logic component, which should decide what action to take on what input.
- Does the Game Logic component encompass everything else of the application? after all; rendering, processing geometry, physics, even the actual application window, all work upon the word of game logic. if game logic decides its time to show the window, call the Window component. If game logic decides its time to render, call the rendering component. etc. On the other hand, "game logic" maybe only means the logic about the actual gameplay, like 'if car explodes with player inside, player dies', but not such general application-level stuff like load file or render.
- Would you mind giving me a rough outline of how your game engine is structured? like maybe just scribble something with MS paint, or just type up something abstract.

3. How much and what types of optimizations do you use in rendering; octrees? quadtrees? bsp trees? are you using an impostor (some call it a billboard?) ? anything else?

4. Because of some destructive material i once read, i worry waaaaay too much about performance issues. I find myself wasting too much time optimizing code, shortening calculations by one or 2 function calls if possible, etc. can you give me a few examples of your engine about like how many function calls get called per frame, how deep do they run (how deep does the stack wind), and yet how ok (hopefully) your frame-rates seem to be?




my future as a game programmer may depend on several answers to these questions Smile
Back to top
View user's profile Send private message
dgreen
The One


Joined: 24 Sep 2005
Posts: 6811
Location: Raleigh, NC

PostPosted: Tue Mar 11, 2008 6:08 am    Post subject: Re: Are you using an impostor? and other questions... Reply with quote

logic.cpp wrote:
Wonder if i would answer these questions if i were you...


1. Did you make the whole engine from scratch? please specify about the following components;

- Platform stuff (ok so your locked on windows directx, are you calling APIs or do you use some other library)
- Networking
- DirectX (r u calling APIs or using other libraries like OGRE or Irrlicht etc)
- Sound
- Input (i hope for your own good that your not using dInput)
- Memory management (did you get down on your knees and re-invent your own variables and lists or/and are you using STL/Boost)
- Physics

2. One thing i bury myself alive about is engine structure, (and) how components 'communicate' with each other, and how to think about components of a game engine in the first place. for example;

- Should input be a component for itself? if all it does is handle the windows process, well i would think the effect of input should be handled by the Game Logic component, which should decide what action to take on what input.
- Does the Game Logic component encompass everything else of the application? after all; rendering, processing geometry, physics, even the actual application window, all work upon the word of game logic. if game logic decides its time to show the window, call the Window component. If game logic decides its time to render, call the rendering component. etc. On the other hand, "game logic" maybe only means the logic about the actual gameplay, like 'if car explodes with player inside, player dies', but not such general application-level stuff like load file or render.
- Would you mind giving me a rough outline of how your game engine is structured? like maybe just scribble something with MS paint, or just type up something abstract.

3. How much and what types of optimizations do you use in rendering; octrees? quadtrees? bsp trees? are you using an impostor (some call it a billboard?) ? anything else?

4. Because of some destructive material i once read, i worry waaaaay too much about performance issues. I find myself wasting too much time optimizing code, shortening calculations by one or 2 function calls if possible, etc. can you give me a few examples of your engine about like how many function calls get called per frame, how deep do they run (how deep does the stack wind), and yet how ok (hopefully) your frame-rates seem to be?




my future as a game programmer may depend on several answers to these questions Smile


Holy Jesus...alright lets see...I'm a busy ass nugga, but I'll try to asnwer your questions.

1 - Yes I wrote the whole engine from scratch. Obviously I didn't write the input libraries, etc. that is all handled by DirectX. I wrote the engine that interfaces with DirectX, I don't use STL/Boost, I code C/C++ hybrid, not a fan of templates and other bloated stuff. I use FMOD for sound because it's better than anything I could create in 10 years. I use Ageia PhysX for physics like any other game studio in the world.

What's wrong with DirectInput? I have been basically using my same input engine/code since early 2003 it has worked completely flawlessly ever since then on any test computer setup/Windows-OS...care to explain your issue with it? Oh I also added XInput support for XBox-360 controllers...again, works flawlessly.

For Networking I use RakNet.

I wrote my entire rendering pipeline, and the shaders as well. [ I even wrote shader model 2.0 asm shaders before I moved everything to HLSL ]. The game uses a full 128 bit HDR pipeline, including bloom, depth-of-field, etc.

Memory managment is hand coded as needed, I allocated my strucutres myself when needed, and handle memory at the byte level.

Basically yes I wrote the whole engine that interfaces with the above libraries, 100k+ lines of source code, and near 8 years of work evolving it.

2 - Make a CDirectInput class and make it a member of CGameEngine. CInput class will handle all interaction via DirectInput8, or XInput and store the states in an array...check out the basic samples in the DXSDK. Also Make a CWindowInterface class, then make it a member of CGameEngine, it will handle all interaction with Win32. Repeat with all major systems that will comprise the game engine.

You're confused about game logic I believe, I'll just give you my quick spill...your logic code should know nothing about your rendering etc, it should be independent. There is no reason for them to even know about each other. This is basic proramming scope, etc. you need to take college class to learn this sort of thing, and spend lots of time experimenting. The rendering should just represent the current state of the objects, the current state of the objects should be determined seperatly/independently by the AI/Logic code which can be run 10-20 times a second, while the rendering occurs 30+ times a second, and input/physics/world updates occur 30 times a second.

The world update calls the AI/Logic code if needed since it has a higher update rate. Check out some of the older questions about my engine in this forum. There is a ton of information about my basic engine structure.

3 - Yes I use all standard optimizations.....Frustum culling, 3+ levels of detail (for geometry, shaders, etc.), dynamic texture caching/LOD system, 2D imposters, etc...everything.

4 - Hmmmm as far as detailed profiling information, I don't know it off hand I'm too busy coding, the best way to profile is by FPS, any kind of optimization that you have to detect at the millisecond level is probably not worth it. Think in terms of major optimization. If you don't have to do it, dont do it. You don't actually have to do it, just make the player think you're doing it. Etc.

Hope that is enough info for ya, hope you stick around the forums.

*Resumes 20 hour code session*

Thanks for posting on the forums BTW! If I missed any one of your questions you really wanted answerd just lemme know!

- Danny

P.S. sorry for typos, I'm typing very fast on a wireless keyboard
_________________
I run this place.
"Some muckety-muck architecture magazine was interviewing Will Wright about SimCity, and they asked
him a question something like "which ontological urban paridigm most influenced your design of the simulator,
the Exo-Hamiltonian Pattern Language Movement, or the Intra-Urban Deconstructionist Sub-Culture Hypothesis?"
He replied, "I just kind of optimized for game play."



Last edited by dgreen on Tue Mar 11, 2008 7:03 am; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website AIM Address
dgreen
The One


Joined: 24 Sep 2005
Posts: 6811
Location: Raleigh, NC

PostPosted: Tue Mar 11, 2008 6:42 am    Post subject: Re: Are you using an impostor? and other questions... Reply with quote

logic.cpp wrote:
Wonder if i would answer these questions if i were you...



Why wouldn't I answer them Very Happy Anything to help a fellow game programmer.

Btw. Sorry I don't have time to diagram my entire game engine lol...unless I'm pitching a presentation to a licensee or a publisher I ain't got the time.
_________________
I run this place.
"Some muckety-muck architecture magazine was interviewing Will Wright about SimCity, and they asked
him a question something like "which ontological urban paridigm most influenced your design of the simulator,
the Exo-Hamiltonian Pattern Language Movement, or the Intra-Urban Deconstructionist Sub-Culture Hypothesis?"
He replied, "I just kind of optimized for game play."

Back to top
View user's profile Send private message Visit poster's website AIM Address
rappen
Mini-Me


Joined: 22 Apr 2007
Posts: 6633
Location: Spijkenisse, Netherlands

PostPosted: Tue Mar 11, 2008 10:34 am    Post subject: Reply with quote

Yea what he said
_________________
Rappen Fo'shizzle my nizzle oh fo dizzle Razz

Back to top
View user's profile Send private message AIM Address MSN Messenger
Rarusu
Viking


Joined: 22 Nov 2007
Posts: 2316
Location: Norway

PostPosted: Tue Mar 11, 2008 11:15 am    Post subject: Reply with quote

What the fuck? I thought these forums were 'bout rape, porn and MILFs....

Shit...
_________________
''Der Mensch der Erkenntniss muss nicht nur seine Feinde lieben, er muss auch seine Freunde hassen können.''
-Friedrich Nietzsche
Back to top
View user's profile Send private message Visit poster's website
rappen
Mini-Me


Joined: 22 Apr 2007
Posts: 6633
Location: Spijkenisse, Netherlands

PostPosted: Tue Mar 11, 2008 12:13 pm    Post subject: Reply with quote

and a little bit games lol Razz
_________________
Rappen Fo'shizzle my nizzle oh fo dizzle Razz

Back to top
View user's profile Send private message AIM Address MSN Messenger
logic.cpp
Super-Cool-Dude


Joined: 17 Feb 2008
Posts: 88

PostPosted: Tue Mar 11, 2008 3:13 pm    Post subject: Re: Are you using an impostor? and other questions... Reply with quote

dgreen wrote:
Why wouldn't I answer them Very Happy Anything to help a fellow game programmer.
Well thanks dude, didnt know if you would consider it 'intellectual property' and $#!t, as many b@$t@rds out there would.
Quote:
Memory managment is hand coded as needed, I allocated my strucutres myself when needed, and handle memory at the byte level.
do you find that very useful? whats wrong with a regular int, char, array[], and std::vector?
Quote:
Btw. Sorry I don't have time to diagram my entire game engine lol...unless I'm pitching a presentation to a licensee or a publisher I ain't got the time.
Ah $#!t. One of the most important things i wanted to know... oh well.
Quote:
What's wrong with DirectInput?
Unless your having game controllers in mind (like steering wheels etc) or your developing for xbox, i heard dInput is entirely useless and dis-recommended.
Quote:
your logic code should know nothing about your rendering etc, it should be independent
yea my problem is i cant seem to draw the line between application-level "logic" and game-level logic. For example, who's logic is it that when i press Esc, rendering stops and bring up the pause menu? application or game? also, if game logic should know nothing about rendering, how will game logic impose its rules like "if car explodes with player inside, then set player health 0 and die" etc, how does game logic determine if the car's geometry actually crashed into something which makes it explode?



thanx alot for your very precious time. remember;
if ( answeringMyStupiQuestions == SlowingDownBeta )
{
// dontAnswerMyStupidQuestions();
answerThemAnyway();
}
Back to top
View user's profile Send private message
dgreen
The One


Joined: 24 Sep 2005
Posts: 6811
Location: Raleigh, NC

PostPosted: Wed Mar 12, 2008 6:17 am    Post subject: Re: Are you using an impostor? and other questions... Reply with quote

logic.cpp wrote:
dgreen wrote:
Why wouldn't I answer them Very Happy Anything to help a fellow game programmer.
Well thanks dude, didnt know if you would consider it 'intellectual property' and $#!t, as many b@$t@rds out there would.
Quote:
Memory managment is hand coded as needed, I allocated my strucutres myself when needed, and handle memory at the byte level.
do you find that very useful? whats wrong with a regular int, char, array[], and std::vector?
Quote:
Btw. Sorry I don't have time to diagram my entire game engine lol...unless I'm pitching a presentation to a licensee or a publisher I ain't got the time.
Ah $#!t. One of the most important things i wanted to know... oh well.
Quote:
What's wrong with DirectInput?
Unless your having game controllers in mind (like steering wheels etc) or your developing for xbox, i heard dInput is entirely useless and dis-recommended.
Quote:
your logic code should know nothing about your rendering etc, it should be independent
yea my problem is i cant seem to draw the line between application-level "logic" and game-level logic. For example, who's logic is it that when i press Esc, rendering stops and bring up the pause menu? application or game? also, if game logic should know nothing about rendering, how will game logic impose its rules like "if car explodes with player inside, then set player health 0 and die" etc, how does game logic determine if the car's geometry actually crashed into something which makes it explode?



thanx alot for your very precious time. remember;
if ( answeringMyStupiQuestions == SlowingDownBeta )
{
// dontAnswerMyStupidQuestions();
answerThemAnyway();
}


How is direct input useles? lol, it's perfect and completely trivial to use...how else will you poll for keyboard input? through win32 callbacks? lol...if you could find me any reference to DInput being uselss I'd appreciate it, I'm quite curious. The only part of DirectX that was considered 'useless' was DirectPlay [networking], and that has been phased out for years now.

Of course I still use ints, chars, etc...but I also have my own data structures/classes...CActor, CProp, CVehicle, etc. 100s of different types of objects that I allocate myself. These objects/structures are composed of chars,floats,ints,vectors (D3DXVECTOR3, or float vector[3]...same thing), etc.

A character "char" is a byte. They are the same thing.

Just pick up a good book on game engine design and read up, etcc...though they all use DirectInput lol.

Well still, if you think about it what happens is the physics library callback indicates that a collision occured, you can check the velocity, and subtract an appropriate amout of damage. Once the damage variable of the CVehicle class is <= 0 then you'd call the CVehicle::CarExplode() function which would set the car to an exploded state, set the health of any child-actors to 0, and spawn particles, etc.etc. The next time you render the scene, you render the vehicle to reflect it's current state, which is now "exploded". The rendering just reflects the current state of the scene which is set by the logic independently.

You can detect collisions using bounding boxes, or compare each triangle of the collision mesh to eachother. Collision detection is handled by the physics library, but most let you set your own colllision callbacks. I've fully implemented vehicles, actors, ragdolls, etc. for PhysX, Newton, ODE and Tokamak physics libs through the life of the game. They all work quite the same.

Thanks for the Qs man, yea I suppose my time is best spent coding, but I always answer questions if people take the time to ask them like you did.

- Danny
_________________
I run this place.
"Some muckety-muck architecture magazine was interviewing Will Wright about SimCity, and they asked
him a question something like "which ontological urban paridigm most influenced your design of the simulator,
the Exo-Hamiltonian Pattern Language Movement, or the Intra-Urban Deconstructionist Sub-Culture Hypothesis?"
He replied, "I just kind of optimized for game play."

Back to top
View user's profile Send private message Visit poster's website AIM Address
Rarusu
Viking


Joined: 22 Nov 2007
Posts: 2316
Location: Norway

PostPosted: Wed Mar 12, 2008 8:34 am    Post subject: Reply with quote

rappen..... Are those two turds ignoring us?
_________________
''Der Mensch der Erkenntniss muss nicht nur seine Feinde lieben, er muss auch seine Freunde hassen können.''
-Friedrich Nietzsche
Back to top
View user's profile Send private message Visit poster's website
dgreen
The One


Joined: 24 Sep 2005
Posts: 6811
Location: Raleigh, NC

PostPosted: Wed Mar 12, 2008 8:49 am    Post subject: Reply with quote

Rarusu wrote:
rappen..... Are those two turds ignoring us?


cuntsaywhat?

Cool
_________________
I run this place.
"Some muckety-muck architecture magazine was interviewing Will Wright about SimCity, and they asked
him a question something like "which ontological urban paridigm most influenced your design of the simulator,
the Exo-Hamiltonian Pattern Language Movement, or the Intra-Urban Deconstructionist Sub-Culture Hypothesis?"
He replied, "I just kind of optimized for game play."

Back to top
View user's profile Send private message Visit poster's website AIM Address
rappen
Mini-Me


Joined: 22 Apr 2007
Posts: 6633
Location: Spijkenisse, Netherlands

PostPosted: Wed Mar 12, 2008 9:04 am    Post subject: Reply with quote

Hi
_________________
Rappen Fo'shizzle my nizzle oh fo dizzle Razz

Back to top
View user's profile Send private message AIM Address MSN Messenger
Rarusu
Viking


Joined: 22 Nov 2007
Posts: 2316
Location: Norway

PostPosted: Wed Mar 12, 2008 10:27 am    Post subject: Reply with quote

......................
HEAVY METAL!!!
......................
_________________
''Der Mensch der Erkenntniss muss nicht nur seine Feinde lieben, er muss auch seine Freunde hassen können.''
-Friedrich Nietzsche
Back to top
View user's profile Send private message Visit poster's website
rappen
Mini-Me


Joined: 22 Apr 2007
Posts: 6633
Location: Spijkenisse, Netherlands

PostPosted: Wed Mar 12, 2008 11:15 am    Post subject: Reply with quote

Confused
_________________
Rappen Fo'shizzle my nizzle oh fo dizzle Razz

Back to top
View user's profile Send private message AIM Address MSN Messenger
Rarusu
Viking


Joined: 22 Nov 2007
Posts: 2316
Location: Norway

PostPosted: Wed Mar 12, 2008 1:31 pm    Post subject: Reply with quote

Hi.
_________________
''Der Mensch der Erkenntniss muss nicht nur seine Feinde lieben, er muss auch seine Freunde hassen können.''
-Friedrich Nietzsche
Back to top
View user's profile Send private message Visit poster's website
rappen
Mini-Me


Joined: 22 Apr 2007
Posts: 6633
Location: Spijkenisse, Netherlands

PostPosted: Wed Mar 12, 2008 1:34 pm    Post subject: Reply with quote

yo
_________________
Rappen Fo'shizzle my nizzle oh fo dizzle Razz

Back to top
View user's profile Send private message AIM Address MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Radioactive-Software Forum Index -> Programming All times are GMT - 5 Hours
Goto page 1, 2, 3 ... 12, 13, 14  Next
Page 1 of 14

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group