Computer Science Canada

Mario/Moving Background Help

Author:  ahmed [ Tue Jun 01, 2004 12:15 pm ]
Post subject:  Mario/Moving Background Help

so this program allows the background to move so basically change the picture names but if i want to make a mario game which one of the picture do i change to mario and which on do i change to the backgrounds lvl.

jamez wrote:

setscreen ( "graphics:1000;700,offscreenonly")
var x,y : int
var sky : int
var ship : int
var backgroundPictureWidth, backgroundPictureHeight : int
var backgroundPictureX, backgroundPictureY : int

ship := Pic.FileNew ("c5.bmp") <--
sky := Pic.FileNew ("sky.jpg") <--
backgroundPictureWidth := Pic.Width (sky)
backgroundPictureHeight := Pic.Height (sky)
backgroundPictureX := (backgroundPictureWidth - (maxx + 1)) div 2
backgroundPictureY := (backgroundPictureHeight - (maxy + 1)) div 2

var chars : array char of boolean
        Input.KeyDown (chars)
            if chars (KEY_UP_ARROW) then
            end if
            if chars (KEY_RIGHT_ARROW) then
            end if
            if chars (KEY_LEFT_ARROW) then
            end if
            if chars (KEY_DOWN_ARROW) then
            end if
            Pic.Draw (sky, -backgroundPictureX, -backgroundPictureY, picCopy)
        end loop

[mod:985ad0c96b]Next time, please post in the relevent section, thank you[/mod:985ad0c96b]

Author:  Flashkicks [ Wed Jun 02, 2004 7:45 am ]
Post subject: 

Im not even sure- My pictures wont even draw.. Confused Are you sure you have the background stuff right??.. Bcuz if you comment it out it WANTS to run but cant bcuz its not recognizing the pictures. Check that you made sure you put them in correctly-get help with the backgroundPicture demand thingy... I would help you with that as well but unfortunately im being LOADED with Java crap right now- for finals Shocked ... Unfortunately have no clue as to what i am even really but Im learning. JAVA IAS HARD. Anyhoo- Yeah- see if you can get the pis to werk. if yours do; then SOMEHINGS wrong with mine....

Author:  rhomer [ Wed Jun 02, 2004 9:50 am ]
Post subject: 

Ok...First of all what are those arrows for?? they screw up your program..

secondly if you have pictures you should post them with your ".t" file in a zip file.

Author:  Flashkicks [ Thu Jun 03, 2004 7:33 am ]
Post subject: 

{ Aha- those were my thoughts too Razz }

ACHOO hint hint Laughing