Jump to content

  • Log In with Google      Sign In   
  • Create Account

[java] Creating a Java Tutorial


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
23 replies to this topic

#1 ManaSink   Members   -  Reputation: 122

Like
Likes
Like

Posted 09 June 2000 - 04:20 AM

Many people say that the chances of seeing a cutting edge 3D game running in a JVM are pretty slim, and I would tend to agree. Games today are usually written in C/C++ using DirectX or OpenGL libraries. These are almost requirements for writing a cutting edge 3D game, as you need to put every CPU cycle to good use. You''ll hear a lot of similar arguments against real-time strategy games in java. How many of you have played Heroes of Might and Magic III? For those of you who haven''t you might check out the review and demo on GameSpot: http://www.zdnet.com/gamespot/stories/reviews/0,10867,2537588,00.html I thought it was a damn good game. Good graphics and sound, rock solid gameplay. Funny though, it isn''t a 3D game. It isn''t a RTS. Hmmm.... Now that I think about it, I still find myself playing old DOS games that have HORRIBLE graphics and sound compared to today''s stuff, because they are still great games. [Point coming here] Cutting edge technology is NOT a requirement of a great game, so great games CAN be written in Java. -------------------- With that being said, I would like to start up a tutorial project. The end result should be a reasonably complex java game (fun being a huge plus!) with its creation documented from start to finish. My goal is to help people new to java and java game programming get past struggling with the basics and move on to the artistic aspects of java game design. Right now I''m looking for: Affirmation that I''m not the only one interested in this... Guru''s willing to verify that my work isn''t bad advice... People interested in my advice (after Guru modification). Anyone else who might want to get involved. //Artists, sound engineers, etc. Lots of ideas and suggestions. ManaSink ManaSink@hotmail.com

Sponsor:

#2 Jerry Lynn   Members   -  Reputation: 122

Like
Likes
Like

Posted 09 June 2000 - 06:55 AM

You might want to check out the FAQ... I think you might find some affirmation there, including some examples of games developed in Java that back your statement.

http://games.cpbinc.com/faq/





#3 ManaSink   Members   -  Reputation: 122

Like
Likes
Like

Posted 09 June 2000 - 07:19 AM


I was looking for affirmation that people are interested in creation of a java specific game tutorial. I haven''t found many existing ones, and feel that another may be a good thing.

The FAQ is great, and has a link to Gamelan''s Graphical Workbench, one of the few places I *have* found a java game tutorial.

ManaSink

#4 javanerd   Members   -  Reputation: 122

Like
Likes
Like

Posted 10 June 2000 - 10:17 AM

quote:
Cutting edge technology is NOT a requirement of a great game, so great games CAN be written in Java.

I agree 100%. We used to have great games on those ancient 8-bit computers and surely the power of Java under todays average PC is many times greater than that.

If you can find the people needed for the tutorial, I'd be very interested in porting it to my own GameFrame for Java library. I've been writing some tutorials for the library on my own, but I don't yet have a full game...

What kind of a game have you been thinking?

Edited by - JavaNerd on June 10, 2000 5:18:16 PM

#5 Erik_N   Members   -  Reputation: 122

Like
Likes
Like

Posted 11 June 2000 - 12:12 AM

I''d be interested in seeing something like this expecially if it''s in Java3D. I''m currently working in java3D because it allows me to focus on the game and not on learning a new api. I learned the java3D api in a couple days with the tutorial.

Anyway I''d like too see this, expecially to see how a pro would squeeze out the performence. I have a problem I''d like to see addressed and that is a inconsistant frame frame rate. I am having the frame rate jump back and forth between two numbers and it happens for me in java2d and java3d. Also some collision tutorials and general game development on java3d are really lacking. There''s none. So I think you''ll have a market. Good luck on the tutorial,can''t wait to read it.

#6 Jim_Ross   Members   -  Reputation: 122

Like
Likes
Like

Posted 11 June 2000 - 07:02 AM

Yes, I''ve seen a few java game tutorials, but they are really... i dunno.. lacking. They don''t show you how to make a game at all. The one attempt I can think of is at east coast game''s web site. They have many tutorials on making complete games in other languages, but the java one stops after a hello world example (not a game). So I would deffinately like to make a good game and document every thing that we did, visio graphs, UML, diaries, all that good stuff.

I think people have a real fear of other people saying that their code sucks. Because there''s not a lot of code examples out there, people can''t defend sloppy code by saying "Well I just copied it from so & so, so it isn''t really mine." I''m willing to show my code and share my ideas with people who really want to step up and do something, it''s just really hard to find those people.

#7 Jerry Lynn   Members   -  Reputation: 122

Like
Likes
Like

Posted 11 June 2000 - 08:10 AM

Well, it may be a little early to mention this, but such a project as you mentioned is under way. Our web page isn't done yet because of my trip to Cancun, but I will provide a little back ground info to see if anyone is interested. Three of the four current project members are regular participants on this board (Archon, BigToe, and myself).

We are using JDK 1.3 and Forte community edition for development tools (three of the team members have JBuilder Enterprise, but the other member did not).

We are using TogetherJ white board edition for object modelling. It doesn't handle alot of what we need, such as collaboration diagrams, but it is free. I could not expect the team members to plop down $1000 bucks each for Visio Enterprise.

Our graphics API is Magician 2.1.3. Right now we are using the evaluation version for learning purposes but I have applied for a free liscense under the open source provision. The game will be using the 3D/2D hybrid technique - where game entities are 2D textures painted on 3D primitives such as boxes and spheres. The first revision of the engine used Java3D, but we discontinued that project because of NUMEROUS problems with the API. We will be *trying* to use Java sound for music and the like.

What we are going to do for code revision management is still up in the air. BigToe is working in it. jCVS is an option.

We will be posting all of our notes, diagrams, design diaries, and models. Rather or not we post the resulting engine and tools depends on how good of a job we do. If it turns out to be of decent quality I will release it to the community.

The real work won't begin until I get back from my trip(around June 25th). I still probably need one or two more developers if there are people willing to participate.

If you are interested there are some things you should know:

1 - Two of the project members are professional Java developers and two are hobbyist, but we are all amateur game developers. If you are a highly skilled game developer looking for a fast moving project you should look else where. There is going to be a step learning curve for all of the current members.

2 - You have to be willing to document the heck out of what you do. Think of this project as a research effort. To start with we will be building the engine and tools - we won't even begin on the 'game' portion until this is done. If we never end up with a working game that will be fine as long as we come out with a lot of good information and documentation.

3 - This will never turn out to be a virtual company or have any commercial value. Where are just amateurs doing this for fun.

So if I haven't scared everyone away yet please let me know if you are interested in participating by e-mailing me at jg@cpbinc.com. I leave for Cancun tommorow morning, so you may not get a response for sometime.

Edited by - Jerry Lynn on June 11, 2000 3:12:24 PM

#8 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 11 June 2000 - 11:57 AM

go for it.
as long as there is good documentation to go around this would help out all game dev''ers.

#9 ManaSink   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 June 2000 - 05:12 AM


Jerry Lynn - This sounds similar to what I was planning to put together. If your team is open-sourcing the project you should have plenty of people interested in helping(including myself).
Enjoy the sun, I''ll talk to you when you return!

Erik_N - Your frame rate problem may be related to garbage collection. What version jdk are you using? You might have better luck with a native binding library, such as javanerd''s GameFrame or Magician. IMHO, using Java3D for games can be touch and go. I think it will improve with time, but doesn''t really cut it right now.

Javanerd - I''m leaning towards a 2D iso or scroller, but will open it up for suggestions and go with the most instructional (not the most popular).

ManaSink

#10 Erik_N   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 June 2000 - 11:32 PM

Hi, my frame rate problem is probably not due to garbage collection. I think this because when garbage collection happens the rendering freezes for about 7/10 to 1.5 seconds. That's a complaint I have about java is no gc control. I would much rather have the gc keep pace with itself every frame then wait until neccessary like it does. The delay it brings in java3D is ok for me while I learn, but would be unaccecptable for a game people had to pay for. The second or so pause hurts the immersion level of the game.

Hopefully it is due to my JDK like you suggested, I have only used jdk 1.2.2 so far. This would be a reason why more people don't have this problem. Right now my frame times in my java3D project is like this. .05 seconds then .1 seconds then .05 then .1 then .05, etc.It keeps going with a pattern like this and every 60 or so frames a 1 second frame(when gc happens). Not the best.

I'm going to look into those engines. I hadn't heard about those. I'm kinda suprised I hadn't because I search for java3D sometimes just to see anything related to it. One problem I see about using another api is that Java3D is a collaboration between Sun,SGI,IBM,and Apple. That is a lot of money,power, and expertise involved so it should be far above the competetion. Apparently they're not right now but one would think they will catch up. Even still I'll check out gameframe and magician

Edited by - Erik_N on June 13, 2000 6:34:55 AM

#11 ManaSink   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 June 2000 - 03:32 AM

Erik_N,

The HotSpot runtime environment was made available in 1.2.2 and has an option for incremental garbage collection which runs GC in much smaller chunks, reducing the pauses in interactive programs. It can be downloaded for 1.2.2 (get client, not server) and comes standard in 1.3. It also speeds up initial startup time and long running code. The downside is that you will have to require the client to use it for them to see any benefit, which eliminates any applet posibilities except for the Java 1.3 plugin. (Not much of an issue if you are distributing the runtime and game code on CD, to be run as an application...)

There are a lot of things in Java3D you can do to increase performance, compiling your scene graphs if they are static, careful setting of render attributes, etc, but in general, Java3D isn''t ready for games that are render intensive. A native binding API will give you stronger performance than Java3D, but cost you platform independence. They will also not bench as fast as their C / C++ counterparts, because JNI calls are slow. If you are rigid on a 3D game, weigh your options carefully.

I don''t want to disuade you if you are set on a 3D game. Any new games done in java are a good thing . I will say that making a ''visually pleasing'' 3D game in java is going to be an uphill battle all the way, a hill that is currently too high for *me* to climb.

ManaSink


#12 Shadow Mint   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 June 2000 - 04:17 PM

Mmmm...only just stumbled onto this thread. Sounds very interesting. Java is certainly an excellent way to do platform indepenence; esp. if you dont need any real time graphics ...or rather, very high frame rates.

I started learning java um...6 months ago? but I''m interested in this project; I''ve been thinking about writing a game in java; but I keep getting side tracked by other projects.

I guess it depends; you game effort is, I trust _not_ an applet? I''m certainly hoping so, because thats more trouble than its worth (IMHO). If so, you can count me at least as an interested enhusiast. =P And if/when you need any, I do a fair amount of 2d/3d artwork.

Incidentally, I''m curious: wouldn''t it be better off to write your own 3D toolkit rather than use the java 3D? From what I''ve read its a) not very good at the moment (ie. fine but slow as) and b) not supported unless you actually download that bit; which most people haven''t.

#13 Erik_N   Members   -  Reputation: 122

Like
Likes
Like

Posted 17 June 2000 - 12:54 AM

THanks for telling me about the HotSpot JVM. I''ll look into it. I have seen links for it but like a dummy never checked it out.

ManaSink or anyone else, how far did you get with Java3D before considering it not good enough? And was speed the only reason?
The biggest problems I have are collision detection apperently doesn''t tell what part of the model hit. And I can''t find hardly any info about collision dection with this api. If I can figure this out I think I can make a decent game with this api.

Shadow Mint why do you say applet is more trouble then it''s worth? Applets a cool way to get people to look at your work, if your project is not commercial. Also it is only a couple extra lines to have your program run as a applet or application so that what I always do. If you want I''ll show you how. Also if you want to contribute art to my game that would be cool! It is a racing game and I need a lot of low poly stuff like houses, bridges, overpasses, parked cars, and other stuff to fill in the levels.



#14 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 17 June 2000 - 02:25 AM

Hey I looked at GameFrame, looks cool but I want to do 3D right now. Where is some magician links? I found a article mentioning it by bill day, but he said it went out of bussiness(this was a year ago) any all links I found to the arcane site are dead. How is it better?

#15 GKW   Members   -  Reputation: 200

Like
Likes
Like

Posted 17 June 2000 - 01:44 PM

I just downloaded the newest version of magician a few weeks ago. It is odd that the site is dead. I think opengl.org had a post on it. You might want to go through the archived news and look for the link.

#16 ManaSink   Members   -  Reputation: 122

Like
Likes
Like

Posted 19 June 2000 - 07:04 AM

Since I am not pursuing any commercial direction, all the documentation and source will be 100% public. This should be about fortifying Java game development. Professionals can lend their expertise and newbies can give ideas and learn from getting involved. I would like to see *everyone* who is not working on something serious getting involved. (If you ARE in the middle of something, don''t set it aside, *FINISH* it, then help out!)

There are two game ideas I have been kicking around:

1) 2D Action/''RPG'' in the vein of Metroid, CastleVania, Abuse, etc. Gameplay should move fairly fast, to keep things exciting. The player controls an individual who battles through rooms of monsters obtaining power-ups and defeating various bosses. Multiple weapons, armor, items are a must. All monster types should have unique AI so they ''feel'' different and different tactics will need to be learned to defeat each. Multiplayer support would be a plus.

2) Multiplayer 2D Strategy/Shooter. The players control a ship and fly around on a large map. There are two main aspects to the game: Fast paced combat with other player/AI controlled ships and tactical structure building where locations can repair upgrade your ship, attack other players, etc. There would *not* be support for multiple troops, and harvesting of resources should be *much* less critical than in current RTS games, moving focus to ship-to-ship combat and defense. I am shooting for the furious combat of Star Control with more personalized ship configuration and stronger map/environment interaction due to tactical elements introduced via buildings and natural obstacles.

I have not put together a formal design document on either because I feel everyone who wants to contribute should be involved in the brain-storming before a design doc. is set. I don''t want to start something that no one else is interested in.

Some of the questions I''d like to get out of the way:

Will this tutorial be 3D or 2D?
2D. I am not against writting 3D games, but (IMHO) Java''s current strengths do not include strong 3D support. Java3D is not very mature, both DirectX and OpenGL make heavy use of JNI calls, DirectX ties the project to Win32, and 3D in general adds the heavy burden of explaining complex 3D concepts instead of fundamental game concepts. No one suggests starting with Doom. When everyone has the simple stuff(like their classpath ) down we can get to tougher stuff.

What graphics package will you be using?
I am planning on using Java2D and Swing. Yes, I could code one from scratch. Yes, I could use an existing package. Bottom line is that using Java2D and Swing will be fairly simple. There will be no need to reinvent the wheel, no need to work with native bindings, and reasonable support on multiple platforms. Since this tutorial is about *Java* game programming, I would like to stick to Java only. Perhaps a 3D tutorial using DirectX could be made down the line.

I also understand that using Java2 and Swing is reducing my support of applets running under current browsers. I will be designing the tutorial to run as an application or as an applet under the Java2 Plugin. My main objections against coding to Java 1.1.7 are the poor performance, lack of features, and usage of a buggy depricated version of Java.


*****
That being said, let''s get some feedback from you guys and get this thing rolling...

ManaSink


#17 joeG   Members   -  Reputation: 172

Like
Likes
Like

Posted 19 June 2000 - 09:48 AM

Did someone say Metroid!!!!!!!!!!!!!!!

joeG

#18 Wrathnut   Members   -  Reputation: 400

Like
Likes
Like

Posted 20 June 2000 - 08:09 AM

Speaking of Java2 has there been any word of when the browsers are going to start supporting it in their VM?

War doesn't determine who is right, war determines who is left.

Edited by - Wrathnut on June 20, 2000 3:10:20 PM

Edited by - Wrathnut on June 20, 2000 3:11:42 PM

#19 Jim_Ross   Members   -  Reputation: 122

Like
Likes
Like

Posted 29 June 2000 - 04:06 AM

quote:
Original post by Wrathnut

Speaking of Java2 has there been any word of when the browsers are going to start supporting it in their VM?



Never. Micros~1 doesn''t seem to want to support java anymore. Netscape 6 will have 1.3 (or at least mozilla will) and so will MacOS X. I know that''s not a browser but... Mac browsers seem to be stuck with 1.0 support (no support for Component.setSize()). But as long as micros~1 holds out you won''t be able to count on anything but a browser plugin.

#20 koatto   Members   -  Reputation: 122

Like
Likes
Like

Posted 03 July 2000 - 02:40 PM

No news about the tutorial? =)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS