Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: [Game] How do i make a camera.class?

  1. #1
    Junior Member
    Join Date
    Jul 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default [Game] How do i make a camera.class?

    Hello i am making a game like pokemon and im am stuck on how to scroll the map I have used g.translate(offsetX,offsetY); but if i want to add ai's later on to follow the player it would not work well
    can someone help me out?

    if you can add me on skype : tommohawkaction
    thanks


  2. #2
    Member Ada Lovelace's Avatar
    Join Date
    May 2014
    Location
    South England UK
    Posts
    414
    My Mood
    Angelic
    Thanks
    27
    Thanked 61 Times in 55 Posts

    Default Re: [Game] How do i make a camera.class?

    Are you talking about a "Player" camera? One that focuses on the
    player of the game (can be moved by the player to look in different
    directions) or an A.I script that would know where the player is or
    could be going to based on the camera location?

    Wishes Ada xx
    If to Err is human - then programmers are most human of us all.
    "The Analytical Engine offers a new, a vast, and a powerful language . . .
    for the purposes of mankind
    ."
    Augusta Ada Byron, Lady Lovelace (1851)

  3. #3
    Junior Member
    Join Date
    Jul 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: [Game] How do i make a camera.class?

    Quote Originally Posted by Ada Lovelace View Post
    Are you talking about a "Player" camera? One that focuses on the
    player of the game (can be moved by the player to look in different
    directions) or an A.I script that would know where the player is or
    could be going to based on the camera location?

    Wishes Ada xx
    Hello Ada I mean a Player camera here is what my game is so far test I have made the map move by g.translate(xpos,ypos); however the player does not physically move what will make it hard to do ai so can you help me out.

    I want to make a nice camera for the player thanks

  4. #4
    Member Ada Lovelace's Avatar
    Join Date
    May 2014
    Location
    South England UK
    Posts
    414
    My Mood
    Angelic
    Thanks
    27
    Thanked 61 Times in 55 Posts

    Default Re: [Game] How do i make a camera.class?

    Java Game Programming in general is not something I know
    much about - however, have you searched for any of the Java
    game library documentations? There are two major gaming libraries
    that you can use - I believe Cornix (a member here) knows what they
    are actually called. Send him or one of the forum moderators a private
    message about it.

    In particular - the forum GameDev has some experienced programmers
    on the site - I know they specialize in C/C++ but some do Java in games
    too.

    Wishes Ada xx
    If to Err is human - then programmers are most human of us all.
    "The Analytical Engine offers a new, a vast, and a powerful language . . .
    for the purposes of mankind
    ."
    Augusta Ada Byron, Lady Lovelace (1851)

  5. #5
    Junior Member
    Join Date
    Jul 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: [Game] How do i make a camera.class?

    Quote Originally Posted by Ada Lovelace View Post
    Java Game Programming in general is not something I know
    much about - however, have you searched for any of the Java
    game library documentations? There are two major gaming libraries
    that you can use - I believe Cornix (a member here) knows what they
    are actually called. Send him or one of the forum moderators a private
    message about it.

    In particular - the forum GameDev has some experienced programmers
    on the site - I know they specialize in C/C++ but some do Java in games
    too.

    Wishes Ada xx
    Thanks its really annoying no one can help me on any fourms thanks though

  6. #6
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: [Game] How do i make a camera.class?

    Thanks its really annoying no one can help me on any fourms
    You may have a great idea, but you have not communicated it well and asked a question that is understood by a programmer experienced in the same area. Spend more time researching, studying, and trying things until you have the experience and language necessary to talk at a level nearly equivalent to the skill level required to do what you imagine. It's frustrating, but hang in there and keep working at it.

  7. The Following User Says Thank You to GregBrannon For This Useful Post:

    Ada Lovelace (July 27th, 2014)

  8. #7
    Senior Member
    Join Date
    Jul 2013
    Location
    Europe
    Posts
    666
    Thanks
    0
    Thanked 121 Times in 105 Posts

    Default Re: [Game] How do i make a camera.class?

    Can you define what a "Camera" is?
    What kind of graphics libraries do you use? What kind of view? 2D, 3D, virtual reality?

    With as little information as you have given its no wonder that nobody can give you a definite answer.

Similar Threads

  1. Trying to make a Risk game, but I got stuck on the Hand class.
    By geeksutopia in forum What's Wrong With My Code?
    Replies: 33
    Last Post: April 30th, 2014, 09:43 AM
  2. Replies: 10
    Last Post: October 20th, 2013, 06:35 AM
  3. need to make basic class and implementation class (base class without void main)
    By javanewbie101 in forum Object Oriented Programming
    Replies: 1
    Last Post: September 19th, 2012, 08:03 PM
  4. [SOLVED] How to make a class be static if it's the main class.
    By javapenguin in forum What's Wrong With My Code?
    Replies: 18
    Last Post: January 10th, 2012, 05:14 AM
  5. trying to make game
    By knoxy5467 in forum Java Theory & Questions
    Replies: 3
    Last Post: June 20th, 2011, 09:26 AM