Help with Text Adventure project

For my nephews 7th birthday, my son(8) and I are making a handheld text adventure game.
We have an arduino and a 4x20 LCD. Navigation of menus is done with 3 momentary buttons.
It's all working except for the monster fighting routine. :o
Problem is that we are up to about 12000 flash and havent really put much of the text into it yet.
I am pretty sure that all the code (-content strings) will fit..but now I need space to put the text
I have been looking at the ATmel dataflash that sparkfun sells and that would be plenty of space (I really only need about 20K). My thought is that I will load up the dataflash thru the arduino, then load the program sketch onto the arduino and read data off the dataflash. My questions are:

  1. Can I solder this thing to a breakout board (also from SF) with a normal pencil tip or how??
  2. I am down to about 200 bytes of ram. I saw that someone wrote a library for the dataflash...anyone know how much
    ram it takes?
  3. Also anyone know the flash footprint of that same library?
  4. Anyone see a reason that this wouldnt work?

Thanks
Ben
(In a maze of twisty passages)

Another question.
I plan to run this all off of a 9v battery. Does the dataflash take much juice?

Ok I seem to be talking to myself here :-/but
I just noticed that sparkfun has the I2C EEPROM 32 K that is DIP so I can just socket it, and it
is 5v tolerant so I could just run it off the arduino directly without a 3.3 voltage regulator.
This sounds good.

About the problem of problem space, note that you gain 2kb if you burn it using an icsp... And I think the Arduino's eeprom may be accessed, too, as a permanent storage space.

Edit 1 : You can access the eeprom at runtime, there's a dedicated lib. You can also burn it using AVRDude, but I'm not sure this feature is integrated within the Arduino environnement.

Edit 2 : But any external eeprom will probably work, too.

Edit 3 : Have you considered Wiring ? Same language as Arduino's, but it's based on the Atmega128...

Ewe! I hated that maze of twisty passages! But I loved that game though - a classic.

The 32K Byte EEPROM sounds like a good choice in my opinion. You only need 4 wires to hook it to the Arduino, so it's easy to breadboard even if you don't want to put it on a shield right away. I've used it and it works well.

However, your first problem is that you need to get more room in RAM before you can use it.
The easiest way to do I2C is by including the Wire library. I just checked and it adds about 2300 bytes to the sketch. :frowning:

You might also need a buffer to collect the characters stored in the EEPROM.

It will be slower, but Adventure is probably more realistic that way. :wink:

Good luck, nice project.

I love this project idea. I'm sorry I can't really help. The EEPROM idea sounds good, and you can make the code versitile enough that you can change the story just put popping out one EEPROM and putting in another (just like game cartridges).

And, because I have to do it:

You are in an open field west of a big white house with a boarded front door.  
There is a small mailbox here.
>
You are in an open field west of a big white house with a boarded front door.  
There is a small mailbox here.
>open mailbox
There is a white, blank envelope inside the mailbox with a letter.
>
There is a white, blank envelope inside the mailbox with a letter.
> Eat the envelope?
I don't think that the envelope would agree with you.
>

I never was very good at games like this :frowning:

I never was very good at games like this :frowning:

You look on the shelf for another game.

Actually, I was really enjoying this thread. I was always a big fan of these kinds of games (though never that good at them either). It was the earlier Sierra 3D adventure games that I really loved. Before they introduced the horrible no-typing interface that killed the genre.

Trickpony,

Looks like your idea struck a chord with several of us here. :sunglasses:

Just forgot to add that the 24LC256 can be accessed in "page mode" (~ 40 bytes at a time) using some of the code you'll find around here. That may be useful.

xyzzy forever!

Just forgot to add that the 24LC256 can be accessed in "page mode" (~ 40 bytes at a time) using some of the code you'll find around here. That may be useful.

Great...too bad it isnt 60bytes at a time...that's what I need (I am displaying 3 lines of text at a time, and keeping the final line for the menu.
The example I saw used wire library and the comments suggested that wires buffer is only 30 bytes. Is there another library (maybe smaller?) that I should be looking at?

I'm thinking of the best way to load up the 24LC512 (went for more memory just in case). I could just make a few sketches with all PROGMEM strings and a loop that loads them into the EEPROM, keeping track of the length, then making a lookup table of int's pointing to the start of each string. The lookup table would start at the end of the EEPROM and go backwards.
Data Sketch 2 would have to know where sketch 1 ended and go from there (I could search end of EEPROM backwards until I found 0, then check the length of the last string..)
Of course if anyone has a better suggestion :stuck_out_tongue:

Note, I'm actually 14 and wasn't born during the era of these games, but they're pimp.

Anyone know of any place to find a game like this?

Flash or Telnet perhaps?

Note, I'm actually 14 and wasn't born during the era of these games, but they're pimp.

Anyone know of any place to find a game like this?

Flash or Telnet perhaps?

I was wondering when someone would post something like that and make me feel old :stuck_out_tongue:

Here's what I've been doing for the past few hours: http://www.xs4all.nl/~pot/infocom/zork1.html this is the classic.
When you play, try to imagine a simpler time before computer graphics, before people had internet connections. Relax, turn off the light, get a warm drink, and watch out for the grue.

Maybe too late but the 24LC512 has a 128-byte page write mode.

Yes. That project is done:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1228010915

The nephew really enjoyed it...took him about a month to finish the game...so now he is waiting for the next adventure :wink:

Some years ago there was a lot of interest in running the classic 'interactive fiction" games on things like the then-new palmtops. Apparently at some point there were developed standard file formats, and it was a relatively easy matter to port things to ... anything with enough memory. IIRC, there were a bunch of such data files for a bunch of games. I don't recall exactly where, though.
http://pdd.if-legends.org/ Looks like a reasonable starting point.

Y'all just missed a chance to download Zork 1, 2, and 3 for free; the offer seems to have expired.

Actually, interactive fiction is alive and well; there is a yearly competition and some very established file formats, interpreters, etc. Porting a frotzlike interpreter to an Arduino would be... interesting! But every year I try to play one or two of the new ones; some are quite accessible and fun.

And if you want to see some of the new tools out there... download and play with inform 7--amazing. Makes me want to write IF!