How do I create a 2D game "camera" to follow player?


Posted on 16th Feb 2014 07:03 pm by admin

In J2ME programming I'm targeting MIDP 2.0 devices.

I'm using gamecanvas and I was thinking that I could create my full world (640 x 480) using a TiledLayer and then set the refpixel of the TilerLayer to the bottom right (thats where the player is going to start) and then draw it on the game canvas which I was thinking would be the full width/height of the phone screen. I can do this right?

Did you know?Explore Trending and Topic pages for more stories like this.
Now my real question is... (yes I googled it but couldn't find it!) how do I get a camera like effect? Basically I want the psychical display to follow the player around in a world that is larger than the psychical display. Could I set the game canvas ref pixel to be center with my player?
No comments posted yet

Your Answer:

Login to answer
234 Like 17 Dislike
Previous forums Next forums
Other forums

Alternate messaging
I have 4 strings in MySQL db1

$string1 : Hello
$string2 : Hi
$string3 : Great
$strin

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

Solution to the FindControl problem
I have seen may posts about having problems with the FindControl method. Most seem to come about bec

Help with syntax
Hi all!

The $bridge variable is not getting passed while it is contained in the line below:

C problem struct and string
Hi guys,

This is my first post and I'm hoping the experts here can help me solve my problem.<

post to self
Trying to get my form to submit to itself. However I am also trying to use an image for my submit bu

Doubles are giving me problems
Ok so, first of all i made a double = 0.05, but when running the debugger it shows up as 0.04999. I

How to assign a textbox value to PHP variable??
Hi ! Can any one help me out as quickly as possible. As I m new to PHP.
Plz tell me how to assign

moving mouse to display image coordinates
I have an existing MFC application that shows an image in the main window.
I'd like to be able to

Parse error: syntax error, unexpected $end in
hello,
i receive the error :Parse error: syntax error, unexpected $end in C:xamppxampphtdocsh

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash