#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# The Project Codelike Topic

edited December 2012 in General Posts: 1

Hey guys,

This is actually KatamariManatee, but the Codea forums won't let me sign in using my Google account anymore! I hope you guys understand.

Anyway, I'm starting work on a Roguelike in Codea because, well, I've been obsessed with them lately! It seems like it should be simple enough, but I'm a little nervous of failure, and I don't think I have very much experience in Codea, so it's actually pretty tough...

So far I've got a player class that moves on the screen based on what keyboard keys are hit. That's about it, but I'm still impressed by myself!

I'm wondering where to go next. Walls seem like the next logical progression to keep my player from wandering off the screen, but I'm having trouble conceptualizing how I'd program the wall detection. How would I check to see if an object/sprite is in a place? I figured it would be a function that would return either true or false. (Maybe even a number value if I want to tell if it's an enemy or a wall.)

This topic is for giving me hints, but mostly for showing my progress. Any tips or tricks to make it more efficient, or cooler, or something, would be appreciated.

Wish me luck!
- Cambert

Tagged:

Posts: 5,417

Sounds like a cool project! You could do level as a grid, and when the player attempts to move check if the destination grid cell contains a wall or enemy.

• Posts: 666

A simple solution is to store your playing area as a table / grid and store values for each type of 'thing' in a cell. Several drawbacks to this exist, but the most obvious is that you tend to stick one thing in a cell, or you end up making numbers that to add together to make more than one thing in a cell, which gets goofy when debugging.

• Posts: 1,255

I have a half-finished rogue-like. How I handled it was to make a grid for walls, floor, and other fixed objects, then tables for monsters, treasure, etc.

I got caught up in lighting models, giving my player torches and letting him light wall torches. I'd love to have a good rogue-like to play.

• Posts: 12

Thanks for the reset @Simeon , and thank you everyone for the tip.

@Mark , before you get too excited, I haven't actually played TOO many hardcore dungeon crawlers... I know the basics of the genre (turns, food meter and such,) but I've only really played Console-based ones like Pokemon Mystery Dungeon, Chocobo's Dungeon, or Toejam and Earl. I couldn't get into Nethack...

However, I'm gonna probably put the code up once I'm done, so even if it doesn't live up to typical expectations, you can always modify it!

That is, if it gets finished... Christmas yielded a LOT of video games for me, so I'll most likely be playing those over the Christmas break... And then school will get in the way again... Ah well! I'll get to it eventually!

See you guys soon!
- KatamariManatee