Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Making an Ascii Roguelike in Project Tiny

Discussion in 'Project Tiny' started by Sarkahn, Nov 28, 2020.

  1. Sarkahn

    Sarkahn

    Joined:
    Jan 9, 2013
    Posts:
    440
    Edit: Project is on hold until this bug gets fixed.

    So I wanted to take a shot at porting my terminal library over to Project Tiny. The only dependency it has on UnityEngine is the Mesh class, so it seemed like it would be a good fit. I got it up and running and made a Tiny version of the first part of the Rust Roguelike Tutorial. Results were pretty good!

    This was my first time really messing with Project Tiny. I was pretty impressed honestly! I was able to implement a scaling pixel perfect camera pretty easily and I recreated the terminal rendering by using sprites. The rest was just re-treading stuff I'd already done in my non-tiny version. But please fix the numpad bug I posted about! I want to add diagonal movement...

    As for feedback: My biggest issues by far were problems with the conversion system. It's really just...not intuitive, in my opinion. Like at all. Maybe I'm just an idiot but I felt like I was constantly struggling with it. I tried using subscenes to help me understand it better and honestly it just made me more confused. I would change things in an authoring script inside a prefab and the changes wouldn't get pushed to runtime. So I would increment the version using
    ConverterVersion
    and that would do nothing. So I move the gameobject referencing the prefab out of the subscene and suddenly it would push my changes to runtime.

    There's almost no documentation out there on how it all works so I don't even know if I was just doing something wrong or if it's a bug, or what. I just had to try and piece everything together by experimenting and finding bits of information in random forum posts. It's kind of insane to me that we've gone this long without any proper documentation on subscenes and the conversion system.

    Anyways, ranting over. I mostly just wanted to show off the little roguelike demo. I think it's pretty cool that I was able to make something like this in Unity and it comes out to 700kb and is playable in a browser. I plan on making more for sure.
     
    Last edited: Dec 28, 2020
    deus0, Mikael-H, angusmf and 6 others like this.
  2. kevinmv

    kevinmv

    Unity Technologies

    Joined:
    Nov 15, 2018
    Posts:
    51
    Hey hey!

    Great stuff on the Roguelike, it's great to see stuff like this being made!

    For conversion workflow this is the same as the overall Entities ConversionWorkflow described here: https://docs.unity3d.com/Packages/com.unity.entities@0.16/manual/conversion.html

    The only difference for Tiny is that Tiny does not support UnityEngine APIs at runtime (not assetbundles, no gameobjects etc...). A conversion system can use gameobjects (which represent authoring data) and convert it into runtime ECS components for the runtime to load from disk and use.

    Hope this helps,
    Kev
     
    tonialatalo and Sarkahn like this.
  3. Sarkahn

    Sarkahn

    Joined:
    Jan 9, 2013
    Posts:
    440
    Yeah I realize the conversion stuff is all from the general entities side of things, I just brought it up because I've never had issues like I described above until I started with Project Tiny, and I've been messing with ECS for a while now.

    Outside project Tiny, I would just slap a "ConvertToEntity" script on my authoring objects and everything would just work. I've never used subscenes due to lack of documentation and up until now I've never had to bother with the "ConverterVersion" attribute.

    So I dunno, again maybe I was just being dumb and missing something obvious, but it seemed like my authoring changes just would not push to runtime sometimes, which is not something I've ever experienced outside Project Tiny.

    Edit: I didn't realize there's actually some decent documentation for conversion now as of .16, thanks for the link!
     
    Last edited: Nov 30, 2020
    deus0, kevinmv and tonialatalo like this.