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

Username:   Password: 
 RegisterRegister   
 Sprite Help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
strife_8




PostPosted: Wed Mar 10, 2004 4:54 pm   Post subject: Sprite Help

code:
setscreen ("graphics:max;max")
var ryanlight : int := Pic.FileNew ("ryanlight.jpg")
var spritelight1 : int
spritelight1 := Sprite.New (ryanlight)
Sprite.SetHeight (spritelight1, 3)
Sprite.SetPosition (spritelight1, 0, 0, false)
Sprite.Show (spritelight1)


Ok, Im trying to learn sprites for a project I'm supposed to be doing and I tried just displaying my image "ryanlight.jpg" as a sprite. When I execute this program it just runs through it and doesn't even display a run window. Whats up?
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Wed Mar 10, 2004 5:22 pm   Post subject: (No subject)

I'm not familiar with sprites, but Dan will prolly be on your ass for not using his sprite prog Razz

anyways, If you make a program such as the following
code:

var text : string := "Hello World"

and you try to run that, the run window won't open and in the status bar it'll say "Unnamed1 - finished execution". That's what happened with your prog, so I'm assuming that you didn't actually print it on the screen, the Show just made it not hidden. I would assume that there is an update command or something? maybe? well, hope i helped Smile
strife_8




PostPosted: Wed Mar 10, 2004 5:33 pm   Post subject: (No subject)

I read about Dan's module and I tried it and it did work for the most part but I don't want to use his moduel because I didn't make it and even though he says it's open source and all my teacher can be really picky about using other people's work and I don't want to base my whole program off Dan's sprite module and then find out that he won't accept it because I didn't make the module.

I read my textbook (Introduction to Programming in Turing, the gr11 textbook) and I mainly followed the explainations it gave there, I then read the help file, it looks ok to me but it still isn't working.

About the Sprite.Show, here is the help file definition:

Quote:
Displays a previously hidden sprite. Sprite.Show has no effect if the sprite is already visible.


Since the sprite wasn't visible in the first place, shouldn't it show my sprite?

edit: I think that somehow I have to load turing's own sprite module but I don't know it's name. That's the only thing I can think of... Any ideas?
Jodo Yodo




PostPosted: Wed Mar 10, 2004 6:19 pm   Post subject: (No subject)

I was thinking it might be because it's .jpg, but I tried it in .bmp, so I have no idea either. Me and strife are working on this project together. I private messaged Asian Sensation for help, and I'm hoping the admins will give their expertise.
shorthair




PostPosted: Wed Mar 10, 2004 6:31 pm   Post subject: (No subject)

okay that modual dan made , is what makes sprites work , you cant ue sprites without that , its the whole reason for its existance ,

it eems your not to familial wiht it but ever ince srites have been added , they have not worked , so finnaly dan took charge and submitted a working modual to make them work , so if you would lik to pass you rproject either make a case that they dont work or use dans modual
Jodo Yodo




PostPosted: Wed Mar 10, 2004 6:37 pm   Post subject: (No subject)

So where exactly DO we get Dan's Sprite Module?
strife_8




PostPosted: Wed Mar 10, 2004 6:56 pm   Post subject: (No subject)

ok, but why is sprites in our textbook if it doesn't work on turing w/o dan's module???
Delos




PostPosted: Wed Mar 10, 2004 7:22 pm   Post subject: (No subject)

Future "implementation" I'd say.
Tony




PostPosted: Wed Mar 10, 2004 7:35 pm   Post subject: (No subject)

because Sprites used to work in v3 Confused Dan's module is made for v4.x Wink

as for using "other people's code"... Confused well you're as free to use Dan's module as you're to use turing's GUI or turing's Sprites
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
strife_8




PostPosted: Wed Mar 10, 2004 7:37 pm   Post subject: (No subject)

Confused They used to work?? and in the updated version they got rid of it??

I'm really starting to hate Holt Software now... Evil or Very Mad
Tony




PostPosted: Wed Mar 10, 2004 7:46 pm   Post subject: (No subject)

strife_8 wrote:
and in the updated version they got rid of it??


if you don't recall, v4.0.1 was not able to compile executables Laughing
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Dan




PostPosted: Thu Mar 11, 2004 9:46 pm   Post subject: (No subject)

just a note for dan sprites you still need to uses viewupdate and setoffscreen sutff.

if you are using V3.x normal sprites should work but any V4.x they will not but danSprites will. For DOS verson i dont think ether will....
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
strife_8




PostPosted: Thu Mar 11, 2004 11:12 pm   Post subject: (No subject)

Me and Jodo have decided to not use sprites for this project because we're not exactly sure how our teacher will react to us using somebody elses module. So back to the Pic Module.... Confused Thanks for the help though, we'll post our program once we have a beta done, we need some testers! Very Happy
Dan




PostPosted: Fri Mar 12, 2004 11:51 am   Post subject: (No subject)

well you could allways make your own sprites code, it is realy easy if you only have one sprite. it gets compiated when you have 2 or more tho b/c of overlaping and stuff.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
strife_8




PostPosted: Fri Mar 12, 2004 1:15 pm   Post subject: (No subject)

well we'll be using 12 units so that means 12 sprites
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 1  [ 15 Posts ]
Jump to:   


Style:  
Search: