Blast 4k

My contribution to the Java4K battle.

Think I am gonna call it Blast! Not sure it is a blast, but you get to blast a bunch of blobs away anyway, and that just can’t be wrong. 8) Slightly inspired by Backlash on the Atari ST. It is a 1st person view of a flat playingfield invaded by a bunch of blobs. At the same time there is a topdown view radar displayed centred around your crosshair. A bit confusing maybe at first, but quite intentional. The more you shoot the trickier it will be to have a look at the radar. New blobs are spawned all the time, so you better start blasting blobs right away.

Coded the game in one afternoon and wasted a full day in getting the size down from 9K to 4K… Really cool with the compo and getting to see many new games, but a PITA to waste so much time on making the code uglier and slower, just to shoehorn it in to 4K…:stuck_out_tongue:

Hope the game can be a good distraction from work. :wink:

Feedback would be greatly appreciated.

New version with mouse support:
http://valhallawebdesign.com/Joakim/Java/4K/Blast

Old without mouse:
http://valhallawebdesign.com/Blast/
I have heard that some mac users have had problems with Robot interaction. Would be interesed to hear how it is working and any possible solutions if available.

(Edit: new link)

The URL to the download would be cool :slight_smile:

DP

Pretty weird. Would be less confusing with the radar in the upper left or upper right corner.

Space was a rather bad choice as fire key, because the key matrix of most (Cherry) keyboards doesn’t allow you to press up+left+space at the same time. Ctrl doesn’t have that problem.

Crashed out webstart first time I ran it, without even finishing loading.

Crashed out itself second time I ran it (this time, the play screen appeared, but it was hung - ingored all input and it’s webstart console was unable to repaint itslef, as though the app had hung the JVM).

oNyx:
Changed the fire to Ctrl.

Yep, the radar is a bit confusing, but the few ppl that have tested it here got somewhat used to it in 20 sec - 2 min. I quite like the radar being right in the middle of the screen. It is a bit like a HUD on a fighter plane, where you have the info right in sight, and don’t have to take look to the side to get info. Plus the fact that you will have to stop shooting all the time since it makes it harder to read the radar. Still I am not 100% set on it, would be nice to hear what more ppl think about it.

Blah…:
The Webstart problems are really strange… Especially with a 4K thingie, where there really should be nothing that could go wrong! >:(
There are two things that I could think of, that possibly could go wrong.
1 My host doesn’t know what .jnlp is, so I had to add

<? header ("Content-Type: application/x-java-jnlp-file"); ?>

to the webstart file. But since it is starting, I don’t really think this could be a problem.
2 I had no space left to do any yielding (sleep), so the game is going flat out. Might stop console repaint depending on OS??? What are you running on? Works “fine” on WinXP. Other things go a bit slow, but respond.

You need to click the application to get focus. Not enough space to request focus either… (from 4087b to 4111) so you will just have to click the window. Hope it isn’t another write once, run almost nowhere… :-[

How about the tennis game. Do you get the same problem with that?

http://valhallawebdesign.com/Tennis/

You can always dl the jar.

Thanks for the feedback!

well, i love it! I got used to the rader in like 2 seconds…

no webstart problems for me (1.4.2_04). The best game for this years 4K definetly. Kept me playing for around 20 minutes :slight_smile:

Well, all 4K games are cool, but this is the only one i didn’t get frustrated with.

Having said that, it feels that its missing something. Perhaps nice graphics instead of yellow circles for the enemies would be nice (like a little alien).

DP

Thanks DP, great to hear. I was aiming at “a good break from work” or something like that, and really trying to make a game out of it. The finish has really been sacrificed on order to make happen… I have 9 bytes left I think so if you have a nice img in that size… :slight_smile:

Just tested performance and on my 1.8Ghz. It ran at 260 - 400 fps. Would be nice to spend some of that time displaying nice graphics. Sleep() would also be nice, but way too expensive for a 4K competition.

If more ppl like it, I might make the 2 DVD version of it. DP, you think you can get me the 3D models? A bit sad that in a game called blast, the only thing that happens when you hit a blob, is it just disappears. It should really be an explosion of fire, smoke and slime.

well, il be very glad to help you…I’l make you the models…etc on one condition.

You use jME to make it ;D

What do you say?

DP

DP:
I sort of like the simple approach of 4K, but would just like to make this look and sound nice and add a bit more variation, without making the game too complicated. A bit like the approach that Cas has been taking.

I tested a few 3D engines for Java a couple of years ago, and I still have mental scars from the battle. Slow, buggy performance, non-existing or at best confusing documentation, API’s almost great, but no longer supported and so on.

It seems like things have improved a lot since then. I have mostly looked into Java3D and Xith3D, don’t know how similar/different that is to jME. I have made one test thing, somewhat similar to Blast4K in Xith3D.

So in short, if you are OK with keeping the game not too complicated but actionpacked, and I wouldn’t have to get too much into the 3D API’s I’d be happy to work together with you.

No one else has any more feedback?

Should we put effort into making a “full version” of this game?

I think that would be cool! Even more so I like the idea of having it work somewhat like some first person shooters work. Arrow keys move and strafe, mouse aims all around. So you could essentially run in all directions and fire in all directions constantly. FPS’ers always strive to improve their ability to quickly turn to face a new target with the best accuracy possible. Running around being fired on by blobs from all directions would be a great play on that technique :wink:

I was toying with the idea of using “standard 1st person ctrls”, but I just couldn’t squeeze it into 4K. If I will code a full version I will definitely try it. Probably makes the player more powerful, so one can pack in even more action. :smiley:

I have also changed the bullets to be a bit smaller, and player bullets are a bit faster. Should make it a bit easier. Let me know what you think.

Ran great from webstart! fun!

Score 25 and a headache :slight_smile: Once you work out whats going on its strangely addictive.

Kev

Made player a bit faster. Should make it a easier.

[quote]I think that would be cool! Even more so I like the idea of having it work somewhat like some first person shooters work. Arrow keys move and strafe, mouse aims all around. So you could essentially run in all directions and fire in all directions constantly. FPS’ers always strive to improve their ability to quickly turn to face a new target with the best accuracy possible. Running around being fired on by blobs from all directions would be a great play on that technique :wink:
[/quote]
Your wish is my command. I have added normal FPS behaviour so that you now can used w,a,s,d + mouse to move or you can continue to use the arrow keys as before. I have also changed the webpage to:
http://valhallawebdesign.com/Joakim/Java/4K/Blast
to have the 4K stuff more organized.

Does Robot stuff (mouse ctrl) work with Mac? Feedback appreciated.

That presumably is why it doesn’t respond…the kb handling routine is being blocked out.

As before, can’t actually do anything because clicking on the window and hitting enter doesn’t have any effect. Eventually the console paints but just the standard message.

This is on linux. Whole system slows to a complete crawl, so I really think you need to put some kind of sleep in there…that might solve the problems.

blahblahblahh
OK, I have added a yield() in the main thread. Hope that fixes it. Have you tested any of my other games or d/l the .jar? Think most of the other games have either yield or sleep, since I had more space available.

Would also be nice to know if OS is somewhat responsive. And to know if sleep would behave much differently…

Shot uses sleep() and Robot for mouse ctrl:
http://valhallawebdesign.com/Joakim/Java/4K/Shot/