Page 1 of 1

Simple moving tutorial.

Posted: Thu Nov 11, 2004 9:38 am
by lurah-
I have surfed in several sites and one question has founded allmost everywhere.

"I wana make text-based game. How i can know can my player move to x,y position or is there some wall etc...?"

Also my self have been some problems with "simple" things. Loading and saving on file was a major problem at first. It took like a 2 hours before i remembered it :lol:

So is there allready some simple moving tutorial allready?

Posted: Thu Nov 11, 2004 10:09 am
by {Nathan}
when you say text, do you mean ASCII (if so, join pure text), or do you mean a classic text adventure. If you do mean text adventure, there is a tutor on this site. Otherwise, read DarkDread's tutorials. He gives a quike, easy and fast method of doing collision.

Posted: Thu Nov 11, 2004 10:10 am
by lurah-
Yah, i ment ascii?s :lol: In my country we usually talk about text-based.

What?s Pure-text?

Posted: Thu Nov 11, 2004 10:49 am
by {Nathan}
pure-text is a programing group (not very good, but it's new. I am a member). www.pure-text.com

Posted: Thu Nov 11, 2004 11:15 am
by lurah-
Ok, i checked it. Looks nice and i love that ascii theme :lol:

I am one of the owners of pure text

Posted: Sun Nov 28, 2004 3:20 am
by Nixon
Hello. I have used text a great deal and know many things about using. I'll give you some code, Its just like using graphical maps

Code: Select all

DIM map(100, 100)
FOR y = 1 TO 5
FOR x = 1 TO 5
READ map(x, y)
LOCATE y, x
IF map(x, y) = 1 THEN PRINT CHR$(219)
NEXT: NEXT
px = 2
py = 2

top:
LOCATE py, px: PRINT CHR$(2)
DO: P$ = INKEY$: LOOP UNTIL P$ <> ""
LOCATE py, px: PRINT " "
IF P$ = "8" AND map(px, py - 1) = 0 THEN py = py - 1
IF P$ = "5" AND map(px, py + 1) = 0 THEN py = py + 1
IF P$ = "4" AND map(px - 1, py) = 0 THEN px = px - 1
IF P$ = "6" AND map(px + 1, py) = 0 THEN px = px + 1
GOTO top

DATA 1,1,1,1,1
DATA 1,0,0,0,1
DATA 1,0,1,0,1
DATA 1,0,0,0,1
DATA 1,1,1,1,1
You can join Pure text if ya want.
Hope this helps anyway

Posted: Tue Nov 30, 2004 1:08 am
by lurah-
Yeah, that helped me a lot. I made my own way but it aint this easy :roll:
Thanks man.

I have been offline somewhile...gee it was hard time :lol: