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

Username:   Password: 
 RegisterRegister   
 How do u keep a picture from bluring
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Vertico




PostPosted: Sat Apr 09, 2005 1:59 pm   Post subject: How do u keep a picture from bluring

i have a picture of a character. that sits on the screen. when i push the arrow keys it moves around, but its not clearing the screen behind it so i have a big blur following it.

i know if i put cls after it will clr it but then i cant have anythin else on the screen without it getting cleared. i want 2 make something like a zelda, with ur character moving around hitting things but i cant seem 2 do it without everything blurring.

if someone could give me the code so that it can move and clr itself behind it without clearing the screen.

if someone could perhaps give me code of there game thats like this so i can look through it and find out whats wrong with mine id be very thankful
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Sat Apr 09, 2005 2:24 pm   Post subject: (No subject)

Inside your main loop, I suggest you group all your drawing together like this:
code:

%main loop
cls
Draw.Everything
View.Update
delay (#)


That means you'll have to redraw everything.
Since you're making a zelda game, however, you could avoid the cls because you never really want your screen to have a solid colour background. The "backgrond" is the environment. So, replace the cls with code that draws all your tiles.
code:

%main loop
Draw.AllTiles
Draw.Link
View.Update
delay (#)


Hope that helps,
-Cervantes
[Gandalf]




PostPosted: Sat Apr 09, 2005 3:34 pm   Post subject: (No subject)

The way I started out doing this kind of motion, although its just to start you off, is to draw the circle, the draw it in the next position and where the circle was before then draw a white (or whatever background colour) circle of the same size there.

1.Draw a circle
2.Blank that circle out
3.Draw the new circle
windowsall




PostPosted: Sun Apr 10, 2005 7:50 pm   Post subject: what are these tiles you talk about?

I saw the word tiles and am curious what they are and if there is an example out there as I myself am wokring on a game similar to zelda but if its the same concept im thinking of would it not be a lot of work ?
jamonathin




PostPosted: Sun Apr 10, 2005 8:30 pm   Post subject: (No subject)

Since this topic is about blurry pictures, is there a way to scale a pic without it blurring as much? i.e. zooming in? Confused
Cervantes




PostPosted: Sun Apr 10, 2005 9:12 pm   Post subject: (No subject)

jamonathin wrote:
Since this topic is about blurry pictures, is there a way to scale a pic without it blurring as much? i.e. zooming in? Confused

Photoshop.

Windowsall: think of Zelda. If you tap the move key once, link moves one tile (though with smooth animation). You can't go half a tile. Basically, you have a 2D array (for a 2D world, that is) of integers in which, for example, a 0 represents an empty space (grass), a 1 represents a tree, and a 2 represents you. For collisions, you can simply compare your character's location to his surroundings. If he's trying to mvoe right and there's a 1 (a tree) in front of him, don't let him move.
jamonathin




PostPosted: Tue Apr 12, 2005 9:02 am   Post subject: (No subject)

How would you use photoshop to do that? Save multiple zooms of the same picture>?
Cervantes




PostPosted: Tue Apr 12, 2005 9:44 am   Post subject: (No subject)

Sure, jamonathin. Save them as pic1, pic2, pic3, etc. then create an array of pictures in your program. Use a for loop and a little bit of string manipulation to associate all your pictures with the appropriate elements of your array.
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  [ 8 Posts ]
Jump to:   


Style:  
Search: