/flex-fov

intelligent defaults for displaying any FOV

Primary LanguageJavaGNU General Public License v3.0GPL-3.0

Flex FOV

flex-full flex-menu flex-rubix

An experiment to display any FOV (0-360°) in a modern game.

Continuing where blinky left off. Rather than exposing a myriad of options, the goal is to provide an intelligent default projection based on the chosen FOV:

          0             90           180           270           360 degrees
          |-------------|-------------|-------------|-------------|
straight> |     standard      |    panini     |     mercator      |
or        |-------------------|---------------|-------------------|-> equirect when exactly 360
curved>   |     standard      | stereographic |   winkel tripel   |   for panoramic recording
          |-------------------|---------------|-------------------|

We are using this minecraft mod as the base for this experiment.

Videos

Quick Start

This currently only works for Windows. Run the following to start a game with the mod installed.

gradlew.bat runClient

NOTE: Prior to running this, I had Minecraft and Minecraft Forge installed (both 1.11.2). But I am not actually sure if this is required, since I believe this gradle setup is building the entire game itself from decompiled sources?

IntelliJ Setup

IntelliJ can be setup to allow autocomplete, which is useful for exploring the Minecraft/Forge APIs in-place. If you don't wish to use an IDE, you can explore the APIs the old-fashioned way using this Forge javadoc (outdated but probably mostly relevant).

You have to create your own IntelliJ project since it cannot be easily version-controlled. I loosely followed these instructions:

  1. Run ./gradlew setupDecompWorkspace
  2. Open IntelliJ
  3. 'Import Project' > choose our build.gradle file
  4. View > Tool Windows > Project
  5. Right click our *.iml file > Import Module
  6. Run ./gradlew genIntellijRuns
  7. Restart IntelliJ
  8. Run > Edit Configurations
  9. Put -Dfml.coreMods.load=mod.render360.coretransform.CoreLoader in VM options
  10. Application > Minecraft Client > Use classpath of module > *_main
  11. Run > Run 'Minecraft Client'

The game should start with our mod installed.

Deploying

This will build a jar file that users can install. (Not currently working when I try to install to a 1.11.2 forge mods folder.)

gradlew.bat build
# outputs a jar to build/libs