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

PrBoom on the Nintendo 3DS

Recommended Posts



https://github.com/devinacker/prboom-3ds

This is my burgeoning port of PrBoom 2.5.0 to the 3DS. It is still a work in progress.

As of now, a quick feature list:

  • Native 3DS controls for all gameplay functions and menus (except typing cheats, etc.)
  • Dual-screen setup with persistent automap and menus on bottom screen
  • Sound support (no music yet)
  • Basic frontend for loading WADs and configuring other options
Still to come: music, 3D, multiplayer.

The name will probably be changed at some point to avoid confusion with prboom3ds, which is several months more mature and also based on DSDoom, which this isn't. I wasn't actually aware of this port's existence when I started working on mine, but I decided I'm going to keep doing it anyway just because.

(This is also my first ever attempt at doing anything at all with the Doom engine source. Isn't that precious?)

Anyway, the above github link has the goods if you want to try it out, as well as a proper readme that I don't feel like quoting here.

Share this post


Link to post

I was hoping a fresh 3DS port would show up soon, but I didn't think it'd be this soon. This is awesome.

I've given it a handful of tests on my N3DS, using the Ultimate Doom IWAD (from Steam). Your port shows promise! Framerate holds up during gameplay, and is fairly decent when uncapped. The way your port handles key bindings is way more 3DS-friendly than elhobbs' port, and that might be due to them basing their port off DS-doom (all buttons are hardcoded as PC keys).

Of course, it's early days. Here's all the bugs, hangs, and oddities I ran into. Ordered from game-breaking to merely-cosmetic.

Spoiler

  • If the game is running in 320×200, I get this warning when I first acquire the shotgun, and at the start of every map after acquiring it (if it has ammo):
    V_DrawMemPatch8: Patch (-2728, -3691)-(-2728,4245) exceeds LFB in vertical direction (horizontal is clipped)
    Bad V_DrawMemPatch8 (flags=0)
    It doesn't appear if the game is running in 320×240, if its ammo has been depleted before entering a new map, or if the player dies and starts over with a pistol.

  • Unfortunately, picking up the chainsaw, chaingun, and rocket launcher causes the game to hang, regardless of screen resolution. (This has the side-effect of enforcing a half-way challenging "shotgun-only" run, as long as you can navigate your way around dangerous weapons! I reached E1M8 before turning a narrow corner and stepping on a rocket launcher.)

  • The game also hangs when going to: Options > General > Next Page > Next Page. It doesn't seem to hang when accessing any other menu screen, though I haven't tried any of the settings (besides key bindings, which work without issue).

  • This might actually be related to PRBoom itself, rather than a result of your port, as it also happens in elhopps' port. That said, I can't reproduce it in PRBoom on PC, but it is easy to reproduce on the 3DS:
    In E1M2 on the easiest difficulty, head straight to the exit door, and then simply open the door and do not move. The two zombiemen should converge towards the corners of exit platform, which will automatically lower. Then, either one or both of the zombiemen should warp to the outdoors area.

  • If you're already in a game and a new game is started, the Melt transition reveals a frame where the player is below the ground. This is only cosmetic, and immediately reverts to normal height after the transition is complete.

  • When transitioning from Title-to-Map or Map-to-Title (demos) while the menu is open, the menu is captured as part of the Melt frame, resulting in some weird doubled menu appearance for a moment.

  • When transitioning from Intermission to Map, depending on the map, the Melt effect will transition into a different visual glitch. Sometimes the player appears under the ground, sometimes the Melt transitions into a nearly-entirely block of green with 20 pixels of the "correct" scene at the top, sometimes the "correct" frame appears but it is shifted down by 20 pixels. In all cases, the Melt effect is doing some weird shit.

  • And lastly, an easy fix: Key Bindings, the labels for C-Stick Up and C-Stick Right should be swapped. ZL and ZR have no labels, but they function!

If you're interested in suggestions for bindings, I've uploaded my prboom.cfg.
In my setup (N3DS or Circle Pad Pro only): Circle Pad moves forward/backward and strafes, while the C-Stick turns left and right. Y is Shoot, X is Use (both are right next to the C-Stick), A is Turn 180. L and R are Prev/Next weapon, ZL is auto-run, and ZR is manual run.

Is it possible to enable PRBoom's Joystick controls? I'm curious to see if the Circle Pad works with them, I'd love to have more analog-like control.

I hope you manage to keep up with this port! It's cool and exciting stuff.

Share this post


Link to post

Thanks for giving it a playthrough!

About the issues you found:

  • I noticed the warning message with the shotgun previously, but I didn't know it only occurred at 320x200. That's interesting.
  • Yeah, I thought this was a Doom II issue at first since I originally noticed it with the super shotgun pickup at the beginning of DEMO2, but then I noticed that it also applied to the chainsaw and some other weapons as well. This is something I'll be looking into asap.
  • I suspect this might be caused by a couple of things that PrBoom's menus do with hardcoded array indexes; I may have just forgotten to update everything when I was tweaking that particular menu. I'll check that out soon too.
  • I noticed possibly the same issue with the lone pinky demon in the narrow corridor in E3M1; it seemed to repeatedly jump back to its starting position or something weird like that while moving towards me. Does that also happen in elhobbs' port?
  • I've noticed some issues with the screen wipe as well, will be looking into that sooner or later. (I've also noticed that the wipe effect seems to always get really low framerates for me, but I'm not sure if that's constant or what's causing it.)
  • Good catch with the control labels. I have neither a New 3DS nor a Circle Pad Pro which is why the default inputs are the way they are, and so I couldn't really test the new inputs either.
I actually was experimenting with a setting to allow the circle pad to be used either as a joystick or as four discrete directional inputs. I left the setting out for now since I wanted to get the regular button inputs hammered out first but I'll probably be bringing that back pretty soon also.

Share this post


Link to post
Revenant said:

  • I noticed possibly the same issue with the lone pinky demon in the narrow corridor in E3M1; it seemed to repeatedly jump back to its starting position or something weird like that while moving towards me. Does that also happen in elhobbs' port?

Yes it does! For me, the Pinky made its way to the end of the corridor, and then it would either attack or move around to find a "better" attack position, before warping out of bounds. Happens in both your port and elhobbs' port on the 3DS.

Revenant said:

  • I've noticed some issues with the screen wipe as well, will be looking into that sooner or later. (I've also noticed that the wipe effect seems to always get really low framerates for me, but I'm not sure if that's constant or what's causing it.)

There's a little bit of variance, but low framerates during wipes seemed more or less constant.

edit: I actually went back to PrBoom 2.5.0 on PC to test the monster warp issue again (no dice, maybe it really is a 3DS issue), but PrBoom also has some framerate slowdown during wipes. It's been fixed in PrBoom-Plus, but I don't know how useful that is to you.

Revenant said:

I actually was experimenting with a setting to allow the circle pad to be used either as a joystick or as four discrete directional inputs. I left the setting out for now since I wanted to get the regular button inputs hammered out first but I'll probably be bringing that back pretty soon also.

Awesome. Totally understandable, but I'll be looking forward to that.

Share this post


Link to post

I used dsdoom a lot when my flash card was still working. What irritated me with it was how to load pwads I spent hours and days trying to with no success.

I am stoked to see a 3ds port come around! Good luck with the project. :)

Share this post


Link to post

I don't know how yet, but actor->movedir corruption is causing both the enemies jumping around and the demo desyncing. I suspect something similar is causing the problems when picking up weapons (somehow, the game is trying to use PLAYPAL as a patch when picking up / starting with the shotgun; I suspect it only "works" out of pure luck since seemingly every other weapon pickup is fatal).

Share this post


Link to post

Okay, a new binary is available on github. All of the issues 3noneTwo posted (and more) should be fixed now, including the enemy position/demo desync issue (but except for the slow screen wipes).

(You may need to delete prboom.cfg to prevent the menu from crashing again.)

Working on more config stuff and support for saving, then single player should be 100% playable and I can start focusing on visual and other stuff.

Share this post


Link to post

Can confirm: Out of everything I listed, wipe-related issues are all that remain. Everything else works great! Got through the first two episodes of Ultimate Doom without any gameplay errors or hang-ups (including the menu issue), and saving and loading is functional.

The only thing that appeared during gameplay was this line:

W_CacheLumpNum: High lock on  PLAYPAL (15)
I think it appeared sometime between E2M4 and E2M6. I played through three times while trying to get the error to appear, and managed to trigger it twice — the third time, I was saving constantly to try and narrow down the moment it appeared, but I couldn't get it to trigger again. I can try to try and find it again later, but the best I can do for now is let you know that it's happening.

If "Use Circle Pad as Analog Stick" is on (it is by default), it doesn't register in Key Bindings and automatically defaults to forward/backward/turn movement. This is technically intended behavior, as the Circle Pad is acting as a joystick, I'm just mentioning it in case anyone else encounters this and wonders what's going on. (Options > General > Page 2 to toggle this)

Lastly, something I forgot to mention earlier: When invisible, if the player stops moving forward/backwards, the invisibility effect will stop animating while the player's weapon returns to center view. A tiny cosmetic issue, but I figured it's worth mentioning anyway.

Share this post


Link to post

It didn't occur to me that you can still enter a save game name using the face buttons (since they're still mapped to normal keyboard keys as far as the engine is concerned). I was planning to just have save games be named using the current date/time just for simplicity's sake.

I did notice the invisibility thing, but not the lump caching issue. I'll check both of those out later.

Share this post


Link to post



As promised, the half-assed frontend. Subject to improvement eventually, but now you can select IWADs / PWADs / patches and set up some other stuff.

Also, all config options can be edited using the 3DS controls now, and save game names are automatically filled in with the date and time. At this point I think all the actual basic functionality is pretty much there.

My next high-priority tasks now are coming up with a real name for the port, adding multi-screen support (and 3D), and adding audio (probably borrowing the OPL2 and GUS emulation from chocolate-doom, eventually).

Current binaries are on github, as usual.

Share this post


Link to post

Good start on the front-end! Start-up settings like screen width/height don't stick yet, but it only takes a couple seconds to set up, and it's a whole lot better than opening the CFG file. I noticed when running on the N3DS (doesn't happen in Citra), the "additional files" section lists each available file twice (including IWADs). Everything about it works, it's just a small menu bug.

I have a cosmetic suggestion that I'd like to bring up now, in case this could somehow affect multi-screen or 3D support (better to be safe?):
Currently, STBAR and menu elements scale unevenly when the resolution is set to 400×240. The tiny ammo counters can become particularly hard to read, and menu text gets pretty messy (small letters in particular). How feasible would it be to stop these elements from scaling?

Screenshots and mock-ups:

Spoiler

Current (via Citra)


Suggestion (taking a cue from PrBoom-Plus)


The extended HUD makes use of the Screen Size border graphics. BDBR_B along the top edge, and FLOOR7_2/GRNROCK (Doom or Doom 2 respectively) for the background. This allows other wads to take advantage of it.

Share this post


Link to post

That's more or less exactly what I wanted to do with the status bar since it looks pretty bad even at 320x240. Once I start working on multi-screen support (which should be pretty soon) I'll be making sure that visual details like that look a bit better than they do currently when running at higher resolutions.

Also, the reason why WADs may appear twice in the list is that (as per I_FindFile) it scans both the current working directory and the program directory, which are usually the same (but may not be if you're running the game in Citra), and it currently doesn't avoid listing duplicate files (due to laziness). You can also put WADs in a subdirectory of the program directory called "wads" and they'll only get scanned once (this is currently configurable as "DOOMMWADDIR" in the makefile).

Share this post


Link to post

Put prboom.wad in the program directory, as mentioned in the readme (you can get it from the repo's data directory or from a regular build of prboom).

Share this post


Link to post

Oh, I didn't realize that it wasn't supposed to be in its "data" folder. It's working now, thanks for the information.

One advantage I noticed it has over the other PrBoom port (The one based on DSDoom) is, unlike that one, this one plays demos correctly. For some reason, the other had the demo with glitched movement so he would keep dying prematurely. The ability to select P-Wads is also handy. One thing, though, is there a reason why the analog stick can't seem to be remapped in the controls?

Share this post


Link to post

You can disable "use circle pad as joystick" to be able to map it to other things. Doing that will cause it to register as four different "keys" (which are mapped to movement by default) instead of as a joystick.

I made the default keys that way back before the option to treat the pad as a joystick was actually added, but I might tweak it later to avoid confusion.

Share this post


Link to post

The only other real thing I've noticed is that Plutonia gives an error about not being mapped as an IWAD and that occurs with the other port as well. On the plus side, though, I can just load it as a PWAD and it's fine.

Share this post


Link to post

It's weird, though, because it's worked just fine with many other source ports, including the PrBoom that's included in D-Touch for Android. Do these particular ports just happen to have IWAD checks that the others lack?

Share this post


Link to post

My port has exactly the same IWAD detection as normal PrBoom does (and I assume elhobbs' port does too), so I'm not sure what else the problem could be. Are you able to verify that it's one of the versions of the WAD listed in the link in my last post?

Share this post


Link to post

Did a bit more work on this lately. In preparation for adding actual 3D support I started modifying video code to better support drawing for multiple screens simultaneously. Now the bottom screen is primarily used for the automap:



Binary is in the same place as usual.

Share this post


Link to post

Good use of the bottom screen, glad that it's being used for menus too. Touchscreen controls for automap/menus would be a welcomed addition, though obviously not necessary for either to be functional. The only thing I can note is that it'd be nice to have some way to clear bindings without manually editing the cfg. (Home button? Hold a specific button to clear? Touchpad option?)

There's a lot of black flickering during gameplay, I'm assuming these are dropped frames? Happens occasionally in 320×200, more prevalent in 400x240, and even moreso with uncapped framerate. Easiest place to find flickering is right at the start of E1M1, moving around the close left pillar while facing east. (x:850, y:-3400)

Also, always nice to see ENDOOM appear after quitting. Appreciate that little addition. :>

Share this post


Link to post

is it hard to run homebrew on 3ds?

is there any chance of wireless multiplayer with another 3ds?

both my nephews have 3ds and i will get one too if we can play doom together.

Share this post


Link to post
rampancy said:

is it hard to run homebrew on 3ds?

It's easy enough, first-time setup is just a bit time-consuming. I've been using the YouTube App method without any issues. http://smealum.github.io/3ds/ (also, video)
(edit: patched out by Nintendo :[ )

rampancy said:

is there any chance of wireless multiplayer with another 3ds?

"Multiplayer????" is on PrBoom-3ds' To Do list. I don't think there's been any focus on it yet? It'd be really cool though.

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
×