JavaGaming.org

July 30, 2010, 09:36:13 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
Advanced search  
Poll
Question: Should the next Java4K (2010) contest be Applet only?
Yes, definetly! - 21 (47.7%)
I like Applets, but should not be a requirement - 18 (40.9%)
No! - 5 (11.4%)
Total Voters: 43

Pages: 1 [2]   Go Down
Print
Author Topic: Next 4K contest should be Applet only?  (Read 7544 times)
0 Members and 1 Guest are viewing this topic.
SimonH
JGO Ninja
*****
Offline Offline

Gender: Male
Posts: 685



View Profile WWW
« Reply #30 on: March 24, 2009, 08:55:32 pm »

In fact no change, other than adding better capabilities to the Java4k site to handle, host and view games.
It does make sense to allow applets, especially with 67 games! It's a bit of a chore to webstart them all...
How about an (optional?) 'play now' button for applets and a 'play in separate window' for webstart?
I always do both versions for my games anyway, but in my exp applets are generally bigger. Undecided
Logged

If you don't try Dungeonsmith,
Then try Bloodridge
Morre
Sr. Member
****
Offline Offline

Gender: Male
Posts: 460


Apocaquatic syntomy.


View Profile WWW
« Reply #31 on: March 24, 2009, 09:17:04 pm »

How about an (optional?) 'play now' button for applets and a 'play in separate window' for webstart?

I agree. This would be a good setup.
Logged

Markus_Persson
Global Moderator
JGO Kernel
*****
Offline Offline

Gender: Male
Posts: 2083


Mojang Specifications


View Profile WWW
« Reply #32 on: March 25, 2009, 01:22:35 am »

Does using applets do that too now? I realised it that applets are now the second comming of god but more accessible too - awesome.

Er, yes, absolutely. Applets definitely make games more accessible than webstart does, no question about it.

I don't really understand why people are so much against making java4k applet only, as applet versions of my 4k games usually are significantly smaller, have fewer weird issues (like not having to worry about the location of the frame or the size of the frame decorations), and it would make for a really awesome looking compo site where hundreds(!) of games could be immediately played without installing anything on your machine.
Logged

Play Minecraft!
Markus_Persson
Global Moderator
JGO Kernel
*****
Offline Offline

Gender: Male
Posts: 2083


Mojang Specifications


View Profile WWW
« Reply #33 on: March 25, 2009, 01:25:26 am »

2. The init method replaces the constructor method.

Unfortunately, this isn't true. The constructor is mandatory. If you don't write one yourself, the compiler will add one for you. So putting code in the constructor is pretty much free.
Logged

Play Minecraft!
kevglass
Guest
« Reply #34 on: March 25, 2009, 01:39:15 am »

Quote
I don't really understand why people are so much against making java4k applet only, as applet versions of my 4k games usually are significantly smaller, have fewer weird issues (like not having to worry about the location of the frame or the size of the frame decorations), and it would make for a really awesome looking compo site where hundreds(!) of games could be immediately played without installing anything on your machine.

It's about choice. I for instance did all my games as Applets this year, why, because I hadn't before. It gave me a chance to try something else. Adding rules that take options away from people when it's not part of the challenge of the contest is just limiting developers experience.

If as Riven suggested the contest is now about making the best and most accessible collection of games to show off Java to the rest of the game development world - then I can understand why having a consistant deployment approach makes sense. And yes, the site would be very pretty. However, thats not what I thought the contest was for. I'm not interested in showing the rest of the world Java, I thought it was just for fun.

Kev
« Last Edit: March 25, 2009, 08:23:25 am by kevglass » Logged
pjt33
JGO Ninja
*****
Offline Offline

Posts: 599


View Profile
« Reply #35 on: March 25, 2009, 01:41:42 am »

I must admit I thought there would be more of an overhead using applets than what both Morre and Ranger are saying. However, even a few bytes can make all the difference when it comes to the crunch! (I felt really bad about commenting out my "setResizable(false);" line in my application, but I couldn't get the last few bytes I needed any other way!  Shocked)
Learn Jasmin. I switched to disassembly of my class file and manual tweaks in Jasmin at the very end of development because I couldn't get the last 5 bytes any other way, and ended up saving something like 60 bytes.

Quote
I agree. It would be great to see an applet template, preferably with some comments about why methods like isActive() need to be called and when.
There is an applet template somewhere on this board, because I borrowed from it.
Logged
Paladin
JGO n00b
*
Offline Offline

Posts: 15


View Profile
« Reply #36 on: March 25, 2009, 02:23:35 am »

Learn Jasmin. I switched to disassembly of my class file and manual tweaks in Jasmin at the very end of development because I couldn't get the last 5 bytes any other way, and ended up saving something like 60 bytes.

I think I might. I was optimising my symbol table and code as much as I could by hand (my walls are pi unit high because I couldn't afford an extra double to store my desired height of 3!) and I kept bumping up against the way the various optimisers would do things.

Plus, writing games in bytecode takes me back to the first games I ever wrote... 4C 00 03 6D 89 57... Those were the days...  Cool
Logged
pjt33
JGO Ninja
*****
Offline Offline

Posts: 599


View Profile
« Reply #37 on: March 25, 2009, 02:56:05 am »

(my walls are pi unit high because I couldn't afford an extra double to store my desired height of 3!)
That's precisely the example which got me about half of my savings: an iconst/bipush/sipush followed by i2d is much better than storing a double with integer value in the constant pool. Another useful one was situations where your constant pool contains methods A.foo(args) and B.foo(args) and B extends A. Call dispose() on a reference of type Graphics2D and on another reference of type Graphics and you end up with wasted space which Proguard doesn't recover.
Logged
userek
JGO n00b
*
Offline Offline

Posts: 49


View Profile
« Reply #38 on: March 25, 2009, 08:10:35 am »

I think its a good idea in theory, but in practice we all know that applets sux and webstat is a failed attempt to replace them Wink(honelsty i haven't seen any webstat on any website not related to java developent). I really can't understand why is so difficult to improve loading experience and stop random browser crashes. That is the real issue, not the jre download size and sun doesn't seem to understand it, but that is a bit off topic.  I'm fine with the applets only contest, the games could be embeded in java4k.com site and thats a good idea (as long as they don't crash the browser of course).
 
Logged
trembovetski
JGO Strike Force
******
Offline Offline

Gender: Male
Posts: 954


If only I knew what I'm talking about!


View Profile
« Reply #39 on: March 25, 2009, 08:54:06 am »

That's precisely the example which got me about half of my savings: an iconst/bipush/sipush followed by i2d is much better than storing a double with integer value in the constant pool. Another useful one was situations where your constant pool contains methods A.foo(args) and B.foo(args) and B extends A. Call dispose() on a reference of type Graphics2D and on another reference of type Graphics and you end up with wasted space which Proguard doesn't recover.

For reference, nothing bad will happen if you don't call Graphics.dispose()  - at least in the current implementations (that I know of).

Dmitri
Logged
pjt33
JGO Ninja
*****
Offline Offline

Posts: 599


View Profile
« Reply #40 on: March 25, 2009, 12:11:35 pm »

For reference, nothing bad will happen if you don't call Graphics.dispose()  - at least in the current implementations (that I know of).
I'll bear that in mind next year. Thanks.
Logged
Abuse
JGO Kernel
*********
Offline Offline

Posts: 1783

falling into the abyss of reality


View Profile
« Reply #41 on: March 25, 2009, 04:56:06 pm »

Er, yes, absolutely. Applets definitely make games more accessible than webstart does, no question about it.

I don't really understand why people are so much against making java4k applet only, as applet versions of my 4k games usually are significantly smaller, have fewer weird issues (like not having to worry about the location of the frame or the size of the frame decorations), and it would make for a really awesome looking compo site where hundreds(!) of games could be immediately played without installing anything on your machine.

The only reason I voted against Applet-only is because of the design constraints it imposes upon the type of games you can make.
Looking back at past games, if fullscreen mode/DisplayMode switching or Robot manipulation were unavailable several excellent games would not have been possible.

However, you're argument regarding presentation of the competition as a whole is a convincing one.

So, just for the record -1 for "No!" and +1 for "Yes!"
Logged
Ranger
Sr. Member
****
Offline Offline

Gender: Male
Posts: 313


Vroom!


View Profile
« Reply #42 on: March 25, 2009, 05:20:04 pm »

Unfortunately, this isn't true. The constructor is mandatory. If you don't write one yourself, the compiler will add one for you. So putting code in the constructor is pretty much free.

Damn!  ...err, with Applets you don't need a setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) call, or a main(String[] args) method!  Grin
Logged
Markus_Persson
Global Moderator
JGO Kernel
*****
Offline Offline

Gender: Male
Posts: 2083


Mojang Specifications


View Profile WWW
« Reply #43 on: March 26, 2009, 02:25:24 am »

The only reason I voted against Applet-only is because of the design constraints it imposes upon the type of games you can make.
Looking back at past games, if fullscreen mode/DisplayMode switching or Robot manipulation were unavailable several excellent games would not have been possible.

Ah, yes. Fair enough. =)

I've changed my opinion to "let people do whatever they wish, but make it easy to host and play applets and webstartable apps directly from the competition site". Perhaps even with a "make applets the officially preferred method of deployment".
Logged

Play Minecraft!
Morre
Sr. Member
****
Offline Offline

Gender: Male
Posts: 460


Apocaquatic syntomy.


View Profile WWW
« Reply #44 on: March 26, 2009, 02:42:49 am »

Yeah, this seems to be the best solution right now. But I do think it's important to keep the actual applet on a separate page (as in, after clicking a "Play!" link). If one doesn't do that, they might have an unfair advantage over webstarted games.
Logged

pjt33
JGO Ninja
*****
Offline Offline

Posts: 599


View Profile
« Reply #45 on: March 26, 2009, 04:08:56 am »

Yeah, this seems to be the best solution right now. But I do think it's important to keep the actual applet on a separate page (as in, after clicking a "Play!" link). If one doesn't do that, they might have an unfair advantage over webstarted games.
I don't really understand this stuff about unfair advantages. Surely it's only relevant if the judging is based on number of people who played the game?
Logged
irreversible_kev
Full Member
***
Offline Offline

Posts: 172



View Profile
« Reply #46 on: March 26, 2009, 04:15:40 am »

if fullscreen mode/DisplayMode switching or Robot manipulation were unavailable several excellent games would not have been possible.

I haven't checked, but fullscreen and Robot use can be done in Applets can't it? It just pops up a security dialog like WebStart would.

One restriction though, is that each Applet would really need to be of the same dimentions. I. E. 640x480 or something, so that they embed well in the site. This really isn't that much of an issue I would bet though - especially as most of the WebStarted 4k games I have played "break" when you resize the window.
Logged
Markus_Persson
Global Moderator
JGO Kernel
*****
Offline Offline

Gender: Male
Posts: 2083


Mojang Specifications


View Profile WWW
« Reply #47 on: March 26, 2009, 04:39:31 am »

Yeah, this seems to be the best solution right now. But I do think it's important to keep the actual applet on a separate page (as in, after clicking a "Play!" link). If one doesn't do that, they might have an unfair advantage over webstarted games.

See, I'd consider that a good incentive for people to use the preferred deployment method. Wink
Logged

Play Minecraft!
DzzD
JGO Kernel
*********
Offline Offline

Gender: Male
Posts: 1719



View Profile WWW
« Reply #48 on: March 26, 2009, 08:15:31 am »

http://www.javagaming.org/index.php/topic,20044.0.html

you should read the foolowing with a background music with bass Smiley Applet ! , Applet !, Applet ! , Applet !, Applet ! , Applet !, Appppletttt!
« Last Edit: March 26, 2009, 08:18:07 am by DzzD » Logged

Pages: 1 [2]   Go Up
Print
 
Jump to: