A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 33

Thread: new game

  1. #1

    new game

    Hello,

    I'm almost finished with a new game. It's a sequel to a fishing game I made almost 4 years ago. There's a large map that you can drive around. Each region has fish species that are particular to that region. There's a random odds-based system that determines fish weights and species, as well as swimming behavior.

    I haven't drawn the fish or set the map boundaries yet (still working on the map), but everything else should work. The timing for when the fish appears and disappears is set very low for my testing, but it won't be that short in the game (the fish will change location, size, and species whenever it disappears.

    Fish will try to swim away from the boat and the "camera" will zoom out to show everything. Based on the size of the fish, you'll have to fight them longer. When they're small or tired, you'll have more control when trying to "steer" them.

    High scores work as well.

    I'd appreciate any feedback. The game should be finished within a few days. Here's the URL: http://pigdogtoad.com/sawfish_lagoon...sh_lagoon.html

    And here's the old game, for comparison: http://pigdogtoad.com/reel_fishing_o...ng_online.html

    Thanks!
    Cooper
    www.pigdogtoad.com

  2. #2
    Amiga freak Ironclaw's Avatar
    Join Date
    Jan 2001
    Location
    Sweden
    Posts
    1,650
    Hehe, cool game. I like it.

    btw, center the game in the html and change the back to a much darker one, white is annoying.

  3. #3
    Thanks for the reply. It will eventually be in a popup window, so please disregard the html.

  4. #4
    the thud of the body rabbitkiller's Avatar
    Join Date
    Jan 2004
    Location
    Royal Oak, Mi
    Posts
    318
    1 pound 13 ounces!
    I'l go make a dinner now!
    Nice game!
    world[i] = new world();

  5. #5
    Senior Member dogtown08's Avatar
    Join Date
    Jul 2004
    Location
    In a later dimension
    Posts
    201
    Awesome game! Scrolling does seem a little slow though. I assume it is art based. If you want to make it a long game with a large map, you should consider using tiles instead.

    Still, really fun to play!

  6. #6
    ·»¤«· >flashl!ght<'s Avatar
    Join Date
    Jun 2003
    Posts
    746
    seemed pretty neat! i didnt understand what the blue square objects were tho? and the boat movement seemed REALLY eratic. but then what do i know about driving a boat?

    can i ask you a question about the arrowField experiement you also have(noticed on your site. neat banana nav )? you have it set so that the arrows rotate to face the mouse. not just face the mouse, but take the time to turn. how did you do this? I have had difficulties with this, I cant find a way to calculate which is a faster rotation - cw or ccw - wihtout using several conditionals(which works but i cant imagine its very fast).

    cheers
    >flashl!ght<
    All the normal names were taken.
    Ron Paul was right.

  7. #7
    Senior Member
    Join Date
    Feb 2004
    Location
    Australia
    Posts
    156
    for doing that effect with the mouse pointers don't you just do (i assume u know how to find the angle is from the muose to the pointer)
    if(mouseAngle > this._rotation){
    this._rotation += 5;
    }
    etc

  8. #8
    ·»¤«· >flashl!ght<'s Avatar
    Join Date
    Jun 2003
    Posts
    746
    the issue i faced with that is due to the fact that angles loop(ie its -180 to 180, then it loops back to -180) the rotation does not work properly. ie it will rotate all the way around ccw when all it needs to do is move a few degrees cw. try u will see what i mean. in short, no, that doesnt work to the full extent. i tried a million different things to try and counter this, all created other problems. heres the final result which works, but is UGLY as anything:
    code:
    _global.smartRotation = function(currentRotation, targetRotation, rotationAmount){
    if(Math.abs(currentRotation-targetRotation)<=rotationAmount){
    currentRotation = targetRotation;
    }else
    if(currentRotation != targetRotation){//if not at target
    if(currentRotation >= 0 && targetRotation >= 0){//if both positive
    if(currentRotation > targetRotation){
    currentRotation -= rotationAmount;
    }else
    if(currentRotation < targetRotation){
    currentRotation += rotationAmount;
    }
    }else
    if(currentRotation < 0 && targetRotation < 0){//if both negative
    if(currentRotation > targetRotation){
    currentRotation -= rotationAmount;
    }else
    if(currentRotation < targetRotation){
    currentRotation += rotationAmount;
    }
    }else
    if(currentRotation < 0 && targetRotation >= 0){//if current negative and target positive
    if((Math.abs(currentRotation) + Math.abs(targetRotation)) <= 180){
    currentRotation += rotationAmount;
    }else
    if((Math.abs(currentRotation) + Math.abs(targetRotation)) > 180){
    currentRotation -= rotationAmount;
    }
    }else
    if(currentRotation >= 0 && targetRotation < 0){//if current positive and target negative
    if((Math.abs(currentRotation) + Math.abs(targetRotation)) < 180){
    currentRotation -= rotationAmount;
    }else
    if((Math.abs(currentRotation) + Math.abs(targetRotation)) >= 180){
    currentRotation += rotationAmount;
    }
    }
    }
    return currentRotation;
    }



    (sorry not trying to hijack the thread here )
    >flashl!ght<
    All the normal names were taken.
    Ron Paul was right.

  9. #9
    Hello,
    Sorry, the blue blocky stuff is my test area for the collision detection. If I disable that so that you can drive all over the map, the fish won't be able to check its boundaries and won't swim around. The background is art based, but the boundaries will be read from an array, like tile based games.

    Can you say more about the erratic boat movement? Was it just that it seemed to turn too quickly, or was it jerky and strange?


    About the arrows:
    I used a frame loop inside the arrow. First, the location of the mouse if found, then the location of the arrow. That gives you the sides of a right triangle, which when used with atan2 will give you the angle between the mouse and the arrow. That's where the arrow wants to rotate to. But your question was how to determine left or right. So determine the difference between the arrow's current rotation and it's desired rotation (the rotation difference). It helps to keep the rotation difference within an easy scope, so if it's > 360, set it to -= 360, if it's less than 0, set it to += 360. Now, if the rotation difference is greater then or less than 180, you know which direction is the shortest to rotate to. Then just increment the arrow's rotation in the direction it wants to turn. It shouldn't be more than 9 or 10 lines of code, I think.

  10. #10
    Lunatic Baukereg's Avatar
    Join Date
    Nov 2000
    Location
    Lowlands
    Posts
    853
    Hé, I really like the idea. Something different than the usual basic fishing games. Maybe you can add some rpg kind of elements, like becoming better, buying better bait, catching fish on order.

    Keep it up!

  11. #11
    OK, I've gotten the boundaries working. You can now drive, hook, and fight fish. I left some test indicators in that show the path of the line and the lure, for collision detection.

    Please, if anyone notices anything screwy, like loosing your lure when casting into the water or being able to drive on land, or anything else, please let me know.

    I still need to draw the fish and fix their timing intervals (so they don't disappear and reappear so quickly).

    Thanks,
    Cooper
    www.pigdogtoad.com

  12. #12
    ********* mentuat's Avatar
    Join Date
    Mar 2002
    Location
    out of office
    Posts
    717
    fun game! I bagged a 7 pounder - and he put up quite a fight

    would be nice if you could drive the boat to follow the fish when you have it hooked and have a 'line stress'-o-meter so if you are pulling too hard and not letting it any slack the line will snap - would add a bit more strategy rather than holding the down button and hoping it doesn't go round a corner or under the boat

  13. #13
    mentuat,

    Thanks for the reply. In the first version of this game, I had exactly what you're talking about - a "drag meter" - that would cause you to lose the fish and lure if you exceeded its limit. I gave some thought to bringing that back for this game, but that's just not how it is in real life. When you're fishing for real, snapping the line because of too much pressure isn't a genuine concern unless your fishing gear isn't well maintained. Also, because of the fact that the camera will zoom out and there are obstructions, I thought it might be better to just have those. You can steer the fish when it's tired by holding down the left or right arrows.

    Anyway, I appreciate the feedback. If the general sentiment is that having the line snap with too much pressure would make the game better, it's certainly easy enough to add that.

    Thanks!
    Cooper

  14. #14
    ********* mentuat's Avatar
    Join Date
    Mar 2002
    Location
    out of office
    Posts
    717
    When you're fishing for real, snapping the line because of too much pressure isn't a genuine concern unless your fishing gear isn't well maintained
    as I've never fished before, I bow to your knowledge on this issue! - I mentioned it purely coz I've just been reading a couple of ernest hemmingway books that describe the process of landing a marlin and the process seems to involve giving a lot of slack so as not to break the line - but I guess thats because those kind of fish are big!

  15. #15
    ·»¤«· >flashl!ght<'s Avatar
    Join Date
    Jun 2003
    Posts
    746
    interesting ill have to try that method. didnt quite understand it so ill have to experiment a bit.

    as for the fishy game, coming along nicely about the 'eratic boat movement" - perhaps i should have said my driving skills were eratic because i didnt understand the boat movement i understand now you turn the motor, but i just feel the movement is kinda funky. at least i couldnt drive worth anything, oversteering constantly. minor gripe, i jsut stink at driving your boat

    keep up the work
    >flashl!ght<
    All the normal names were taken.
    Ron Paul was right.

  16. #16
    Senior Member dogtown08's Avatar
    Join Date
    Jul 2004
    Location
    In a later dimension
    Posts
    201
    I see you added a new version. Its really cool and really fun to play!

    Great work

  17. #17
    ·»¤«· >flashl!ght<'s Avatar
    Join Date
    Jun 2003
    Posts
    746
    btw, you da man!
    code:
    _global.smartRotation = function(currentRotation, targetRotation, rotationAmount){
    if(Math.abs(currentRotation-targetRotation)<=rotationAmount){
    currentRotation = targetRotation;
    }else{
    smtRot_dif=currentRotation-targetRotation;
    if(smtRot_dif<0){smtRot_dif+=360};
    if(smtRot_dif>=180){
    currentRotation+=rotationAmount;
    }else{
    currentRotation-=rotationAmount;
    }
    }
    return currentRotation;
    }



    works smoothly *and* according to my benchmarks it appears about 3000 times faster than the one i posted! awesome, thanks alot
    >flashl!ght<
    All the normal names were taken.
    Ron Paul was right.

  18. #18
    flashl!ght,
    Sorry to be a little vague before, I didn't have the code in front of me. I did it with flash 5, but here's the flash 7 equivalent of what I did:

    code:

    rotation_difference = ((Math.atan2 ((_parent._ymouse - _y), (_parent._xmouse - _x))) / (Math.PI / 180)) - _rotation;
    if (rotation_difference > 180) {
    rotation_difference -= 360;
    } else if (rotation_difference < -180) {
    rotation_difference += 360;
    }
    _rotation += rotation_difference / 10;


  19. #19
    Senior Member
    Join Date
    Apr 2004
    Posts
    325

    weak ass

    I hate fishing

  20. #20

    Re: weak ass

    Originally posted by dwilliams3
    I hate fishing
    Cool, thanks.

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

HTML5 Development Center