Archived

This topic is now archived and is closed to further replies.

a few beginner, but important, questions

This topic is 5144 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Greetings, I am brand new to the game programming world, and thus would love the opinions of those who have been here before me. 1. In terms of speed, usability, and just downright the best for the job, is C or C++ going to be more for a large scale and very detailed game? I know It''s a matter of opinion, but I hear good and bad things and would like a rundown of the cons and pros of each (the one on this site just didn''t do it for me). 2. OpenGL or DirectX 9? I''m not looking for cross platform ability because I don''t see Linux handling the graphics in my lifetime, and thus I see it staying on Windows with a possible port later to Mac. OpenGL reminds me of slightly choppy Quake 2 while DirectX reminds me of morrowind, homeworld, etc. I can''t find anything that offers a good honest insight to what does what and why. This also may help decide origonal programming language, as most directX documentation (From what I have heard) is C++ based. 3. How do you get a project started? I''m sitting down and there seems to be so much I need to plan out and research before getting to the coding part. Anyone have any tips or ideas about where to start? Maybe a game plan from someone who has programmed an entire game before so I have a idea of what to work with? Thank you for your time and patience with me, regards, Battlefield Tactics "There may come a time when ours swords must be thrown to the ground in defeat. There may come a time when the world as we know it sings no more songs of happiness. But today is not that day! For today, let them never forget the spirit of mankind and the courage within our hearts!" -- myself

Share this post


Link to post
Share on other sites
1. They''re both good - depends on your personal preference. Personally I prefer C++ because it has more features to augment program design.

2. Linux supports hardware acceleration if the vendor provides the drivers (nVidia does, no idea about ATI). If you''re only concerned about Windows, Direct3D would be your best bet. Unless of course you''re using C in which case I would tend to stick with OpenGL.

3. Never finished a game myself (for shame!) so I can''t say.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If you''re going to port to mac, you may want to stay safely in OpenGL land. If you don''t care about more than one window
or native widgets, I would also suggest using libSDL (www.libsdl.org), which would give you instant (at the graphics, audio, and event levels) cross-compatiblity
between win32, mac, linux, and other platforms.

Share this post


Link to post
Share on other sites
Hello

1) I''m a C++ junkie myself, as said, I also use it because it allows a nicer software design to the things I''m developing.

2) I was a directx fan, but I''m now with opengl because I use linux nowadays. We ported a demo from linux to windows in no-time using opengl and fmod for music.

3) I''ve finished a game, but we didn''t do it as you should do, that is, design each and every obsticle, find a solution and write the code. That is really the way to do it.. to mark out every single problem you have, divide the code into modules/sections/classes and then implement one at the time. Testing each component is also extremely recommended.

Also, start with something simple first, and I mean REALLY simple, like asteroids, arkanoid, nibbles or similar.

Good luck!
Albert "thec" Sandberg

Share this post


Link to post
Share on other sites
Hi,

As you said yourself, the choice of language is mostly a matter of preference. I personally use C++ because thats what I'm used to, and can't provide a better comparison than the other ones given on this site.

If you were to stay in the Windows platform, then I would suggest DirectX. Many people say that OpenGL is easier to learn. But once you get used to DirectXs style its no problem thanks to its brilliant docs. The power difference between OpenGL and DirectX Graphics is negligable in most areas but DirectX also provides access to all the other areas required for games such as sound and networking. I know that there are other APIs that can provide these features but it is nice to have them all under the one roof. If you do go for DirectX you really should use C++. You could use C but it is probably not worth the hassle.

libSDL is a good choice to start off on. You can gain good experience about planing a game and its structure, but I would recommend learning OpenGL or DirectX aswell as you gain a deeper understanding of how graphics work, if nothing else.

As for starting a project, it really depends on the type and size of the game. But for fear of sounding clichéd, if this is your first attempt at graphics or games in C/C++, make a tetris clone or even something simpler. My first was a pong clone. It doesn't take much time but the skills learned in finishing even the smallest of games is huge.

All that I have said is just my own opinion based on my own experience but I hope it is of help :-)

Good luck!

Edit - typos

[edited by - stro on November 13, 2003 3:42:13 PM]

[edited by - stro on November 13, 2003 3:42:35 PM]

Share this post


Link to post
Share on other sites
I want to thank everyone for their responces and look foward to future responces as well in this thread. I will most certainly take those first baby steps in programming games, and will most likley end up using C++ with DirectX.

Why don''t I want to port to Liunx? Because as much as I love the OS, let''s be honest. If it could handle next generation graphics we would not be using windows. Even with WineX as an emulator and nvidia releasing binary packages of their drivers, XFree and X simply isn''t ready for next gen graphics. And the project I have in mind, well let''s just say I plan on having the minimum specs be a Pentium IV 4.2 ghz with one gig of RAM and about 10 gigs of install space.

It''s massive, and for a good reason. I''ll explain the game idea later once I feel it is ready


Thanks again!

Share this post


Link to post
Share on other sites
Hi battlefieldtactics,

I just want to let you know that when you''re thinking about OpenGL, you can also think at Doom III and Quake III Because that''s what ID software uses.

"My basic needs in life are food, love and a C++ compiler"
[Project AlterNova] [Novanet]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You probably shouldn''t plan on your first game being that incredibly complicated. If you''re planning on learning C++ and DirectX for the first time, your first project shouldn''t be a game that requires "a Pentium IV 4.2 ghz with one gig of RAM and about 10 gigs of install space."
I think you''ll just end up frustrated whe you don''t get anywhere.

Share this post


Link to post
Share on other sites
Oh I agree. My first game will not be incredible complicated, but what I was talking about was the final goal of the game I have in mind that I would like to eventually acheive. I have it on paper, on books, etc. The idea is there for this game I want to develope, and fully understand a lot of tiny smaller games will need to be made before this becomes a reality.

Share this post


Link to post
Share on other sites
I''m looking at some DirectX docs and it seems to allow a very good API handling for networking. Since I plan on the final project being a very MASSIVE MMORPG, I think that is going to be something needed.

OpenGL can handle networking i''m sure with 3rd party APIs, but as well as a DirectX handler?

Share this post


Link to post
Share on other sites
quote:
Original post by battlefieldtactics
I''m looking at some DirectX docs and it seems to allow a very good API handling for networking. Since I plan on the final project being a very MASSIVE MMORPG, I think that is going to be something needed.

OpenGL can handle networking i''m sure with 3rd party APIs, but as well as a DirectX handler?

OpenGL doesn''t care about what network libraries you use with it. So you can use SDL''s network libs, or DX''s network libs, but keep in mind if you use DirectX for your netcode, that you would have to rewrite it to an extent in order to port it over to Mac.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by battlefieldtactics
I want to thank everyone for their responces and look foward to future responces as well in this thread. I will most certainly take those first baby steps in programming games, and will most likley end up using C++ with DirectX.

Why don''t I want to port to Liunx? Because as much as I love the OS, let''s be honest. If it could handle next generation graphics we would not be using windows. Even with WineX as an emulator and nvidia releasing binary packages of their drivers, XFree and X simply isn''t ready for next gen graphics. And the project I have in mind, well let''s just say I plan on having the minimum specs be a Pentium IV 4.2 ghz with one gig of RAM and about 10 gigs of install space.

It''s massive, and for a good reason. I''ll explain the game idea later once I feel it is ready


Thanks again!



I really wouldn''t start out that big, that could take you a while. You should start out small and work up, not try a huge project that would take 300+ people years to finish.

Share this post


Link to post
Share on other sites
Once again, anonymous poster, I can stress that the thing you quoted was my final goal and something I amstriving for. I understand all the baby steps and smaller games I will be making until I feel I am ready for that large of a production. I don''t think you are the same anonymous poster, as I already answer this once or twice.



As a update note, I have chosen DirectX and C++. They seem to go hand in hand with one another and direct X seems to have much more of an ability for power, graphics and the like. And since I''m not concerned about portability, OpenGL is useless to me.

I do have one question though, just to clear something up.

C++ and Microsoft Visual C++. What is the difference? C++ is the standard and Visual C++ is a flavor of ir, or simply the all in one program namefor the compiler, linker, and editor?

If it is a different kind of C++, then what is the difference and should I use that in place of C++? If it is just the official name for the MS compiler, editor, and linker than would any recommend it over say Ultra edit or notepad?

Thanks

Share this post


Link to post
Share on other sites
Personally, im into c++ i have tried a few other languages but i prefer c++. It lets you control the small things you dont want to see and if you dont want to you dont have to. Anyway, i have tried opengl and directx. Opengl is easier to understand and directx has the power you need to make a really nice game. I have never completed a game but i need to. I would start out with opengl for my first game.

Share this post


Link to post
Share on other sites
quote:
Original post by battlefieldtactics
I'm looking at some DirectX docs and it seems to allow a very good API handling for networking. Since I plan on the final project being a very MASSIVE MMORPG, I think that is going to be something needed.

OpenGL can handle networking i'm sure with 3rd party APIs, but as well as a DirectX handler?


For a "MASSIVE MMORPG" good luck using DirectX networking or even a third party library. Any large MMO uses a proprietary network library using Winsock and UDP or combination of UDP/TCP.

As shown with a few independant MMOs being developed right now.. using a third party networking lib is not all it's cracked up to be. I won't name any project names.. but I know one that lags like a beast due to using the network component they chose =]

[edited by - Imperil on November 14, 2003 11:03:12 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hang on... what''s this with Linux being too slow? I don''t understand... I run Linux and Windows on the same PC, with the same GeForce graphics card, and they both run my OpenGL programs at the same speed (faaaaaast).

And what''s Wine got to do with it, anyway?

Yours truly,
A Disturbed Linux User

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
"Hang on... what''s this with Linux being too slow? I don''t understand... I run Linux and Windows on the same PC, with the same GeForce graphics card, and they both run my OpenGL programs at the same speed (faaaaaast)."


Yeah, he was wrong. Linux has much less overhead than Windows, so, theoretically, games can run faster in Linux than in Windows. There are fewer Linux games, however, because there is less of a market.

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
"Hang on... what''s this with Linux being too slow? I don''t understand... I run Linux and Windows on the same PC, with the same GeForce graphics card, and they both run my OpenGL programs at the same speed (faaaaaast)."


Yeah, he was wrong. Linux has much less overhead than Windows, so, theoretically, games can run faster in Linux than in Windows. There are fewer Linux games, however, because there is less of a market.



On a theoretical level you could also say DOS runs games faster than both Linux and Windows =]

Share this post


Link to post
Share on other sites
Don''t say that. DOS is teh suxx0rz, write a game that''s bundled with your own OS. And make sure that it supports every single hardware configuration just as well as Windows does. (I know, that''s not well at all, but at least you have a lot of choices.)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
"On a theoretical level you could also say DOS runs games faster than both Linux and Windows =]"

No... DOS only had support for 32 MB of RAM.

Share this post


Link to post
Share on other sites
"Hang on... what''s this with Linux being too slow? I don''t understand... I run Linux and Windows on the same PC, with the same GeForce graphics card, and they both run my OpenGL programs at the same speed "


Last time I ran a check On my gentoo machine versus my 2k machine, Quake 3 had 20 less fps. Also, much I also remind that linux games only support Nvidia, and even then binary packages instead of the source.

No, linux is not a gaming platform for a reason, and thus why 80% of all linux users dual boot Linux isn''t built nor ready to handle the low latency (no, not even with patches) and timing freqs that high quality games require. It''s obvious, or more games would be in linux.

And the linux market is about 40%, not less. Overhead has nothing to do with game preformance, hardware properties and how well they are called deals with it. So, until you can show me benchmarks of Warcraft 3 on a nix versus windows. Oh wait, no WC3 for linux. Well, even better. Bench mark a fully tweaked and installed nix OS running quake 3, and then benchmark a fully tweaked and installed win OS running quakle 3. Windows out preforms, each time


No, I''m not a win lover, but I''ve given each OS the same amount of attention and am well aware of the pros and cons of both.

My final answer is still DirectX and C++ on windows machines, with portability to Mac.

Share this post


Link to post
Share on other sites