Controlling ASCII Figures with collision

Started by Njordor, February 04, 2008, 04:52:27 PM

Previous topic - Next topic

Njordor

Alright, it's gonna be no mystery what I will write..  I know how to use variables and other string programming, but what has eluded me thus far, is to control an ASCII figure...  or even better, an @ symbol...  I need to know how collision is to be used, and how to cause other ASCII figure to go toward me....  Sorry if  this seems to be a tall order...  But I want to make a Roguelike so bad, that it's one of the coolest things I want to do on my "bucket" list.

Njordor

PS  I am not gonna use save and load routines

Njordor

Correct me if I am wrong...  If the moving ASCII character collides with my controlled @, then I can subtract whatever is necessary?  And I was wondering, can I draw my maps, with ASCII characters too, like with the pound (#) sign?  And how do I keep it from moving?

thaaks

I suggest you have a look at QHack from Thomas Biskup, creator of ADOM, one of the most famous roguelikes.
QHack is some kind of template to get started with a simple roguelike you can extend on your own.
It's C code but should help you learn a lot about generating and drawing dungeons and such.
Feel free to ask questions about the code if you are not C safe  ;)

I would suggest to use the Text command to position your characters on screen, using multipliers to get from map coordinates to pixel coordinates as PlayBasic is game oriented and thus does not care about lines or columns of text...

Cheers,
Tommy

Njordor

Well, I might as well make a graphical version of my Rogue-like

I will aways be into Rogue!   And PlayBASIC made my dream come true

Njordor
aka
Sarg (SAR-GAH, not SAR-JAH!!!  It means Coffin in German)