Thread: The long-awaited Space Shooterz DX!

  1. #46
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Hmm, sounds interesting. I'll have to try doing that for my next game (after I'm done with sound).

    I've actually never used a list before, though. I've heard people talk about them much in the same way as vectors (in terms of functionality, i.e. you can add and remove objects at will), but I've never really seen the need to use a list. Are there specific performance, readability, or ease-of-use reasons to use lists instead of vectors in different places?
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  2. #47
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Vectors are efficient for random-access, ie when you want to access item number 13 specifically. They are slow when they need to grow of shrink in size.
    Lists are very easy to grow and shrink in size, but they don't have random access.
    I decided lists was better to use because objects are added and removed all the time.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  3. #48
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Ohh, I see. Are you saying that you cannot access objects in a list just with "objectlist[index]"?

    Also, then in my case, a list would be more efficient for all the shots (both ship and alien)?
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  4. #49
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Yes to both questions!
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  5. #50
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879

    Yeeha!!!

    OKAY! YEAH! Heh, I thought this was gonna take like another year or something, but I've managed to finish this slightly ahead of schedule, and now Space Shooterz DX has sound and music! I'm sorry I couldn't attach it to this post, but the filesize was slightly too large (i.e. over 3X the max size lol). But it's on my website, so everyone go and try it out and tell me what you think! (Sang-drax, the sound is for you *nudge nudge* )

    Oh yes, and please everybody take a look at the very poorly commented code (but still "understandable" lol), and please give me some suggestions on improvement other than using linked lists which is already on my to-do list

    http://www.geocities.com/hunterguy_2/downloads.html
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  6. #51
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110
    Oh nevermind sounds alrdy oke.
    Oh and btw i just listened to the music it Rox... , although that upg.wav sounds familiar -> think i alrdy heard it in some game somewhere....

  7. #52
    napKINfolk.com napkin111's Avatar
    Join Date
    Apr 2002
    Posts
    310
    Very cool! Ship rotation would be good but I guess that adds to the challenge. High score list is only available while in-game (not like thats a big problem or anything). And do my ears decieve me, or is that some Final Fantasy music I hear playing? (ah the good ole days of nothing to do but sit and play FF7 for hours...ahhhh)

    //napKIN
    "The best way to get answers is to just keep working the problem, recognizing when you are stalled, and directing the search pattern.....Don’t just wait for The Right Thing to strike you – try everything you think might even be in the right direction, so you can collect clues about the nature of the problem."
    -John Carmack

  8. #53
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    And do my ears decieve me, or is that some Final Fantasy music I hear playing?
    Yep, that's right. I was looking through my library of midis and the only one that wasn't too happy, too sad, or too fruity, was the FF7 battle theme. And did you recognize the intro? Lol I guess not, well it's a remix of the FF3 prelude

    that upg.wav sounds familiar
    Heh, it's a Starcraft sound that plays when you rescue some stray Terran units. Actually, all the sounds are from Starcraft even though the repeater/laser shots I've never actually heard in the game itself. Starcraft is a great source of sounds, IMO
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  9. #54
    napKINfolk.com napkin111's Avatar
    Join Date
    Apr 2002
    Posts
    310
    Ahem ahem, high score 12312

  10. #55
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110
    Yeah i had a highscore of 15755. I tried to take a screeny but too bad that the screen was all black when i pasted it into paint ...
    But it was really fun i had so much luck with the shield thingies you can get so at the end i had around 24 shields left and then there came a new wave of aliens, and then i was pretty much dead...

    Im wondering what the maximum of those aliens is in one wave...
    My strategy: when there are too much aliens fly around the outer edges of the screen and constantly fire homing missiles, when you get this whats the name , well when you get backup you select the linked laser wich is more effective with backup this way almost the whole wave is instantly dead. + when using backup with linked lasers the game will slow down thus its easiier to avoid incoming shots ( bevause youve got more time to react)

    ::edit::
    Broke my own score with 19845, my strategy is god-like
    Last edited by GanglyLamb; 06-13-2003 at 02:00 AM.

  11. #56
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    the game will slow down thus its easiier to avoid incoming shots
    Actually, it's not supposed to! If it slows down, then more lasers end up being shot, and more aliens die than were supposed to

    Also, if anybody has DirectX 9 running on their comp, could you try the game and see if it runs slow? A lot of people are complaining that it's slow and they have fast comps, and I'm trying to figure out why...
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  12. #57
    and the Hat of Clumsiness GanglyLamb's Avatar
    Join Date
    Oct 2002
    Location
    between photons and phonons
    Posts
    1,110
    Actually, it's not supposed to! If it slows down, then more lasers end up being shot, and more aliens die than were supposed to
    Damn just when ive found a great strategy your about to make sure this wont happen again...
    Well i guess thats called progress

  13. #58
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Well, I'm not really going to fix it or anything, but what I'm saying is that people with really old computers are going to have a big advantage in my game when they get laser limitbreaks
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  14. #59
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Well, it's a lot better with sound.

    I have severe problems with it though: The power repeater limit break takes me below 1 fps.

    Apart from that:

    *When I press F1 to go to the help screen, I am transported to the second page immediately about 80% of the times.

    *If you minimize the program, it won't let you maximize it again (quite difficult to fix)


    Also remember that GetAsyncKeyState doesn't return a boolean. To check if a key is down, use this:
    Code:
    inline bool keyDown( WORD vkCode )
    {
      //0x8000 is the most significant bit
      return GetAsyncKeyState( vkCode ) & 0x8000;
    }
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  15. #60
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Heh oops, it's 0x8000 huh? I tried 0x80 and I was wondering why it wasn't working But for my purposes, I only need to check if the key was pressed since the last call, so... w/e i guess

    Umm, yes. About the help thing, I took a look at it but I couldn't figure out why until about 2 seconds ago. I think I fixed it now by removing all the WM_KEYDOWN messages from the queue when you hit F1, so re-download it and see if it works now It should be SPS_DX_v5d.zip now.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Inserting a swf file in a windows application
    By face_master in forum Windows Programming
    Replies: 12
    Last Post: 05-03-2009, 11:29 AM
  2. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  3. hton long long
    By carrotcake1029 in forum C Programming
    Replies: 1
    Last Post: 06-01-2008, 08:26 PM
  4. can someone check this out and let me know ?
    By javaz in forum C Programming
    Replies: 5
    Last Post: 01-21-2002, 02:13 PM
  5. My graphics library
    By stupid_mutt in forum C Programming
    Replies: 3
    Last Post: 11-26-2001, 06:05 PM