× Main Menu

WPF C# Tutorial – Create Parallax Scrolling Endless Runner Game in Visual Studio

Full Source for the Parallax Scrolling Endless Runner Game

 

 

Make sure you have checked the spelling of the variables and objects to match your XAML Window, sometimes it can cause issues where if the objects are spelled differently it will not recognize it in the C# Script Window.




2 responses to “WPF C# Tutorial – Create Parallax Scrolling Endless Runner Game in Visual Studio”

  1. Pascal F says:

    Very nice tutorial, I really appreciate it.

    But i got one question:

    How do i get a moving ground into the game? when i put an image with the same length as the background and also the nearly same code i fall through the ground.

    Pascal

  2. Anhar Ali says:

    Hi Pascal, glad you liked the tutorial, worked really hard on this one. For your question about moving the ground, you can use similar techniques as being used with the background scrolling animation , have two separate ground rectangles and move them the same way as the backgrounds are. Within the rectangles you can images as it’s texture so it looks like the ground is scrolling with the background.

    I think the reason your character is falling through it is because it’s not checking whether you have landed on the ground rectangle. See if that helps.

    Happy programming.

Comment on this tutorial and let us know how you got on -

%d bloggers like this: