Archived

This topic is now archived and is closed to further replies.

Jippi_programming

[java] deathstar hunt, a java game

Recommended Posts

Hello! I''we made a java-applet game called "deathstar hunt". I would like to get some feedback on the game concept and on how the game works on different browsers/systems. Its not finished yet but the basic concept is there.. the link is: http://members.fortunecity.com/jippi_mail/ hope you enjoy it!

Share this post


Link to post
Share on other sites
Nice! The game worked good on my system: P3 866 IE5 I when I played the game and clicked outside the window i lost control with the mouse, then mousecontrol came back after about 3 seconds. I tried it again and it worked okay. Good Work!

Share this post


Link to post
Share on other sites
I had the same problem once as nonnus29. The X-Wing got stuck on the left side of the applet border for several seconds. Looks very nice. Perhaps you could do some gun towers?

Share this post


Link to post
Share on other sites
Very nicely done. Worked well on my system with IE 5.5. I played it for a few minutes.

Comments:
1) needs an advancing skill level - I didn''t see any change in objective or difficulty in the 5 minutes I played it. If you do have harder levels, then ignore this comment.

2) ship reactivity - i felt like I was sliding on ice. The ship was always behind the mouse just enough that I felt a lack of control.

Michael

Share this post


Link to post
Share on other sites
Happy to hear you liked it!
This is just a really old first version of the game, one of my first applets acctually.
Now that I''m a bit more advanced, I would like to develop it further. Therefore I am gratefull for more comments, which will make me motivated to continue developing!

"1) needs an advancing skill level - I didn''t see any change in objective or difficulty in the 5 minutes I played it. If you do have harder levels, then ignore this comment."
Well, the game has advancing skill levels. Slowly the tie-fighters come in bigger and bigger vawes... But I will make greater difference between levels later on. Alson you cant die, so it doesn''t really matter I''ll do something to that to!

With the sliding on ice, I kinda like the effect.. Not total controll, but still controll.. Please post more comments on the controlls! (Maybe this is a mayor flaw which I dont realise..)

With the x-wing getting stuck problem I''ll see what I can do about it. Shouldn''t bee to hard to fix! The only problem is that this is some really old code so I belive I''ll rewrite it all and put it into classes and stuff (Only one class in this version ).
Next step is to rewrite it and then insert some cool fx like particle explosions and nicer interface. I''we got tons of plans for this game, but I''ll take it one step a time!

Share this post


Link to post
Share on other sites
Cool game, I think I''ll make one just like it for fun. But in mine I might put some really cool physics and different weapons. I like how you made it simple, yet addictive. Great job

I sure hope this world isn''t one big joke, because I don''t get it.

Share this post


Link to post
Share on other sites
Things to come:
*totaly amazing graphics
*amazing fx
*More enemies than just tie-fighters
*different weapons (one for right mouse and one for left)
*shadows
*interface with shields, health, kills, level and more
*a wait before the game starts

and more...

More comments please!


[edited by - Jippi_programming on March 24, 2002 12:31:14 PM]

Share this post


Link to post
Share on other sites
Hey, great game!

I have a question for you: This is a design question that might sound dumb, but for having the laser shots be on screen, did you just have an array of laser shots that were being drawn and tested for collisions? I have been wondering how to do this (right now in this one game, i just have one bullet being shot and drawn). Is there a best way to keep track of all bullets being fired?

again, very fun game...

riz

Share this post


Link to post
Share on other sites
Sweet, Star wars is the bomb. It brings back some of the old atari days. The only comment I have is that it should wait for all of the graphics to load before the game starts, but I see you''ve already added that to you list.

Runs great on my system, IE 5.5 700 Duron 512 megs ram.

-Just when you think things are starting to look up, life grabs you by the jaws makes you open up wide and sh*ts down your throat.

Share this post


Link to post
Share on other sites
Well, to Riz:
Im not a very experienced programmer myself, all of games programming I know I've learnt from my own mind.
For this game I figured out my own technice which I don't know if it's being used by professional programmers. Still it works very nicely. Hope I understod your question:

For each laser shot I have a x, a y and a active value;
int x[], y[];
boolean activelaser[];

Every loop I go through all the active lasers and give em y--, which means they'll go uppwards the screen:
for(int n=0;nif(activelaser[n]){
y[n]++;
}
}
Then I check for collisions with ties on the laser coordinates in the same loop.

Anyway, the clever part of my method comes here:
When the user fires a laser shot (clicks mousebutton) A loop like the one above goes through all lasers until it finds a laser that is not active. Then it makes it active, gives it the ship's current coordinates.

When ever a laser hits something or goes out of screen it becomes
activelaser[n] = false
Which meen that it will not be updated, painted or anything!

hmm.. Hope that explained some of it.. Im not very good at explaining.. Ask more if you didn't understand..


[edited by - Jippi_programming on March 24, 2002 2:17:33 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
nice game, worked excellent p3500 ie6

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
nice! ran really well on a K6-2/450

Share this post


Link to post
Share on other sites
I keep getting a bad magic number exception which usually means that you uploaded the class files as ascii rather than binary. Anyone else get this?

The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran

Opere Citato

Share this post


Link to post
Share on other sites
quote:
Original post by Jippi_programming
Well, to Riz:

Anyway, the clever part of my method comes here:
When the user fires a laser shot (clicks mousebutton) A loop like the one above goes through all lasers until it finds a laser that is not active. Then it makes it active, gives it the ship''s current coordinates.


[edited by - Jippi_programming on March 24, 2002 2:17:33 PM]


Jippi I was wondering. About how many laser beams is a good amount to allocate in this array (if you are using an array)? Like is would have to be more than the amount that is possible to have on the screen at one time? Thanks!



I sure hope this world isn''t one big joke, because I don''t get it.

Share this post


Link to post
Share on other sites
Using a fixed size array is fast, but cannot handle the load when too many objects or lasers get on the screen. In a game like this, you can probably get away with an array of 1000 lasers or something really high so you can''t go out of bounds. However, some people use java Lists for this type of thing. You can use ArrayLists, Vectors, LinkedLists, etc....

Also, you don''t necessarily want to tie your array or list to a laser itself. Rather, you want to have a base "flying object" class that serves as the base for lasers, bombs, etc... That way you can use the same array or list to represent multiple types of ordinates on the playing surface.

Michael

Share this post


Link to post
Share on other sites
VisualB4BigD:
Because this is a rather old project I used arrays. The laser array is as big as "int maxlaser" after a loop where all lasers are active you cant shoot, theres a maximum ammount of lasers in the game at the same time! It becomes a pretty typical game thing, dont overheat the lasers!

Now that I''m a little bit more experienced I realise that it would probably be better to use a vector of the vector class, where the elements could be deleted any time they died, and the vector would change so it only contained active lasers.. mjacobsca has a good point there.

Share this post


Link to post
Share on other sites
Thanks, I almost have the little game I''m making finished. It uses alot of vectors, so maybe a vector class wouldn''t be a bad idea.

I sure hope this world isn''t one big joke, because I don''t get it.

Share this post


Link to post
Share on other sites
Well.
Now I''ve rewritten the entire game from scratch, only using values for stuf like movement and gameplay featuers. I''ve put everything into classes and added some of the things I wrote. Still the graphics look the same.

The funny part is that I now use Vectors for all the object besides the xwing, and that I''ve put everything into its own class. I''ve also made the level a bit bigger and fastened up the gameplay.
You can''t tell how surprised I got when this new version was about five times faster than the old one. Probably due to the memory taken by all my old int[]s which werent at use..
Now I''ve even added a frame holder so that it wont run to fast on lousy computers!
I''ll upplad the new version tomorow.
Wow! didnt think that about Vectors.....

Share this post


Link to post
Share on other sites
Works great on these Solaris SunRay terminals at uni in Netscape 4.76.

As for features I agree that gun turrets would be nice and also I think it would be good if the enemies flew in formations.

Keep up the good work!

Share this post


Link to post
Share on other sites
Small note, you should move the ship during mouse dragged events as well as mouse moved events. It is very distracting to fire and not have the ship move until you let up on the mouse button.

Share this post


Link to post
Share on other sites
hmm.. I don''t really understand what you meen..
You know that you aren''t supposed to hold down the mouse when firing? You''re just supposed to click really fast!
Maybe it''s the way you''re playing it? I''ll try with also searching for mousedrags and see if i notice any difference.. Anyway, thanks for the feedback!

Share this post


Link to post
Share on other sites
Firing fast is a good thing but try this. put the mouse in the middle of the applet now click and hold the button down and try to move the ship. You can''t because you aren''t responding to mouse dragged events. When firing very fast (via multiple mouse clicks) the ship won''t move smoothly if you move the mouse even a pixel when trying to fire. That''s all I''m saying.

Share this post


Link to post
Share on other sites