Please help, looking for UNIX tutorial


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Please help, looking for UNIX tutorial
# 1  
Old 02-11-2008
Please help, looking for UNIX tutorial

Hello,

I only have this afternoon to take a UNIX tutorial for my contract job, and I've posted two threads already for the forum, asking if someone could help me find the Gary Hook AIX tutorial.
Neither has been published yet.

Could you please help me? Thank you.

Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Web Development

Vue JS 2 Tutorial by The Net Ninja: A Recommended Vue.js Video Tutorial Series

A number of people have asked me how to get started with Vue.js and my reply before today was to Google "Vue.js". That has changed and my recommendation to anyone who wants to learn the fastest growing, easiest to learn and use Vue.js web dev framework is to watch this video tutorial series: ... (0 Replies)
Discussion started by: Neo
0 Replies

2. Programming

Lamp tutorial

Hello All, I need a good lamp(linux, apache, mysql, php) tutorial for web development. I searched in net but not finding suitable one. suggest me something. (3 Replies)
Discussion started by: amisubha
3 Replies

3. Shell Programming and Scripting

Tutorial question

Write a pipeline that takes a file as input and replaces all occurrences of exclamation marks (!) by underscores (_) . The pipeline should also prepend your login at the beginning of every line (the beginning of a line is specified with ^ in Unix) Hi guys, Just trying to do this tutorial... (1 Reply)
Discussion started by: geena_b
1 Replies

4. Solaris

Need LAMP tutorial!

Hello Everybody, Does anybody know or recommend me a tutorial for LAMP server on Solaris 10 x86? (3 Replies)
Discussion started by: ahmedamer12
3 Replies

5. AIX

AIX useful tutorial...

hi guys, I want to learn AIX, I am a beginner for this operating system of IBM. Can anyone give me some useful tutorial for a beginner like me?... Thanks... + GOD bless + ^_^ (1 Reply)
Discussion started by: TechReader
1 Replies

6. What is on Your Mind?

take a look aat this unix tutorial site

hello everyone, just wanted to tell all you people about a site that we have been hosting for some time called "http://www.laynetworks.com". this site contains lots of tutorials and information regarding Unix, linux, protocols, networking etc. this site is free and is maintained by students.... (0 Replies)
Discussion started by: ashish-m6.net
0 Replies

7. Shell Programming and Scripting

Tk tutorial

Anyone know any good website with a step by step instructions on writing Perl GUI scripts with Tk ??? (3 Replies)
Discussion started by: perleo
3 Replies

8. UNIX for Dummies Questions & Answers

Unix Tutorial

Any good UNIX tutorials to download? Any good APACHE tutorials? thanks (2 Replies)
Discussion started by: TEKGALAHAD
2 Replies
Login or Register to Ask a Question
SDL::Tutorial::Images(3)				User Contributed Perl Documentation				  SDL::Tutorial::Images(3)

NAME
SDL::Tutorial::Images SYNOPSIS
# to read this tutorial $ perldoc SDL::Tutorial::Images # to create a demo animation program based on this tutorial $ perl -MSDL::Tutorial::Images=sdl_images.pl -e 1 ANIMATING IMAGES
Since you're already familiar with the concepts behind animation, it's time to learn how to work with images. As usual, the important point is that computer animation is just simulating motion by painting several slightly different frames to the screen every second. There are two ways to vary an image on screen. One is to change its coordinates so it's at a slightly different position. This is very easy to do; it's just like animating a rectangle. The other way is to change the image itself so it's slightly different. This is a little more difficult, as you'll need to draw the alternate image beforehand somehow. Loading Images As usual, start with an SDL::App object representing the image window. Then preload the image file. This is easy; just pass the "name" parameter to the SDL::Surface constructor: use SDL::Surface; my $frame = SDL::Surface->new( -name => 'frame1.png' ); Note: you'll need to have compiled SDL Perl (and probably SDL) to support JPEG and PNG files for this to work. That's it; now you have an SDL::Surface object containing the image. You can use the "height()", "width()", and "bpp()" methods to retrieve its height, width, and bits per pixel, if you need them. Displaying Images Drawing an image onto the screen requires blitting it from one surface to another. (Remember, "blitting" means copying bits in memory.) The "blit()" method of SDL::Surface objects comes in handy. Its arguments are a little odd, though. Assuming $app is the SDL::App object, as usual: use SDL::Rect; my $frame_rect = SDL::Rect->new( -height => $frame->height(), -width => $frame->width(), -x => 0, -y => 0, ); my $dest_rect = SDL::Rect->new( -height => $frame->height(), -width => $frame->width(), -x => 0, -y => 0, ); $frame->blit( $frame_rect, $app, $dest_rect ); $app->update( $dest_rect ); Here we have two SDL::Rect objects which represent rectangular regions of a Surface. $frame_rect represents the entire area of $frame, while $dest_rect represents the area of the main window in which to blit the frame. This may be clearer with more descriptive variable names: $source_surface->blit( $area_of_source_to_blit, $destination_surface, $destination_area ); As usual, call "update()" on $app to see the change. Requiring the source and destination Rect objects may seem tedious in this simple example, but it's highly useful for copying only part of surface to part of another. For example, animating this image is a matter of changing the "x" and "y" coordinates of $dest_rect: for my $x ( 1 .. 100 ) { $dest_rect->x( $x ); $frame->blit( $frame_rect, $app, $dest_rect ); $app->update( $dest_rect ); } Of course, you'll have to redraw all or part of the screen to avoid artifacts, as discussed in the previous tutorial. Multi-Image Animation That covers moving a single image around the screen. What if you want something more? For example, what if you want to animate a stick figure walking? You'll need several frames, just as in a flip-book. Each frame should be slightly different than the one before it. It's probably handy to encapsulate all of this in a "Walker" class: package Walker; use SDL::Surface; sub new { my ($class, @images) = @_; my $self = [ map { SDL::Surface->new( -name => $_ ) } @images ]; bless $self, $class; } sub next_frame { my $self = shift; my $frame = shift @$self; push @$self, $frame; return $frame; } To use this class, instantiate an object: my $walker = Walker->new( 'frame1.png', 'frame2.png', 'frame3.png' ); Then call "next_frame()" within the loop: for my $x ( 1 .. 100 ) { my $frame = $walker->next_frame(); $dest_rect->x( $x ); $frame->blit( $frame_rect, $app, $dest_rect ); $app->update( $dest_rect ); } Again, the rest of the frame drawing is missing from this example so as not to distract from this technique. You'll probably want to abstract the undrawing and redrawing into a separate subroutine so you don't have to worry about it every time. It'd be easy to make "next_frame()" much smarter, selecting an image appropriate to the direction of travel, using a bored animation when the character is no longer moving, or adding other characteristics to the character. As you can see, the hard part of this technique is generating the images beforehand. That can add up to a tremendous amount of art and that's one reason for the popularity of 3D models... but that's another tutorial much further down the road. More importantly, it's time to discuss how to make these animations run more smoothly. More on that next time. SEE ALSO
SDL::Tutorial basic SDL tutorial SDL::Tutorial::Animation non-image animation AUTHOR
chromatic, <chromatic@wgz.org> Written for and maintained by the Perl SDL project, <http://sdl.perl.org/>. BUGS
No known bugs. COPYRIGHT
Copyright (c) 2004, chromatic. All rights reserved. This module is distributed under the same terms as Perl itself, in the hope that it is useful but certainly under no guarantee. perl v5.12.1 2010-07-05 SDL::Tutorial::Images(3)