My first tile based side scroller

Hi everyone,

I have been practicing and learning as many of the skills necessary for this sort of a game that i can recently. I think i now have sufficient knowledge and 'skill' with java to attempt a side scroller like your typical mario bros sort of game.

Just a few questions since this will be my most ambitious programming endevour to date.

1) How do you guys normally prepare or get organised for something that you regard as a farely large program that is going to be very complicated (for your skill level)? I unfortunatly don't have any UML skills as of yet but im trying to scribble down a simple program structure anyway.

2) Im going to probably use normal text files as map files which i can read in to my game and change the characters in the text file for the images and sprites etc. So it will be easy to make new levels. I cant seem to get my head around what happens at the end of a level? Lets say my player sprite has now finished a level and i now use a loadMap() class to load the new map. What would you do for aspects like destroying objects, keeping scores, running through it all seemlessly between levels. Im not asking for you to write me massive amounts of code or anything. Just some ideas on how you guys do things like this.

3) I know this has been asked many times before but maybe you guys have found a great new resource since it was asked last. Anywhere i can get some cool free sprites and images to use. (i have the artistic skill of a 5 year old with 1 black crayon). But never fear,...Google to the rescue if all else fails

4) A few classes will be ScreenManager (handles going to and from full screen mode), Animation (handles images, times to display them etc), Sprite (updates sprites position using Animation, velocity etc), GameCore (Abstract class to initialise settings and run game loop), GameAction (mapping of keys and mouse events), InputManager (Contros input, relative mouse position, maps keys to GameActions etc), Player (adds gravity and jump ability etc to Sprite class). This is the sort of thing im trying to scribble down on paper and connect with lines and whatever i think is approprite. Any other ideas?

I know i havn't asked anything specific here but as i said this is my first 'real game' (other than pong, tetris, blockout etc) so im interested to hear how you guys do it. I guess lots of the more experienced guys could do this with little or no planning but i think im gonna need to be organised with what everything does. Ill definitly have more specific questions over the next few weeks (months?). Ill post the game when im finished so you can all see if your help has paid off :)

thanks

RisseN

[2733 byte] By [RisseNa] at [2007-9-29 19:51:55]
# 1

> 1) How do you guys normally prepare or get organised

> for something that you regard as a farely large

> program that is going to be very complicated (for your

> skill level)? I unfortunatly don't have any UML skills

> as of yet but im trying to scribble down a simple

> program structure anyway.

I don't know much about UML either (formally at least). Usually after I finish thinking out the objects and the class structure, I start thinking about their interfaces and the way they interact with each other. I write down the prototypes for the public (and package private) methods and fields I think I'll need in every class and how they will relate to each other.

> I guess lots of the more experienced guys

> could do this with little or no planning

If they're really experienced they won't do it without planning it first. There's no shame on thinking things out before you just go out and hack the code. On the contrary, it's something to be proud of.

Sounds to me like your on the right path. Don't expect though, no matter how much you plan things ahead of time, to get everything right the first time around. Be ready to refactor the application at least two or three times before you're happy with the results.

shmoove

shmoovea at 2007-7-15 21:45:36 > top of Java-index,Other Topics,Java Game Development...
# 2

Planning is a good idea, but for small informal (ie not for work) projects, I'd suggest you not bother with UML.

On paper, try making a list of what you want to have (menu, levels, high score display etc), the game elements (characters, weapons with gunshots, opponent creatures, doors, keys etc) and the best way to display them (one main display panel, several ...) and then write out what objects you need and what each one will do. This shouldn't take you long, and makes updates easy (especially if you used pencil :).

Once you've got the design on paper, be careful not to lose the page(s) and start coding.

cheers,

Andrew

outlander78a at 2007-7-15 21:45:36 > top of Java-index,Other Topics,Java Game Development...
# 3

> 2) Im going to probably use normal text files as map

> files which i can read in to my game and change the

> characters in the text file for the images and sprites

> etc. So it will be easy to make new levels

I find it easier to read pixels from an image, that way you can jsut edit it in mspaint or something. I've set up an example for you on my site [url=http://woogley.net/misc/RisseN/]here[/url]. hope it helps

Woogleya at 2007-7-15 21:45:36 > top of Java-index,Other Topics,Java Game Development...
# 4

Thanks for the advice that has been given. I have managed to write down all the classes that im going to need (that i can think of), and am now simply drawing lines that connect them to show which classes inherit from others or create and use instances of others etc. Now im going to just dive into the coding and hope for the best.

The idea from Woogley is very interesting regarding using an image instead of text files. Woogley,...the link to the source code doesn't appear to be working, cant find the file anywhere. I would definitly like to have a look through it if you manage to fix the link. (thanks for the effort on the example). Im afraid i dont understand how it works but i think after seeing the code it should be clearer.

RisseN

RisseNa at 2007-7-15 21:45:36 > top of Java-index,Other Topics,Java Game Development...
# 5
very sorry about the broken link, it's fixed now. You can download the source [url= http://woogley.net/misc/RisseN/Maze.java]here[/url]
Woogleya at 2007-7-15 21:45:36 > top of Java-index,Other Topics,Java Game Development...
# 6
hi you must be using Developing games in java, i need some help with the score part i need to show the score everytime it takes stars, any ideas?thanks.
KreTh_TICOa at 2007-7-15 21:45:36 > top of Java-index,Other Topics,Java Game Development...