Results 1 to 9 of 9

Thread: [RESOLVED] need game help

  1. #1

    Thread Starter
    Member Giver's Avatar
    Join Date
    Aug 2008
    Posts
    39

    Resolved [RESOLVED] need game help

    im making this game where you have to protect objects from the enemy trying to capture them. i have a loop where a number is randomized from 1 to the current level the person is on. if that number is 50 then a new enemy is created and sent out to get an object.but my problem is if the level is getting higher and higher then the game will get easier and easier. i want it to get harder and harder. please help

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,413

    Re: need game help

    change it so the enemy is sent out if the number is 1

  3. #3

    Thread Starter
    Member Giver's Avatar
    Join Date
    Aug 2008
    Posts
    39

    Re: need game help

    it doesnt matter what the number is, it could be any number between 0 and the current level you're on.

  4. #4
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,413

    Re: need game help

    how many levels are there?

  5. #5

    Thread Starter
    Member Giver's Avatar
    Join Date
    Aug 2008
    Posts
    39

    Re: need game help

    i want it to be unlimited.

  6. #6
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,413

    Re: need game help

    if for example you have 10 levels:

    vb Code:
    1. dim randomNumber as new random
    2.  
    3. dim number as integer = randomNumber.next(0, math.abs(level + 1 - 10))
    4. if number = 0 then
    5.     'send out enemy
    6. end if

  7. #7

    Thread Starter
    Member Giver's Avatar
    Join Date
    Aug 2008
    Posts
    39

    Re: need game help

    is there a way to do it with unlimited levels?

  8. #8
    Fanatic Member Vectris's Avatar
    Join Date
    Dec 2008
    Location
    USA
    Posts
    941

    Re: need game help

    You can't do unlimited levels. If your going by millisecond then the hardest level you can do is one enemy per millisecond. If you wanted to keep going you could add more than 1 enemy per millisecond but that would be a bit more complicated.

    Instead of increasing the range decrease it. That increases the chance of the enemy being sent out.
    If your problem is solved, click the Thread Tools button at the top and mark your topic as Resolved!

    If someone helped you out, click the button on their post and leave them a comment to let them know they did a good job

    __________________
    My Vb.Net CodeBank Submissions:
    Microsoft Calculator Clone
    Custom TextBox Restrictions
    Get the Text inbetween HTML Tags (or two words)

  9. #9

    Thread Starter
    Member Giver's Avatar
    Join Date
    Aug 2008
    Posts
    39

    Re: need game help

    ok thanks for the help.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width