Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
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  
  Basic 3D Questions  (Read 871 times)
0 Members and 1 Guest are viewing this topic.
Offline jsparger

Junior Newbie





« Posted 2009-08-04 22:05:54 »

Hi guys. I'm starting to program an online game in java with a friend. We have started to set up the Databases for the Server and all that good stuff as well as begin on the client. Hooray for us.

My question is actually about graphics. We have decided to make the graphics for our Game along the lines of those used in the final fantasy games of the 90's -- painted static backgrounds that are 2D, but with the character moving on an invisible 3D terrain that matches the pictures so it appears as though he is actually walking on them (at least that's what it looked like they did to me). Think about how cool some of those backgrounds were in final fantasy VII and how you got the depth of the 3D with the extremely great aesthetics of a great artist's painting of the scene.

Anyway, the questions stem from me having no knowledge of 3D. I would like to know what the basic terminology and interfaces are so I can read about this stuff and learn.
--------------
1) Is there a name for this kind of mixing of 3D world and 2D graphics?

2) What is the actual 3D terrain called?

3) Where do you store what parts of the world are hard and soft or cause some action to occur, like slipping on ice, going up a ladder, moving into another model etc? Do you have to keep track of that separately based on the character's position, or can that be stored in the 3D model, like links to code? If so, what is that called?

4)How do you interface a 3D model with the Java code? I know how to make a flat little picture of a man walk around on the screen, but I have no idea of how to keep track of a player's position on a model, let alone try to use the model directly to display images in Java.

5) How do you make the player follow the terrain? Is that simply called terrain following?

6) I have downloaded Blender, free = good for me. Will I be able to do this type of thing in Blender?

7) I know Blender has a game engine, but I really don't have any clue what that means. I don't mind coding large quantities of my own stuff in Java. In fact that is the point, since this is meant to be a learning experience. Do I need a big complicated engine to work with 3D or can I code some stuff to work directly with the 3D model?
------------

If you guys could spare a minute or two to explain some of the important basic terminology for this type of endeavor, maybe recommend some websites or books, etc I would really appreciate it. Since I don't know anything about this, I probably asked the wrong questions. If I can learn just a little bit here, I will know what to search for so I can learn more on my own and be able to ask more specific questions.

I am confident that we can get something cool on the screen with enough patience and that we'll be better programmers by the end of it, too.

Thanks for the help
--John
 
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #1 - Posted 2009-08-04 23:42:53 »

1) Is there a name for this kind of mixing of 3D world and 2D graphics?
Not that I know of, but it's pretty commonly done. I myself am doing it in a professional game, and got some help with it from the users here at JGO. Depending upon your background and the information you have about it, it can be difficult or easy to make the 3D objects match it.

2) What is the actual 3D terrain called?
I don't think there's any specific name, but I would maybe call it your path map or your path data. Whatever floats your boat. The "invisible" map you're referring to is not a map at all, it's data that determines the elevation and size of different areas, what can be moved through, etc.

3) Where do you store what parts of the world are hard and soft or cause some action to occur, like slipping on ice, going up a ladder, moving into another model etc? Do you have to keep track of that separately based on the character's position, or can that be stored in the 3D model, like links to code? If so, what is that called?
That would all be part of the path data. On a simplistic 2D level, it could be a 2D array that contains data for grid spaces - whether that space can be walked through, is hard or soft, etc. You want to think of all this in a OO (Object Oriented) fashion. If you've got a smart importer written I'm sure you could somehow make a level in a 3D modeler and then generate all the data using the geometry / textures, but that's way unnecessary when you can just specify each piece as you wish.

4)How do you interface a 3D model with the Java code? I know how to make a flat little picture of a man walk around on the screen, but I have no idea of how to keep track of a player's position on a model, let alone try to use the model directly to display images in Java.
This sounds like a convoluted question to me, implying that you don't really understand Java or OO programming too well. Typically you would want an Object (let's call it Player) that contains position information, a reference to a model file, and any other relevant information. Then you tell that Player to draw itself by calling a method it has.

5) How do you make the player follow the terrain? Is that simply called terrain following?
Again, I don't know if there's a specific name for this, but either way this is a complicated question and it all depends on what you really want anyway. If you have elevation information (Z-height at any given X/Y) then you can just set the player's Z to match whatever the model has at that X and Y. If you're putting it on a 2D background, however, then it's unlikely you will ever change the Z - instead you can just use tricky resizing to make different parts look okay (via tweaking only). Once again, this information will be part of your path data.

6) I have downloaded Blender, free = good for me. Will I be able to do this type of thing in Blender?
I think so? I know Blender has some sort of programming language attached to it, and you can at the very least create and generate professional-quality models.

7) I know Blender has a game engine, but I really don't have any clue what that means. I don't mind coding large quantities of my own stuff in Java. In fact that is the point, since this is meant to be a learning experience. Do I need a big complicated engine to work with 3D or can I code some stuff to work directly with the 3D model?
Take a look at jMonkeyEngine, which will handle a lot of the complicated stuff for you. You will probably want to use either Blender or Java for your game code. Blender can be used to generate your models, then you can import them into your Java game using jME.

If you guys could spare a minute or two to explain some of the important basic terminology for this type of endeavor, maybe recommend some websites or books, etc I would really appreciate it. Since I don't know anything about this, I probably asked the wrong questions. If I can learn just a little bit here, I will know what to search for so I can learn more on my own and be able to ask more specific questions.
It's not that you're asking the wrong questions, it's that you're in over your head. You should learn the basics of programming a game long before you ever move into the (much more difficult) territory that is 3D and worrying about terrain height and all that jazz. Get a 2D sprite moving around the screen with Java2D first, then throw that into a game of some kind, maybe a clone of Space Invaders or something. Start simple, then slowly build up. When you finally understand the principles behind most things (which will probably take you like a year), then you can move onto make 3D.

The technology and approach you use is irrelevant, in the end. What's really important is just that you know how to make a game, then the rest follows based on the design you have in mind.

See my work:
OTC Software
Offline jsparger

Junior Newbie





« Reply #2 - Posted 2009-08-05 02:30:46 »

Thanks for the advice!

I actually am not too bad at programming, and like I said, I can make a 2D object move around the screen and do stuff just fine. I have made Space Invaders before, and learned a lot doing it.

I will admit that I am over my head with the 3D, since I don't know anything about it. But I get the whole OO thing, and I guess my question of how to interface the model with the Java was a question of, well, how to interface the model with the java. I don't really know how I can say read(3DModel.extension) and import the data.

Nor do I know what type of model to use -- as in which type of file or file extension, what type of mapping or whatever to do--I'm sure you probably don't use the same type of 3D data to model a component to be cut with a CNC as you do when making an animation for a Movie as you do when you make a game terrain -- nor the data types I should be trying to make in Blender.

I also don't know what the form of the data is, as in the structure. I am familiar with using java to read from very large data sets. Do I just read in a 3D model file like I would a binary file and store that in my Java program just keeping track of my player's x, y, and z and checking their moves against a database of possible positions which i determine from my 3D model, or do I use the 3D model in a different environment and let it return an image for me to print that will compile the pieces together?

If I so chose, I suppose I could do all this with a huge nasty matrix which I create low-tech style for each area of my game, but I know that's not how it is really done. I know nobody uses MS paint to draw topology and hardness and convert those bytes into a matrix of level data, they make some kind of 3D terrain in an editor like Blender and then import that data into the game.

I'm not planning to make a Final Fantasy in the first go around. I'm not even planning to make a real game on the first go around. I just want to write good, solid code that is very modular and will be useful if we want to really put time and effort into making graphics and writing event scripts. I want to be able to have a few friends log on to the server and be able to walk through a few screens and talk to each other in game. Just some basic stuff game stuff that I'm really not too scared of. The real hang-up is the 3D, because neither I nor my friend have any 3D graphics experience. I am not afraid to screw stuff up a few times or wade through tutorials, books, and source code if need be. But I don't think that just because I don't understand how 3D works that I am totally over my head. Hundreds of games get made every year. Some suck, some are good, but if Bob and Joe can make a 3D game, John can probably make one, too, regardless of the perceived quality of the end result.

I appreciate the advice. Can you give me some more specific responses so I can start learning? I'm going to play around with Blender this week, but I would hate to waste my time on the wrong thing, and I can't really write the Graphics Engine (or so I am calling it) for my game until I know how I can use the 3D data once I have created it.

Thanks
--John
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #3 - Posted 2009-08-05 17:00:01 »

All right, apologies on jumping the gun and calling you an amateur so quickly.

I think the best route for you to go is definitely jMonkeyEngine, which I referenced above. It already includes many of the functions you're looking for, plus a lot more. It can handle both model loading and collision, no problem. So give it a look, try out their example projects, then go from there. Blender isn't a waste of time, you can export your Blender models and animations into jME very easily.

See my work:
OTC Software
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Riven (13 views)
2014-07-29 18:09:19

Riven (10 views)
2014-07-29 18:08:52

Dwinin (10 views)
2014-07-29 10:59:34

E.R. Fleming (28 views)
2014-07-29 03:07:13

E.R. Fleming (10 views)
2014-07-29 03:06:25

pw (40 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (27 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org 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‑gaming.org
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!