Skip to content

adinilfeld/generals-ar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to generals.ar, a two-player, iOS, AR-based implementation of the popular online game generals.io. Created during the Uncommon Hacks 2024 hackathon.

How to play

Start the server

Note that the device running the server must be on the same network as the device(s) running the app.

  1. Clone the generals-ar-server repo.
  2. If needed, install uvicorn (for example, by running pip install uvicorn)
  3. From the top level of the server repo, run uvicorn app:app --host 0.0.0.0 --port 8000

Install the app

  1. Clone this repo.
  2. Open the top-level generals.ar.xcodeproj file in XCode
  3. On line 219 of Game.swift, modify the IP address to use the local address of your device running the server (keeping port 8000). Please don't commit this change!
    • To find this IP address, you can go System Settings -> Network -> Details (next to your wifi network).
    • For example, if your IP address is 192.168.1.10, then line 219 should now be
      let serverURL = "http://192.168.1.10:8000"
      
  4. Connect your device (iPhone or iPad) with a physical cable and wait for it to appear in XCode
  5. Click the Build button (looks like a "play" button)
  6. If needed, follow any prompts to (a) enable Developer Mode, and (b) trust the Developer App certificate; afterwards, build again
  7. Follow instructions 4-6 to install the app on a second device. (You can unplug the first device once the game is installed.)

Notes:

  • The device(s) running the app must be running iOS/iPadOS 17.4 or higher.
  • The server cannot handle more than 2 devices at the same time.

Play the game!

To reset the game:

  1. Close the server (CTRL+C, then CTRL+Z)
  2. Close the app on the device(s)
  3. Restart the server
  4. Re-open the apps

Enjoy!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages