Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

RPG layout...(role playing game)

 
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, I realize that you usually would have to have a game programming language/script that would allow you to do the advanced graphics thing.

But I was wondering if I were to approach the design of a "world" in which a character could move around on, how would I go about doing this in java?

I just dont understand I guess the concept of your character being in a small window, but there's a bigger world around you. I don't understand it programming wise that is.

I mean, would you have to make your own coordinate system, and pre-plan every step of the character to know what he/she will see around her?

For example:

say my character is at point 0,0 and at point 30,100 you can see a vague silohuette of a certain mountain.

is this how it would work not only logically but in programming?

I've tried to achieve this in a JFrame, but I dont see how to do it.

If anyone could give me a link or maybe a book that goes over this concept in general, not just java specific, would be awesome.

Thanks a bunch,

Justin Fox
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have a ton of time right now but just to get you pointed in the right direction trying to achieve a 3D world in a JFrame is going to be a major pain. You'd be better off using a 3D API where all abilities to move around in 3D space is already done for you. Here are a few options. Google them as I am not putting them as links. They are easy to find.

LWJGL
JOGL
Java3D
JMonkeyEngine
Xith3D

And if it is just 2D you are looking for try something like

Slick.

[ January 10, 2008: Message edited by: Gregg Bolinger ]
[ January 10, 2008: Message edited by: Gregg Bolinger ]
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Greg,

I'll definately look into those.

Justin Fox
 
"Don't believe every tiny ad you see on the internet. But this one is rock solid." - George Washington
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic