Jump to content

  • Log In with Google      Sign In   
  • Create Account

How/Who create the GameObjects?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
41 replies to this topic

#21 uart777   Members   -  Reputation: -126

Like
-2Likes
Like

Posted 25 October 2012 - 10:08 AM

fleblanc: "Modern hardware can handle RGBA data in so many different formats, that you are basically free to pick your preferred method" - Yes, but RGBA requires shift c>>8 and &0xFFFFFF. Please respond to this.

Sponsor:

#22 FLeBlanc   Crossbones+   -  Reputation: 3117

Like
2Likes
Like

Posted 25 October 2012 - 10:20 AM

Who gives a shit? That's my response. Any code where you might conceivably have to shift and & is not going to be performance critical, and if it is performance critical, and you are noticeably slowed down by a shift and bitwise &, then you have seriously fouled up your design somewhere and you really ought to go back to the design table rather than worrying about pixel formats. Why are you worried about the performance of shifting and bit-wise operations anyway? Is this still 1996? If you need to switch something around, just swizzle in your shader and stop bringing up old shit and thinking it's a valid argument in the modern world.

#23 uart777   Members   -  Reputation: -126

Like
-2Likes
Like

Posted 25 October 2012 - 10:29 AM

"Why are you worried about the performance of shifting and bit-wise operations anyway?" - Because it occurs milions of times per second in game/graphics programming. For example, one 1024x768x32 screen is 786,432 pixels which translates to 3,145,728 bytes. Multiply this by FPS.

#24 kunos   Crossbones+   -  Reputation: 2207

Like
0Likes
Like

Posted 25 October 2012 - 10:30 AM

"Why are you worried about the performance of shifting and bit-wise operations anyway?" - Because it occurs milions of times per second in game/graphics programming. For example, one 1024x768x32 screen is 786,432 pixels which translates to 3,145,728 bytes. Multiply this by FPS.


are you writing software renderers?
Stefano Casillo
Lead Programmer
TWITTER: @KunosStefano
AssettoCorsa - netKar PRO - Kunos Simulazioni

#25 FLeBlanc   Crossbones+   -  Reputation: 3117

Like
2Likes
Like

Posted 25 October 2012 - 10:32 AM

Are you sure about that? Which driver team (NVidia, ATI, Intel) are you a member of, that you know what the driver is doing millions of times per second?

Like I said, is this still 1996? These days, performance critical code runs on the GPU, and the optimization landscape for modern GPUs is so much more complicated than "We must optimize out bitshifting and AND for performance" that it's actually hilarious that you still think the way you do.

#26 uart777   Members   -  Reputation: -126

Like
-1Likes
Like

Posted 25 October 2012 - 10:38 AM

"are you writing software renderers?" - Yes. Pure software rendering using only CPU instructions.

"Who gives a shit? That's my response" - You can't respond to my claim that AA.RR.GG.BB is the best. Your response is basically, "Who cares?". RGBA requires additional instructions.

Edited by uart777, 25 October 2012 - 10:40 AM.


#27 kunos   Crossbones+   -  Reputation: 2207

Like
0Likes
Like

Posted 25 October 2012 - 10:39 AM

"are you writing software renderers?" - Yes. Pure software rendering using only CPU instructions.


are you suggesting everybody should write software renderers?
Stefano Casillo
Lead Programmer
TWITTER: @KunosStefano
AssettoCorsa - netKar PRO - Kunos Simulazioni

#28 uart777   Members   -  Reputation: -126

Like
-1Likes
Like

Posted 25 October 2012 - 10:45 AM

"are you suggesting everybody should write software renderers?" - No, just explaining my perspective. He asked, I answered. Why are we way off subject here?

Edited by uart777, 25 October 2012 - 10:45 AM.


#29 kunos   Crossbones+   -  Reputation: 2207

Like
1Likes
Like

Posted 25 October 2012 - 10:54 AM

"are you suggesting everybody should write software renderers?" - No, just explaining my perspective. He asked, I answered. Why are we way off subject here?


but do you realize your "perspective" is based on a tech that nobody has been using for over 15 years? Current generation programmer just DON'T CARE about these things because they are hidden far far away.. and because they are probably trying to solve much more interesting problems.
Seriously, you should get out more and try to learn something else other than those 2 tricks you've learned 15 years ago. You have no idea how much software development has changed, and trust me, it's all good stuff.

Conservative programmer, is a contradiction in terms.

Edited by kunos, 25 October 2012 - 10:56 AM.

Stefano Casillo
Lead Programmer
TWITTER: @KunosStefano
AssettoCorsa - netKar PRO - Kunos Simulazioni

#30 slayemin   Members   -  Reputation: 2912

Like
3Likes
Like

Posted 25 October 2012 - 11:27 AM

uart777: I learned a hard lesson a few years ago: The person playing your game doesn't give two shits about whether you wrote the code in ASM, C, C++, Fortran, C#, Visual Basic, LOLCAT, java, javascript, Malbolge, etc. All they care about is whether or not the game works and whether or not it's fun. In 2012 (going on 2013), you have LOADS of language and platform choices to choose from to make a game. Whatever language/platform you choose, your end user won't care because it doesn't matter. If it DID matter, then the language used would be prominently featured on the box art. Today, we've got multicore processors which run around 3.5Ghz , gigs of ram, hard drives with terabytes of space, and graphics cards supporting hardware so beefy that they're practically super computers. We can afford to be a bit more lax with our bits. It's a waste of programmer time to worry about how bits are laid on the wire when there are platforms and technologies which have already figured it out.

Since the programming language doesn't matter much anymore, we are free to be a bit more picky about what language we pick. Here are my principles:
-How robust/flexible is the language?
-How easy is it to learn?
-How easy is it to maintain the code after its writen? (I'm looking at you, x86 ASM!)
-How much boiler plate code needs to be writen to get a feature rich game running?
-How well is the language specifications and API documented?
-How much industry support is there for the language?
-How portable is the language to other hardware and software platforms?
-What is my (or my teams) language proficencies and background?
-How much of an existing code base (libraries) do I have?

If(making games)
{
If you're doing it right, you're sweating over high level design decisions and choosing the best algorithms for the job you're trying to do. Doing this well is much more valuable than sweating over the bit order of a pixel residing in memory.
}

If(Writing hardware device drivers)
{
Okay, sweat over the most efficient ordering of bits for your hardware device. I assume you're working for nVidia or ATI and working very closely with the hardware engineers to maximize driver performance so your end users (API & game devs) don't have to.
}

Eric Nevala

Indie Developer | Dev blog


#31 uglybdavis   Members   -  Reputation: 959

Like
1Likes
Like

Posted 25 October 2012 - 12:04 PM

I love how no one seems to give a shit about the original question in this thread and are instead having a flame war. Icebone1000, was your question sufficiently answered or do you have further questions?

#32 uart777   Members   -  Reputation: -126

Like
-2Likes
Like

Posted 25 October 2012 - 04:54 PM

kunos: Learned from the masters: Andre Lamothe, Michael Abrash, Diane Gruber, etc. Yeah, living in the 90s, when programmer's used to write good code Posted Image

slayemin: Very true. We must respect everyone who makes a good game/program in any language, even Javascript. "Since the programming language doesn't matter much anymore" - Thanks for sharing your opinion Posted Image

Icebone1000: Hope you got your question answered. Sorry for changing the subject :|

Edited by uart777, 25 October 2012 - 05:13 PM.


#33 L. Spiro   Crossbones+   -  Reputation: 14263

Like
2Likes
Like

Posted 25 October 2012 - 07:20 PM

"Who gives a shit? That's my response" - You can't respond to my claim that AA.RR.GG.BB is the best. Your response is basically, "Who cares?". RGBA requires additional instructions.

I’ll respond to it.

My engine runs on DirectX 9, DirectX 10, DirectX 11, OpenGL 3.2+, and OpenGL ES 2.0.
DirectX expects ARGB while OpenGL (and derivatives) expect RGBA.
In the grand scheme of things, those extra instructions are going to happen no matter what. If I use ARGB then I need extra shifts when I make a texture in OpenGL.
If I use RGBA then I need extra shifts when I make a texture in DirectX.

There is no right or wrong solution.
There is no “correct” way to go. If you plan on supporting both DirectX and OpenGL, you are going to lose on one side or the other.

If you plan on only supporting DirectX, ARGB is the correct solution.
If you plan on only supporting OpenGL, RGBA is the correct solution.

But neither ARGB nor RGBA is the universally correct solution. Stop saying ARGB is “the way to go”.


L. Spiro

Edited by L. Spiro, 25 October 2012 - 07:20 PM.

It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#34 Icebone1000   Members   -  Reputation: 1148

Like
0Likes
Like

Posted 26 October 2012 - 05:55 PM

Yo..
Ppl that draw and program are all faggots... Peace ¦D



I get most of the replies...but nox_pp post is really confusing to me, I dont get it..
Is he saying I should have not a common base? But them, how the design of the "engine" would be like..I really dont get it, and since he got 6 thumbs up, Im interested..

My first understanding of why my design is bad was that I shouldnt be so restrictive about the creation of the stuff, making my class less useful (based mostly on spiro post)
Then nox_pp says basically I shouldnt have a central management of game objects at all..i guess..??
"If you've got too many derived GameObjects for this to be feasible, that's merely an indicator that something else is wrong."
But of course it will have many derived GOs, that was the the idea since the beginning: give behavior to game objects (override Update()), give game objects to Game, Game will make them run/execute and interact..

Then uglybdavis raped some Unity design choices (o_o I see what you doing there!), but I also dont see the benefits of deriving components and adding to game objects over deriving game objects, looks like its just delegating it deeper in the hierarchy (if I get his idea correctly).

Thanks for the responses.

#35 uart777   Members   -  Reputation: -126

Like
-2Likes
Like

Posted 29 October 2012 - 02:11 AM

May I PLEASE respond to these FALSE rumors?

* "ASM IS HARD" - It's getting easier. Modern Assemblers have POWERFUL macro features to develop EASY CUSTOM syntaxes - IF, ELSE, LOOP, CLASS, etc - that are 100% PORTABLE to ANY CPU or OS. Honestly, C/C++/Java are easier overall and you should continue to use them. I'm only defending my use of ASM.

* "ASM IS NOT PORTABLE" - FALSE. Modern Assemblers are 100% PORTABLE and can generate custom code for absolutely ANY CPU or OS using special macros. Microsoft compilers produce executables that are ONLY FOR X86/WINDOWS OSs. Microsoft will NEVER support other OSs like Android, IPOD, Linux or Macintosh. We're working on Java currently. We have macros that output JVM instructions for Java-enabled CPUs, ARM, Universal ASM, etc.

* "ASM programmers are faggots" - You don't understand how ASM programmers get mistreated for being different and rejected from an entire community that used to accept us. I used to get along excellent with C++ programmers and would share inline graphics code... until the newer C++ programmers started calling me "stupid", etc. Now, new C++ programmers describe us as dumb primitive humans because they heard this from people who pretend to know ASM but don't understand its uses in the world today. In some cases, we're not allowed to post, defend ourselves or respond to FALSE statements about ASM. Is this fair? Please try to see both sides of the picture.

* "You have no argument to use ASM" - I'VE GOT A LONG LIST OF REASONS "WHY I USE ASM" BUT ASM PROGRAMMERS CAN'T DEFEND THEMSELVES AGAINST THE LIES AND MISCONCEPTIONS THAT YOU TELL BEGINNERS. YOU KNOW NOTHING ABOUT THE EVOLVED HL ASSEMBLER SYNTAXES THAT WE HAVE TODAY.

I WILL NOT RETURN HERE.

#36 jbadams   Senior Staff   -  Reputation: 19374

Like
0Likes
Like

Posted 29 October 2012 - 02:53 AM

uart777:
You're perfectly welcome to respond to anything you like, the only thing people have been objecting to is the fact that you continually raise off-topic points. You decided to start talking about assembly in a completely unrelated topic, and when you were challenged part of your response was to randomly show some art, of all things.

Stop being such a drama queen -- you can respond to anything you like -- in return however you will have to respect the fact that other users may also respond to you, and will call you on it when you make false claims of your own such as insisting that only one pixel format is "correct". You should also learn to recognise a joke or sarcasm and not post lengthy serious responses to them, which you've done more than once now.


But you know what... this is all still off topic, and it isn't helping the original poster -- who isn't currently interested in learning assembly -- or anyone else. You can respond to whatever points you like, but start a new topic rather than dragging this one any further off course.


Any further responses to this topic must be on-point responses that are genuinely intended to help the original poster. Anyone wanting to continue a discussion of assembly should start a new topic -- you may post a link to it if you like.

#37 joew   Crossbones+   -  Reputation: 3679

Like
1Likes
Like

Posted 29 October 2012 - 06:07 AM

If you plan on only supporting OpenGL, RGBA is the correct solution.

Also note that depending on chipset (i.e. PowerVR) with GLES 1.0/2.0 the native format is BGRA

#38 mdias   Members   -  Reputation: 793

Like
0Likes
Like

Posted 13 November 2012 - 10:43 PM

Then uglybdavis raped some Unity design choices (o_o I see what you doing there!), but I also dont see the benefits of deriving components and adding to game objects over deriving game objects, looks like its just delegating it deeper in the hierarchy (if I get his idea correctly).


You should read this and search google for "composition vs inheritance".

Edited by Kamikaze15, 13 November 2012 - 10:47 PM.


#39 archanian   Members   -  Reputation: 247

Like
2Likes
Like

Posted 14 November 2012 - 05:43 AM

Holy jeezus wtf happened in here ...

#40 Khatharr   Crossbones+   -  Reputation: 3040

Like
3Likes
Like

Posted 14 November 2012 - 06:48 PM

Sanity stack overflowed.
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS