Code Monkey home page Code Monkey logo

doom3-ios's Introduction

DOOM 3 for iOS and tvOS for Apple TV

 

This is my port of DOOM 3 for iOS, running in modern resolutions including the full width of the iPhone X. I have also made a target and version for tvOS to run on Apple TV.

screenshot

Features

  • Tested and builds on Xcode 10.
  • Runs single player campaigns at full screen and full speed on iOS
  • Support for original campaign and expansion pack campaigns via separate apps.
  • MFi controller support (reccomended) and on-screen control options
  • Second project target for tvOS that takes advantage of focus model and removes on-screen controls.
  • Limited support for native menus of original game

This commit does not need any placeholder resources as it is not an update of an existing id Software port.

NOTE: this is a port of the original DOOM 3 from 2004, not the DOOM 3: BFG Edition from 2012

You will need to provide your own copies of the base and d3xp directories from an existing instalation of DOOM 3. The latter directory is only needed if you want to run the expansion. You can buy DOOM 3 on Steam here. You can buy the expansion pack DOOM 3: Resurrection of Evil on Steam here. Note that GOG does not sell the original game, they only sell the BFG Edition which is incompatible with this release.

There are two Xcode project files, one for DOOM 3, DOOM3-iOS.xcodeproj, and one for the expansion pack, DOOM3xp-iOS.xcodeproj. You will need to drag your directories into the project and select "Create Folder References". The base folder needs to be added to the DOOM 3 project and target, while both the base and d3xp folders need to be added to the expansion pack project. The folders will be blue if you've done it right:

folders

foldersxp

You can read a lengthy blog article on how I did all this here.

This port was based on dhewm3 and uses SDL for iOS. I also referenced to this fork for WebAssembly/WebGL from Gabriel Cuvillier for OpenGL ES code. On-screen joystick code came from this repo by Brad Howe. Font Diablo Heavy available here. I also studied the iOS port of Hedgewars for information on how to use UIKit alongside SDL.

Video of DOOM 3 running on an iPhone X

I have also made apps for Wolfenstein 3-D, DOOM, DOOM II and Final DOOM, Quake, Quake II, Quake III: Arena and Return to Castle Wolfenstein.

Have fun. For any questions I can be reached at [email protected]

doom3-ios's People

Contributors

dnicolson avatar tomkidd avatar yoshisuga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

doom3-ios's Issues

Bluetooth usage request settings should be tweaked a little bit.

On tvOS 14.5 at least, the request to use bluetooth for the controllers says:

"Doom 3 would like to remain connected to nearby bluetooth Game Controllers and Game Pads even when you're not using the app."

The Bluetooth request permission should be changed to while using the app only. (This is probably only in later versions of Xcode...)

BluetoothRequest

main thread violation

I have main thread assert off which is weird

------ Initializing Sound ------
2020-07-28 16:36:33.209497+0100 Quake3-tvOS[819:998852] [Assert] Cannot be called with asCopy = NO on non-main thread.
2020-07-28 16:36:33.209585+0100 Quake3-tvOS[819:998852] [Assert] Cannot be called with asCopy = NO on non-main thread.
SDL_Init( SDL_INIT_AUDIO )... 2020-07-28 16:36:33.209769+0100 Quake3-tvOS[819:998852] [Assert] Cannot be called with asCopy = NO on non-main thread.
2020-07-28 16:36:33.209915+0100 Quake3-tvOS[819:998852] [Assert] Cannot be called with asCopy = NO on non-main thread.
2020-07-28 16:36:33.210056+0100 Quake3-tvOS[819:998852] [Assert] Cannot be called with asCopy = NO on non-main thread.
OK
SDL audio driver is "coreaudio".
2020-07-28 16:36:33.222975+0100 Quake3-tvOS[819:998852] [Animation] +[UIView setAnimationsEnabled:] being called from a background thread. Performing any operation from a background thread on UIView or a subclass is not supported and may result in unexpected and insidious behavior. trace=(
0 UIKitCore 0x00000001de8e8d8c 76DD38F2-CA77-380F-A02F-9981820E9FC8 + 14941580
1 libdispatch.dylib 0x00000001b34db3c4 EF838813-C591-3235-86CC-386198B0C6C1 + 13252
2 libdispatch.dylib 0x00000001b34dca44 EF838813-C591-3235-86CC-386198B0C6C1 + 19012
3 UIKitCore 0x00000001de8e8cf0 76DD38F2-CA77-380F-A02F-9981820E9FC8 + 14941424
4 UIKitCore 0x00000001de8e8e78 76DD38F2-CA77-380F-A02F-9981820E9FC8 + 14941816
5 UIKitCore 0x00000001de4b73fc 76DD38F2-CA77-380F-A02F-9981820E9FC8 + 10544124
6 UIKitCore

It works on iOS 14 beta 3 though

Hello!

Hello can you make an ipa then we rename it into zip then extract it and then put the base folder in >Payload >(Name).app just like OpenLara does it i have a mac but its too old for Xcode 10 :(

Resolution on iphone 12+ max

Is there any chance to change screen resolution mode on iphones plus models, i tried change in menu option but without any success?
IMG_4793

Problem with on screen controls and mfi controllers

On screen controls are not sufficient for example reload gun action is not present. And on screen left analog controls both movement and look around so they conflict so game is unplayable. There must be right analog also for looking around.
Ps4 mfi controller isnt recognized by the game

Controller

Is there anyway to add controller support but I know you said it comes with it but something must've happened, how do make controls

Is this possible?

hello have your heard of openlara because it has an ipa but you have to rename Ipa into a zip then extract it and put game files inside the openlara.app file will that be possible for this? Or can you do it like xash3d where you put the files on documents in xash3d app using filza if not that's OK.

Problem with MFI Controller

Hi, thanks for the port of the game. i have the following problem with the nimbus steelseries controller and the apple tv 4k, i have downloaded the steam game and copy the base folder, then compile and install to the apple tv:

https://www.youtube.com/watch?v=Jj7uA2SVm54

as you can see the controller movement is unresponsive. I 've tried the controller in other aptv games, and it works just fine. Can you please help me with this?

Crash on starting game

I copied my Doom 3 base directory to the project, fixed the build (see my PR), and was able to run, but i get an assertion failure:

2019-04-05 08:15:35.279209-1000 DOOM3-iOS[1046:162904] [Accessibility] ****************** Loading GAX Client Bundle ****************
 /var/containers/Bundle/Application/704BD4C9-3C1B-423C-84EB-E7322C473CA3/DOOM3-iOS.app/doom3 +set g_skill 1 +map game/mars_city1
dhewm3 1.5.1pre.1304-debug macosx-x86_64 Apr  5 2019 08:04:51 using SDL v2.0.9
terminal support disabled: stdin is not a tty
pid: 1046
1024 MB System Memory
found interface lo0 - loopback
found interface pdp_ip0 - 192.0.0.1/255.255.255.255
found interface en0 - 192.168.86.43/255.255.255.0
found interface en2 - 169.254.203.68/255.255.0.0
----- Initializing File System -----
Loaded pk4 /var/containers/Bundle/Application/704BD4C9-3C1B-423C-84EB-E7322C473CA3/DOOM3-iOS.app/base/pak000.pk4 with checksum 0x28d208f1
Loaded pk4 /var/containers/Bundle/Application/704BD4C9-3C1B-423C-84EB-E7322C473CA3/DOOM3-iOS.app/base/pak001.pk4 with checksum 0x40244be0
Loaded pk4 /var/containers/Bundle/Application/704BD4C9-3C1B-423C-84EB-E7322C473CA3/DOOM3-iOS.app/base/pak002.pk4 with checksum 0xc51ecdcd
Loaded pk4 /var/containers/Bundle/Application/704BD4C9-3C1B-423C-84EB-E7322C473CA3/DOOM3-iOS.app/base/pak003.pk4 with checksum 0xcd79d028
Loaded pk4 /var/containers/Bundle/Application/704BD4C9-3C1B-423C-84EB-E7322C473CA3/DOOM3-iOS.app/base/pak004.pk4 with checksum 0x765e4f8b
Loaded pk4 /var/containers/Bundle/Application/704BD4C9-3C1B-423C-84EB-E7322C473CA3/DOOM3-iOS.app/base/zpak000.pk4 with checksum 0xfaa41155
Current search path:
/var/mobile/Containers/Data/Application/9EEC4F8E-AA86-42B8-A34F-1B5E48C1BA63/Library/Application Support/dhewm3/base
/var/containers/Bundle/Application/704BD4C9-3C1B-423C-84EB-E7322C473CA3/DOOM3-iOS.app/base
/var/containers/Bundle/Application/704BD4C9-3C1B-423C-84EB-E7322C473CA3/DOOM3-iOS.app/base/zpak000.pk4 (830 files)
/var/containers/Bundle/Application/704BD4C9-3C1B-423C-84EB-E7322C473CA3/DOOM3-iOS.app/base/pak004.pk4 (5137 files)
/var/containers/Bundle/Application/704BD4C9-3C1B-423C-84EB-E7322C473CA3/DOOM3-iOS.app/base/pak003.pk4 (4676 files)
/var/containers/Bundle/Application/704BD4C9-3C1B-423C-84EB-E7322C473CA3/DOOM3-iOS.app/base/pak002.pk4 (6120 files)
/var/containers/Bundle/Application/704BD4C9-3C1B-423C-84EB-E7322C473CA3/DOOM3-iOS.app/base/pak001.pk4 (8972 files)
/var/containers/Bundle/Application/704BD4C9-3C1B-423C-84EB-E7322C473CA3/DOOM3-iOS.app/base/pak000.pk4 (2698 files)
Addon pk4s:
----- Initializing Decls -----
Detected
	1024 MB of System memory

This system have specific quality requirements (Emscripten/WebGL)!
4966 strings read from strings/english.lang
Couldn't open journal files
execing editor.cfg
execing default.cfg
couldn't exec dhewm.cfg
couldn't exec autoexec.cfg


ASSERTION FAILED!
/Users/yoshi/Code/personal/DOOM3-iOS/DOOM3/idlib/LangDict.cpp(103): 'kv.key.Cmpn( STRTABLE_ID, STRTABLE_ID_LENGTH ) == 0'

PS4 and MFI gamepads not working at all (SLD2)

Hi!

I added "Game Controllers" capability for "Extended Gamepad" to the project and built the game using the latest SDL2 library but I can't get my gamepads to work.

Gamepad is init right and the SDL_CONTROLLERDEVICEADDED event fired, but gamepad doesn't work at all.

I'm using PS4 and Razer Kishi controllers with iPhone 13.

Can you please help with this issue?

Controller issue tvOS 14.5 (Possibly DualSense specific)

The last time I tried Doom 3 on my Apple TV 4K, the movement was badly configured using my PS4 DualShock. I saw that some work has been done since then regarding controller support, so I thought I'd give it another go. I tried again but this time with tvOS 14.5 and a DualSense controller.

The Dualsense is able to navigate the menu (Choosing new game/ load, and the difficulty settings). However, when ingame there is no response to any of the inputs. (I'm able to move around with the Apple TV controller though).

No audio

I built the port for ios 15.4 and there is no audio. There were also no errors in the console

Touch controls

Is there any way to Chang the touch controls do instead of turning left/right move left/right

EXC_BAD_ACCESS when new game starts

Device: iPhone 7+ iOS 13.6.1
Xcode: Version 11.6 (11E708)
Xcode error: Thread 1: EXC_BAD_ACCESS (code=1, address=0x29)
Log from Xcode:

/private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/doom3 +set g_skill 0 +map game/mars_city1 +set fs_game d3xp
dhewm3 1.5.1pre.1304-debug macosx-x86_64 Aug 17 2020 02:52:23 using SDL v2.0.12
terminal support disabled: stdin is not a tty
pid: 373
1024 MB System Memory
found interface lo0 - loopback
found interface en0 - 192.168.1.15/255.255.255.0
found interface en2 - 169.254.242.31/255.255.0.0
----- Initializing File System -----
2020-08-17 02:54:09.139109+0300 DOOM3xp-iOS[373:13970] CoreBluetooth BLE state is unauthorized
Loaded pk4 /private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base/pak000.pk4 with checksum 0x28d208f1
Loaded pk4 /private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base/pak001.pk4 with checksum 0x40244be0
Loaded pk4 /private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base/pak002.pk4 with checksum 0xc51ecdcd
Loaded pk4 /private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base/pak003.pk4 with checksum 0xcd79d028
Loaded pk4 /private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base/pak004.pk4 with checksum 0x765e4f8b
Loaded pk4 /private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base/pak005.pk4 with checksum 0x8ffc3621
Loaded pk4 /private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base/pak006.pk4 with checksum 0x95b65ab
Loaded pk4 /private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base/pak007.pk4 with checksum 0x666bdb3c
Loaded pk4 /private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base/pak008.pk4 with checksum 0x23ae5993
Loaded pk4 /private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/d3xp/pak001.pk4 with checksum 0x38a5e7d5
Current search path:
/var/mobile/Containers/Data/Application/A8A1A1F7-A8A5-4324-A4B2-15CD4B84E1E5/Library/Application Support/dhewm3/d3xp
/private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/d3xp
/private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/d3xp/pak001.pk4 (24 files)
/var/mobile/Containers/Data/Application/A8A1A1F7-A8A5-4324-A4B2-15CD4B84E1E5/Library/Application Support/dhewm3/base
/private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base
/private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base/pak008.pk4 (3 files)
/private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base/pak007.pk4 (38 files)
/private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base/pak006.pk4 (48 files)
/private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base/pak005.pk4 (63 files)
/private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base/pak004.pk4 (5137 files)
/private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base/pak003.pk4 (4676 files)
/private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base/pak002.pk4 (6120 files)
/private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base/pak001.pk4 (8972 files)
/private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/base/pak000.pk4 (2698 files)
Addon pk4s:
----- Initializing Decls -----
5206 strings read from strings/english.lang
Couldn't open journal files
execing editor.cfg
execing default.cfg
couldn't exec dhewm.cfg
couldn't exec autoexec.cfg
5206 strings read from strings/english.lang
----- Initializing OpenAL -----
Setup OpenAL device and context
OpenAL vendor: Apple Inc.
OpenAL renderer: Software
OpenAL version: 1.1
OpenAL: EFX extension not found
OpenAL: found 256 hardware voices
----- Initializing OpenGL -----
Initializing OpenGL subsystem
2020-08-17 02:54:10.710069+0300 DOOM3xp-iOS[373:13737] Metal API Validation Enabled
WARNING: SDL_GL_SWAP_CONTROL not supported
Using 8 bits per color channel (RGBA), 24 bits depth, 8 bits stencil
2020-08-17 02:54:10.809231+0300 DOOM3xp-iOS[373:13737] root VC = <SDL_uikitviewcontroller: 0x125e40340>
OpenGL vendor: Apple Inc.
OpenGL renderer: Apple A10 GPU
OpenGL version: OpenGL ES 3.0 Metal - 66.6
...using GL_EXT_texture_filter_anisotropic
   maxTextureAnisotropy: 16.000000
----- R_ReloadGLSLPrograms -----
Loading main interaction shader
Loading main interaction shader (Phong) 
Loading default diffuse shader
Loading skybox cubemap shader
Loading reflection cubemap shader
Loading diffuse cubemap shader
Loading Zfill shader
Loading Zfill shader (Clip plane version)
Loading Fog shader
Loading BlendLight shader
Loading Stencil shadow shader
-------------------------------
Init Vertex Cache
using GLSL renderSystem
WARNING: Couldn't set gamma ramp: That operation is not supported
----- OpenGL Initialization complete-----
WARNING: Couldn't set gamma ramp: That operation is not supported
----- Initializing Game -----
gamename: baseDOOM-1
gamedate: Aug 17 2020
Initializing event system
...530 event definitions
Initializing class hierarchy
...151 classes, 924320 bytes for event callbacks
execing default.cfg
Initializing scripts
Compiled 'monster_zombie_commando_tentacle': 1702 ms
----- Compile stats -----
Memory usage:
     Strings: 79, 13232 bytes
  Statements: 67875, 2715000 bytes
   Functions: 2109, 318020 bytes
   Variables: 170888 bytes
    Mem used: 4483712 bytes
 Static data: 6237768 bytes
   Allocated: 7791684 bytes
 Thread size: 14056 bytes
...6 aas types
----- Initializing Session -----
WARNING: Couldn't load image: gui/mainmenu/marshighlight2
WARNING: Couldn't load image: gui/mainmenu/resurrection
WARNING: Couldn't load image: gui/mainmenu/resurrectionglow
WARNING: file /private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/d3xp/pak001.pk4/guis/mainmenu.gui, line 2247: file 'guis/d3xp-weaponconfig.pd' not found
WARNING: file /private/var/containers/Bundle/Application/5F021F23-09C0-4094-BC60-B935BB724CEF/DOOM3xp-iOS.app/d3xp/pak001.pk4/guis/mainmenu.gui, line 2247: Unexpected end of file
WARNING: Couldn't load image: gui/mainmenu/skin_purple
WARNING: Couldn't load image: gui/mainmenu/skin_grey
WARNING: Couldn't load image: gui/mainmenu/skin_orange
WARNING: Couldn't load sound 'guisounds_nervelogo.wav' using default
WARNING: Window MarsRender in gui guis/mainmenu.gui: a transition does not have a valid destination var BlackFade::backcolor
WARNING: Unknown string id #str_00100604
WARNING: Unknown string id #str_00100604
WARNING: Unknown string id #str_00100709
WARNING: Unknown string id #str_00100709
WARNING: Unknown string id #str_00100710
WARNING: Unknown string id #str_00100710
WARNING: Unknown string id #str_00101046
WARNING: Unknown string id #str_00101047
WARNING: Unknown string id #str_00101048
WARNING: Unknown string id #str_00101049
WARNING: Unknown string id #str_00101050
WARNING: Unknown string id #str_00101051
WARNING: Unknown string id #str_00101055
WARNING: Unknown string id #str_00101051
WARNING: Unknown string id #str_00100930
WARNING: Unknown string id #str_00100931
WARNING: Unknown string id #str_00100932
WARNING: Unknown string id #str_00100933
WARNING: Unknown string id #str_00100934
WARNING: Unknown string id #str_00100935
WARNING: Unknown string id #str_00100936
WARNING: Unknown string id #str_00100937
WARNING: Unknown string id #str_00100938
WARNING: Unknown string id #str_00100939
WARNING: Unknown string id #str_00100940
WARNING: Unknown string id #str_00100941
WARNING: Unknown string id #str_00100942
WARNING: Unknown string id #str_00100975
WARNING: Unknown string id #str_00100976
WARNING: Unknown string id #str_00100977
WARNING: Unknown string id #str_00100978
WARNING: Unknown string id #str_00100979
WARNING: Unknown string id #str_00100980
WARNING: Unknown string id #str_00100981
WARNING: Unknown string id #str_00100982
WARNING: Unknown string id #str_00100983
WARNING: Unknown string id #str_00100134
WARNING: Unknown string id #str_00100567
WARNING: Unknown string id #str_00100134
WARNING: Unknown string id #str_00100137
WARNING: Unknown string id #str_00100917

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.