Page 1 of 1

wolf 3d type game. easier in turbo pascal or c++?

Posted: Tue Feb 08, 2005 2:14 pm
by Joey
im thinking of undertaking a huge project with my friend, where we would make a game very similar to the classic wolfenstein 3d. i have multiple books on both c++ and turbo pascal, but im not really sure what turbo pascal is capable up. if i were to undergo a big project like this, would it be easier to make it in c++ or turbo pascal? im willing to take the time to learn the languages and stuff, and it would probably take a year or two to finish. possible more, but i wanted to try and incorperate a little multiplayer thing into it if i could ever learn enough to do that.

these are just thoughts and i doubt i would ever be able to finish a project like this. but atleast if i could make a little 3d world you could run around in and stuff i think it would be cool. again, it would be very much like wolf 3d, 256 colors, etc. nothing like todays standards. and i have a friend who is willing to help. he would probably do most of the art and help me with the sound. i think i would be doing nearly all the coding.

anyway give me your input soon please.

Re:wolf 3d type game. easier in turbo pascal or c++?

Posted: Tue Feb 08, 2005 7:36 pm
by AR
If you have low expectations and just want something like the original plus multiplayer then you should probably use OpenGL rather than messing around with ray-tracing. OpenGL should be very simple if you're going for a similar appearance since you won't need to touch anything other than initalisation, mesh loading and scene rendering.

The general standard in the games industry is C/C++, Microsoft is (trying to) shifting them to C# though. Games are very complicated pieces of software, you need a decent ammount of prior experience with both the language and platform (as well as the additional platforms on top like OpenGL/DirectX/SDL).

Re:wolf 3d type game. easier in turbo pascal or c++?

Posted: Tue Feb 08, 2005 7:55 pm
by Curufir
C++ and OpenGL, mainly because you'll find more help with C++ than Pascal.

http://nehe.gamedev.net/ might be a good starting place if you have limited OpenGL knowledge.

Re:wolf 3d type game. easier in turbo pascal or c++?

Posted: Tue Feb 08, 2005 8:14 pm
by mystran
Wolfenstein does not do ray-tracing. It does ray-casting. The difference might seem small, but while ray-casting is much faster than "true" polygon based rendering, ray-tracing is again slower than drawing polygons.

In ray-tracing you literally trace a ray for each pixel, testing it agaist different shapes like spheres (the fastest shape in raytracing btw), planes, and whatever you got. Once you hit a shape, you determine the normal of the surface there, and then usually compare that with directions of light sources. If you want shadows, you then trace another ray to see if something's blocking the way. Similarly you can do true reflections by tracing some more rays.

All of that stuff is a lot of math. The nice thing is that you get "photorealistic" images. You can't easily reach the same quality with polygons. There are some demos/intros (say, Heven7) that do real raytracing in realtime, but even those are quite primitive, and reaching their performance requires both deep magic and heavy wizardry. For practical purposes, ray-tracing is pretty much a batch activity.

The images from ray-tracing can simulate almost everything we see in real life. In fact, if properly organized, the complexity of the scene has much less effect on performance than it has with polygon rendering. Then again, if you have CPU to burn, you can do better than ray-tracing too. :)

The notable thing that even ray-tracing can't do (unless you cheat with some pre-calculation) is real radiosity lighting were not only the light-source provide light, but also every "visible" (ie, not purely black) surface. With radiocity you get VERY realistic images, but unfortunately you either need to pre-calculate it, or do something even fancier than ray-tracing. One such method is "photon tracing" where instead of tracing rays from the camera to the scene, we trace photon paths from lighting sources, and record them when they hit our camera.

Re:wolf 3d type game. easier in turbo pascal or c++?

Posted: Tue Feb 08, 2005 9:50 pm
by AR
mystran:
:) I'm not a game developer myself, I know those sorts of old games drew lines to give a 3D apperance and was called ray-something, I just took the first word that came to mind.

Re:wolf 3d type game. easier in turbo pascal or c++?

Posted: Wed Feb 09, 2005 3:56 pm
by mystran
AR wrote: mystran:
:) I'm not a game developer myself, I know those sorts of old games drew lines to give a 3D apperance and was called ray-something, I just took the first word that came to mind.
Yeah, I guessed that. I just felt an irresistible need to demostrate my superior knowledge of life, university, and everything. ;)

Re:wolf 3d type game. easier in turbo pascal or c++?

Posted: Wed Feb 09, 2005 4:02 pm
by cloudee1
42

Re:wolf 3d type game. easier in turbo pascal or c++?

Posted: Wed Feb 09, 2005 4:50 pm
by Joey
i have several books on c++, a few on turbo pascal, and one on visual basic 6. i have done a few chapters in c++ and vb6 but i dont know much at all. ive programmed AGI games and messed around with things before but im really not a programmer. but again, my friend and i want to spend some time to make a basic little wolf 3d type game. same graphics and stuff and if i ever learn enough language to make multiplayer i would be very happy.

so you suggest using open gl for this? could you tell me what i should do to start as soon as possible on this? like what i should read first, etc. for c++ books i have:

Learn C++ Today!
Sams Teach Yourself Visual C++ 6 in 24 hours
Programming in C
LetsC CCompiler
Programming in ANSI C
Sams Teach Yourself Game Programming in 24 hours

so what would you recommend. i really didnt like the game programming book for some reason. but do you suggest going through one of the books then reading some online open gl stuff? again, i want to start as soon as possible, and the best way i learn things is by editing or whatever. i learned AGI by looking at other peoples games, making changes, and experiementing, doing small games and building up, and also asking for help online for the complicated things.

so please let me know what i should do. thanks.

Re:wolf 3d type game. easier in turbo pascal or c++?

Posted: Thu Feb 10, 2005 8:06 pm
by Joey
also, what exactly is OpenGL? i know it is used in a lot of modern games and stuff but i dont know what it exactly is. and if i were to make a game like wolf 3d, would it be easy? i have done basic c++ apps like hello world, etc., so i dont know much of it, but would it not be too difficult while using open gl? and how hard would it be to make a small multiplayer feature out of the game after the engine and single player is done. just a simple ip connect 4 or 8 player death match thing.

please let me know soon, i would like to begin this project as soon as possible, so let me know what my first step should be (what tutorials or whatever i should start with)

Re:wolf 3d type game. easier in turbo pascal or c++?

Posted: Thu Feb 10, 2005 11:31 pm
by Perica
..

Re:wolf 3d type game. easier in turbo pascal or c++?

Posted: Thu Feb 10, 2005 11:49 pm
by AR
OpenGL is a 3D API (Application Programming Interface) created by Silicon Graphics in the early 1990s, it's the standard cross-platform API for dealing with 3D Graphics, although Microsoft's DirectX is considered the general standard for games but it's Windows only.

You may be better off using an additional layer like SDL (Simple DirectMedia Layer) which includes an OpenGL wrapper as well as sound and input, not sure about networking.

As for multiplayer, the only way to do it properly is to have a server, this is to allow players to find and create games. Usually the client negotiates with the server to find peers, then the server acts as a tunnel to transmit data between the peers. The disadvantage of this approach is if the server is overloaded, everyone has a laggy game. The common modification to this approach is the server declares which peer is connectable with the fastest ping and they become the game server.

You also need to consider what's going on in the levels, if there are interactive objects, they need to be coordinated so that they appear exactly the same to everyone, this adds extensive pressure to writing the engine since it needs to always generate the same result when the same set of inputs are given. If there is only the players moving (ie. no doors, AI or items) then they only need to syncronise positions and actions (shooting/moving/nothing) which is far simpler.

You may want to checkout GameDev.net's articles and tutorials, google for "SDL Tutorials", the gamedev forum may also have more people who can point you in the right direction.

Considering your lack of experience though, you will most likely have a lot of difficulty. The general approach to game programming that I hear continually rehashed over and over is to start with simple 2D stuff like Pacman, solitare, minesweeper and the like. These sorts of things will allow you to familarise with the concepts involved in dealing with games, the learning curve is quite long, it can take years to become proficent with the finer points of the APIs, especially given the sheer number of them.

Re:wolf 3d type game. easier in turbo pascal or c++?

Posted: Fri Feb 11, 2005 10:43 pm
by Joey
Perica, and everyone else, just to make things clear, I have made games before, and i do have experience. i just have never made a game in c++. i have made games using the AGI engine, Reality Factory, Game Maker, and other programs. Ive also made maps for popular games like Unreal and Return to Castle Wolfenstein. i understand this still isnt anything near c++ but i do have experience with making games, i just dont know the language and stuff. i also understand that this will be no walk in the park. i just wanted to know about how difficult it would be and how long it might take. as long as i see results i will be motivated to continue onward.

so would you still recommend making a 2d game first? and should i in c++ and open gl? then maybe when i get more of an understanding, i can move on? and the multiplayer part was just an extra feature i was thinking, and no i would not want to host a server for the game, i would want direct ip to keep it as easy for me as possible. the main part of the game would focus on single player. but could you give me some links that might help in making a few games with these? (i havent really explored the other sites posted yet so if the info is on there just let me know.)

also, if you use open gl library or whatever, would you be able to sell games with it or would you have to buy a license for it or something.

i am really excited to start this project. i can see the game in my head and i want others to be able to see it and enjoy it, so please give me the advice i need to get started on this as soon as possible. i wanted to take the game step by step to keep me going, like first make the main menu and opening screens. then make a 3d world, then make it so you can move in the world, etc.

thanks for the help so far.

Re:wolf 3d type game. easier in turbo pascal or c++?

Posted: Fri Feb 11, 2005 11:28 pm
by AR
OpenGL may be used freely without licence fees, so can SDL (but it's under LGPL).

Game tools are different from coding a game, experience in using those may help with design, I'm not sure how effective that knowledge is in implementation though. Programming languages require that you are familiar with Win32 (or POSIX on Linux), Direct3D/OpenGL, DirectSound/OpenAL/OS Sound APIs, DirectInput/OS Input APIs as well as the language itself and its builtin functions, such as the STL for C++. It's usually a battle to just get a window on the screen.

If you think you can do it, I suggest you start with the 2D stuff first since you'll need to know at least GDI32 (or whatever the equivalent is on Linux) to draw things then make them move around. Then try to work with OpenGL, then try playing music using a sound API, then try writing a program that responds to keystrokes using whatever input API you decide to use. Once you know how to use all 3 components individually then you should be able to combine them together and add the game logic. (I recommend checking out SDL though, its got facilities for all 3).

Try the beginners page at Gamedev here:
http://www.gamedev.net/reference/start_here/
It should have what you need to get started.