Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
BBQgiraffe

Nitemare 3D Reverse Engineer

Recommended Posts

OpenNitemare3D is an attempt to reverse engineer the executable for the 1994 Dos FPS Nitemare 3D using C#

Note: OpenNitemare3D is in very early stages of development and will probably take months to get a fully playable version

Discord Server

Download/Contribute

Edited by BBQgiraffe : C++ to C#

Share this post


Link to post

edit: this is the old version that uses Unity3D, the current version can be found above.

 

fixed the aspect ratio

Screenshot (128).png

Edited by BBQgiraffe

Share this post


Link to post

That‘s nice actually. I really like the preservation of the more obscure games via the Doom engine. 

Share this post


Link to post
2 hours ago, elend said:

That‘s nice actually. I really like the preservation of the more obscure games via the Doom engine

 

... actually, I believe he is using Unity to port that game.

Share this post


Link to post

Oops yes, haha. Totally overlooked that, because... well Doomworld, etc.

 

Begs the question now, why not remake it in Doom? :O

Share this post


Link to post

I have a special interest in source ports of ancient, obscure Wolf3D-like games. It would be nice to see Nitemare 3D with improved graphics. Have fun and good luck with your project!

Share this post


Link to post

Looks cool! I remember hearing about Nitemare 3D back in the day but never checked out the game. It looks fun based on some videos I just watched.

Share this post


Link to post

update: I created a site where I will be hosting builds and documenting my progress,

I also have a custom made tool that extracts the menu art and the hud overlay + sound files(with available download and source code on GitHub).

 

My website.

Share this post


Link to post

sorry for the lack of updates(holy cow it's been a month) I've been preoccupied with school and work.

 

I got the title screen working and a simple level and made a simple monster(Frankenstein), I'll post binaries here, on my site, and on my GitHub page when I finish polishing it.

Share this post


Link to post
On 8/25/2019 at 11:53 AM, Arno said:

I have a special interest in source ports of ancient, obscure Wolf3D-like games. It would be nice to see Nitemare 3D with improved graphics. Have fun and good luck with your project!

 

How about one for Rise of the Triad: Dark War?  Oh, wait that's not obscure...

Share this post


Link to post
20 hours ago, Master O said:

How about one for Rise of the Triad: Dark War?  Oh, wait that's not obscure...

 

Heh. Are you by any chance referring to the recently revealed source port for ROTT that @Kaiserhas started working on? If so, then hell yeah I'm interested in checking it out!

Share this post


Link to post
5 hours ago, Arno said:

 

Heh. Are you by any chance referring to the recently revealed source port for ROTT that @Kaiserhas started working on? If so, then hell yeah I'm interested in checking it out!

 

That's certainly news to me.  Had no idea he was working on one.  ROTT badly needs a modern source port.

Share this post


Link to post

Update: so as it turns out you can still buy the game so it's not abandonware and I don't want to risk legal action, do you guys think I should keep making the Unity port which would require packaging all the game assets or should I just take the longer route and remake the executable? 

 

I think remaking the executable would take a while longer as i wouldn't have the fancy Unity editor(makes things soooooooo much easier) but on the other hand it would take up a fraction of the space and could be easily ported(Nitemare 3D on my Xbox would be sweet as hell)


I think I'll go with just remaking the executable but I want to know what you guys think.

 

 

Pros of EXE remake:

  • chance of legal stuff is non existant
  • way lighter and faster
  • easy to port

 

Cons of EXE remake:

  • will take way longer
  • no fancy editor
  • I'll have to figure out how to get OPL2 emulation working for good sounding music.

 

I think an exe remake would take ~7 months to do given my schedule.

Share this post


Link to post

My € 0.02 ...

You're doing a non-profit hobby project, which means it is quite important that you enjoy working on it. Hence, if redistributing copyrighted material makes you feel uncomfortable, then it is probably not the right route to take.

 

For the CatacombGL source port, I made the conscious decision to stay clear from copyright issues. A great benefit for me personally is that I can have the source and binaries hosted on Github. Also, for example, the owner of the Catacomb games was willing to put a link to my source port on the official homepage of his games. Obviously, he wouldn't be so cooperative if there were legal issues.

 

OPL emulation was hardly an issue for me. I simply took the sound code from the Reflection Keen source port, which was based on the DosBox implementation. That's the advantage of working with open source.

Share this post


Link to post

Why can't Unity use custom formats? I'm sure if you write the file readers and format interpreters you can then plug them into your engine and keep working with what you're comfortable without needing to distribute a packaged form of the original game resources.

 

Alternatively, you can go the Doom64 EX way and make a tool that, like WadGen, does the extracting, converting, and packaging in a first step.

Share this post


Link to post

update: I am going to go with creating a new Executable.

 

I'm planning to allow the user to switch between OPL2 emulation and FluidSynth

 

I forgot to mention this but I will be creating two versions, a version for the Dos game and a version for the Windows game,

as the Windows game has a GUI and gives a few monsters new 8 directional sprites for some reason, I personally don't like this version but some people prefer it.

 

 

Frankenstein in the Dos version(always faces one direction)

1221455173_DOSBox2014-09-3016-44-58-11.png.21e14b06884834430270603597c8ac75.png

 

 

Frankenstein in the Windows version(can face 8 directions)

 132119.jpg.df32f468eca3432ddebd97cc73e79fb6.jpg 

 

Share this post


Link to post

GOOD NEWS EVERYONE!

 

I got SDL2 to load bitmap images from the Nitemare 3D game-files, now I just need to figure out how to rotate it correctly.

 

also the game comes with three objects.x files that are stored in plain text(thanks David P. Grey!) which give me useful information

Example line from Objects.1:

 

0016 f70t obj001.tomb2  DUMB     Tombstone (plain)

 

 

Checklist:

  • load images from original game files
  • figure out what each and every single sprite is and label them(it's hard work but someone has to do it)
  • write 3D game engine 
  • figure out directional sprite math
  • navigational math for enemies
  • UI stuff
  • rip strings from original EXE
  • figure out level format
  • OPL2 emulation + sound player(the Windows and Dos versions use different audio formats)
  • get final cutscene to work
  • spend a week cleaning up because my coding process is drink Monster at 2AM, black out, wake up with semi-readable code.
  • whatever else I forgot to write down1946191122_Screenshot(66).png.b86fc22255e4662468f19c328101ff87.png

Share this post


Link to post

working on making it easier to access the files by assigning a string to each sprite,

for example the first sprite is a 2 unit wide red wall with no decorations so it's sprite name is "RED_WALL_DOUBLE_PLAIN"

you just ask a function for the index of that name and you can use that to blit it.

 

sadly this means I have to label each and every single sprite in the game

 

 

anyway I blit sprites by using "SDL_CreateTextureFromSurface(renderer, img[Sprite Index])" which is a custom function that loads the sprite from its spot in memory, the 'Sprite Index' can be replaced with the new function I'm working on EX: "fileIndex.getSprite("RED_WALL_SINGLE_PAINTING")"

 

once I finish assigning texture names I will begin work on the 3D engine itself(Just putting textures onto cubes and placing those in the world for now)

Share this post


Link to post

Update: added GitHub page

 

 

I'm working on fixing the sprite errors previously mentioned and getting a basic player controller and level implemented, all suggestions are welcome.

currently the program just exports sprites from IMG.1, but you can do whatever as you can get an SDL surface using img[index of sprite]

Share this post


Link to post

Minor Update: still working on fixing graphical glitches but I figured out how to rotate it properly

 

I haven't had much work done at all since Monday as I've had a few school exams so I didn't have much time to work on this project(I do most of my programming while I'm at school)

 

I also made it so it creates popups for errors using tinyfiledialog rather than print them to console

I also removed #pragma once as it isn't standard

 

GitHub page

 

4742072_Screenshot(78).png.1672d2ae06fbee5fb3e0a8c06e661ad0.png

Share this post


Link to post

Update: The sprite glitches have been fixed! I added a simple animation test thing, anyway now I can finish labeling all the sprites :)

 

 

Share this post


Link to post

Transparent sprite demo

Note(music is from external midi file, not actual game files)

 

this is from a level where you can turn on a jukebox thing and nearby monsters start dancing, just wanted to show off the transparent sprite feature

 

 

 

Share this post


Link to post

Nice progress!

I guess one of the next steps would be to draw those walls and sprites in 3D space, to start off the "write 3D game engine" item on your checklist. What are your plans there? Are you going to use Vulkan or OpenGL? Or perhaps a software renderer?

Edited by Arno

Share this post


Link to post
1 hour ago, Arno said:

Nice progress!

I guess one of the next steps would be to draw those walls and sprites in 3D space, to start off the "write 3D game engine" item on your checklist. What are your plans there? Are you going to use Vulkan or OpenGL? Or perhaps a software renderer?

I'm going to use OpenGL because it's what I'm used to using, although SDL2 is going to handle stuff like loading in game files(OpenGL can convert SDL surfaces to textures) I think I will use Box2D to handle collision, then write stuff like  an animation manager, a sound manager, and billboard sprites after that I have to integrate A* navigation(the navigation algorithm used in the original game is garbage) after that I can start actually start putting in monsters, pickup items, doors, etc.

 

after that of course is getting the original maps to work.

Share this post


Link to post

the sprites from the Windows version work :) although it seems they are organized differently or they have extra/less sprites because this is supposed to be a dancing animation but it's just Frankenstein rotating. 

Screenshot (85).png

Share this post


Link to post
On ‎10‎/‎13‎/‎2019 at 7:20 PM, BBQgiraffe said:

I'm going to use OpenGL because it's what I'm used to using, although SDL2 is going to handle stuff like loading in game files(OpenGL can convert SDL surfaces to textures)

 

An additional benefit of OpenGL is that it is supported on older hardware. Any budget PC from the Windows 7 era should be able to render a Wolf3D-style maze in 720p in OpenGL at a somewhat playable frame rate.

Share this post


Link to post

I'm starting work on the engine today, I was going to start on Monday but I had to study for my PSAT, I'm aiming for a working FPS controller and billboard sprites + collision by next week.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×