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

How to make Snake with Project TIny

Discussion in 'Project Tiny' started by sniffle63, Jun 28, 2019.

  1. sniffle63

    sniffle63

    Joined:
    Aug 31, 2013
    Posts:
    365
    Hey guys, started a series on how to make Snake with Project Tiny if anyone's interested

     
    ihonk, Silenus3, Jalol and 3 others like this.
  2. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Nice work, looking forward to your next videos.

    It does highlight how clunky working with Tiny is at the moment though, e.g. We should be able to make components, entities and config data in the editor.

    Also will Tiny be runnable in the Editor in the future?
     
  3. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194


    Cool second video great work.

    The thing is again how clunky DOTS and Tiny are, having to load a scene to add a segments of the snake.

    Needing to cycle through all the entities to find the last segments and move it forward, when a good collection system should let you remove the last element and move it to the first position e.g. List.

    All of the code needed to find config data, have you considered using the singleton pattern to directly access this data?

    This is the boilerplate problem with DOTS you end up having to jump through hoops to do simple/solved things we used to take for granted.
     
    sniffle63 and Silenus3 like this.
  4. raymondyunity

    raymondyunity

    Unity Technologies

    Joined:
    Apr 30, 2018
    Posts:
    122
    This is great and thank you for the feedback!
     
    Manny_bit and sniffle63 like this.
  5. sniffle63

    sniffle63

    Joined:
    Aug 31, 2013
    Posts:
    365

    Sorry its taken so long to reply! It was my birthday this past weekend and with 4th of July iv been busy!

    But yes i agree, at the moment Project Tiny can be tedious and clunky. (Especially with how you have to reopen the DOTS project every time you create a new script).

    You can create entity's with the EntityManager, but i was unable to assign a sprite to the sprite2D renderer for some reason. So i used scenes instead, i also believe they are working on prefabs, so its a 'for now' workflow.

    Also, there may be a way to better do the tail movement, but as of now i couldnt find a way to rearrange the segments in the DynamicBuffer. It may be possible, but id assume it would mess up the memory chunking of the buffer. (In the TypeScript version i used an array and just poped and inserted the tail segments, but the segments were stored in the system and not on the Entity component)

    They also said the editor version of creating components is being worked on currently.

    But keep in mind that we are programming in a DOTS approach, so some things will be more complex to achieve then what we would be use too, but the extra complexity comes with the performance and file size benefits

    Also i feel i should say, i really like how separated it is from the unity editor. I suppose it would be nice to see the game running within the editor for easier debugging, but the ability to build and run the game from the IDE is AMAZING to me
     
    Last edited: Jul 9, 2019
  6. sniffle63

    sniffle63

    Joined:
    Aug 31, 2013
    Posts:
    365
  7. sniffle63

    sniffle63

    Joined:
    Aug 31, 2013
    Posts:
    365
  8. Cryzer

    Cryzer

    Joined:
    Oct 10, 2016
    Posts:
    2
    Thank you for your videos, they are very informative! Are you planning to upload this to facebook instant too? Any idea if it would be possible?
     
  9. sniffle63

    sniffle63

    Joined:
    Aug 31, 2013
    Posts:
    365
    Its for sure possible, i didnt have plans for making this game usable with facebook instant.
    But im sure its not much different then the TypeScript way of uploading to instant, which i already have a video on.


    ALSO

    Heres the last planned video in this series! Ill probably wait for the next update where the inspector is being completely changed and they are going away from an Entity DOTS editor and are moving back to normal unity GameObject editor before i make more videos tho, because its looking like this series might be pretty obsolete once the update comes.

    Then after it comes, apparently they are eventually switching back to the Entity editor or something, idk its seeming kinda ridiculous, so i probably will stray away from Unity Tiny for a while

    Heres the new video tho
     
    Maras and Sunny2017 like this.
  10. Maras

    Maras

    Joined:
    Dec 11, 2012
    Posts:
    131
    Tiny might be in too early stages to make tutorials. I am waiting a few more months too, but I am looking forward to see your tutorials once the core is a bit more stable.
     
  11. sniffle63

    sniffle63

    Joined:
    Aug 31, 2013
    Posts:
    365
    For sure, i had every intentions of having to redo a lot of the videos and knew they would only be relevant for a short period of time. I wasn't expecting them to ditch the editor and go back to GameObjects tho, and im not really sure how much thats going to change the way the programming is done. I asked in the forum post about what that means for how we are programming in tiny currently, but i didn't get an answer.

    So i guess it really depends on how long we are going to be stuck with the temporary GameObject inspector/editor, and how much that changes how we interact with entities through code.
     
    MadeFromPolygons likes this.
  12. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,980
    I would really like for you to do some tutorials of this style (maybe even the same tutorials) on non-tiny ECS. These tutorials are great but I think more users would find normal ECS over tiny+ECS useful right now :)
     
    pm007 likes this.
  13. sniffle63

    sniffle63

    Joined:
    Aug 31, 2013
    Posts:
    365
    Iv actually been considering that, and will most likely be doing it.

    Also i really appreciate the comment!
     
    MadeFromPolygons likes this.
  14. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    All the boilerplate required to use hybrid ECS in Unity is really disheartening to me, I really prefer the new ECS-specific UI and approach used by Tiny.

    Great video tuts by the way, congratz. I've been following and had plenty of trouble myself (only 2019.2b3 works well, couldn't get the project to build from Rider no matter what, could only build from Unity using the Web(AsmJS) preset, etc), nothing unexpected from an experimental feature. Still, it's really good to have a tutorial to follow instead of walking around totally blind. Thanks! :)