iPad Victory Shot

For the past few weeks Andy has been working on the iPad port of the game, and we now have the engine running on that device:

The colors are all funny because we haven’t written the shaders for the iPad yet, so what you are seeing is the surface normals of the objects in the scene.

We haven’t written the shaders yet because they need to be OpenGL ES shaders, and the shaders we have right now are HLSL shaders all written for medium-to-high-end PCs. As the first part of the porting work, Andy made the engine work on OpenGL on the PC, and for that we converted our HLSL shaders to GLSL automatically. But the jump to ES on an embedded device is big enough that it doesn’t make sense to try and use the same shaders. Instead we’ll have to have some simpler shaders that we substitute.

As you can see from my previous post, I have been working on touch controls (not on the iPad, but on a touchscreen Windows PC). A very rough first cut of that is now working. It’s nice to play the game with touch controls, as it feels more immediate than mouse and keyboard (and I have been a first-person shooter player forever!)

So in order to have the game fully interactive on the iPad, we just need to write the bit that translates iPad touch controls to feed them into the rest of the gameplay code, which should not take long.

Then, after that, we have to work out exactly how we are going to crunch all the graphical assets down to portable versions and do the streaming in an appropriate way… which is going to be a bit of work. Salvador built a streaming asset system a while back, and we have been using that daily on the PC, but we haven’t tried to set it up on a lighter-weight portable system like the iPad yet. We’ll see how it goes!

This entry was posted in Development. Bookmark the permalink. Trackbacks are closed, but you can post a comment.

34 Comments

  1. Posted October 19, 2012 at 10:02 am | Permalink

    Pardon my skepticism, but I’m curious – just how, exactly, do these “more immediate” controls work? Are they virtual buttons, drag-to-move, point-based touch points that automatically move you(Myst-style)?

    • Jonathan Blow
      Posted October 19, 2012 at 11:46 am | Permalink

      See my other comment in these replies. It’s not virtual buttons / joysticks, as I think those are always terrible.

      Maybe at some point I will make a little video.

  2. Posted October 19, 2012 at 10:07 am | Permalink

    Great news Jonathan.
    And awesome working porting the engine to iPad.
    I did the same a couple of days ago, although I didn’t had any shaders to port, using Fixed function with GLES1.

    Looking forward to play The Witness on my iPad. In fact I’m pretty sure that’s the platform I’m choosing to buy it.

    Will it work on iPad 1 or is it too soon to tell?

    Cheers and good luck

    • andy
      Posted October 19, 2012 at 7:00 pm | Permalink

      We’d like to get it running on as much hardware as possible, and as far as hardware features go, the engine is compatible with the iPad 1. Once I’m further along with the port we can better gauge how it’s going to stack up in terms of performance and memory use.

      Also I guess we need to get an iPad 1 from somewhere :)

  3. Peter
    Posted October 19, 2012 at 10:18 am | Permalink

    Perhaps finally a reason to buy a iPad.

  4. Devin Raposo
    Posted October 19, 2012 at 10:22 am | Permalink

    How do you want to handle movement in a 3D space with touch controls? It seems like most games have gotten this wrong.

    • Posted October 19, 2012 at 10:39 am | Permalink

      Initially console games got this wrong too. It wasn’t until Halo that I considered it to be “decent”, but for me Halo nailed it.
      As for the touch devices, I don’t think it’s impossible, and considering the work Jonathan has made I’m pretty sure it won’t disappoint.

    • Tim Romero
      Posted October 19, 2012 at 10:45 am | Permalink

      Epic Citadel did an okay sort of “tap where you want to walk,” I can imagine it’s something along those lines rather than the horrible virtual analog that so many games try to pull off.

      • Jonathan Blow
        Posted October 19, 2012 at 11:45 am | Permalink

        Indeed. The current control scheme is 1-finger tap / hold for almost everything, and 2-finger motions for subtle sidestepping movements that you might rarely want to do.

        • justin
          Posted October 19, 2012 at 1:27 pm | Permalink

          But… We need to stand still and see sometimes, right? We are gonna have o walk towards and object stop and inspect it from all sorts of angles since this is still a 3D game in the iPad, right? How will we walk around and look up, down, left and right to register what’s going on…

          Well, implying the game is what I have in mind. The truth is that we still have no idea what this game is going to be! We don’t know what we’ll have to do in the game so I can’t image how this will have to go down.

          The part that is not the mazes. You talk about a part of the game that needs buffing up to justifies existing. The part that is not the touch screen mazes is the part about “seeing” and “witnessing?” things in nature or subtleties of objects or shadows or reflections. Can you still explore in such detail with touch controls?

          Again, we have no idea what the game is or what it’s trying to do. so I can’t tell if what i’m trying to say even matters. When that part of the game doesn’t exist anymore… I can remember someone saying shapes taking form in the union of the shoreline and the water’s reflection. Touch would be awesome for the touch screen mazes but is that all there is to the game? Just touching mazes?

          Could you make a video…

          Capcha: Achieve trust (?)

  5. Howard Lewis Ship
    Posted October 19, 2012 at 10:58 am | Permalink

    You are using the term “streaming” in a way that makes me wonder if this game will require an active internet connection? Is “streaming” used for downloading game assets from the internet, or is it a term related to driving data into the GPU?

    • Jonathan Blow
      Posted October 19, 2012 at 11:44 am | Permalink

      I just mean streaming from disk / flash to main memory. Not from the internet.

  6. justin
    Posted October 19, 2012 at 11:23 am | Permalink

    This is awesome! I’ll buy it a second time for the iPad too! I’m so happy that this will be available “on the go” I hope it’s better than Myst for iPad cuz that port sucked!

    Good luck and I hope the game releases soon. I also hope that the iPad versions releases at the same time or not too long after the Steam PC version.

  7. Mike
    Posted October 19, 2012 at 11:36 am | Permalink

    How did you choose to do your automatic HLSL->GLSL conversion? I’d be interested to hear, as it seems like existing tools each have some set of drawbacks.

    • andy
      Posted October 19, 2012 at 6:52 pm | Permalink

      Our shader processing is quite involved and really deserves a blog post of it’s own (I apologise for never posting, I have a few almost-finished posts I’ll try to get up here soon!). The short version:

      We compile the HLSL .fx files with the D3D compiler library, and pull out render state and parameter information. Using that, we preprocess the vertex and pixel shaders and write out new versions with various changes, such as parameters that will be set at the same time rearranged to be in contiguous blocks (i.e. per material vs per draw-call) .

      Then we compile those shaders; with the HLSL compiler for D3D, and the Nvidia Cg compiler for OpenGL. Currently the iOS version picks a GLSL substitute shader based on some of that information we pulled out of the original .fx file.

      Cg will also compile to GLSL (I haven’t tried this), but as Jon said, it’s not worth converting our PC shaders for iPad because they’re way too expensive. I’m working on refining that shader-choosing step and having it directly in our asset processor.

      • Mike
        Posted October 20, 2012 at 1:02 pm | Permalink

        Very interesting; thanks for the reply, Andy. I’ve been meaning to poke at the Cg compiler at some point. I’d love to see that blog post someday, too, when you get the time!

  8. Amir
    Posted October 19, 2012 at 12:25 pm | Permalink

    I have no idea about how different ios programming is from android programming, but any plan for android?

  9. Posted October 19, 2012 at 12:45 pm | Permalink

    Very exciting. Thanks for posting your progress toward ipad release. Since Braid, my personal game playing itch has been increasingly tough to scratch (inventive mechanics, philosophical flavors, sublime art, in other words a game that works my mind beyond simply figuring it out) and my anticipation increases with every update you provide. Thanks for everything!

  10. Posted October 19, 2012 at 7:10 pm | Permalink

    I’m interested to see how the conversion to OpenGL ES goes. I have a lot of high-end PC shaders too, and am worried about how I’ll “gracefully degrade” functionality if I want to port to Android/iOS one day.

  11. Screwtape
    Posted October 19, 2012 at 8:50 pm | Permalink

    Would you consider shipping the ‘light’ GLES shaders with the desktop version of the game, perhaps as a ‘netbook’ or ‘minimal graphics’ mode? As I understand it, GLES shaders should Just Work with OpenGL 2.x, and it’d make it easier to much easier to port to Linux and other minor platforms.

  12. Posted October 19, 2012 at 10:23 pm | Permalink

    I was waiting for someone to comment “but there are artifacts in the screen shot”.

    Just because I know that is Jonathan’s favorite comment.

    Based on what we’ve seen of the core “maze tracing” gameplay – I think this is a definite purchase on iPad.

  13. Pritchard
    Posted October 20, 2012 at 12:10 pm | Permalink

    So will the release of The Witness to multiple platforms be simultaneous, or will a PC/console release come first?

    • Jonathan Blow
      Posted October 20, 2012 at 1:12 pm | Permalink

      I would like to do simultaneous on as many platforms as possible, but ultimately it will just depend on what we are able to do. We are a small studio.

  14. Douglas
    Posted October 22, 2012 at 7:29 pm | Permalink

    I’m not in any way tech savvy so forgive me if this question is stupid. Will this game be playable on a MacBook? If not, I suppose now is the best time to go ahead and say that I hope to see this game available – sooner rather than later – on Xbox or the Mac. One of the few games, in fact the only game I suppose, that I’ve been watching and waiting for and getting excited about.

  15. Harold
    Posted October 23, 2012 at 1:42 pm | Permalink

    I’m 41 and I’ve played a few games. But honestly, I haven’t played all that many. I get bored and rarely get past the first few levels; demos often have just enough levels to get me interested, but I don’t buy games that often since the ones I have purchased simply don’t keep me interested beyond the first few levels.

    I read an article about you in The Atlantic a few months ago, then I played Braid. I purchased the game and played it all the way through. I was fascinated with this game; still am. It’s marvelous. The mechanics alone are enough to make the spine tingle, and both the artwork and music is gorgeous — but there’s something else. Something that produces that feeling that’s being simply fun…

    I don’t wish to make more out of it than it is. I don’t know exactly what it is. Braid is simply one of a few games that actually has me interested in games — and their potential — again.

  16. Harold
    Posted October 23, 2012 at 1:43 pm | Permalink

    “that feeling that’s beyond simply fun”, I meant.

  17. Alex
    Posted October 24, 2012 at 11:19 pm | Permalink

    Will there be an option in the PC version to downgrade the graphics (using those changed and simpler shaders), to allow people with weaker PCs (like, Core2Duo 1.66 + GeForce7xxxGo integrated solutions) to still have the possibility to run the game? Or is it completely out of the question?

    • Jonathan Blow
      Posted October 25, 2012 at 12:33 am | Permalink

      Yes, though I don’t know how the game will run on the specific specs you name — mainly just because I have no idea how fast a Core 2 Duo and a GeForce 7 Go are. At this point there have been just too many CPUs and GPUs with essentially random numbers for names and I just can’t keep them straight in my head any more.

      There are a lot of different Core 2 Duos; the later ones were on a 45nm process which is a huge difference over 65nm. No idea which one you have. Anyway, we will just see! I suspect that if the game will run on an iPad 2 it will run on an older PC.

  18. Roger
    Posted October 27, 2012 at 2:15 pm | Permalink

    As a followup, is iPad 2/iPad mini the lowest iOS spec you’re planning to support? I have an iPad 1 and I’m trying to decide whether/when to upgrade it, and I’m planning to play The Witness on launch day, preferably on iPad.

    • Jonathan Blow
      Posted October 27, 2012 at 4:24 pm | Permalink

      I have no idea. We are told, though, that the iPad 1 is a very low spec and that we may not be able to support it. But, we haven’t tried, so we don’t know.

  19. Matt DeCata
    Posted December 19, 2012 at 10:06 pm | Permalink

    Will touch support be included for windows too?

  20. Matt DeCata
    Posted December 19, 2012 at 10:09 pm | Permalink

    Oh nm I hadn’t read the wm_touch post yet, I’ll probably play it on a windows 8 touch device

  21. josh
    Posted January 3, 2013 at 6:58 pm | Permalink

    non-technical comment, sorry, but that screenshot looks really interesting without the shaders! …I mean, I know that’s not the idea, but it’s still awesome, in a trippy sort of in a way.

    Really excited to see what the touch controls are like.

  22. Joey
    Posted July 1, 2013 at 2:13 pm | Permalink

    Will it be availible on android devices?

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

 
  • Archives

  • Categories

  • Meta