Brain F*ck

Just wondering if it's possible to make a BrainF*ck game.

If so do you guys have any links.

Just a small game, for an exercise.
It would be possible, but you would more than likely need to convert c-code to brainfuck for it to even be viable. This is not exactly what I mean, but it could help. http://www.cplusplus.com/articles/2bCRko23/
I've already seen that article, that's what inspired me to ask. Does brainf*ck have any libraries?
These might help: http://code.google.com/p/braincuff/
http://jonripley.com/brainfuck/games/
Also, Google is your friend.

EDIT: Or you could write your own. It would be very interesting.
Last edited on
@Fredbill30
There's no way to call functions from Brainfuck, but if there were, then you could maybe use libraries.

@Script Coder
Converting C to brainfuck is orders of magnitudes harder than the opposite. One is simple token replacement, the other involves actual parsing.
@chrisname I do not remember comparing their respective difficulties. I just said that that article might be able to help him. I also do not remember comparing their conversions.

@fredbill in relation to chrisname's comment to you: you could always invent a super-set of the language that allows those kinds of things. Although that would be quite difficult (if not impossible) you could even invent your own language similar to BF that offers the required functionality, and then make c-bindings for a library like SDL and then code your game :)
Yes it is the LONG way around, but it would be educational and give you something to do for the next 6 months (rough estimate, do not quote me).
Script Coder wrote:
I do not remember comparing their respective difficulties. I just said that that article might be able to help him. I also do not remember comparing their conversions.

You said "convert C to brainfuck" and then posted a link to an article about doing the opposite, which is much, much easier.
chrisname wrote:
You said "convert C to brainfuck" and then posted a link to an article about doing the opposite, which is much, much easier.


I somehow think you missed this sentence. It appeared after I said "convert C to brainfuck" but before the link.

Me wrote:
This is not exactly what I mean, but it could help.
How does "the complete opposite" fall under "not exactly"?

Also, it wouldn't take six months to implement a brainfuck interpreter which can call functions. One (fitting, IMO) way would be to have the brainfuck code write a NUL-terminated ASCII string that names the function to call (e.g. "glBegin"), then reset the pointer to the start of the string and execute a new operator (say, '$'). An ordinary brainfuck interpreter is a couple of hours. Adding that operator is maybe another hour.
Last edited on
How does "the complete opposite" fall under "not exactly"?

Maybe my logic is different to your, but in my mind "not completely" encompasses "the complete opposite"

Also, you are forgetting that he then also wants to make a game in BF. Yea, maybe not 6 months, but I do recall saying:
(rough estimate, do not quote me).

Or did you not read that part?
Script Code wrote:
Maybe my logic is different to your, but in my mind "not completely" encompasses "the complete opposite"

Well, I respectfully disagree; I would say "not exactly" means "almost, but not quite".

Also, you are forgetting that he then also wants to make a game in BF. Yea, maybe not 6 months, but I do recall saying:
(rough estimate, do not quote me).

Or did you not read that part?

I read it, calm down, I just forgot about the game part.
Ok well if it's going to take 6 months for a superset, I don't think it's worth the effort.
Ok well if it's going to take 6 months for a superset, I don't think it's worth the effort.
Yay fredbill is double posting :)
Yay fredbill is double posting :)

@ chrisname I was never not calm :)
Holy crap sorry. Thanks for commenting 'cause now I can't delete it. I'll just report it :D
What is that gonna help? Also, how does it happen? Surely you must realise when you type it twice :)

Also, I think that is the first time someone reported their own post.
It happened when I hit submit 2 times, lol.
Topic archived. No new replies allowed.