Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

My next gen engine

Name: nedunlock 2006-04-26 13:11

Hello everybody.

Let me present myself first. I am an engineer currently working on databases for a well established company in the UK. Given my job, I have years or experience in programming highly complex systems (up to 4000 lines of code, a big number I guess among people in these forums). I have programmed so far in Java, but I am currently reading some books on C++ in order to gain confidence with this language and further improve my programming skills.

I have recently become interested in videogames programming. Given my engineering background, I scientifically researchead information on the current state-of-the-art technology. At the same time, I extended my research range to the techniques used in the movie industry to recreate those stunning visual effects we can enjoy in movies today (such as subdivision surfaces, heard about that?). After this research, I was sadden in realizing how outdated the technology of today games is, despite their poor attempts to market it as "cutting-edge". Graphic effects in movies are undoubtly of superior quality despite being created on machines that roughly offer the same power as the average consumer machine. I put some thought into this problem and I come to the conclusion that videogames programmers are responsible for this quality gap between games and movies. The typical videogame programmer has poor knowledge in advanced fields such as software engineering, garbage collection, etc, whose concepts instead are necessary for programming advanced technologies on complex systems. The typical videogame programmer is a figure that would find the right place in the early 90's, when programming was a mere work of hacking code until seemily correct results were obtained. This kind of approach negatively affects the quality of commercial games but also of independent and amateour games, including those made by people in these forums (mainly tetris clones). Simply, people do not have the right preparation to tackle more complex products.

As I am in possess of such knowledge, I am convinced of being in the position to create an engine featuring a visual quality comparable to that found in the movie industry. Of course I am realistic person and I've realized that this project of mine will take a large part of my spare time, possibly some months. But that is the same time that average people spend in realizing the aforementioned tetris clones, so I certainly cannot complain. I also promise that my engine will offer high performance on the current consumer machines because I have a deep knowledge of all Java mechanisms and of its interaction with the processor. Eventually I could program some critical sections of the engine in C++, as it supposedly produces faster machine code (although I am bit sceptical about this, I would like to test that personally first).

I am writing to this forum because there are a couple of issues I have not yet found a solution to.
I found that two major APIs are used in current games: DirectX and OpenGL. You probably already know about them. As I don't have direct experience with games programming so far, what are the pros and cons of both and which one you'd ultimately suggest for my cutting-edge (really cutting this time) engine?

Second, for performance reasons I will need to bypass the API of choice in critical situations and write directly to the video memory using my own routines for drawing, texturing and processing polygons (high-order surfaces will be supported of course). I have not found in the APIs documentation a way to have direct access to the graphic card memory. What is the solution?

Please only professional developers answer my question.

Thank you for your help.

Ned Unlock

Name: Anonymous 2008-06-17 18:43

http://www.hugeurl.com/?YTdjNGJmYzYwYzhhMTk5MjA2YmE1YzA2NThhMzFhZjQmMTMmVm0wd2QyUXlVWGxWV0d4WFlUSm9WMVl3Wkc5V1ZsbDNXa2M1YWxKc1dqQlVWbHBQVjBaYWMySkVUbGhoTVVwVVZtcEdZV015U2tWVWJHaG9UV3N3ZUZacVFtRlRNazE1VTJ0V1ZXSkhhRzlVVm1oRFZWWmFkR1ZHV214U2JHdzFWa2QwYzJGc1NuUmhSemxWVmpOT00xcFZXbUZrUjA1R1pFWlNUbFpVVmtwV2JURXdZVEZrU0ZOclpHcFRSVXBZVkZWYWQxTkdVbFZTYlVacVZtdGFNRlZ0ZUZOVWJVWTJVbFJHVjFaRmIzZFdha1poVjBaT2NtSkdTbWxTTW1oWlYxZDRiMkl3TUhoWGJHUllZbFZhY2xWc1VrZFhiR3QzV2tSU1ZrMXJjRWxhU0hCSFZqSkZlVlZZWkZwV1JWcHlWVEJhVDJOc2NFaGpSbEpUVmxoQ1dsWnJXbGRoTVZWNVZXNU9hbEp0VWxsWmJGWmhZMVpzY2xkdFJteFdiVko1VmpJMWExWXdNVVZTYTFwV1lrWktSRlpxUVhoa1ZsWjFWMnhhYUdFeGNGbFhhMVpoVkRKT2RGTnJaRlJpVjNoWVZXcE9iMWRHV25STlNHUnNVakJzTkZVeWRHdGhWazVHVjJ4U1dtSkhhRlJXTVZwWFkxWktjbVJHVWxkaVJtOTNWMnhXYjJFeFdYZE5WVlpUWVRGd1dGbHJaRzlqYkZweFUydGFiRlpzV2xwWGExcHJZVWRGZUdOR2FGaGlSbkJvVmtSS1QyUkdUbkphUmxKcFZqTm9XVlpYY0U5aU1XUkhWMjVTVGxkSFVsWlVWbHBIVFRGU1ZtRkhPV2hpUlhCNldUQmFjMWR0U2tkWGJXaGFUVlp3YUZwRlpFOU9iRXB6WVVkc1UwMHlhRmxXYlhCTFRrWlJlRmRzYUZSaVJuQlpWbXRXZDFZeGJISlhhM1JUVW14d2VGVnRNVWRWTWtwV1ZtcGFXbFpXY0doWlZXUkdaVWRPUjJGR2FHbFNia0p2Vm10U1MxUXlVa2RVYmtwaFVteEtjRlpxVG05a2JGcEhWbTA1VWsxWFVucFdNV2h2VjBkS1JrNVdVbFZXYlZFd1ZqRmFWMlJIVWtoa1JtaFRZbFpLU2xkV1ZtRmpNV1IwVTJ0a1dHSlhhRmhaVkVaM1ZrWmFjVkp0ZEd0V2JrSkpXbFZrYzFVd01WWmlla1pYWVd0dmQxWlVSa1psUm1SellVWlNhRTFzU25oV1YzUlhXVlpaZUZkdVJsVmlWR3h6V1d0YWQyVkdWWGxrUjBacFVteHdlbFV5ZUhkWGJGcFhZMGRvV21FeVVrZGFWV1JQVTFkS1IyRkhhRTVXYmtKMlZtcEdZV0V4VlhoWFdHaFZZbXhhVmxscldrdGpSbFp4VW10MFYxWnNjRWhXVjNSTFlUQXhSVkpzVGxaU2JFWXpWVVpGT1ZCUlBUMD0=

Name: Anonymous 2008-06-17 18:50

>>40
Dave Eberly‽⁈⁉‼‽⁈

Name: Anonymous 2008-06-17 19:45

>>39
his book actually doesn't go over the STL much I think like 1 chapter at the end

Name: Anonymous 2008-06-17 20:08

>>42
What the hell sort of character is ⁈? It looks like:

+--+
|20|  
|48|
+--+

Is this a Firefox 3 thing?

Name: Anonymous 2008-06-17 20:10

>>44
Yes, it is.

Name: Anonymous 2008-06-17 20:10

Name: Anonymous 2008-06-17 20:40

>>44
That glyph signifies that Firefox cannot find glyph for U+2048. Here is some information about it:

    ##    #
   #  #   #
     #    #
     #    #
    
     #    #


U+2048 QUESTION EXCLAMATION MARK

General Character Properties

Unicode category: Punctuation, Other

Various Useful Representations

UTF-8: 0xE2 0x81 0x88
UTF-16: 0x2048

C octal escaped UTF-8: \342\201\210
XML decimal entity: ⁈

Annotations and Cross References

Approximate equivalents:
 • U+003F QUESTION MARK U+0021 EXCLAMATION MARK

Name: Anonymous 2008-06-17 20:43

Royal ℒℴℓ

Name: >>47 2008-06-17 20:45

Apparently shiitchan doesn't escape the ampersand in HTML entity references.

XML decimal entity: ⁈
should be
XML decimal entity: ⁈

Name: Anonymous 2008-06-17 20:48

Yes it does: ⁈

Name: Anonymous 2008-06-17 21:00

>>50
I thought I should let you know that that's not shiichan escaping the ampersand, that's you inserting empty bold and italic tags, and that you are trolling me. Stop trolling me, I don't like it.

Name: Anonymous 2008-06-17 21:14

ℒℴℓℒℴℓℒℴℓℒℴℓℒℴℓℒℴℓℒℴℓℒℴℓℒℴℓℒℴℓℒℴℓ

Name: Anonymous 2008-06-17 21:19

ℒℴℓℴℓℴℓℴℓℴℓℴℓℴℓℴℓ?

Name: Anonymous 2008-06-17 21:51

Looking at the swans, and hearing the birds singing.

Name: Anonymous 2008-06-17 21:52

The sword of time
Will pierce your skin
It doesn't hurt when it begin
But as it works it's way on in
The pain grows stronger
Watch it grin

Name: Anonymous 2008-06-17 22:14

>>51
Yes it does: ⁈

Name: Anonymous 2008-06-17 22:35

>>56
[rem

Name: Anonymous 2008-06-17 23:44

>>31
Troll harder. BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); can only throws unchecked exceptions, and it's asinine to attempt to catch them all individually. You could do the same thing in C++ or C# and end up with equally terrible code.

Name: Anonymous 2008-06-18 3:09

>>58
but you don't.

Name: Anonymous 2008-06-18 17:18

Does anyone remember the epic gamedev thread about the guy who invented a 120% efficient compression algorithm?

it was based on 1's and 0's or someshit.
I fucking lold.

Name: Anonymous 2008-06-18 18:16

>>58
Isn't there an "else" for exception catching?

Name: Anonymous 2008-06-18 18:27

>>61
Yes. It's called the inside of the fucking try block.

Name: Anonymous 2008-06-18 18:52

>>62
You seem to be confused.

Name: Anonymous 2008-06-18 21:29

>>61
catch (Exception e) will catch all exceptions inheriting from the Exception class (that is, all of them) through the magic of polymorphism.

Name: Anonymous 2008-06-18 21:43

>>64
You mean Throwable, retard.

Name: Anonymous 2008-06-18 21:46

>>64,65
Ah, ok.

Name: Anonymous 2008-06-18 22:14

>>65
Exception inherits from Throwable, but all exceptions the standard libraries throw inherit from Exception, not from Throwable directly.
Throwable is a separate class because Error also inherits from it, but applications

should not try to catch errors since they indicate abnormal conditions. An abnormal condition is something which should not occur, or which should not be recovered from. This latter category includes ThreadDeath and AssertionError.
Catching a Throwable rather than an Exception is bad practice. In the best case it's useless, in the worst case is fucks shit up in hard-to-predict ways.

Read the fucking documentation before commenting.

Name: Anonymous 2008-06-19 0:06

try {
  while(true) {
    throw new OutOfMemoryError("JAVA");
  }
} catch(Throwable t) {
   System.out.println("JAVA has died.");
}

Name: Anonymous 2008-06-19 0:08

>>68
Will throw exactly one OutOfMemoryError before proceeding to the catch block.

Name: Anonymous 2008-06-19 13:26

>>68
Build errors into infinity, it'll throw up eventually

Name: Anonymous 2008-06-19 13:35

>>67
Consider a punch bag.

Name: Anonymous 2008-06-19 13:46

>>71
Come on, >>67 seemed polite enough. Only two instances of cussing, and a single (and restrained) telling off. Also, lo and behold, no caps lock. I don't think a punching bag is really necessary at this point.

Name: Anonymous 2008-06-19 13:51

>>72
You have issues.

Name: Anonymous 2008-06-19 14:57

>>67
Hey, dumbfuck, documentation tends to say all kinds of crazy things. If some library throws an AssertionError while loading a file, you can catch that and handle it gracefully. Or you get an OutOfMemoryError when loading a huge image. Catch that fucker. Bad practice, my ass.

Name: Anonymous 2008-06-19 15:31

>>74
If you want to catch those errors you will always do so by explicitly catching AssertionError and OutOfMemoryError, not by catching a general Throwable, because they're a bigger deal than regular exceptions.
catch (Throwable t) is retarded and you're a fucking moron for trying to defend it without thinking.

Name: Anonymous 2008-06-19 15:35

[b][u]You might also want to use the HASKELL function catch, which happens to be perfectly suited for doing various stuff in case of errors[/u][/b]

Name: Anonymous 2008-06-19 15:36

Shit.

You might also want to use the HASKELL function catch, which happens to be perfectly suited for doing various stuff in case of errors

Name: Anonymous 2008-06-19 16:08

>>75
No, they're not a bigger deal if it just means some file failed to load, asshole.

Name: Anonymous 2008-06-19 16:24

>>78
The compiler will warn you about exceptions the classes you use throw. The documentation for those classes will also warn you of them. Neither will tell you about Errors.
If you actually read through the source code of every single class you use you'll know about them, but nobody does that.

The only thing catching Throwables will do is make it so you accidentally catch an unknown Error when all you wanted to do was catch known exceptions.
If you think that's not a big deal you're a fucking idiot who's obviously never worked on a real Java project. Enjoy your single semester of Java.

Name: Anonymous 2008-06-19 17:07

There seems to be a confusion about what "catching a Throwable" means, and it's fueling this retarded discussion. To asshole #1 it means catch (Throwable t), while to asshole #2 it means catch (SpecificSubclassOfThrowable t). Each asshole's point is right when "catching a Throwable" means what he thinks it means.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List