Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - z26

Pages: [1]
1
Community Notices / Discord
« on: February 24, 2019, 01:14:03 am »
I like Discord's interface so I've made yet another community for rawbots there for when the forum closes. https://discord.gg/HWzDMZc The point isnt to keep rawbots alive but to have a place to keep former rawbot players in contact.

Keep in mind that I'm currently I'm the only member.

2
Terrain / (Website) Terrain editor
« on: March 17, 2018, 11:48:23 pm »
I've made this site a while ago, it allows you to make rawbots maps with a 3d editor, then export them to a file.

http://z26.pythonanywhere.com/rawcraft/

Currently you need to click once to place each tile, this is slow and I plan to fix this eventually especially if there is demand.

Feel free to comment

3
Misc / Rawbots absolute coordinates
« on: March 17, 2018, 11:19:26 pm »
I know the forum is quite calm recently, Nevertheless I've been working on scripts for rawbots.  This one is a simple python script.

You know how in rawbots map files (you can open them like a gzip archive to look at the text inside) parts and terrain have a "local_to" line?  Said line specify an origin point the part follows.  This allows cool things, like having a bunch of terrain all grouped together.  By moving/rotating a single point, every linked tile is going to move with it.  Those points are called xform.


What if a part is connected to one of those xform, but you want to know the real, absolute position of the part for whatever reason?  I've made the following python script to calculate that information.

Feel free to report any questions or bugs.  The script requires a single module (numpy) and runs with Python3.


Code: [Select]
from numpy import array, radians, degrees, cos, sin, matmul, arctan2, degrees

#(optional) Enter the name (example: hex1@16451481) and the type of the object (example: small_hex_earth)
name = "name1"
type = "energy_bridge"


#Replace the zeroes of the 4 lines below by the proper values, then run the script.
xyz = array ( ((0),(0),(0)) )  #position of child object
origin_x,origin_y,origin_z = 0,0,0 #position of xform
angle_x, angle_y, angle_z = radians(0),radians(0),radians(0), #euler angle of child object
origin_anglex, origin_angley, origin_anglez = radians(0), radians(0), radians(0) #euler angle of xform


def eulertomatrix(x,y,z):
    matrix_x= array((( (1),(0),(0) ),
                        ( (0),(cos(x)),(-sin(x)) ),
                        ( (0),(sin(x)),(cos(x)) )))

    matrix_y= array((( (cos(y)),(0),(sin(y)) ),
                        ( (0),(1),(0) ),
                        ( (-sin(y)),(0),(cos(y)) )))

    matrix_z= array((( (cos(z)),(-sin(z)),(0) ),
                        ( (sin(z)),(cos(z)),(0) ),
                        ( (0),(0),(1) )))

    return matmul(matrix_y,matmul(matrix_x,matrix_z))


def matrixtoeuler(matrix):

    #I stole these from an excel file.  Strangely, the y-x-z formula is the one that works
    #Also, the order of arctan2 parameters is inversed in libreoffice vs numpy.

    gamma = arctan2(matrix[1,0],matrix[1,1])  #matrix[0,1],matrix[1,1]


    beta = arctan2(matrix[2,1]*sin(gamma) -  matrix[2,0]*cos(gamma),  matrix[0,0]*cos(gamma) -  matrix[0,1]*sin(gamma))

   
    alpha = arctan2(-matrix[1,2],  matrix[1,1]*cos(gamma) +  matrix[1,0]*sin(gamma)) #inverted

   
    return array( ((degrees(alpha)),(degrees(beta)),(degrees(gamma))) )
   
 


origin_anglematrix = eulertomatrix(origin_anglex, origin_angley, origin_anglez)
object_anglematrix = eulertomatrix(angle_x, angle_y, angle_z)


finalpos = matmul(origin_anglematrix, xyz )
finalpos[0] = round(finalpos[0] + origin_x, 4 )
finalpos[1] = round(finalpos[1] + origin_y, 4 )
finalpos[2] = round(finalpos[2] + origin_z, 4 )

finalangle = matrixtoeuler(matmul(origin_anglematrix,object_anglematrix))
finalangle[0] = round(finalangle[0],4)
finalangle[1] = round(finalangle[1],4)
finalangle[2] = round(finalangle[2],4)





print(f'''
################################################
{name} . position [{finalpos[0]},{finalpos[1]},{finalpos[2]}]
{name} . rotation [{finalangle[0]},{finalangle[1]},{finalangle[2]}]
{name} . permissions 31
{name} as {type}
energy_bridge_b local_to gaia''' )

4
Screenshots & Videos / Wheeled mass driver
« on: February 23, 2017, 09:45:08 pm »
Hi,

I've made this bot a while ago and its unfinished, but with me being busy + new rawbots coming eventually (will turn it obsolete probably) I think its better that I share it right away.  If anyone wants the blueprint feel free to request it (it also contains a complicated vision system that probably impact the game's performance, but that is easy to remove)


5
General Discussion / Map related info/question.
« on: March 17, 2016, 02:10:47 am »
Hi! I'm making this topic because I again forgot what are the pillars and big plates named and wanted to ask, but also because the working of map files in Rawbots isn't well documented so I'm setting myself (and others) a place to document that in the future.  Right now, I don't have much to say, except from this (i'll have to format this better later)

Gravity of planets and cores varies in the shape of a parabola, at the center it = 0, it then increases in strength when going farther to the center until it reaches the apex where it equals 10 (the height of the apex is determined by the size attribute of the planet or core) then decreases to 0 at twice the distance than the apex.  This can be abused to make planets with low surface gravity but high escape velocity   Make a gravity less planet (actually a spherical mosaic of terrain hexagons)  Then put at the center one or more cores of a larger gravity radius than the planet itself.

There exists a large version of the earth hexes called hex_earth that are 4 times the size of a normal hex.  Sadly, only the earth type is available.

The gravity of the non-planet maps is provided by cores.  They look like this.



The sides of the core can be individually toggled to glow.  Glowing cores automatically spawn a hex above them that cannot be deleted.


The map files of rawbots are actually gzip compressed files, therefore you need to open them with a program like 7-zip first before editing them with a text editor.

To add a passcode, unzip the desired map/blueprint then open the file with a text editor.  Add this to the desired part/code hex without the parentheses:
(name)@(number) . passcode #0000
the passcode must be a four digits number.

6
Troubleshooting & Getting Started / Adjust forum clock?
« on: March 12, 2016, 11:18:47 pm »
Hi, I haven't found anywhere where I can adjust the forum's clock.  Maybe I just havent looked carefully enough, if so sorry, but otherwise if its possible fixing this would be appreciated.

Thanks.

Pages: [1]