A little bit better but not 100%
// Project: rollingmap
// Created: 2018-02-13
// show all errors
SetErrorMode(2)
#constant screenwidth=1024
#constant screenheight = 768
// set window properties
SetWindowTitle( "rollingmap" )
SetWindowSize( screenwidth, screenheight, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( screenwidth, screenheight ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 1200, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
//SetVSync(1)
// iniaialise variables that dont change
#constant chunksize#=50
#constant chunksizedepth#=5
#constant xMax=80*192
#constant yMax=80*192
#constant gridx=1
#constant gridy=1
#constant gridz=1
// initallise necessary globals that all functions can see and change
global camerastep#=.01
global playermovement#=.05
global player,oldobj
global mySelection=0
global cx#,cy#,cz#, blockcount
global magnetic=0
//camera variables
global mouse,angx#,angy#,startx#,starty#,cameray#,camerax#,cameraz#,lookmodey#,lookmodez#
// initalise the area map (192x192x256 - this will store locations of each added / deleted block
// this will be used to do Load/Save feature later on and move with the map
map as integer[200,200,256]
global playerblockx#, playerblocky#
global playerblocks as integer[10] // stored the players object of which will use to add/destroy
// setup the types - each entity may have multiple of entities to keep track of, these can be stored as Types
type _textures
id // texture store
r,g,b // colors
dr,dg,db // depths (because minecraft tiles is built with rectangular different shades of the color)
texturessize
endtype
global textures as _textures[8]
// this is the main play chunk which will be used through out - it will live with the player and dynamically updated
// with map data when move around
type _chunk
x#,y#,z#
id
biome as string
texture
alpha
damage
endtype
global chunk as _chunk[chunksize#,chunksize#,chunksizedepth#]
global chunkplanes as integer[4] // four planes that sit on the out side of the chunk
global worldplane as integer
type _breakcube
id
x#
y#
z#
texture
endtype
global breakcube as _breakcube[10]
type _clouds
x#,y#,z#
id
endtype
global clouds as _clouds[chunksize#,chunksize#]
player = CreateObjectSphere(.05,20,20)
createblockpointer()
CreateInfoText()
definetextures()
setupplayerblocks()
setupclouds()
setupchunk()
setupskyandfog()
InitialiseStartingBlocks()
do
movecamerawithmouse()
checkkeypresses()
movecamera()
settextstring(17,"Frame Rate = "+str(ScreenFPS()))
print(GetCameraAngleX(1))
print(GetCameraAngleY(1))
print(GetCameraAngleZ(1))
print (GetRawLastKey())
Sync()
loop
function movecamera()
///movecameras local to the player
SetObjectPosition(player,cx#,cy#,cz#)
cx#=getobjectx(player)
cz#=getobjectz(player)
cy#=getobjecty(player)
SetCameraPosition(1,cx#+camerax#,cy#+cameray#+lookmodey#+2,cz#-lookmodez#)
endfunction
function checkkeypresses()
if GetRawKeyState(40) then shiftmap(0,-camerastep#) //key down
if GetRawKeyState(38) then shiftmap(0,camerastep#) //key up
if GetRawKeyState(39) then shiftmap(camerastep#,0) //key right
if GetRawKeyState(37) then shiftmap(-camerastep#,0) //key left
if GetRawKeyPressed(76) // Key L - Look mode
if GetTextString(12) ="L Toggle at the chunk - Chunk mode"
SetTextString(12,"L Toggle at the chunk - Play mode")
lookmodey#=20
lookmodez#=40
else
SetTextString(12,"L Toggle at the chunk - Chunk mode")
lookmodey#=0
lookmodez#=0
endif
endif
//A - rotate camera
/* if GetRawKeyState(65) then RotateObjectLocalY(player,-camerastep#*50) //Key A
if GetRawKeyState(68) then RotateObjectLocalY(player,camerastep#*50) //key D
if GetRawKeyState(87) then RotateObjectLocalX(player,-camerastep#*5) //key W
if GetRawKeyState(83) then RotateObjectLocalX(player,camerastep#*5) //key S
*/
// 1-8 for textures
//if GetRawKeyPressed(48) // 0 - Loads editor
if GetRawKeyPressed(49) then SetObjectImage(playerblocks[0],textures[0].id,1)
if GetRawKeyPressed(50) then SetObjectImage(playerblocks[0],textures[1].id,1)
if GetRawKeyPressed(51) then SetObjectImage(playerblocks[0],textures[2].id,1)
if GetRawKeyPressed(52) then SetObjectImage(playerblocks[0],textures[3].id,1)
if GetRawKeyPressed(53) then SetObjectImage(playerblocks[0],textures[4].id,1)
if GetRawKeyPressed(54) then SetObjectImage(playerblocks[0],textures[5].id,1)
if GetRawKeyPressed(55) then SetObjectImage(playerblocks[0],textures[6].id,1)
if GetRawKeyPressed(56) then SetObjectImage(playerblocks[0],textures[7].id,1)
if GetRawKeyPressed(57) then SetObjectImage(playerblocks[0],textures[8].id,1)
if GetRawKeyPressed(58) then SetObjectImage(playerblocks[0],textures[9].id,1)
if GetRawKeyState(65) then dec camerax# //Key A
if GetRawKeyState(68) then inc camerax# //key D
if GetRawKeyState(87) then dec cameraz# //key W
if GetRawKeyState(83) then RotateObjectLocalX(player,camerastep#*5) //key S
// 69 UP camera 67 downcamera
if GetRawKeyState(69) then inc cameray#,camerastep# //KEY_E
if GetRawKeyState(67) then dec cameray#,camerastep# //KEY_C
if mySelection <> 0
if GetObjectExists(mySelection)
// magneticPlace(mySelection,GetObjectSizeMaxX(mySelection),GetObjectSizeMaxX(mySelection))
// SetObjectColor(mySelection,255,255,255,255)
endif
endif
mySelection=0
/*
SetObjectScale(ObjectID,1.03,1.03,1.03)
SetObjectCullMode(ObjectID,2)
SetObjectColor(ObjectID,0,0,0,255)
DrawObject(ObjectID)
SetObjectScale(ObjectID,1,1,1)
SetObjectCullMode(ObjectID,1)
SetObjectColor(ObjectID,255,255,255,255) // Reset to old object color
*/
// attack / delete - maybe each type of cube with a certain texture as a damage ratio attached. like damage=10 = 10 hits before it deletes
if GetRawMouseLeftPressed()
selectedObj=Click3dObject()
if GetObjectExists(selectedObj) and mySelection=0 then mySelection=selectedObj
if mySelection>0
// SetObjectColor(mySelection,150,150,150,20)
DeleteObject(mySelection)
// shiftPiece(mySelection)
endif
endif
if GetRawMouseRightPressed()
selectedObj=Click3dObject()
if GetObjectExists(selectedObj) and mySelection=0 then mySelection=selectedObj
if mySelection>0
bl=CreateObjectBox(1,1,1)
SetObjectPosition(bl,getobjectx(myselection),getobjecty(myselection)+1,getobjectz(myselection))
// check which BIOME we are in and set the texture for that, for now just do land
SetObjectImage(bl,textures[0].id,1)
inc blockcount
// store details some how in an map extension array
endif
endif
mouseOver=Click3dObject()
if GetObjectExists(mouseOver)
if getObjectExists(OldObj) then SetObjectColor(oldObj,255,255,255,255)
SetObjectColor(mouseOver,100,100,100,255)
oldObj=mouseOver
else
// SetObjectColor(oldObj,255,255,255,255)
endif
if GetRawKeyPressed(27) then end
endfunction
function initialisestartingblocks()
cx#=getobjectx(chunk[chunksize#/2,chunksize#/2,chunksizedepth#].id)
cy#=getobjecty(chunk[chunksize#/2,chunksize#/2,chunksizedepth#].id)+1
cz#=getobjectz(chunk[chunksize#/2,chunksize#/2,chunksizedepth#].id)+1
SetCameraPosition(1,cx#,cy#,cz#-200)
SetCameraRange(1,0.01,9000)
cameray#=0
//Get the starting coordingates for the mouse (the mouse always stays in centre of screen and the camera's move
startx# = GetPointerX()
starty# = GetPointerY()
angx# = GetCameraAngleX(1)
angy# = GetCameraAngleY(1)
// End
endfunction
function movecamerawithmouse()
SetSpritePosition(mouse,getpointerx(),getpointery())
fDiffX# = (GetPointerX() - startx#)
fDiffY# = (GetPointerY() - starty#)
newX# = angx# + fDiffY#
if ( newX# > 40 ) then newX# = 40
if ( newX# < -60 ) then newX# = -60
SetCameraRotation( 1, newX#, angy# + fDiffX#, 0 )
SetSpriteAngle(player,angy# + fDiffX#)
// These positions the block/weapon as if in the hand
// SetObjectRotation(playerblocks[0],newX#,angy#+fDiffX#,0)
SetObjectPosition(playerblocks[0],.012,1.95,-.1)
SetObjectRotation(player,3.6,fDiffX#,angy#)
endfunction
function setupskyandfog()
// setup a skybox
SetSunActive(0)
SetSkyBoxHorizonSize(4.0,4)
SetSkyBoxHorizonColor(255,255,255)
SetSkyBoxSkyColor(135,206,250)
SetSkyBoxVisible(1)
SetFogColor(155,155,155)
SetFogRange(0,180)
SetFogMode(1)
endfunction
function setupchunk()
for a=0 to chunksize#
for b=0 to chunksize#
for z=0 to chunksizedepth#
// dont have a full block full of cubes, randomise it abit - so one, we conserve memory and 2 it will look like a cave
// the ground level have a complete flat surface for now until perlin noise comes
// otherwise shake underneath a bit.
if random(1,10)>8 or z=chunksizedepth#
chunk[a,b,z].id=CreateObjectBox(1,1,1)
SetObjectPosition(chunk[a,b,z].id,a,b,z)
SetObjectCullMode(chunk[a,b,z].id,1)
chunk[a,b,z].texture=textures[0].id
SetObjectImage(chunk[a,b,z].id,chunk[a,b,z].texture,1)
chunk[a,b,z].x#=a
chunk[a,b,z].y#=z
chunk[a,b,z].z#=b
chunk[a,b,z].biome="land"
if chunk[a,b,z].biome="land" then chunk[a,b,z].damage=5
chunk[a,b,z].alpha=255
inc blockcount
endif
next
next
next
// create the outsides
// front
chunkplanes[0]=CreateObjectPlane(chunksize#,chunksizedepth#)
SetObjectPosition(chunkplanes[0],chunksize#/2,chunksizedepth#/2,0)
//right
chunkplanes[1]=CreateObjectPlane(chunksize#,chunksizedepth#)
SetObjectRotation(chunkplanes[1],0,90,0)
SetObjectPosition(chunkplanes[1],chunksize#,chunksizedepth#/2,chunksize#/2)
// back
chunkplanes[2]=CreateObjectPlane(chunksize#,chunksizedepth#)
SetObjectPosition(chunkplanes[2],chunksize#/2,chunksizedepth#/2,chunksize#)
//left
chunkplanes[3]=CreateObjectPlane(chunksize#,chunksizedepth#)
SetObjectRotation(chunkplanes[3],0,90,0)
SetObjectPosition(chunkplanes[3],0,chunksizedepth#/2,chunksize#/2)
// bottom
chunkplanes[4]=CreateObjectPlane(chunksize#,chunksize#)
SetObjectRotation(chunkplanes[4],90,90,0)
SetObjectPosition(chunkplanes[4],chunksize#/2,0,chunksize#/2)
for a=0 to 4
SetObjectImage(chunkplanes[a],textures[0].id,1)
SetImageWrapU(textures[0].id,1)
SetImageWrapv(textures[0].id,1)
// SetObjectUVScale(textures[0].id,0,1000,1000)
next
// worldplane = CreateObjectPlane(20000,20000)
//SetObjectRotation(worldplane,90,0,0)
//SetObjectPosition(worldplane,0,chunksizedepth#,0)
// display the chunks
shiftmap(0,0)
endfunction
function setupclouds()
// setup clouds
for a=1 to chunksize#
for b=1 to chunksize#
clouds[a,b].id=CreateObjectbox(random(40,80),random(40,80),4)
SetAmbientColor(255,255,255)
SetObjectRotation(clouds[a,b].id,270,0,0)
clouds[a,b].x#=random2(-9000,9000)
clouds[a,b].z#=random2(-9000,9000)
clouds[a,b].y#=128
SetObjectPosition(clouds[a,b].id,clouds[a,b].x#,clouds[a,b].y#,clouds[a,b].z#)
SetObjectColor(clouds[a,b].id,255,255,255,255)
next
next
endfunction
function shiftPiece(mySelection as integer)
if GetRawKeyState(40) then SetObjectPosition( mySelection, GetObjectX(mySelection), GetObjectY(mySelection)-.05, GetObjectZ(mySelection) ) //key down
if GetRawKeyState(38) then SetObjectPosition( mySelection, GetObjectX(mySelection), GetObjectY(mySelection)+.05, GetObjectZ(mySelection) ) //key up
if GetRawKeyState(39) then SetObjectPosition( mySelection, GetObjectX(mySelection)-.05, GetObjectY(mySelection), GetObjectZ(mySelection) ) //key right
if GetRawKeyState(37) then SetObjectPosition( mySelection, GetObjectX(mySelection)+.05, GetObjectY(mySelection), GetObjectZ(mySelection) ) //key left
if GetRawKeyState(65) then SetObjectPosition( mySelection, GetObjectX(mySelection), GetObjectY(mySelection), GetObjectZ(mySelection)-.05 ) //Key A
if GetRawKeyState(90) then SetObjectPosition( mySelection, GetObjectX(mySelection), GetObjectY(mySelection), GetObjectZ(mySelection)+.05 ) //Key Z
for a=0 to chunksize#
for b=0 to chunksize#
for z=0 to chunksizedepth#
if chunk[a,b,z].id=mySelection
chunk[a,b,z].x#=GetObjectX(mySelection)
chunk[a,b,z].y#=GetObjectY(mySelection)
chunk[a,b,z].z#=GetObjectZ(mySelection)
endif
next z
next b
next a
endfunction
function shiftmap(xvalue#,zvalue#)
for a=0 to chunksize#
for b=0 to chunksize#
for z=0 to chunksizedepth#
inc chunk[a,b,z].x#,xvalue#
inc chunk[a,b,z].z#,zvalue#
inc clouds[a,b].x#,xvalue#
inc clouds[a,b].z#,zvalue#
if GetObjectExists(chunk[a,b,z].id )
if chunk[a,b,z].x#>chunksize#
chunk[a,b,z].x#=0
endif
if chunk[a,b,z].x#<0
chunk[a,b,z].x#=chunksize#
endif
if chunk[a,b,z].z#>chunksize#
chunk[a,b,z].z#=0
endif
if chunk[a,b,z].z#<0
chunk[a,b,z].z#=chunksize#
endif
SetObjectPosition(chunk[a,b,z].id,chunk[a,b,z].x#,chunk[a,b,z].y#,chunk[a,b,z].z#)
if a>0 and a<50 and b>0 and b<50 then SetObjectPosition(clouds[a,b].id,clouds[a,b].x#,clouds[a,b].y#,clouds[a,b].z#)
endif
next
next
next
endfunction
function moveclouds()
endfunction
function createtextures(sizex# as float, sizey# as float,density, toptexture, bottomtexture)
if bottomtexture=0
//do a full block of the same texture
texturecount=toptexture
swap()
for a=0 to sizex# step density
for b=0 to sizey# step density
rr=random(1,textures[texturecount].dr)
if textures[texturecount].dr-rr >0 then colorred=textures[texturecount].r - rr
if textures[texturecount].dg-rr >0 then colorgreen=textures[texturecount].g - rr
if textures[texturecount].db-rr >0 then colorblue=textures[texturecount].b - rr
if colorred<0 then colorred=textures[texturecount].r
if colorgreen<0 then colorgreen=textures[texturecount].g
if colorblue<0 then colorblue=textures[texturecount].b
drawbox(a,b,(A+density),(B+density), MakeColor(colorred,colorgreen,colorblue),MakeColor(colorred,colorgreen,colorblue),MakeColor(colorred,colorgreen,colorblue),MakeColor(colorred,colorgreen,colorblue), 1)
next
next
render()
textures[texturecount].id = getimage(0,0,sizex#, sizey#)
else
// do an half block with a different texture at bottom
texturecount=toptexture
swap()
for a=0 to sizex# step density
for b=0 to sizey#/3 step density
rr=random(1,textures[texturecount].dr)
if textures[texturecount].dr-rr >0 then colorred=textures[texturecount].r - rr
if textures[texturecount].dg-rr >0 then colorgreen=textures[texturecount].g - rr
if textures[texturecount].db-rr >0 then colorblue=textures[texturecount].b - rr
if colorred<0 then colorred=textures[texturecount].r
if colorgreen<0 then colorgreen=textures[texturecount].g
if colorblue<0 then colorblue=textures[texturecount].b
drawbox(a,b,(A+density),(B+density), MakeColor(colorred,colorgreen,colorblue),MakeColor(colorred,colorgreen,colorblue),MakeColor(colorred,colorgreen,colorblue),MakeColor(colorred,colorgreen,colorblue), 1)
next
next
texturecount=bottomtexture
for a=0 to sizex# step density
for b=sizey#/3 to sizey# step density
rr=random(1,textures[texturecount].dr)
if textures[texturecount].dr-rr >0 then colorred=textures[texturecount].r - rr
if textures[texturecount].dg-rr >0 then colorgreen=textures[texturecount].g - rr
if textures[texturecount].db-rr >0 then colorblue=textures[texturecount].b - rr
if colorred<0 then colorred=textures[texturecount].r
if colorgreen<0 then colorgreen=textures[texturecount].g
if colorblue<0 then colorblue=textures[texturecount].b
drawbox(a,b,(A+density),(B+density), MakeColor(colorred,colorgreen,colorblue),MakeColor(colorred,colorgreen,colorblue),MakeColor(colorred,colorgreen,colorblue),MakeColor(colorred,colorgreen,colorblue), 1)
next
next
render()
textures[texturecount].id = getimage(0,0,sizex#, sizey#)
endif
endfunction textures[texturecount].id
function definetextures()
// grass=createtexture(64,64,0,200,0,8)
//grass
textures[0].r=0 :textures[0].dr=50
textures[0].g=80 :textures[0].dg=100
textures[0].b=0 :textures[0].db=50
//dirt
textures[1].r=139 :textures[1].dr=20
textures[1].g=69:textures[1].dg=20
textures[1].b=19:textures[1].db=20
//goldgold=createtexture(8,8,255,215,100,1)
textures[2].r=255 :textures[2].dr=100
textures[2].g=215 :textures[2].dg=10
textures[2].b=100 :textures[2].db=10
// water=createtexture(8,8,0,0,100,1)
textures[3].r=0 :textures[3].dr=50
textures[3].g=0 :textures[3].dg=10
textures[3].b=100 :textures[3].db=10
// emeralds=createtexture(8,8,39,89,45,1)
textures[4].r=39 :textures[4].dr=5
textures[4].g=89 :textures[4].dg=5
textures[4].b=45 :textures[4].db=5
// create the texturs
textures[0].id = CreateTextures(64,64,4,0,0) // top
textures[1].id = CreateTextures(64,64,4,1,1) // bottom
textures[2].id = CreateTextures(64,64,4,2,2) // sides
textures[3].id = CreateTextures(64,64,4,3,3) // sides
endfunction
function Click3dObject()
myX as float
myY as float
my3dX as float
my3dY as float
my3dZ as float
rayStartX as float
rayStartY as float
rayStartZ as float
rayEndX as float
rayEndY as float
rayEndZ as float
myX=GetPointerX()
myY=GetPointerY()
my3dX=Get3DVectorXFromScreen(myX,myY)
my3dY=Get3DVectorYFromScreen(myX,myY)
my3dZ=Get3DVectorZFromScreen(myX,myY)
rayStartX=my3dX+GetCameraX(1)
rayStartY=my3dY+GetCameraY(1)
rayStartZ=my3dZ+GetCameraZ(1)
rayEndX=800*my3dX+GetCameraX(1)
rayEndY=800*my3dY+GetCameraY(1)
rayEndZ=800*my3dZ+GetCameraZ(1)
theObjectHit= ObjectRayCast(0,rayStartX,rayStartY,rayStartZ,rayEndX,rayEndY,rayEndZ)
for a=0 to 4
if theObjectHit=chunkplanes[a] then theObjectHit=0
next
Print(theObjectHit)
endfunction theObjectHit
function magneticPlace(mySelection,x#,y#)
X1#=GetObjectX(mySelection)
Y1#=GetObjectY(mySelection)
Z1#=GetObjectZ(mySelection)
if magnetic=1
X1#=floor(X1#/gridx)
Y1#=floor(Y1#/gridy)
Z1#=floor(Z1#/gridz)
endif
SetObjectPosition( mySelection, X1#, Y1#, Z1# )
shiftPiece(mySelection)
endfunction
// this creates the centre pointer
function createblockpointer()
swap()
DrawLine(0,5,10,5,MakeColor(255,255,0),MakeColor(255,255,0))
DrawLine(5,0,5,10,MakeColor(255,255,0),MakeColor(255,255,0))
DrawEllipse(5,5,5,5,MakeColor(255,255,0),MakeColor(255,255,0),0)
render()
mouse = CreateSprite(GetImage(0,0,10,10))
SetRawMousePosition(screenwidth/2,screenheight/2)
SetRawMouseVisible(0)
endfunction
function CreateInfoText()
createtext(1,"CraftLite") // Create the text to display current level number ******
createtext(2,"Left Arrow move left.") //create the text to keep track of how many objects we have so far
createtext(3,"Right Arrow move left.")
createtext(4,"Up Arrow move forward.")
createtext(5,"Down Arrow move back.")
createtext(6,"W Rotate up")
CreateText(7,"A Rotate left.")
CreateText(8,"S Rotate down.")
CreateText(9,"D Rotate Right.")
CreateText(10,"E Move Up.")
CreateText(11,"C Move Down.")
CreateText(12,"L Toggle at the chunk - Play mode")
CreateText(13,"Hold down shift to select.")
CreateText(14,"Selection="+str(mySelection))
CreateText(15,"M toggle snap to grid.")
CreateText(16,"Magnetic ="+str(magnetic))
CreateText(17,"Esc exit.")
CreateText(18,"Frame Rate=")
settextsize(1,20)
settextsize(2,20)
settextsize(3,20)
settextsize(4,20)
SetTextSize(5,20)
settextsize(6,20)
settextsize(7,20)
settextsize(8,20)
settextsize(9,20)
settextsize(10,20)
settextsize(11,20)
settextsize(12,20)
settextsize(13,20)
settextsize(14,20)
settextsize(15,20)
settextsize(16,20)
settextsize(17,20)
settextsize(18,20)
settextposition(1,10,20)
settextposition(2,10,40)
settextposition(3,10,60)
settextposition(4,10,80)
settextposition(5,10,100)
settextposition(6,10,120)
settextposition(7,10,140)
settextposition(8,10,160)
settextposition(9,10,180)
settextposition(10,10,200)
settextposition(11,10,220)
settextposition(12,10,240)
settextposition(13,10,260)
settextposition(14,10,280)
settextposition(15,10,300)
settextposition(16,10,320)
settextposition(17,10,340)
settextposition(18,10,340)
FixTextToScreen(1,1)
FixTextToScreen(2,1)
FixTextToScreen(3,1)
FixTextToScreen(4,1)
FixTextToScreen(5,1)
FixTextToScreen(6,1)
FixTextToScreen(7,1)
FixTextToScreen(8,1)
FixTextToScreen(9,1)
FixTextToScreen(10,1)
FixTextToScreen(11,1)
FixTextToScreen(12,1)
FixTextToScreen(13,1)
FixTextToScreen(14,1)
FixTextToScreen(15,1)
FixTextToScreen(16,1)
FixTextToScreen(17,1)
FixTextToScreen(18,1)
SetTextColor(1,0,200,0,255)
SetTextColor(17,200,0,0,255)
endfunction
// this creates the hand weapon to distroy /block to add and places on bottom right corner of the camera
function setupplayerblocks()
playerblocks[0] = CreateObjectBox(.02,.02,.04)
SetObjectImage(playerblocks[0],textures[3].id,1)
FixObjectToObject(playerblocks[0],player)
SetObjectRotation(playerblocks[0],-25,-10,-2)
playerblockx#=cx#+10
playerblocky#=cy#
endfunction
Press 1-9 for different blocks
and press 0 will go to be able to create your own blocks textures
ive only done 5 txts at moment
Catch up soon