This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#examples of using surface.convert() and surface.convert_alpha() | |
#do this after calling pygame.display.init() and pygame.display.set_mode()! | |
mysurface=pygame.image.load("mysurface.png").convert() | |
mysurface_with_alpha=pygame.image.load("mysurface_with_alpha.png").convert_alpha() | |
###below is an example of using pygame's pygame.time.Clock class to regulate FPS of game loop.: | |
#this loop will run at 30 FPS | |
clock=pygame.time.Clock() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SSTNPL tutorial part 3: iterators | |
var cb=0 | |
#### Basic Iterators #### | |
uiter itval,test1,@-5,@5 | |
newline | |
diter itval,test1,@5,@-5 | |
newline | |
#### Double Iterators #### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### variable setup #### | |
var chbuff=0 | |
##### printing VS non-printing ##### | |
prline I print | |
gsub self_printing_sam | |
prline I don't print. | |
gsub non_printing_sam |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# #### VARS #### | |
var kb=0 | |
var retflg=0 | |
var value=0 | |
# #### MAIN #### | |
label main | |
print boolean value: | |
dumpd value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frontend: Curses | |
Begin UIO tty log: | |
ready. | |
1 00000000+ | |
1 00000000+ | |
2 0000000+- | |
3 0000000+0 | |
5 000000+-- | |
8 000000+0- | |
13 000000+++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Fibonacci sequence in SSTNPL | |
var endnum=10x4181 | |
#both of these == 1 at first. | |
var num0=10x1 | |
var num1=+ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#this is a short example of how offsetlen acts like a mask. | |
setreg1|--------- | |
#set mem20 to an arbitrary value to read | |
setreg2|+0+---++0 | |
IOwrite2|>mem20 | |
#dump register 1 in its full negative state | |
dumpreg1 | |
#set offset len to radix offset 1, trit length 1 | |
offsetlen|off,1,1 | |
#read memory and dump new state of register 1 |