Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (541)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Beta: Crystals  (Read 7895 times)
0 Members and 1 Guest are viewing this topic.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Posted 2003-04-27 22:13:06 »

http://grexengine.com/sections/people/adam/crystals.html

Collect all the crystals within the timelimit to get the bonus, and advance to the next level.

Ideas for additional features welcome. Current planned features:

- powerups (change size, shape, speed of player)
- extra lives for high scores
- different backgrounds (any ideas appreciated...)
- enemies

Screenshot:

malloc will be first against the wall when the revolution comes...
Offline leknor

Junior Devvie




ROCK!!!


« Reply #1 - Posted 2003-04-28 01:52:54 »

1  
2  
3  
4  
5  
6  
7  
8  
9  
$ java -jar crystals-full-v1.2.jar 
net.tmachine.crystals.bBonusTimer: [DEBUG] Ticking clock URL = jar:file:/Users/sandymac/Desktop/crystals-full-v1.2.jar!/net/tmachine/crystals/sounds/clockticks.wav
Exception in thread "main" java.lang.NullPointerException
        at sun.applet.AppletAudioClip.<init>(AppletAudioClip.java:59)
        at java.applet.Applet.newAudioClip(Applet.java:263)
        at net.tmachine.crystals.bPlayerModel.<init>(bPlayerModel.java:31)
        at net.tmachine.crystals.bPlayerModel.<init>(bPlayerModel.java:38)
        at net.tmachine.crystals.Crystals.<init>(Crystals.java:27)
        at net.tmachine.crystals.Crystals.main(Crystals.java:19)


On Mac OS X with Java 1.4.1_01
Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #2 - Posted 2003-04-28 02:09:24 »

Dude, if you needed a sound engine, you could have always swiped the one from GAGE. Using applet APIs was always a bad hack and was almost guaranteed not to work in the future. That's what we have JavaSound for.

BTW, I get the same error as Leknor on Win2K.

Java Game Console Project
Last Journal Entry: 12/17/04
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #3 - Posted 2003-04-28 04:13:29 »

Confirming bug on Win 2k

and I'll just throw in a shameless plug for LWJGL:
http://java-game-lib.sourceforge.net/
which also has audio support, which outperforms GAGE [shadow=red,left,300]any day of the week[/shadow] Tongue Tongue

Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #4 - Posted 2003-04-28 05:03:16 »

Quote
and I'll just throw in a shameless plug for LWJGL:
http://java-game-lib.sourceforge.net/
which also has audio support, which outperforms GAGE any day of the week


He could use that. That is, if he wanted to reengineer the entire application around LWJGL plus worry about various native libs. LWJGL is a great hammer, but we do have a few nuts and bolts around here.  

Java Game Console Project
Last Journal Entry: 12/17/04
Offline mill

Junior Devvie




popcorn freak


« Reply #5 - Posted 2003-04-28 05:52:58 »

same null pointer here.

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #6 - Posted 2003-04-28 06:20:38 »

Quote
He could use that. That is, if he wanted to reengineer the entire application around LWJGL plus worry about various native libs. LWJGL is a great hammer, but we do have a few nuts and bolts around here.


hehe - two things:
- GAGE has a native time too (yes it isn't strictly needed)
- You can use OpenAL without using the rest of LWJGL. - it's only input/window that are tied together (for obvious reasons).

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #7 - Posted 2003-04-28 08:49:03 »

LOL! And you know what, I copied to a separate directory and tested before uploading!

Problem is very simple - Applet.getAudioClip dies gracelessly (and with the wrong exception!) when the file that the URL references cannot be found; bug. I was creating an AudioClip for a file that I was no longer using; the JAR file was a bit too large for comfort, so I pruned unused files, including a WAV - but the reference to create the AudioClip was still around in my initialisation.

Anyway, removing one line of code has fixed the problem Smiley.

NOTE: I cannot upload the update for another ten minutes or so. Samba on linux has just destroyed my local filesystem (again - even for linux, it's a horrifically buggy piece of **** Sad ), and I have to reboot Sad. Since I cannot save ANYTHING to the hard disk before rebooting, I'm going to post this message. If you check the download page and it's offering you version 1.21 or above, then the upload has gone through OK.

PS: I hope to switch to better sound API's ASAP, but I need time to evaluate which one(s) to use; I only added sounds at the last minute on this release, just to see how well they'd work...thanks for pointing out the problem Smiley.

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #8 - Posted 2003-04-28 09:30:21 »

Quote
If you check the download page and it's offering you version 1.21 or above, then the upload has gone through OK.


Fixed version uploaded...and I have just re-tested it, so I'm sure it's OK this time Smiley.

malloc will be first against the wall when the revolution comes...
Offline mill

Junior Devvie




popcorn freak


« Reply #9 - Posted 2003-04-28 09:42:05 »

pretty cool. some bugs though:

* if you press and hold left mouse button you can move the pointer and the cross will stay. when you release the button the cross appears at the pointer -> space warp! a tad too easy to cheat don't ya think? Smiley

* when starting, it's possible to have the cross at a bomb and that's annoying. so, place the pointer in the middle or somwhere there isn't a bomb.

* the starfield is moving a bit choppy. fullscreen perhaps?

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline mill

Junior Devvie




popcorn freak


« Reply #10 - Posted 2003-04-28 09:47:36 »

one more:

* it doesn't terminate correctly. it leaves a java process running and eating 17 mb of memory.

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #11 - Posted 2003-04-28 09:52:34 »

Quite nice  Smiley
Lately there seem to be a lot of these extremely simple but addictive little games popping up here.

Some small remarks/suggestions:
- I'd put the red translucent (which looks rather cool) 'window' to the center of the screen.
- Sometimes the cross appears on top of a bomb.
- It could get harder more quickly. Maybe by making the bombs move, or for example adding different kind of crystals that make all bombs instantly relocate to other positions.
- The background stars could scroll more smoothly.
- Maybe it's an idea to make the background light up light blue when collecting a crystal (and fade to black again) or red when you hit a bomb to make it a bit more 'flashy'.
- Make it an applet

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #12 - Posted 2003-04-28 09:54:33 »

Quote
pretty cool. some bugs though:

* if you press and hold left mouse button you can move the pointer and the cross will stay. when you release the button the cross appears at the pointer -> space warp! a tad too easy to cheat don't ya think? Smiley


What a cool idea! I'll see if I can work it into a powerup (and disable that "feature" in normal play Wink ).

Quote

* when starting, it's possible to have the cross at a bomb and that's annoying. so, place the pointer in the middle or somwhere there isn't a bomb.


Sure, thanks for pointing it out. The way it works at the moment is that the pointer is attached to the absolute mouse position, but that's just too easy. The pointer-behaviour is a class hierarchy of its own, so I can swap in and out different behaviours - one I have in mind is a "slippery" or "skidding" cursor - it carries on moving a little when the mouse stops. [cackles evilly].

Hmm. My PCs only use graphics tablets (RSI problems Sad), so I may end up making the cursor-control too difficult by accident. Will try and be careful Smiley.

Quote

* the starfield is moving a bit choppy. fullscreen perhaps?


Oh, bugger. Probably just because the starfield was very quick-n-dirty, and only calls repaint() every 100 (!) milliseconds. I was afraid of being profligate with CPU, and "it's only a background". I'll increase the framerate for the next version - let me know if you notice an improvement then Wink.

malloc will be first against the wall when the revolution comes...
Offline mill

Junior Devvie




popcorn freak


« Reply #13 - Posted 2003-04-28 09:58:57 »

super. it's gonna be top-notch.

simple and addictive.

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #14 - Posted 2003-04-28 10:57:37 »

Version 1.22 now up.

Fixes:

 - exits correctly (I often forget to add the close-handling in Swing.Doh!)
 - message windows centred
 - the cross that you are controlling always shows up (it was inheriting the "last colour used by the starfield" which often meant dark grey, and sometimes meant almost black.

New features:

 - increasing difficulty. This just increases the number of mines; on low levels, the number of mines increases gradually, on high ones it increases very fast.

This is just a minor revision; I should be doing other work, but instead I'm adding some structures that will enable mobile mines and primitive AI.

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #15 - Posted 2003-04-28 11:01:54 »

Quote
Version 1.22 now up.


!"£$"!%£"!£%.

I've just noticed that when you die, the difficulty level isn't reset. I got to difficulty 13, and now it's rather hard to play Smiley.

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #16 - Posted 2003-04-28 11:59:23 »

Version 1.23:

Fixes:
 - Difficulty now resets to 0 when you lose all your lives Smiley

Features:
 - Extra life every 10,000 points
 - The amount in the Bonus timer increases on harder levels

Again, this is just another minor revision.

On this version, my personal best is 49,746 - SO CLOSE to getting that extra life Sad.

malloc will be first against the wall when the revolution comes...
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #17 - Posted 2003-04-28 12:03:11 »

So when's the online scoreboard coming?  Wink

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #18 - Posted 2003-04-28 12:05:17 »

Quote
Quite nice  Smiley
- It could get harder more quickly. Maybe by making the bombs move, or for example adding different kind of crystals that make all bombs instantly relocate to other positions.


Any feedback on the new "increasing difficulty" will be appreciated...Smiley

...still working on adding moving enemies/mines/etc


Quote

- Maybe it's an idea to make the background light up light blue when collecting a crystal (and fade to black again) or red when you hit a bomb to make it a bit more 'flashy'.


Done; let me know what you think (just a simple impl at the moment). I think I'd prefer to do a fast-but-gradual fade - but 1.4.1 is VERY slow at drawing translucent colours to the screen - even fillRect is slow (slow enough that you don't want to be doing it more than once or twice a second).

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #19 - Posted 2003-04-28 12:12:01 »

Quote
So when's the online scoreboard coming?  Wink


As soon as the gameplay is relatively stable - enough that the average scores won't wildly fluctuate from version to version! Smiley.

...or else I guess I'd need one scoreboard per point-release of the game...

At least no-one's asking for a multipayer version yet; but I have got one in mind. It'd be pretty mental - two players competing to grab the same gems before the level ends. Highest scoring player - once both players are dead, wins.

So, it can sometimes be worth not bothering to collect crystals, and let your opponent do it - in the hope that they'll die soon, and you get to play alone from there. But of course, if they're scoring all the points, they're the one getting al the extra lives... Wink

Seeing as my day job includes writing MMOG server technology, I'll be really depressed if I can't get a multiplayer version working pretty soon Smiley.

malloc will be first against the wall when the revolution comes...
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #20 - Posted 2003-04-28 12:49:43 »

Quote
Done; let me know what you think (just a simple impl at the moment).

It works, but I would prefer a fast fade too.

Quote
I think I'd prefer to do a fast-but-gradual fade - but 1.4.1 is VERY slow at drawing translucent colours to the screen - even fillRect is slow (slow enough that you don't want to be doing it more than once or twice a second).

Really? In my duke rogers game I do fillRect every frame to clear the screen as well as another 200 fillRects to draw the stars and I well over 80fps on my p2/266 laptop. fillRect should be fast enough I think.

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #21 - Posted 2003-04-28 12:51:10 »

Quote
At least no-one's asking for a multipayer version yet

I want multiplayer  Grin

Offline mill

Junior Devvie




popcorn freak


« Reply #22 - Posted 2003-04-28 13:35:40 »

the mouse button cheat is still there Smiley

about highscore stuff, why not give my super-bad-ass-cooler-than-"tickle me elmo"-highscore server a go? http://h55d205.delphi.afb.lu.se/apps/wellplayed/
notice that's far from finished. uploading highscores is done and so is export to html. the next thing is to improve the export to html so it can be done automatically (either when a score comes in or using a timer).

by the time your game is finished it's probably around version 1.0 Smiley

i'm working on my game at the moment so the highscore server is stalled at the moment, but it will be cool one day.

back to your game.. the flash is fast here anyway.

you could also have a rotating cross. that would make it harder and add a cool twist. all sorts of power-ups and downs come to my head as i type this. reverse controls, add noise to movement, add drunken-mode, resizable cross and so on! Smiley

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #23 - Posted 2003-04-28 14:16:09 »

Quote
the mouse button cheat is still there Smiley


Yeah; its actually very useful for testing (being able to cheat whenever I need to, to simulate certain conditions Smiley ). I just deliberately don't use it when playing seriously Smiley. Once I start adding powerups, I'll get rid of it...

Quote

about highscore stuff, why not give my super-bad-ass-cooler-than-"tickle me elmo"-highscore server a go? http://h55d205.delphi.afb.lu.se/apps/wellplayed/
notice that's far from finished. uploading highscores is done and so is export to html. the next thing is to improve the export to html so it can be done automatically (either when a score comes in or using a timer).


My requirements:
1. It doesn't use Java on the server side (the company webserver doesn't - and won't - run java) Sad.
2. This game might at some point become commercial; I'm happy to be a free beta tester until then - assuming that was OK - but after that I'll probably switch to something more powerful (e.g. integrated SQL-based highscores; integrated with downloads, online savefiles, and other funky stuff).

Quote

you could also have a rotating cross. that would make it harder and add a cool twist.


Sadist Smiley. Actually, though, I'm afraid that might not currently be possible. I'm being cunning and getting high-precision collision detection out of Java2D, despite the fact that Sun didn't think to include it - I consider this to be on a par with "forgetting" to include standard data structures like "List" until Java 2. However, it does require that the player object/silhouette be composed entirely of rectangles - what I don't know is if you can AffineTransform those Rectangles; given how buggy most of Sun's libraries are when you start using them in imaginative ways, I would expect I'd probably get a recurring NullPointerException deep in Sun's classes  if I tried (that seems to happen depressingly often with 1.4 libraries. Sigh.).

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #24 - Posted 2003-04-28 14:19:44 »

Quote

It works, but I would prefer a fast fade too.

Really? In my duke rogers game I do fillRect every frame to clear the screen as well as another 200 fillRects to draw the stars and I well over 80fps on my p2/266 laptop. fillRect should be fast enough I think.


Hmm. I have an app that makes heavy use of Java2D, and runs smoothly (approximately > 30 fps) - until you fill any rect, anywhere, with a transparent colour. Then it slows down to about 5 fps or worse. It could just be Java2D + certain AfffineTransforms + transparent fillRect - I don't know,  but I was only drawing that one rect. ?!?

malloc will be first against the wall when the revolution comes...
Offline mill

Junior Devvie




popcorn freak


« Reply #25 - Posted 2003-04-28 14:24:45 »

well, i think you should ditch your line crosses and replace them with nice looking images. now boy, fire up Blender and render away!

what do your company use on the server then?

i will switch to sql in a very distant future if hell freezes over and i win $10000000 on the lottery, oh and yeah if the new JGO site launches in my lifetime Smiley

Offline mill

Junior Devvie




popcorn freak


« Reply #26 - Posted 2003-04-28 14:25:59 »

instead of fillRect, try drawing a translucent image instead

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #27 - Posted 2003-04-28 20:02:21 »

Why translucent? It's the background, right?
I would guess you're clearing each frame black anyway, and if so, why not clearing it with a different color and forget about tranlucency? That's how I did it with duke rogers anyway (in which the background slowly fades to different colors), just a completely opaque fillRect.

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #28 - Posted 2003-04-28 20:26:03 »

Quote
Why translucent? It's the background, right?
I would guess you're clearing each frame black anyway, and if so, why not clearing it with a different color and forget about tranlucency? That's how I did it with duke rogers anyway (in which the background slowly fades to different colors), just a completely opaque fillRect.


Actually, the game uses a custom layered-components system I wrote; it makes it VERY easy to have a complex GUI with lots of independent layers; very easy to add new features, and even new interactive features (which normally tends to be quite tricky in a complex program).

The flash is implemented as an extra layer that is normally just empty (i.e. lets the layers below show through), but then flashes itself when necessary. Easy to code, easy to maintain.

I never clear any frames - I just let the layer below show through, and if the stack of layers isn't completely opaque for all pixels, you get weird effects a la doom and idnoclip Wink.

Basically, I wrote the bits of JLayeredComponent that Sun should have; if you look at JLC, you'll see that it's missing loads of basic functionality. I would much prefer that JLayeredComponent were actually a useful classes for users - it appears that the swing designers just thought of it as a building block for creating their classes-with-internal-frames etc; it could have been so much more than that!.

FYI: I created a few classes that, in essence, allow you to stack JComponent's on top of each other, and get various extra methods that JComponent SHOULD have, but Sun forgot to include (some of which I've logged RFE's for). For instance, although Graphics is specified as "storing the translation", there's no clear way (nothing using just Graphics; presumably there IS a way, but it's probably in the wrong place, and I certainly haven't found it yet Sad ) to actually read the translation - and this is an ESSENTIAL requirement to writing any GUI where translation is used, because you need to know in order to correctly interpret things like the mouse co-ordinates from MouseEvent's...

malloc will be first against the wall when the revolution comes...
Offline mill

Junior Devvie




popcorn freak


« Reply #29 - Posted 2003-04-28 20:34:09 »

idnoclip lol

Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Mr.CodeIt (24 views)
2014-12-23 03:34:11

rwatson462 (55 views)
2014-12-15 09:26:44

Mr.CodeIt (45 views)
2014-12-14 19:50:38

BurntPizza (86 views)
2014-12-09 22:41:13

BurntPizza (110 views)
2014-12-08 04:46:31

JscottyBieshaar (81 views)
2014-12-05 12:39:02

SHC (91 views)
2014-12-03 16:27:13

CopyableCougar4 (98 views)
2014-11-29 21:32:03

toopeicgaming1999 (157 views)
2014-11-26 15:22:04

toopeicgaming1999 (154 views)
2014-11-26 15:20:36
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!