Jump to content

  • Log In with Google      Sign In   
  • Create Account

[java] Some help getting started


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
4 replies to this topic

#1 wikidsmot   Members   -  Reputation: 122

Like
Likes
Like

Posted 04 May 2000 - 04:45 AM

I''m trying to develop a top view 2D tile based RPG game and I''m a little lost at where to begin. I know java, some C/C++ and I recently purchased "Black Art of Java Game Programming", read through it an thoroughly understand it. I currently have a game written in java-script up on my site: http://ultimate-end.net(requires IE 4.0+) and I''m trying to figure out a way to translate it to java while using solid object oriented design principles. I had a good idea about how to do it using the book I purchased and it''s Sprite hierarchy when I ran into a snag. The book doesn''t do anything that deals with drawing out an managing a 2D map. I was thinking of creating a GridSprite class that would contain small areas of the world, and be responsible for drawing all other sprites within it. All the GridSprites would, in turn, be contained in a WorldSprite class of somesort. And all of this would be managed by WorldManager class, which would be managed by the actual applet called GameManager. Does this seem like a good approach? Any tips, algos, source code for drawing out a map? Also I plan to handle collisions with an Intersect interface. All objects that could possibly get in the way of your character while moving around the screen would implement this. I have found, however, that this would be unfeasable or rather just not good, when dealing with coastlines, trees or other non unique terrain features. I''ve read through lots of online material but I haven''t found a place yet with a good starting point. Any help would be greatly appreciated.

Sponsor:

#2 Jerry Lynn   Members   -  Reputation: 122

Like
Likes
Like

Posted 04 May 2000 - 06:16 AM

I hate to answer you by pointing you to another book, but it answers all of your questions (I think its only like $20) - Also includes some decent source code to work with.

Java Game Programming for Dummies: Wayne Holder Dummies Technical Press Staff Format: Paperback, 1st ed., 359pp.; ISBN: 0764501682; Publisher: IDG Books Worldwide; Pub. Date: January 1998

I am also working on a section for the FAQ about 2-D tile engines, but its going to be some time before I have anything to post. I wish my real job wouldn't keep getting in the way of doing important stuff = )

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

Edited by - Jerry Lynn on 5/4/00 12:18:32 PM

#3 Captain Goatse   Banned   -  Reputation: 100

Like
Likes
Like

Posted 04 May 2000 - 07:07 AM


quote:
Original post by Jerry Lynn

I hate to answer you by pointing you to another book, but it answers all of your questions (I think its only like $20) - Also includes some decent source code to work with.

Java Game Programming for Dummies: Wayne Holder Dummies Technical Press Staff Format: Paperback, 1st ed., 359pp.; ISBN: 0764501682; Publisher: IDG Books Worldwide; Pub. Date: January 1998

I am also working on a section for the FAQ about 2-D tile engines, but its going to be some time before I have anything to post. I wish my real job wouldn''t keep getting in the way of doing important stuff = )

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

Edited by - Jerry Lynn on 5/4/00 12:18:32 PM


What does it actually tell about making scrolling 2D enviroment? Like you can see from my last posts I''m lookin for decent tiledrawing algorithm and I became really interested about this book. Also, is there anyway to get it''s scurce instead of buying it?


Time comes, time goes and I only am.

#4 Jerry Lynn   Members   -  Reputation: 122

Like
Likes
Like

Posted 04 May 2000 - 08:30 AM

This is the web site for the book:

http://www.dummies.com/cgi/fill_out_template.pl?book:0-7645-0168-2:book-Dummies+Press::u444

It might give you a better idea of what''s in the book (there is a chapter list and some sample chapters). The source code is not available from the web site : (

They have an entire 2-D engine in the source code in addition to chapters on collision detection (with source).

There are some draw backs. Most of their code is fairly simple (Actually the code from the section on event handeling is fairly good). Most of it might serve as a good base but would require a lot of extension work (they do offer some suggestions on how to extend, but leave it as an exercise for the reader).

Another problem is that all of the code is written as an applet using standard AWT graphics (the more advanced graphics API weren''t really available when it was written). You would probably have to spend a lot of time porting the graphics routines to Java 2D or some other API.

#5 Jim_Ross   Members   -  Reputation: 122

Like
Likes
Like

Posted 05 May 2000 - 03:07 AM

Very good book that is, but no code what-so-ever about 2d scrolling maps. Don't buy it if you already have black art of java game programming. To make a large 2D map, you can have SpriteTile objects that have information about what picture to display and what not. Put all these objects into a linked list. Then have another class, or just a function of your game engine go through that list and pull out the tiles that need to be displayed right now. You can call the class Viewport and have it's only purpose be to keep track of the offset of the visible area to one corner of the map.

Edited by - Jim_Ross on 5/5/00 9:09:28 AM




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