Author Topic: background-moving  (Read 4520 times)

pielago

  • Guest
background-moving
« on: August 07, 2013, 02:27:24 AM »
Hi 
is there a tutorial just for background that moves while the player moves? so far i see background that dont move cause
no need for it!
what if i want to have a screen 1000x700 but the background moves the opposite way my player is walking too..to make it see the world its huge...

can someone show me a tutorial or some example?? simple as possible :)

I sort offfff want to put 2 background together  side by side not on top of each other!

Thank YOU


Osgeld

  • Guest
Re: background-moving
« Reply #1 on: August 10, 2013, 07:47:50 AM »
its fairly simple with a painted background, though you will run into performance issues with really large backgrounds scrolling

you have a game window, inside that window you restrict your player movement to a box somewhat central to the game window

if the player hits that boundary you stop moving the player and start scrolling the bg with simple 4 function math

this is a game I did for ludum dare, though keep in mind its a poorly documented, very quickly hacked together thing made in less than 48 hours, after working a day job 45 hours, first time ever using EGSL

http://www.ludumdare.com/compo/ludum-dare-26/?action=preview&uid=828

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: background-moving
« Reply #2 on: August 10, 2013, 08:14:31 AM »
Oh great, seems to be the very first time EGSL was used in a ludum dare!
EDIT: But why didn't you make an *.exe out of your game???
« Last Edit: August 10, 2013, 08:17:26 AM by Cybermonkey »

Osgeld

  • Guest
Re: background-moving
« Reply #3 on: August 11, 2013, 03:58:04 AM »
Oh great, seems to be the very first time EGSL was used in a ludum dare!
EDIT: But why didn't you make an *.exe out of your game???

I dont remember exact details off hand, seems like I had trouble getting it to work on win7 x64, and I did not use the IDE cause I am somewhat picky about what I use ... and lack of sleep pressed against a deadline does funny things to your mind

as far as being picky, bout the only thing I wish the IDE had was a dark theme, hour 30 with no sleep at 3AM a glaring white screen is not one's first choice
« Last Edit: August 11, 2013, 04:00:40 AM by Osgeld »

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: background-moving
« Reply #4 on: August 11, 2013, 08:19:59 AM »
You can change the colours of the IDE as you wish. Even a dark background is possible.
I attached a colour configuration file for the colours of the screenshot.
« Last Edit: August 11, 2013, 01:14:43 PM by Cybermonkey »

kona.express

  • Guest
Re: background-moving
« Reply #5 on: August 22, 2013, 02:56:47 PM »
its fairly simple with a painted background, though you will run into performance issues with really large backgrounds scrolling

you have a game window, inside that window you restrict your player movement to a box somewhat central to the game window

if the player hits that boundary you stop moving the player and start scrolling the bg with simple 4 function math

this is a game I did for ludum dare, though keep in mind its a poorly documented, very quickly hacked together thing made in less than 48 hours, after working a day job 45 hours, first time ever using EGSL

http://www.ludumdare.com/compo/ludum-dare-26/?action=preview&uid=828

Looks like a cool little game guy! Nice job.

John