1. Hoping for some help

I have a bunch of Ideas for games and stuff, and I know how to make most of
the parts, but I can't figure out a routine for contact(for example,
character touching an item. Can anyone give me an Idea?

new topic     » topic index » view message » categorize

2. Re: Hoping for some help

Esta i uma mensagem de mzltiplas partes em formato MIME.

------=_NextPart_000_01BC90B3.62EEE3A0

 Hi Charles, I am Eduardo, I am a beginner, so don't be angry with me if my
idea doesn't work. It's just it: give values to the character position and
item position(like x,y for character and a,b for item, for example). I did
a function to test if x(atom position of character) is equal to a but if
you like, make your own relation. That's it, if you don't understand it,
write me and when I have more time, I'll try something else.
 Just use this routine and write back if it work, I am going to make games
too, thats it.
 Just to remember, a and b are coordinates of character and x and y are
item coordinates im my code. Enjoy!

PS - include it in your game, call cheack_contact in the loop that checks
the commands of moving character. It will return 1 if occurs contact.

Eduardo Uemura Okada
e-mail: cool at art.com.br

------=_NextPart_000_01BC90B3.62EEE3A0
Content-Transfer-Encoding: quoted-printable
Content-Description: check.e (E Arquivo)

new topic     » goto parent     » topic index » view message » categorize

3. Re: Hoping for some help

Hi guys, and Charles, I am not quite sure that you can read files in MIME,
because it I am sending again the code, copy it and paste in a file .E
 Sorry for my fail...

Eduardo Uemura Okada
e-mail: cool at art.com.br

--------- CODE starts here (without this line, obvious) ------------

function check_contact(atom a, atom b, atom x, atom y)
-- pay atention: a and b are coordinates of character, and x and y are of
item, for example
        if a=x and b>y-10 or a=x and b<y+10 then
                return 1
        else
                return 0
        end if
end function

new topic     » goto parent     » topic index » view message » categorize

4. Re: Hoping for some help

Hey, thanks a bunch!

new topic     » goto parent     » topic index » view message » categorize

5. Re: Hoping for some help

Hey Charles, I forgot to say just a thing, if you need a special routine
(for example, that reads a character encountering an enemy), you can put
just a variable, that is set to 0 if character is not atacking and to 1 if
character is atacking, this is a good way to make contact and check atack
or not and other special actions smile
 Just a curiosity, what kind of game is yours?
 If my routine check_contact haven't the precision that you need (it
abranges an area of 10x10 pixels), write me, I'll re-write it and we will
see what we can do.
 Bye.

Eduardo Uemura Okada
e-mail: cool at art.com.br

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu