Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Super noob needs slick 2d camera help!  (Read 5680 times)
0 Members and 1 Guest are viewing this topic.
Offline wasoup

Innocent Bystander

« Posted 2012-06-19 02:48:04 »

So I just completed the slick2d tutorials that bucky from the newboston on youtube uploaded. To make the character move he had the actual backround move on his game instead of the character. With this is don't see how I can expand on his code and try to add my own monsters. I am realizing that I will need a camera that follows the character. Can anyone point my in the right direction as how to create this camera.
Offline Z-Man
« Reply #1 - Posted 2012-06-19 02:58:48 »

With the kind of design your talking about EVERYTHING moves except for the character. You basically move the world (enemies, items, the map) around the player to make it look like the player is moving. So, move the enemies around independently, but when you move the map make sure you move the enemies by the same amount so the map doesn't move out from underneath them. For example, if you move the map 1 space to the right, you would move all the enemies one space to the right as well.
Offline ra4king

JGO Kernel

Medals: 508
Projects: 3
Exp: 5 years

I'm the King!

« Reply #2 - Posted 2012-06-19 03:54:46 »

This doesn't belong to the Java2D forums, a mod should move this.

Pages: [1]
  ignore  |  Print  

EgonOlsen (78 views)
2018-06-10 19:43:48

EgonOlsen (58 views)
2018-06-10 19:43:44

EgonOlsen (78 views)
2018-06-10 19:43:20

DesertCoockie (260 views)
2018-05-13 18:23:11

nelsongames (158 views)
2018-04-24 18:15:36

nelsongames (157 views)
2018-04-24 18:14:32

ivj94 (899 views)
2018-03-24 14:47:39

ivj94 (162 views)
2018-03-24 14:46:31

ivj94 (812 views)
2018-03-24 14:43:53

Solater (177 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!