Comments on: The secret behind Duke Nukem 3D for Sega Genesis https://www.seganerds.com/2016/08/07/the-secret-behind-duke-nukem-3d-for-sega-genesis/ SEGA News, Reviews, Interviews, Podcasts, Features and more! Fri, 21 Oct 2016 10:13:00 +0000 hourly 1 https://wordpress.org/?v=6.2 By: Conexão Games https://www.seganerds.com/2016/08/07/the-secret-behind-duke-nukem-3d-for-sega-genesis/#comment-4147 Fri, 21 Oct 2016 10:13:00 +0000 https://www.seganerds.com/?p=27828#comment-4147 All TecToy, engineering door out to the Presidency, think Duke’s engine is based on the Phantasy Star. But this is not not.

Mauricio Guerta (here copy) studied quite the techniques of 3D gamming. All of the basic books that Internet time did not have the same availability that we have today. When the opportunity arose to get this project his plan was to be based on a technique called raycast. We explained this to the commercial and marketing, and left as Plan B if the raycast did not work, do something like the Phantasy of the maze. But I think the staff did not understand raycast and got the Phantasy Star on the head.

I remember the first engine prototype, was a PigCop alone in a square room. It was moving very slowly. But Maurice was not desaminou and optimizing the code until things began to move well acceptably.

While he took care of other details of the game I took the engine to give more optimized. I believe that we gain another 10 or 15% in speed using the artifice
not to use multiplication instructions and division of 68000, they take too, they take many machine cycles. Instead tables were assembled of various logarithmic values ​​*. Remember the math, when adding logarithms are doing a multiplication. Subtracting have the division. Additions and subtractions are relatively faster in 68000. In today’s processors, especially in the graphic accelerator cards, this is no longer true.
* (In fact logarithms of sines and cosines of each possible angle of vision of the character in the first person).

Hence forward we divide the tasks as every step was being won. Mauricio also optimized the rendering of writing everything in Assembler (the main code was written in C), was working in sound effects by writing a routine that allowed mixing various sounds, such as the enemy screaming while you could hear the sound of guns firing. Many more other routines had to be made to complete the game. Each represented a problem to solve, because it consumes engine runtime and cartridge memory space.

Another feature that the Mauritius created was a kind of interweaving of pixels to create the illusion that we have 256 colors in the image elements. The MegaDrive allows only 16 different colors on each element of 8×8. This feature works well in tube TVs, which naturally create this illusion. In the current LCD TVs the game shows several vertical lines do not create the same effect of tube TVs.

There was also Daniel Trevisan creating area, making the maps. We did not have time to write a map editor software, the original PC did not fit in, then the poor guy worked on graph paper, and conversion design for database was made by hand !!!!

The entrance music was not very good, it was the only thing we use a ready tool SEGA that converted a MIDI file to the format that the Mega Drive understand. Not that the tool was bad, but depended on someone good music and programming to get the most out of it. That person no longer had.

So all the code is unique our TecToy, the arts were provided by the holders of the original PC Duke and reduced especially to fit our engine. The software tool that performs this re-adaptation of the arts was also written from scratch by Mauritius.

Today Mauritius no longer works for the TecToy, but keep in touch and always talked to spare some time. I have almost 30 years in electrical engineering, and I have yet to meet a “coder” as bright as him.

]]>
By: Arturo A. https://www.seganerds.com/2016/08/07/the-secret-behind-duke-nukem-3d-for-sega-genesis/#comment-3940 Mon, 08 Aug 2016 11:28:00 +0000 https://www.seganerds.com/?p=27828#comment-3940 Stream doesn’t work very well… anyway. Long story short they used Yuji Naka’s algorithm 😀

]]>
By: shadow1w2 https://www.seganerds.com/2016/08/07/the-secret-behind-duke-nukem-3d-for-sega-genesis/#comment-3938 Mon, 08 Aug 2016 07:30:00 +0000 https://www.seganerds.com/?p=27828#comment-3938 Very interesting. I always wondered why Duke Nukem 3D was ported to Mega Drive so much later.
Love how their work on Phantasy Star translation helped inspire their solution.
Sure its closer to Wolfenstein 3D and its nothing like Zero Tolerance let alone like proper DN3D but it’s still decent.
It’s pretty interesting how odd projects came to be and the hurdles they had to jump for them.

]]>