Suggestion - Applet template

As there is already a discussion about changing the rules a little bit to add an highscore feature I guess it could be a good time to suggest it.

Making the applet core code is always a subject of discussion every year. So how about a simple template like this that would do all the dirty job for you.

import java.awt.Graphics2D;

public class MyApplet extends J4kApplet{
	
	public void init(){
		
	}
	
	public void update(int deltaTime){
		
	}
	
	public void render(Graphics2D g){
		
	}

}

The programmer just have to fill these method and doesn’t have to worry about the gameloop, making input listener, etc. The J4kApplet would be a class host on the server and everyone could use it (just adding a ressource tag in the html page). The J4kApplet class wouldn’t count in the 4k limit.

Ok that was the idea. It kinda breaks the 4k rule but it give more freedom to do your game (with the extra bits).

I’d rather just copy/paste a code template and fill it in. That way I have something self contained. But it is a pretty good idea.

I think the highscore support was quite undermining the spirit of Java4K already.

I’d vote ‘no’, because if we keep adding support for convenient things like this, we’re pretty much creating a new platform. Getting the core right in an applet is part of the contest: it takes valuable space, and should not be taken out of the ‘byte pool’ we have, or everybody would be forced to use this new platform, if only to save space.

I agree with Riven. Such a base would make everyone’s coding efforts easier, but it goes against the spirit of the contest. Though, if we do end up with such a platform, throw in some Slick or LWJGL.

+1

I agree with Riven & co… plus its not always possible to separate update & rendering logic without incurring extra overheads - such as requiring class local variables. just my 2 cents.

[edit: “hi” to everyone by the way! have been lurking on here for a wee while :slight_smile: ]

A 4K game will work still be a game without the highscore, therefor I don’t mid that little bit of cheat. However removing the core part of the game will kill the game. Having a template for beginners to use is however a good idea. Feel free to improveand add stuff on
this wiki
and maybe motivate it here.