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:
bet your gay2006-04-26 14:08
lol fag
Name:
Anonymous2006-04-26 14:32
You had me going for a while, up until you mentioned Java. I'm now convinced that this thread is a joke on several levels.
Name:
Anonymous2006-04-26 14:49
highly complex systems (up to 4000 lines of code)
Uh. 4000 is pretty damn small FYI.
Name:
Anonymous2006-04-26 14:54
Yeah... lol @ 4000 lines !
Name:
Anonymous2006-04-26 15:18
Lol. Good job. You got for the first paragraph, I was even feeling pity and had written this:
Uh... If this is not a troll I'd like to let you know of something, not to be an asshole or anything, but you should know this. 4000 is the limit between small and medium. A large/complex project is usually 20K-50K lines of code. I'm maintaining a 200K+ lines system among other things at work. The insane Windows 2000 codebase is about 40 million lines.
Name:
Anonymous2006-04-26 16:16
4000 lines was enough for minix3.org
Name:
Anonymous2006-04-26 16:24
Just too funny, I HAD to reply with a semi-seriously.
lol @ 4000 lines
lol @ java
lol @ your cutting-edge tech. You do know that effects in movies may take ages to render! Games need to be realtime, doh!
lol @ people not having the right preperation. Looks like you don't either mate. Besides, theres no way you could compete with id or valve, especially from the sound of your post. And the fact you're asking this on 4chan. heh
Have you ever tried writing a game engine before? I have and can tell you it's no easy task.
ROFL @ "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"
I have decent knowledge of C++, C and some x86 assembly mechanisms, but I still won't claim that I can produce a high performance engine. Especially not using Java!!
DirectX vs OpenGL... search google. OpenGL is a graphics API, DirectX does graphics, sound, input... If you don't know what both of these are, then you are NOT ready to make any sort of large game engine. lol
"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)."
lol! How are *YOU* going to be able to draw stuff faster than a graphics card!? Besides, how would you expect to produce faster/better hardware interfacing code than the engineers at nVidia and ATI..? You know, the guys who know everything about the hardware and how it works.
roflmaool!!!
Name:
nedunlock2006-04-26 17:21
Hello everyone,
Thank you to those who tried to answer my questions properly. To the rest, please do understand, I have done a lot more programming than most of you, and I am much more experienced than most of you. That is why I said I only wanted opinions from professional developers.
I think I have decided to use OpenGl, as after a lot of research, I have found that you can use glDrawPixels to draw individual pixels, or blocks of pixels. (http//www.opengl/... This is essential as I have thought of some very unique methods which require rendering directly into a frame buffer. DirectX doesn't seem to have this feature; maybe Microsoft will include it in DirectX10. I have sent them an email requesting this feature... I'll keep you posted!
I find it hard to believe the so called 'standard' API on windows lacks such simple features like that; once again reinforcing my theory about games lagging so much behind movies.
Please stop telling me about how movies are rendered using supercomputers, etc. I know how these work (I have done a lot of research). Did you know NVidia (one of the major graphics card manufacturers) have shown the final fantasy movie running in real time (60fps+) on thier graphics cards?
Please try and answer my questions, and refrain from posting if you are just going to make fun.
You can access the framebuffer in directx.
You could also render to a texture and then map that to the screen.
Also, you are not going to get much performance if you are going to render each pixel by hand, in software.
If anything, you could do it iusing pixel shaders.
I do not believe you have done enough research and I personally doubt you're programming experience.
Name:
Anonymous2006-04-26 20:16
it is 4chan afterall ;)
Name:
Anonymous2006-04-26 20:34
>>11
This Anonymous still hasn't realized this is a joke.
Name:
Anonymous2006-04-26 21:05
You sure did put quite a lot of time into this joke. *Applause*
Name:
Anonymous2006-04-26 21:10 (sage)
This attempt at comedy fails to deliver.
“I tried to see things from his point of view, but I couldn't fit my head up his arsehole too.”
Im looking for a bento box, it cant be pinku (thats japanese for next-gen engine) or any girl color. It has to be
of 2 or more kotoba (thats japanese for 4000 lines of code) and has be be chibi (Java) sized. And
has to be really kawaii (glDrawPixels). Also It has to be about 10-20 bux. And you have to post pics of it
first (i want to make shure it's kawaii [glDrawPixels]). And it would be nice if it came with matching
chopstick holder (WITH chopsticks). OH! and it CANNOT have any cartoon pictures, or be made
out of plastic. It has to be made of ceramic, or something like that. Also it would be nice if it was
made in japan. and not in china or corea (mainly tetris clones) or whatever. I have found a bento box similar to
the one im describing in e-bay, but it was 1 kotoba, and i dont want my gohan (cutting-edge) to touch my
other things (it can get wet and i would not like that, plus 2 compartments looks more kawaii)
Name:
Anonymous2006-04-26 23:00
A. he's trolled the fuck out you
B. Your lack of experience is showing 200KLOC IS HUGE CODE LOL GTFO.
>>4
It's Java, 4000 lines of Java is pretty close to unmaintainable :P
Name:
Anonymous2006-04-27 9:17 (sage)
Let's not forget about all the XML Progr^H^H^H^H^H"Configuration"!
Name:
Anonymous2006-04-27 15:11
4K lines of Java is a huge achievement!
Name:
Anonymous2006-04-27 18:48
You actually got to write four fucking thousand lines of Java without quitting your job? I admire you.
Name:
Anonymous2006-04-27 21:46
"highly complex systems (up to 4000 lines of code"
HAHA! That's nothing dude!
"I was sadden in realizing how outdated the technology of today games is"
Don't forget that a sucessful game has to hit diferent budgets. But yes there are several poor examples that I know... You should monitor the disk access of the America's Army game, it's a joke!
I recomend DirectX because has a very easy API, and it's integration with Windows drivers makes it easier to achieve better results. OpenGL is more portable and better for opensource programming, but heh! Where is the linux gaming today? Well I have some good games running on linux but have poor support to it, but it's still a good adventure!
You SHOULDN'T access graphics card memory, and it's a driver's work. So you would have to write diferent code for diferent cards. A shit heh? If you want 2d access you should try SDL library or Direct Draw from DirectX package, both have prety good performance. Also explore the new pixel shader features present in almost every graphic card (not mine).
try
{
isr = new InputStreamReader(System.in);
if( isr != null )
br = new BufferedReader(isr);
}
catch (InputStreamException ise)
{
//Handle this shit
}
catch (BufferFullException bfr)
{
//Handle that shit
}
catch (Exception e)
{
//Handle some more shit
}
return br;
you would reach 4000 lines easy if you just handle every exception thrown.
Apparently shiitchan doesn't escape the ampersand in HTML entity references.
XML decimal entity: ⁈
should be XML decimal entity: ⁈
Name:
Anonymous2008-06-17 20:48
Yes it does: ⁈
Name:
Anonymous2008-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:
Anonymous2008-06-17 21:14
ℒℴℓℒℴℓℒℴℓℒℴℓℒℴℓℒℴℓℒℴℓℒℴℓℒℴℓℒℴℓℒℴℓ
Name:
Anonymous2008-06-17 21:19
ℒℴℓℴℓℴℓℴℓℴℓℴℓℴℓℴℓ?
Name:
Anonymous2008-06-17 21:51
Looking at the swans, and hearing the birds singing.
Name:
Anonymous2008-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
>>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.
>>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:
Anonymous2008-06-19 0:06
try {
while(true) {
throw new OutOfMemoryError("JAVA");
}
} catch(Throwable t) {
System.out.println("JAVA has died.");
}
Name:
Anonymous2008-06-19 0:08
>>68
Will throw exactly one OutOfMemoryError before proceeding to the catch block.
Name:
Anonymous2008-06-19 13:26
>>68
Build errors into infinity, it'll throw up eventually
>>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.
>>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:
Anonymous2008-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:
Anonymous2008-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]
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:
Anonymous2008-06-19 16:08
>>75
No, they're not a bigger deal if it just means some file failed to load, asshole.
Name:
Anonymous2008-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:
Anonymous2008-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.