
-----------------------------------
Kingnoz
Fri Jun 25, 2004 1:19 pm

Coin Collecting Game...How many can u collect?
-----------------------------------
This is a coin collecting game that i warped out of what was going to be a pacman like game, but i was too lazy to make an AI for it.

Anyway, the point of the game is...well collect as many coins as u can before the time runs out

My highest amount is 200 and one item from a treasure chest.

You guys can use the code for ideas but do not copy the whole thing.

There is also final fantasy music to listen to while u play...all u have to do is select a number between 1 and 5 when it asks.

All the tiles were created by me
The characters are all final fantasy
The coin is from super mario

U can make ur own maps too...just modify the Map1.t file, but make sure they are the same size...i don't remeber if i bug proofed that

Controls:
Arrow keys -> move around
o -> opens the treasure chests

-----------------------------------
Delos
Fri Jun 25, 2004 5:48 pm


-----------------------------------
Hmm...nice...nice...

I didn't particularly like the movement too much...but I guess that it's classic Pac Man style movement?

That's just me.

It ran really fast on my computer though, and often the keys were 'sticky'.

I'm guessing you're checking too much in your Input Loop...didn't check myself, just a hunch.

Music is good...fun...Nobuo Uematsu...

-----------------------------------
Kingnoz
Fri Jun 25, 2004 6:58 pm


-----------------------------------
It ran really fast on my computer though, and often the keys were 'sticky'. 


Yeah it does that on mine too, so i just hold the buttons down, even when moving in the same direction.

-----------------------------------
mynameisbob
Sun Jun 27, 2004 3:50 pm


-----------------------------------
how do you get the guy not to run into the walls? what collision detect method do you use?

-----------------------------------
Kingnoz
Sun Jun 27, 2004 9:12 pm


-----------------------------------
i used my own method  :lol: 

im not too much into looking at code for this kinda stuff...but anyhoo
what i do is have a 2D array of the tile names then i check the tile that the player will move into and see if it is a tile that is "walkable" (in this instance the black squares), if there are more than one tiles that are "walkable" then u can just organize the pictures of the tiles so they divides into two groups...walkable and nonwalkable...and just say tiles between this number and another number are ok to walk on


procedure Movement (var dir : string)
    var num1 : int
    var num2 : int
    if dir = "up" then
        fy += 16 
    elsif dir = "down" then
        fy -= 16
    elsif dir = "left" then
        fx -= 16
    elsif dir = "right" then
        fx += 16
    end if
    num1 := ((((maxy + 1) div 2 + 156) - fy) div 16)
    num2 := ((fx - ((maxx + 1) div 2 - 216)) div 16)
    locate (2, 2)
    %put "num1: ", num1, " num2: ", num2
    if num1 = 1 and num2 >= 1 and num2 