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

Username:   Password: 
 RegisterRegister   
 Bad interaction between Sprites and canvas?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
MrC




PostPosted: Sun Oct 10, 2010 5:04 pm   Post subject: Bad interaction between Sprites and canvas?

What is it you are trying to achieve?

I am writing a game that uses sprites and Canvas (UI element). When I add the code below, the entire first part of the program fails to display.


What is the problem you are having?

As soon as I try to incorporate sprites, the entire first part of the program does nothing (visually, all of the data is being processed properly)


Describe what you have tried to solve this problem

Everything I could think of. I have compared the program to the last working version. I found the specific line that causes the error (and commenting it out makes the initial graphic display properly. It is line 354 - the Sprite.New line for the player sprite.

Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)

Turing:

playSpr := Sprite.New (playSp (1))
Sprite.SetHeight(playSpr, 3)


Here is the whole program zipped:

http://dl.dropbox.com/u/11275806/MrCsRPG.zip

Please specify what version of Turing you are using
4.1


If anyone has any idea why initializing a sprite stops other graphics from showing, please help! Also, if you have any other suggestions on how I could improve my code, I would love to hear it! It's clearly far from finished, but it's a pet project I have been working on for a while.
Sponsor
Sponsor
Sponsor
sponsor
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  [ 1 Posts ]
Jump to:   


Style:  
Search: