Delphix for 3d game

I've a problem: i'm beginning with delphi and directx: is delphix a good choice to make 3d game easily?

I want to use directx, is it easier with delphix?

And where can i find good tuts on delphi?



The_Green_Falcon Thanks you!!


Comments

  • : I've a problem: i'm beginning with delphi and directx: is delphix a good choice to make 3d game easily?

    : I want to use directx, is it easier with delphix?

    : And where can i find good tuts on delphi?



    Delphi is not a good language to program games with. It is slow (Borland doesn't make compilers that optimize very well), bulky, and quite frankly, nobody makes *real* games in Delphi.



    I think of Delphi as a nice way to make Win32 apps as an alternative to VB, but not games.



    Learn C/C++.



    -Xotor-


  • Says who?



    Delphix is a wrapper around DirectX, so you will be using the same set of APIs for the graphics as C++ (C cant be used with DirectX).



    Optimizing? Hello? Optimizing nowdays is all about optimizing your algorithms, loop unwinding, fixed-math etc are all gone down the drains with DOS, your standard graphics engine (DirectX, OpenGL, etc) will take care of the graphics.



    I cant see any reason why not to use Delphi for writing games. However, finding a wrapper around OpenGL instead of DirectX would be a big plus, if you care about Linux that is.



    : : I've a problem: i'm beginning with delphi and directx: is delphix a good choice to make 3d game easily?

    : : I want to use directx, is it easier with delphix?

    : : And where can i find good tuts on delphi?

    :

    : Delphi is not a good language to program games with. It is slow (Borland doesn't make compilers that optimize very well), bulky, and quite frankly, nobody makes *real* games in Delphi.

    :

    : I think of Delphi as a nice way to make Win32 apps as an alternative to VB, but not games.

    :

    : Learn C/C++.

    :

    : -Xotor-

    :






  • I know this doesnt really have much to do with this discussion, but you CAN use C with DirectX. You just have to use a different way of dealing with the COM objects.



    Copied from MSDN:



    "Any COM interface method can be called from a C program. There are two things to remember when calling an interface method from C:



    1. The first parameter of the method always refers to the object that has been created and that invokes the method (the this argument).



    2. Each method in the interface is referenced through a pointer to the object's vtable."



    so instead of something like:

    ret = lpDD->CreateSurface(&ddsd, &lpDDS, NULL)



    you would use:

    ret = lpDD->lpVtbl->CreateSurface(lpDD, &ddsd, &lpDDS, NULL);







    : Says who?

    :

    : Delphix is a wrapper around DirectX, so you will be using the same set of APIs for the graphics as C++ (C cant be used with DirectX).


  • The reason optimizing seems less apparent is because now we have compilers that will do optimizing for us, and overall better than a human. Though well-done hand-coded assembler will beat a compiler any day of the week, it's just not feasible to program an entire application in hand-coded assembler, and it is not to important to optimize certain parts.



    These low-level optimization can make a significant difference. Sure, a better algorithm usually will beat out a well coded, but inefficient algorithm, but a poorly coded good algorithm, will lose to a well coded good algorithm.



    For processor intensive apps, hand-coded assembler is usually used in tight-loops b/c even a small difference times 1024*768*4 is a big difference.



    Most professionals probably use the best algorithm or at least a very good algorithm, as all but the cutting edge ones are relatively common knowledge by now.



    Finally, Intel found it important enough to setup systems to implement low-level optimizations in hardware. For example, loop-unrolling and modulus timed loops are implemented in hardware on Intel's 64-bit chips.



    Next, C++ will beat Delphi any day of the week. So does it matter that you can use DirectX from Delphi. I, with Xotor, with everyone, have never heard of any *real* game being programmed in Delphi. C/C++ is THE most popular language for game programming (or almost any complicated real-time system). It is the de facto standard. There must be a reason behind why all these game programmers are using C/C++.



    C/C++ is one of the most efficient languages out there for speed and size, while still retaining high-level characteristics. Hmm, have I heard somewhere that one of the strengths of C/C++ is still giving access to low-level aspects of the computer.



    I've heard of cases (I forgot what language this was) where people have profiled their code and found more time wasted in the languages overhead than actually doing anything.



    One other thing, I can think of a reason not to use Delphi to make a game. Employers don't want someone proficient at making games in Delphi, they want someone proficient at making games in C/C++, typically.



    PS Check your info before you state it, or at least give yourself a way out by couching it in "I think" or something.



    : Says who?

    :

    : Delphix is a wrapper around DirectX, so you will be using the same set of APIs for the graphics as C++ (C cant be used with DirectX).

    :

    : Optimizing? Hello? Optimizing nowdays is all about optimizing your algorithms, loop unwinding, fixed-math etc are all gone down the drains with DOS, your standard graphics engine (DirectX, OpenGL, etc) will take care of the graphics.

    :

    : I cant see any reason why not to use Delphi for writing games. However, finding a wrapper around OpenGL instead of DirectX would be a big plus, if you care about Linux that is.




  • : Delphix is a wrapper around DirectX, so you will be using the same set of APIs for the graphics as C++ (C cant be used with DirectX).

    :

    : Optimizing? Hello? Optimizing nowdays is all about optimizing your algorithms, loop unwinding, fixed-math etc are all gone down the drains with DOS, your standard graphics engine (DirectX, OpenGL, etc) will take care of the graphics.



    Hello yourself. I'm speaking of optimizing at the COMPILER LEVEL. No matter how much you optimize your code, if you your *compiler* does such a shitty job of making your code efficient you're looking at a slow dumpy program.



    Take for example Turbo C++ vs other C compilers. Turbo C++ is HORRIBLE at optimizing, especially against such fine-tuned compilers as gcc. Thus Turbo C++ is not a good platform for making games.



    : I cant see any reason why not to use Delphi for writing games. However, finding a wrapper around OpenGL instead of DirectX would be a big plus, if you care about Linux that is.



    Why the hell would you want to wrap around OpenGL? OpenGL is one of the easiest graphical APIs in existance. If anything, you'd want to wrap around DirectX which is *not* intuitive.



    -Xotor-


  • : The reason optimizing seems less apparent is because now we have compilers that will do optimizing for us, and overall better than a human.



    Delphi can do that. I dont think you ever used Delphi, have you? Infact I dont think you ever programmed in Windows environment. Please go and check the output of Delphi binary vrs any Windows compiler and see for yourself.



    :Though well-done hand-coded assembler will beat a compiler any day of the week, it's just not feasible to program an entire application in hand-coded assembler, and it is not to important to optimize certain parts.

    :



    Delphi can do assembly code. So no problem here. Dont confuse C/C++ with ASM please!



    : These low-level optimization can make a significant difference. Sure, a better algorithm usually will beat out a well coded, but inefficient algorithm, but a poorly coded good algorithm, will lose to a well coded good algorithm.



    Again, this is general talking, if I use Delphi then I will be inefficient algorithms? Makes no sense.



    : For processor intensive apps, hand-coded assembler is usually used in tight-loops b/c even a small difference times 1024*768*4 is a big difference.



    Again, that's ASM vrs everything else. No point.



    : Most professionals probably use the best algorithm or at least a very good algorithm, as all but the cutting edge ones are relatively common knowledge by now.



    Agree, still has nothing to do with Delphi vrs C/C++ in Windows.



    : Finally, Intel found it important enough to setup systems to implement low-level optimizations in hardware. For example, loop-unrolling and modulus timed loops are implemented in hardware on Intel's 64-bit chips.



    See above.



    : Next, C++ will beat Delphi any day of the week. So does it matter that you can use DirectX from Delphi. I, with Xotor, with everyone, have never heard of any *real* game being programmed in Delphi. C/C++ is THE most popular language for game programming (or almost any complicated real-time system). It is the de facto standard. There must be a reason behind why all these game programmers are using C/C++.



    :

    : C/C++ is one of the most efficient languages out there for speed and size, while still retaining high-level characteristics. Hmm, have I heard somewhere that one of the strengths of C/C++ is still giving access to low-level aspects of the computer.

    :

    : I've heard of cases (I forgot what language this was) where people have profiled their code and found more time wasted in the languages overhead than actually doing anything.

    :

    : One other thing, I can think of a reason not to use Delphi to make a game. Employers don't want someone proficient at making games in Delphi, they want someone proficient at making games in C/C++, typically.



    I agree, all you said is true. But you are looking back. First of all this guy is probably still in high school, he's doing this as a hobby, comparing what hes trying to do with the gurus out there is pointless. There was this kid once who was asking questions about x86 ASM, also trying to make a game, so I said to him "Why on earth do you want to torture yourself making a game in ASM, go Windows! go C++?!" And he said "For fun". Thats the whole point! I couldnt say anything else.

    Second, Delphi is probably the first and biggest Windows based RAD environment to be ported to Linux. This guy with his experience (or experience he will make wrtiting this game) with Delphi will be a big plus for him. Hence, no effort is wasted. If you dont agree and dont care about Linux (you are an MS fan), very good, heard about .NET? If you want to program games for the future go C#!.



    :

    : PS Check your info before you state it, or at least give yourself a way out by couching it in "I think" or something.



    This wasnt necessary.


  • Hello Xotor.



    : Hello yourself. I'm speaking of optimizing at the COMPILER LEVEL. No matter how much you optimize your code, if you your *compiler* does such a shitty job of making your code efficient you're looking at a slow dumpy program.



    Hello again! Delphi does NOT produce shitty code. I used to think that, I was proving wrong. Delphi optimized for speed code is as good as C++.



    : Take for example Turbo C++ vs other C compilers. Turbo C++ is HORRIBLE at optimizing, especially against such fine-tuned compilers as gcc. Thus Turbo C++ is not a good platform for making games.



    True, but TC++ is a 16-bit 1990 DOS-based compiler, gcc is a 32-bit 2000 DOS-based compiler. You cant possibly compare the 2 of them together. Besides we were talking Windows compilers, much has changed!



    : Why the hell would you want to wrap around OpenGL? OpenGL is one of the easiest graphical APIs in existance. If anything, you'd want to wrap around DirectX which is *not* intuitive.



    I was talking about a game engine wrapper. Dont know if such exists for Delphi, but that would be a very good thing. I dont think OpenGL has a function glLoad3DSFileAsList, or make that GLList.Load3DSFile in an OO way. Not to mention a game loop, GLList.HitTest( GLList & ).. Can think of a hundred different "functions" to be wrapped.






Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories