The secret behind Duke Nukem 3D for Sega Genesis

In 1998, everyone was looking at SEGA’s next console, the Dreamcast. In Brazil, however, SEGA Genesis was still strong and supported by TecToy (Representative of SEGA in Brazil). In 1997, TecToy had done an incredible job porting Street Fighter II for Master System and then decided to go further.

At that time Duke Nukem was very popular; Released for Nintendo 64, SEGA Saturn, and PlayStation, TecToy had the idea to port this game for SEGA Genesis. To do this, TecToy decided to get the license from GT Interactive, which was a distributor of 3D Realms around the world.

However, when they were almost closing the deal, they thought they couldn’t do it because of the the SEGA Genesis’ limitations. A programmer from TecToy who had helped translate Phantasy Star (Master System Version) to Portuguese remembered an algorithm that simulated 3D labyrinths in that game.

With this solution, they were able to port a FPS game for SEGA Genesis without any extra chips. SEGA Nerds translated a part of an interview made by a Brazilian Channel, where Stefano Arnhold (President of TecToy) talks about it.

Duke Nukem 3D for SEGA Genesis is a simplified version of the game, covering the second episode of Lunar Apocalypse; The game uses flat layout and 90-degree angles. Before only available in Brazil, the game was re-released across the whole world in 2015 by Piko Interactive.

About Luiz Nai

I'm huge fan of Sega, I have been playing Sega games for over 20 years and games like Shenmue, Skies of Arcadia, Panzer Dragoon Saga and also all the Arcades race games are my favorites. Besides of playing Sega games I have a post degree in Game development and I enjoy playing guitar in my free time.

Check Also

Has Sonic Mania’s release date been potentially revealed?

Sonic Mania is perhaps one of the most anticipated games of the year for SEGA …

  • shadow1w2

    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.

  • Arturo A.

    Stream doesn’t work very well… anyway. Long story short they used Yuji Naka’s algorithm 😀

  • Conexão Games

    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.