Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //BLOB alpha v0.2
- >Blob
- A blob is a living thing. You are the intelligent designer, create a DNA
- and bring it to life!
- >DNA
- The DNA is the code that runs on the blob.
- DNA is made out of operators.
- DNA is stored in txts in the dna directory.
- An example DNA (conn 1.txt):
- clone
- 50
- 5
- 22
- mdna
- 13
- 99
- conn
- 2
- 13
- reg
- 2
- 0
- send
- 2
- 2
- rec
- 2
- 3
- pcmin
- 22
- nop
- rotp
- pcmin
- 26
- go
- Line numbers are important. If you open the DNA text file ingame or in
- Notepad++ you can see the line numbers. Same DNA, but with line numbers:
- 1|clone
- 2|50
- 3|5
- 4|22
- 5|mdna
- 6|13
- 7|99
- 8|conn
- 9|2
- 10|13
- 11|reg
- 12|2
- 13|0
- 14|send
- 15|2
- 16|2
- 17|rec
- 18|2
- 19|3
- 20|pcmin
- 21|22
- 22|nop
- 23|rotp
- 24|pcmin
- 25|26
- 26|go
- Suggested editor: Notepad++
- >How will it work?
- Each blob has its own energy. If the energy counter reaches 0,
- the blob dies. A new blob from left click starts with 100 enegry.
- Lets say we select "conn 1" form the left click menu, then click
- on the black background to add it. If you hit "stop" in the
- simulation menu, then hit "step" a few times you will be able to
- see each and every step.
- The first command is clone. It has 3 operands:
- 1|clone
- 2|50
- 3|5
- 4|22
- >Camera controls
- Middle click drag: drag camera
- Scroll: zoom
- >In game editor
- You can edit blobs in the in-game editor but you wont be able to save
- them. Remember: you are playing a developer edition alpha build.
- You can grab operands and drag them into the DNA. You can click a command
- in the DNA to delete it. You can click an operand to edit it. Click,
- type numbers / backspace then hit enter.
- >Program counters
- Each blob has 3 program counters
- - actual program counter [pc]
- - program counter min [pc min]
- - program counter never [pc never]
- Each blob does operations between its min and never program counter,
- in a continuous loop. It starts from pc min and restarts the loop
- before it reaches pc never.
- A new blob from left click starts with an actual program counter of 0.
- The jump operands sets the program counter directly.
- >Operators
- Operators are the building blocks of the DNA. Each operator has an
- energy cost. Some operators have operands. Each operation takes
- one simulation tick.
- operator | # of operands | E required
- ---------+---------------+-------------
- nop | 0 | 0
- clone | 3 | 1 + extra
- getE | 0 | 1
- rotn | 0 | 1
- rotp | 0 | 1
- go | 0 | 1
- conn | 2 | 1
- reg | 2 | 1
- ray | 1 | 1
- aoe | 0 | 1
- jmp | 1 | 1
- pcmin | 1 | 1
- pcmax | 1 | 1
- clone2 | 3 | 1 + extra
- send | 2 | 1
- rec | 2 | 1
- mdna | 2 | 1
- - nop
- Does nothing.
- - clone
- 3 operands:
- 1.: new blob starting E (from own)
- 2.: new blob pc min, new blob actual pc
- 3.: new blob pc max
- Pc min and pc max are line numbers from the DNA code.
- - getE
- The blob gets 10 E. Chlorophyll and eating is not in the game yet and
- the blob has to get energy form somewhere.
- - rotn
- The blob rotates counterclockwise.
- - rotp
- The blob rotates clockwise.
- - go
- The blob moves forward (towards its white line).
- - conn
- 2 operands:
- 1.: connection slot [1-4]
- 2.: connection id
- If 2 blob collide with the same connection id they form a bond.
- If a blob has an existing connection with an other blob it wont
- form a 2nd connection with the same id.
- - reg
- 2 operands:
- 1.: register number
- 2.: register new value
- You have 8 registers. You might want to set one not zero before you jmp.
- - ray
- 1 operand: output reg
- Cast a ray (towards its white line), if it hits if flips the
- color bit of the hit blob and sets the output reg to 1.
- Else sets the output reg to 0.
- - aoe
- Flips the color bit of the nearby alive blobs.
- - jmp
- 1 operand: new pc
- Sets the actual program counter to the new value. If pcmin is not
- equals 0, the jmp will jump between pc min and pc never - 1.
- - pcmin
- 1 operand: new pc min
- Sets the min program counter to the new value.
- - pcmax
- 1 operand: val
- Sets program counter never to val + 1.
- - clone2
- 3 operands:
- 1.: E to keep (remaining is the starting E of the new blob)
- 2.: new blob pc min, new blob actual pc
- 3.: new blob pc max
- Pc min and pc max are line numbers from the DNA code.
- - send
- 2 operands:
- 1.: connection slot [1-4]
- 2.: output register number
- - rec
- 2 operands:
- 1.: connection slot [1-4]
- 2.: input register number
- - mdna
- 2 operands:
- 1.: dna line number
- 2.: line new val
- >Future updates
- Stuff that is essential, but I havent coded it yet:
- -save button
- -wait operator
- -sensing
- -chlorophyll
- -eating
- -att, def, hp
- -multiplayer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement