[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Slick Forums :: View topic - camera questions
Slick Forums
http://slick.ninjacave.com/forum/

camera questions
http://slick.ninjacave.com/forum/viewtopic.php?f=13&t=5903
Page 1 of 1

Author:  oblivion5683 [ Sun Nov 25, 2012 10:14 pm ]
Post subject:  camera questions

(sorry i make so many topics just have a lot of questions and this is my best place to find answers)

so i just restarted making my game again, and i want to upgrade the way the game is viewed, how would i go about having the screens view always centered on a moving sprite, befroe i just kept the sprite in the same place and moved the backround, but thats ridiculus.


EDIT: also how do you get keyboard input from a class outside a state useing the if(input.isKeyDown(Input.KEY_WHATEVERKEY)) method, because you dont have agame container variable, should i make a new one? how does that work?

Author:  TrentonZero [ Mon Nov 26, 2012 6:59 pm ]
Post subject:  Re: camera questions


Author:  oblivion5683 [ Tue Nov 27, 2012 1:49 am ]
Post subject:  Re: camera questions

ok, thanks for replying
i actually ended up solving it by just using lwjgls method of input detection, much cleaner i think

Author:  oblivion5683 [ Wed Nov 28, 2012 12:32 am ]
Post subject:  Re: camera questions

still got the camera problem though, and thats kinda the bigger one
i dont know how to shift the screen

Author:  Liam [ Wed Nov 28, 2012 11:24 am ]
Post subject:  Re: camera questions

I think you may find this example to be particularly useful:

https://bitbucket.org/kevglass/slick/sr ... at=default

You can find the resources necessary to run this example here:

https://bitbucket.org/kevglass/slick/sr ... at=default

Author:  oblivion5683 [ Wed Nov 28, 2012 3:51 pm ]
Post subject:  Re: camera questions

hmmm, ok ill look at that

EDIT:ok i see now, im guessing that the scrolling is done by Graphics.Translate? how do i do that in another class without making a new graphics object? everytime i tyr it tells me i cant make a non static reference to a static object, but its not static.

Author:  Magn919 [ Wed Nov 28, 2012 4:38 pm ]
Post subject:  Re: camera questions

if you use Graphics.Translate() directly rather than the instance of Graphics that you get from slicks render method, you are calling it statically.
instead pass it to your own object via a parameter, just like TrentonZero explained you should do with the GameContainer object.

Author:  oblivion5683 [ Wed Nov 28, 2012 4:41 pm ]
Post subject:  Re: camera questions

hmmm, ok, i think i might get it, kinda confused still. ill try, sorry im so new to this and dont get things.




EDIT:i see the problem, renders graphics variable is being created in the render method, and so i cant use it outside of it, right?, maybe not

Author:  oblivion5683 [ Tue Dec 04, 2012 5:44 am ]
Post subject:  Re: camera questions


Author:  joki [ Mon Dec 10, 2012 9:52 pm ]
Post subject:  Re: camera questions


Author:  oblivion5683 [ Wed Dec 12, 2012 5:20 pm ]
Post subject:  Re: camera questions

thanks for replying, as for all your comments:

i will make a resource manager, thanks i didnt know about that

the unused g.toString was just a lne i forgot to delete

link.start is the method that checks all the collisions for the character and things like that. i later changed it it link.Update

also the esc thing is just mt atempt at making a pause menu, which failed and also later got deleted

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/