Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 I Need Help on sprites!!
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
FwuffyTheBunny




PostPosted: Thu May 08, 2003 12:23 pm   Post subject: I Need Help on sprites!!

Hey, im making a project and how exactly do u use sprites? Im completely new to sprites so dont assume i know any details about it. Give me the full way to make it. Thanks alot
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu May 08, 2003 3:41 pm   Post subject: (No subject)

well by sprites you mean transparent images, right?

so you use them just like you would use a regular images

code:

var picID:int := Pic.FileNew("image.jpg")
Pic.Draw(picID, x, y, picCopy)


now picCopy is the default mode we use... it just puts the picture up as its in the file. Replace it with picMerge. That will get rid of all the white in the picture (pure white... 255,255,255) and make it transparent.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Dan




PostPosted: Thu May 08, 2003 5:00 pm   Post subject: (No subject)

sprites olny wrok with turing 3

turing 4.* dose not have wroking sprites.

there is a tutorial on how to do smooth animation here: http://www.compsci.ca/bbs/viewtopic.php?t=193
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
FwuffyTheBunny




PostPosted: Thu May 08, 2003 5:01 pm   Post subject: (No subject)

Hmmm, i cant seem to get it, it gives me a message saying: illegal pic identifier

i typed this in and it sed that message:

code:
setscreen ("graphics:600;500;millions")


var picID:int := Pic.FileNew("C:hullo.bmp")
Pic.Draw(picID, 200, 200, picMerge)
Dan




PostPosted: Thu May 08, 2003 5:11 pm   Post subject: (No subject)

i think it is c:/ not just c:
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Tony




PostPosted: Thu May 08, 2003 5:13 pm   Post subject: (No subject)

and you gotta make your background color other then white so you can actually see that it becomes transparent Wink
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
FwuffyTheBunny




PostPosted: Thu May 08, 2003 5:19 pm   Post subject: (No subject)

ok, i got it it looks kool. Hmm, now i need sumthing else. I need to know how to have like hitting. Im making a fighting game. Now i got the guy to punch but when he hits the other guy, how do i get it to realize that he has hit him? So i can have a health metter and every time he gets hit, his health goes down. thx
Tony




PostPosted: Thu May 08, 2003 5:32 pm   Post subject: (No subject)

circle colision detection... we have a tutorial on that
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Sponsor
Sponsor
Sponsor
sponsor
FwuffyTheBunny




PostPosted: Thu May 08, 2003 5:36 pm   Post subject: (No subject)

where is it located?
Tony




PostPosted: Thu May 08, 2003 5:47 pm   Post subject: (No subject)

Confused Did you look in TUTORIALS ? Evil or Very Mad

http://www.compsci.ca/bbs/viewtopic.php?t=75 - scroll down to first reply for circle one.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
FwuffyTheBunny




PostPosted: Thu May 08, 2003 5:52 pm   Post subject: (No subject)

Wow, this may be more work than i thot. How would i got about making a shotting style game almost like an original nintendo one. Where Faces pop up and u have to clikc on them and they go red. I want so facespop up randomly around the screen and stay for about 5 seconds. Then i'd like to put a score in. At the top so its like : total hit:10 so it keeps track.
I could get the faces too pop up randomly, but i dont know how to make them stay for 5 seconds and then diaapear. nor do i know how to clikc on them and make thme go red and then dissapear. Uh, could sumone help me or at least point me in the right direction? thx alot
Tony




PostPosted: Thu May 08, 2003 6:40 pm   Post subject: (No subject)

you find the distance between circle center and your click and if its less then circle radius, you clicked inside...

as for timer... just keep a counter for each new fact and deceare it every time through the loop. As it reaches 0 (or lower) it disappears
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
void




PostPosted: Thu May 08, 2003 6:52 pm   Post subject: (No subject)

i made a similar game to entertain myself when i was done my programs....apparently CD players arent allowed in school and playing online gets you a 1 week account suspension....so i made my little game in turing and sat there for almost an hour clicking....NOTE TO THE USER: DO NOT COPY MY PROGRAM....ALTHOUGH IT IS NOT OF SIGNIFICANT VALUE TO ME....I WOULD RATHER YOU NOT COPY IT (or if you do...just dont tell me so that i feel good about having taught someone how to do something...) THE ONLY REASON I AM PUTTING THIS UP IS BECAUSE IT COVERS THE BASIC SYNTAX OF A SIMPLE PROGRAM LIKE THIS...
IF YOU DONT WANNA DOWNLOAD COZ U THINK ITS A VIRUS...HERES THE IDEA FOR YOUR WHACK-A-MOLE TYPE GAME
1) RANDOMLY CREATE MOLES (OR OTHER WHACKABLE THINGS..LIKE YOUR TEACHERS FACE)
2) HAVE THE USER CLICK AND IF THE CLICK IS WITHIN THE CIRCLE OR RECTANGLE OF YOUR WHACKING OBJECT...THEN SCORE INCREASES....AND THE WHACKED THINGY DISAPPEARS....
THATS THE BASICS OF IT....ITS REALLY SIMPLE...IT ONLY LOOKS NICE IF YOU USE SOME GOOD GRAFIX TO ENHANCE THE EXPERIENCE....COZ CLICKING ON A DOT IS NOT AS FUN AS WHACKING A TEACHER IN THE FACE



game.t
 Description:

Download
 Filename:  game.t
 Filesize:  1.92 KB
 Downloaded:  259 Time(s)

Tony




PostPosted: Thu May 08, 2003 7:56 pm   Post subject: (No subject)

ya void, you should replace the dot with your teacher's face... who came up with "lets not let students have fun" rule?

man, all we do in my compsci class is play in games... constantly... or talk about hockey... or golf...

there's that kid who plays music on his computer for the class... too bad he got a bad taste and our teacher tells him to turn it off... but I assume that if it were some better songs it would be cool
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Catalyst




PostPosted: Thu May 08, 2003 8:01 pm   Post subject: (No subject)

i shot out the score.... Sad
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 16 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: