🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

StackFck2d

posted in The Broken Mind
Published March 12, 2006
Advertisement
As you may or may not know, ive always been interested in languages/compilers/interprets so I did my weekly x hour codeathon (this weekend it was 2 hours)...and StackFck2d was born!

Its just like Brainfck but with 6 new commands...here is the complete listing of commands:
>	moves the pointer east.<	moves the pointer west.^	moves the pointer north.v	moves the pointer south.+	increment (increase by one) the value(top of the stack) at the pointer.-	decrement (decrease by one) the value(top of the stack) at the pointer..	output the value of the byte(top of the stack) at the pointer.,	accept one byte of input, storing its value in the top of the stack at the pointer.[	jump forward to the command after the corresponding ] if the byte at the pointer is zero.]	jump back to the command after the corresponding [ if the byte at the pointer is nonzero.@	pushes an empty cell onto the top of the location's stack#	pops the top most cell off of the location's stack%	copies the current location's value and places it into the global variable&	pastes the global variable's value into the current location's value


Now, let me explain the new aspects. Its not 1d like BF, this is 2d. You can move in 4 directions instead of 2. Also, each "cell" is now a stack. When you use + and -, you affect the top of the stack. There are also 2 commands for coping and pasting cells.

I did this in 2 hours so the code is ugly, crammed into 2 functions, and may not work 100%! The loops is the only aspect that may not work perfectly, but from my few tests, they worked. Here is the compiler with source:
StackFuck2d.zip

I know its not much and doesnt add much greatness to BF, but I wanted a project to mess around with in a short amount of time and learn some things about the STL. Have fun

;)
Previous Entry Busy
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement

Latest Entries

26 Games 26 Weeks

1702 views

Celenite

1246 views

Im back...again!

1093 views

Tunnel Syndrome

1390 views

Borderlands

1275 views

First Flash Game

1065 views

First Flash Game

1365 views

Bullet holes? Yum!

1178 views

Game 2

1125 views

New Project

985 views
Advertisement