Porting Wolfenstein 3D to Mac OS X

Moderator
Posts: 1,140
Joined: 2005.07
Post: #31
Looking at the warnings, it looks like you're having a problem of not including the frameworks with all the files. Try doing a project-wide search in project and frameworks for the types it's not seeing, and make sure the base frameworks of those header files are being included.
Quote this message in a reply
sixtyfive
Unregistered
 
Post: #32
Feel free to download the source and try it yourself. Wink
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #33
If you add -DALLOW_OBSOLETE_CARBON=1 to the compiler flags, it no longer throws the 3 errors. I'm not sure if the functions will actually work or not, but you can try.

It looks like other functions are defined but not provided. I think you're going to need to figure out what's going on, then re-write the functions throwing errors and warnings with modern carbon. Sorry. Sad

Edit: if you also get rid of the Build ResourceManager phase, it also gets rid of another compiler error.
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #34
I found an OpenGL port for Linux and Windows (here), and I'm working on porting the window system and events to Mac. The rest is pretty much cross-platform. (AFAIK, the source is mostly the original, as well)
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #35
Thats a much better idea, sounds a lot more likley to be well... possible too.
The whole thing was pretty much quickdraw and other deprecated api's so, best of luck!
If I can help in any way just say Smile

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #36
Do you happen to have the data files? Let's just say that it's easier to test when you can actually test it. Wink
Quote this message in a reply
sixtyfive
Unregistered
 
Post: #37
Files here: http://download.sourceforge.net/wolfgl/wolfdata.zip.

Notice that that's the PC edition of Wolfenstein. Not the same as the Mac version.
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #38
Oops, I probably should have checked their website. Blush It's the demo, but that should be just fine for test purposes.

Are you sure the data files are different on the Mac? Usually they're the same for games. Are they mostly the same with just a different extension? (hopefully: that way it's likely the only difference is the byte order) The code I have is for the PC version of the data, but most people who download this will likely want it for the Mac version... If they datafiles are similar enough, though, I can have it be able to use both.
Quote this message in a reply
sixtyfive
Unregistered
 
Post: #39
Unlike newer games (Doom, Unreal, etc) the Macintosh version is not just a port (exact translation) of the PC version. The levels and the game engines are actually quite different. Thus, you can not use levels and mods for one version with the other version.

Levels

The first major difference is the level design. While the PC version contains 6 episodes with each episode containing 10 levels (1 of those is a hidden bonus level), the Macintosh version (reffered to as the 2nd Encounter) contains 30 levels with no divisions into episodes. The Mac version is divided into floors, but you can not start on a specific floor and every floor has a different amount of levels. A 3rd Encounter was later released for Macintosh containing 60 more levels which were supposed to make up episodes 2 to 6.
Obviously, the number of levels aren't the same but this doesn't necessarily mean that the Macintosh version is giving you more. Many of the levels are similar, but the Macintosh levels are usually much less intricate and much shorter. This is apparent in the first level where the path to the exit is exacly the same in both versions, but the PC version contains many more possible side-trips and many more rooms. Other levels in the games are completely different. Basically, the 2 games play extremely differently and offer unique experiences.

Game Engine

Another major difference is in the game engines. At first glance, the Macintosh engine, which is 2 years newer, seems to be the more advanced. The graphics in the Macintosh version are much sharper, clearer, and better looking at twice the resolution of the PC graphics. Also, the game takes up a slightly larger portion of the screen and the sounds are much higher quality in the Macintosh version.
However, the enemies in the Macintosh version are only 2D sprites whereas the enemies in the PC version are 3D sprites. This means that the Macintosh enemies only have 1 side, a front side, and thus, they are always facing you. In contrast, the PC enemies have 8 sides, making for much more realist play; in the PC version, it is possible to sneak up behind guards and kill them before they see you - something that can't be done in the Macintosh version.

The enemies in the PC version also offer an extra level of realism by being able to patrol an area. In the Macintosh version, the enemies will just stand in one spot until they see you or hear you; in the PC version, enemies will stand in place or patrol an area until they see or hear you. These differences make the PC version's game engine more advanced despite being 2 years older.

Weapons, Items, and Enemies

Several other difference worth noting include the addition of 2 extra weapons in the Macintosh version: the flamethrower and the rocket launcher. Those two weapons and some other items (bullet crates, flamet thrower and rocket ammo, backpacks) are not found in the PC version.
Also, some other pick-ups and dropped items are different. For example, in the PC version, dropped clips give 4 ammo and other clips give 8 ammo; in the Macintosh version, all clips give 5 ammo. Also, picking up treasure in the PC version adds to your score (40000 points gets you an extra life); in the Macintosh version, picking up treasure increases your item count by one until you get an extra life at 50 items.

Other differences include an additional enemy, the Flying Hitler, in the PC version and different bosses in the 2 versions (see the enemies and bosses pages); the Mac version actually uses some bosses from Wolfenstein 3D and some bosses from Spear of Destiny.

Miscellaneous

Yet another difference is that changing the difficulty level in the Macintosh version only affects the damage taken and starting ammo whereas in the PC version it affects the damage taken and the number of enemies; the PC version tends to be much more difficult. The Macintosh version also has an auto-map that is helpful in finding you way around; there is no mapping feauture in the PC version.
The last difference I can think of is the pools of blood in the PC version. In the Mac version, you only have pools of water - no pools of blood. If your health is less than 11 in the PC version, you can drink the blood to gain back some health.

Other Versions

The Atari Jaguar version was a direct port of the PC version.
There was also a Super Nintendo version of Wolfenstein 3D released; it was a cross between the PC and Mac versions. For example, the flamethrower and rocket launcher from the Mac verison are present as is the abilty to sneak up on enemies from the PC version. Unfortunately, it was extremely censored through the changing of the guard dogs into rats and removal of the Natzi symbols.

Released in 2002, the Game Boy Advance version is an nearly exact port of the PC version. It contains all 6 Episodes. The only difference is that you can only save the game at the end of a level - not during.
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #40
Wow, that's a huge difference... Well, so much for supporting the Mac data files. At least this will give Mac users the ability to play the PC version, and maybe we'll be successful in porting the original Mac version eventually. I think the largest problem that I've seen is that at least one function is declared and not defined, namely to play sounds. It looks like it should be part of the source code, and not a system function, though I'm not 100% sure.
Quote this message in a reply
sixtyfive
Unregistered
 
Post: #41
I'd like to play the PC version too, so whatever. Wink
Quote this message in a reply
sixtyfive
Unregistered
 
Post: #42
Has anyone had success?
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #43
I'm quite close to finishing this version. As I've told you over AIM, I have done most of the coding necessary to port it. So far I have the menus up and running perfectly. It crashes when trying to start a game, but I know exactly what's causing it and where to fix it, so that should be fixed rather quickly. If all goes well, I should have a playable build up by the end of today. (*crosses fingers*) After I get it playable, there will be a few things I will fix.

First of all, it doesn't seem to like how it processes mouse input from the original code. I will probably have to re-write that section, but I'm thinking it won't be that major of a re-write. Second of all, it seems that being able to select custom controls is broken. I have already started making a config file system so I could have custom resolutions, which works beautifully. I'll likely add the ability to set custom key bindings there. Finally, it looks like everything that has to do with music has been commented out. I'll see if I can manage to re-integrate it back into the game. I'll be sure to get a playable version up first, though!
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #44
I cant wait to play this, I loved to the old game on mac. Its great of you to take on this project as I was really struggling, thanks and I hope to see a playable build soon!
Grin

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #45
This is the PC version, which is quite different from the Mac. I might tackle the Mac version later after learning from porting this one.

Right now I have the levels loading, but the graphics don't show correctly and it doesn't process any movements etc. Most likely endian issues, which always pop up in the smallest nooks and crannies. Now I know what porters have to go through all the time, since these developers like to use byte-order-dependent algorithms for everything. *sigh*
Quote this message in a reply
Post Reply