Page 1 of 1

Collisions

Posted: Fri Dec 03, 2004 5:44 pm
by {Nathan}
For my text game, I need to do collision, but I do not use a "true" map. Is there some way to do a point command in text mode? I was thinking about "talking" directly to &HB000, but is there an easyer way?

I know, I cannot spell; at all! :roll:

follow the mouse?

Posted: Fri Dec 03, 2004 10:41 pm
by Nixon
Are you talking about clicking somewhere on the screen while the chr 2 moving to that position? if so just use a mouse thing and set where the postion of the mouse was when clicked and make the chr move there and wait fr the next click. I've done it before and it is really easy.

Posted: Sat Dec 04, 2004 8:36 am
by {Nathan}
No, i have my "map" set up with lots of things. The problem is, I can't use the Map array to do collisions (because i don't use one) so i need to do a "point" command in text mode. I was thinking about talking with the text buffer, but I cannnot find a formula that can allow me to do this. here is the code:

DEF SEG = &HB000

POKE 0, 1 'Poke smiley face to 1, 1
poke 1, 1 'Make smiley face blue
poke 2, 2 'make another kind of smiley face
poke 2, 2 'make this one green

and ect.

I use WIDTH 50 (columns) and 80 (rows)

Posted: Sat Dec 04, 2004 10:29 pm
by Nodtveidt
You can use SCREEN as a function to return character codes at specific locations. Look it up in QB's help.

Posted: Sun Dec 05, 2004 8:24 pm
by Z!re
c = SCREEN(row, collumn [, return ASCII value or was it color.. hmm])

Example:
color = SCREEN(10, 50)
char = SCREEN(10, 50, 1)


Look it up though