I wrote a 3D TPT!

  • SopaXorzTaker
    30th Jun 2018 Member 3 Permalink

    It's currently very limited, but you can find it at https://sopaxorztaker.gitlab.io/tpt3d.

    Source code is available at https://gitlab.com/sopaxorztaker/tpt3d.

     

    It's based on 3DExplore, my previous experiment in writing a 3D renderer.

    It's currently very buggy, the controls are inconvenient and there's only 5 6 7 elements, however I'd still like to suggest checking it out :P

     

    Update 2018-06-02: added wood and fire!

    Update 2018-06-01: added saving!

     

     

    Copy the code below, paste it into the text area and press "Load" for a quick demo.

    {"cubes":[{"coords":[50,-2,1],"type":4},{"coords":[50,0,0],"type":5},{"coords":[48,-2,0],"type":3},{"coords":[48,0,0],"type":2},{"coords":[12,32,2],"type":1},{"coords":[12,31,2],"type":1},{"coords":[10,31,2],"type":0},{"coords":[12,30,2],"type":1},{"coords":[10,30,2],"type":0},{"coords":[12,29,2],"type":1},{"coords":[10,29,2],"type":0},{"coords":[12,28,2],"type":1},{"coords":[10,28,2],"type":0},{"coords":[12,27,2],"type":1},{"coords":[10,27,2],"type":0},{"coords":[12,26,2],"type":1},{"coords":[10,26,2],"type":0},{"coords":[12,25,2],"type":1},{"coords":[29,-2,0],"type":2},{"coords":[29,-1,0],"type":5},{"coords":[29,0,0],"type":5},{"coords":[10,25,2],"type":0},{"coords":[12,24,2],"type":1},{"coords":[28,-2,0],"type":2},{"coords":[28,-1,0],"type":5},{"coords":[28,0,0],"type":5},{"coords":[10,24,2],"type":0},{"coords":[12,23,2],"type":1},{"coords":[10,23,2],"type":0},{"coords":[12,22,2],"type":1},{"coords":[10,22,2],"type":0},{"coords":[12,21,2],"type":1},{"coords":[10,21,2],"type":0},{"coords":[12,20,2],"type":1},{"coords":[10,20,2],"type":0},{"coords":[12,19,2],"type":1},{"coords":[10,19,2],"type":0},{"coords":[12,18,2],"type":1},{"coords":[12,17,2],"type":1},{"coords":[10,18,2],"type":0},{"coords":[12,16,2],"type":1},{"coords":[10,17,2],"type":0},{"coords":[12,15,2],"type":1},{"coords":[10,16,2],"type":0},{"coords":[12,14,2],"type":1},{"coords":[10,15,2],"type":0},{"coords":[12,13,2],"type":1},{"coords":[10,14,2],"type":0},{"coords":[18,0,1],"type":6},{"coords":[12,12,2],"type":1},{"coords":[10,13,2],"type":0},{"coords":[12,11,2],"type":1},{"coords":[17,0,1],"type":6},{"coords":[10,12,2],"type":0},{"coords":[12,10,2],"type":1},{"coords":[16,1,1],"type":7},{"coords":[16,0,1],"type":6},{"coords":[10,11,2],"type":0},{"coords":[12,9,2],"type":1},{"coords":[10,10,2],"type":0},{"coords":[12,8,2],"type":1},{"coords":[12,7,2],"type":1},{"coords":[10,9,2],"type":0},{"coords":[12,6,2],"type":1},{"coords":[10,8,2],"type":0},{"coords":[12,5,2],"type":1},{"coords":[12,4,2],"type":1},{"coords":[10,7,2],"type":0},{"coords":[12,3,2],"type":1},{"coords":[12,2,2],"type":1},{"coords":[12,1,2],"type":1},{"coords":[10,6,2],"type":0},{"coords":[12,0,2],"type":4},{"coords":[10,5,2],"type":0},{"coords":[10,4,2],"type":0},{"coords":[10,3,2],"type":0},{"coords":[10,2,2],"type":0},{"coords":[10,1,2],"type":0},{"coords":[10,0,2],"type":3},{"coords":[7,0,2],"type":6},{"coords":[6,0,2],"type":5},{"coords":[5,0,2],"type":2},{"coords":[3,0,2],"type":2}],"paused":true,"signs":[{"text":"Welcome to TPT3D!","coords":[0,0,2]},{"text":"Go right to continue!","coords":[0,1,2]},{"text":"This is a cube.","coords":[3,-1,2]},{"text":"Those have different types:","coords":[5,-1,2]},{"text":"There are solids, liquids and liquid sources.","coords":[10,-1,2]},{"text":"There's also fire! Press [Space].","coords":[16,-1,1]},{"text":"Click anywhere to place a cube!","coords":[21,-1,0]},{"text":"Press [.] to see the different types.","coords":[21,0,0]},{"text":"Try moving the viewport by dragging.","coords":[25,0,0]},{"text":"Also try [Z] and [X]! :P","coords":[28,0,0]},{"text":"Press [T] to place a sign with your own text!","coords":[31,0,0]},{"text":"[Y] will remove the last sign placed.","coords":[36,0,0]},{"text":"[Q] will clear everything.","coords":[40,0,0]},{"text":"That's it, now reload the page and try yourself!","coords":[44,0,0]},{"text":"By SopaXorzTaker","coords":[0,2,0]},{"text":"woo, some cubes are translucent!","coords":[28,1,0]},{"text":"Also try [K].","coords":[28,2,0]}],"viewport":{"coords":[2,0,-2],"look":[0,0,0]}}

    Edited 9 times by SopaXorzTaker. Last: 2nd Jul 2018
  • QuanTech
    30th Jun 2018 Member 1 Permalink
  • _Theo
    30th Jun 2018 Member 1 Permalink

    Interesting. How about a brush feature though, and maybe edit the distance the brush goes with the scroll, instead of awkwardly guessing where to move the mouse? seems good. Maybe add some fire and a fuse? Probably wtrv in a later version? This seems promising. One complaint I have is that the rendering is backwards, the blocks look inverted like you're looking INTO them not from outside, gotta fix that.

  • NF
    30th Jun 2018 Member 1 Permalink

    @SopaXorzTaker (View Post)

     This is why I wish could test mods on my phone :(.

    Edited once by NUCLEAR_FOX. Last: 1st Jul 2018
  • SopaXorzTaker
    1st Jul 2018 Member 0 Permalink

    TuDoR2007:

    Interesting. How about a brush feature though, and maybe edit the distance the brush goes with the scroll, instead of awkwardly guessing where to move the mouse? seems good. Maybe add some fire and a fuse? Probably wtrv in a later version? This seems promising. One complaint I have is that the rendering is backwards, the blocks look inverted like you're looking INTO them not from outside, gotta fix that.

     

     

    I've just fixed the rendering of cube edges, now they do show up properly.

    I've also added glass and transparency, so it looks cooler! :D

     

    Now there's a small bug about water sometimes permeating through walls, I do have to fix that. FIXED!

    Edited once by SopaXorzTaker. Last: 1st Jul 2018
  • archived_account
    1st Jul 2018 Member 0 Permalink

    oh lol, so strange and can be runned on a android! btw, will you add controls with buttons? 

  • SopaXorzTaker
    2nd Jul 2018 Member 0 Permalink

    @NUCLEAR_FOX (View Post)

     This is not a mod.

    In fact, it's a standalone game completely independent of TPT and written in JavaScript.

     

    However, there isn't yet a mobile/touchscreen interface, unfortunately.

  • nmd
    2nd Jul 2018 Member 0 Permalink

    ngl this is pretty cool! The controls are a little difficult at the moment though

  • SopaXorzTaker
    4th Jul 2018 Member 0 Permalink

    Check out the demo level!

  • _Theo
    20th Aug 2018 Member 0 Permalink

    Loading gives "SyntaxError: Unexpected end of JSON input"