Return Last 50 posts First 100 posts

Black art of 3D game programming Book by André LaMothe

1 Name: Anonymous : 2017-03-17 02:48
Hello /prog/, I recently bought this book and it came with a CD with all the source code and example programs, but it was made for Windows DOS in 1995. Does anyone have any idea how to get the code to run on Windows 10?
2 Name: Anonymous : 2017-03-17 02:53
i had that book. wow. that's wild.

can't help you tho. sorry.
3 Name: Anonymous : 2017-03-17 02:55
Footlong dildos
4 Name: Anonymous : 2017-03-17 03:01
>>2
I'm excited to read through it. I have heard a lot of great things.

I'm thinking about just writing the code as I go through the book and forgetting the CD, but I would hate to miss out on everything on there.
5 Name: Anonymous : 2017-03-17 03:03
Just run it in a virtual machine
6 Name: Anonymous : 2017-03-17 03:12
I think it would require getting a machine with an old OS and old C compiler. Otherwise you're going to have to convert the code to work with a current OS and compiler, which will take some work. It seems like a better option if you want to use any of the code though. How hard it would be depends on your programming experience.

If you're just trying to understand the concepts of 3D game programming, maybe you can just read through the code to learn.
7 Name: Anonymous : 2017-03-17 03:34
>>1
DOSBox
8 Name: Anonymous : 2017-03-17 03:38
There's a program called DOSBOX that runs it as a virtual machine for you I think. Google that name maybe?
9 Name: Anonymous : 2017-03-17 03:46
>>1
I mostly write my videogames in Java, but am moving towards javascript w/ RoR backend for more multiplayer stuff
Unity is also really good if you don't have much programming experience, but doing any GUI stuff at all in C is kind of excessively difficult due to being so close to the metal
10 Name: Anonymous : 2017-03-17 03:50
Go back in time and steal a computer that can run the program.
11 Name: Anonymous : 2017-03-17 04:19
I honestly thought no one was going to reply to this because the tread was not a about dicks or feels. Thanks for your help /prog/.
12 Name: Anonymous : 2017-03-17 04:29
>>1
Install DOSBox, compile and run all the code from within it. You can probably use Borland Turbo C as a compiler
13 Name: Anonymous : 2017-03-17 04:31
>>11
3D game programming
Includes the code of a 2d game
Something is amiss here.
14 Name: Anonymous : 2017-03-17 04:38
>>13
You have to start somewhere; you cannot just jump right into 3D.
15 Name: Anonymous : 2017-03-17 04:46
>>11
I know this feel :(

How much coding experience do you have? Have you at least written a fair amount of C prior to taking on this book? And are you sure about using C?
16 Name: Anonymous : 2017-03-17 04:54
I had that book back in the day too. It's great for teaching you the fundamentals, but it's hopelessly outdated now. They spend a lot of time teaching things that aren't really useful anymore - setting up a framebuffer and writing pixels in a particular VGA mode, scan line conversion, gouraud shading, etc. It's entirely done in software, won't take advantage of any 3D accelerator you may have.

If you just want to get something on the screen, you'd do better picking up Unity or Unreal Engine. If you want to learn the math and how to wprk with the hardware, you should get a much more recent book.

If you're really into retro programming, Andre LaMothe's books were kinda lame. See if you can find the Black Book of Graphics Programming by Michael Abrash - he wrote it between Doom and Quake and it's kind of the Bible for old school software 3D programming.

hth!
17 Name: Anonymous : 2017-03-17 04:58
>>15
I have a degree in game design with a specialization in programming and I'm about to graduate with a computer science degree.

I learned programming in C# and C++ (up to data structures) but my current school only teaches Java.
18 Name: Anonymous : 2017-03-17 05:07
>>16
What makes Abrash's books more useful?
19 Name: Anonymous : 2017-03-17 05:11
>>18
LaMothe kinda gives you enough to get started, but it's not real good and he doesn't tell you much about how to make it better.

Abrash starts from the naive implementation, then goes through several rounds of optimization, explaining each step of why this way is faster, until it's as solid a piece of code as you can make it. In the chapter on scan line conversion he calculates out exactly how many clock cycles it takes to write a single pixel. Of course, none of that will be the same these days - his target was a high end 486 DX or a brand new at the time Pentium, with none of the multiple cores, hyperthreading, instruction reordering, etc. we have these days. But the way he walks you through his improvements is useful for training you how to think about optimizing code generally, even if you wouldn't write the exact same things these days. (This goes up to the macro level as well - he explains things like how he used BSP trees and PVS to sort and eliminate overdraw, back when that was more important.)

Of course, Abrash also focuses only on graphics. LaMothe takes a more holistic approach that explains how to do basic sound, AI, and gameplay logic, which from my recollection you really don't get in the Abrash book.
20 Name: Anonymous : 2017-03-17 05:14
>>17
The game design degree makes it sound like Unity might be a better tool, since you can get shit done much quicker with it.
With the background in C++, I can understand your preference toward C, which is a very different style of programming than most languages that are becoming popular today, but being so close to the metal really has a huge impact on productivity.
The kind of shit you'd do with C/C++ is a several year commitment rather than a several week or month long binge.

A lot of that is simply my own opinion, but basically C really is a huge trade-off in performance efficiency (which has never been an issue for me) vs. productivity, and I recommend that you consider it a little more deeply whether C is the proper tool for what you want to accomplish
21 Name: Anonymous : 2017-03-17 05:24
>>20
I've used Unity a lot and taken multiple classes on it. I'm not trying to make a game; just improve my programming knowledge of 3D graphics because I wanted to get a masters focusing on it.

If I was just making a game as a side project, absolutely Unity would be the best option, but since I'm just doing this to learn I'm fine using C since most graphics in games are coded in C/C++ anyway.
22 Name: Anonymous : 2017-03-17 05:44
>>19
Thanks for the recommendation, I will check out his book too after reading this one. I know both of these books are outdated today but they are still really interesting and reading about the challenges and problems they faced is still valuable knowledge in my opinion.
23 Name: Anonymous : 2017-03-17 05:57
>>19
But still, and I can't emphasize this enough, if you want to write games today, this isn't the code you need to be learning. These books may serve as an interesting introduction to the linear algebraic concepts behind transformations and projections, and the idea of direct lighting, but this is not the type of code you would write anymore. If you want to be close to the metal these days, you really should learn about working with a modern version of OpenGL or DirectX. (You can get even better performance using an API like Vulkan or Metal, but then you have to get into buffer and lock management, managing your various shader stages, and so on and you really need to learn to crawl before you can walk)

Or honestly, get Unreal Engine. You can write things using their visual scripting and shader languages, or you can write in C++ instead if you'd prefer.
24 Name: Anonymous : 2017-03-17 06:05
>>22
Cool man! And hey check it out - Black Book is available for free online (legally): http://www.drdobbs.com/parallel/graphics-programming-black-book/184404919
25 Name: Anonymous : 2017-03-17 06:10
>>1
codeblocks with cygwin is how it's done, homes. the "cannot reach memory" things are because those don't come into play until later when debugging. it's the shit. i got a 91 on this assignment.

https://youtu.be/yggcKP6Px2k
26 Name: Anonymous : 2017-03-17 06:14
>>25
oops... anagrams2 was last week. i don't have the grade yet. this is C though, and how you use it in university. you'll need cygwin for getline. codeblocks is the shit.
27 Name: Anonymous : 2017-03-17 06:18
>>1
Why anon? As you said it's outdated and absolutely useless. Chances are the libraries involved might not work properly with modern graphics cards. I can't say if that's the case because I don't know what exact libraries are used in the walk throughs of this book. As for the C code in general that should work as-is.
28 Name: Anonymous : 2017-03-17 06:22
>>27
The CD comes with a lot of example games and programs that I wanted to mess around with.
29 Name: Anonymous : 2017-03-17 06:40
>>25
Visual Studio is far superior for C/C++. Plus who cares about compatibility with garbage operating systems like Linux or OS X?
30 Name: Anonymous : 2017-03-17 06:57
>>4
Get DOSbox or a VM
31 Name: Anonymous : 2017-03-17 07:11
>>27
It doesn't use any libraries for graphics, that's the thing. It sets a VGA mode by calling BIOS interrupt 10h. The books build up the code to set pixels, then draw lines, then fill triangles, etc. from scratch.

It wouldn't run on a modern system outside of something like Dosbox or a DOS VM
32 Name: Anonymous : 2017-03-17 07:28
>>13
>>14
one does not simply get what they payed for
33 Name: Anonymous : 2017-03-17 08:02
>>1
u shud buy like 2 ounces of weed and smoke it LOL
34 Name: suigin : 2017-04-02 10:43
>>1
Blog post to follow.

I too bought that book, back around 1997. The next year, I got to meet LaMothe in person. He actually wore the body armor from the Blade movie in real-life. He bought me and a few other people I was with Taco Bell and invited us back to his condo in Palo Alto to chill and show us what he was working on. I remember his girlfriend had like 2 dozen pairs of shoes. I also remember him talking about his arguments with dealing with Activision executives over some business deals, and how they were all you know whos.

These days, I myself work in the game industry. That book was were I got my start. I was about to quit late last year due to being surrounded by cancerous SJW/hipster QA testers who won't shut up about their normie nonsense, but someone in management read my mind and gave me my own office.

Return Last 50 posts First 100 posts

Name: