Jump to content
MakeWebGames

Hunting Mod


Mcfarlin

Recommended Posts

I am working on a hunting mod. Almost completed but in need of two images. (nothing like the fishing mod i posted)

Any interest in this mod? I need help getting the two images for the mod to be proper.

Here is how it works.

You click on the hunting page and the page checks to see if you are able to hunt.

1.) Is the user in jail or hospital.

2.) does the user have the energy to go hunting?

3.) does the user have a Hunting rifle ( can be expanded to check for permit as well.)

4.) once those are passed the user is directed to the hunting page.

As the page loads the heading states that your hunt has begun.

An image of the woods loads and the user waits.

At a random time after beginning the hunt a deer will appear in the woods for the user to shoot at.

They have to click on the deer to hit the deer. IE if they miss it is a miss and so on, if they hit a non critical area of the deer it will run away.

Only if they hit the kill spot will they get the kill. and the hunt ends when they shoot, displaying the outcome based on where they shot. so aiming will count.

Now if there is interest in this as a free mod. . . . . as i said i need two images.

One of the woods and a second with the deer photoshopped into the woods image.

 

Edited by Mcfarlin
Link to comment
Share on other sites

How are you going to determine where the kill shot and non-critical area's of the deer are?

Also, if you only need two images, the woods and the deer in the woods, does that mean the deer will always end up in the same place?

If so, could a player not just find the kill shot and keep their mouse hovered over that area?

Link to comment
Share on other sites

nice idea but you could mix it up a little and make random images of different animals i know this doesn't help you but makes it much more better for the players

I can and had planned on making more animals to hunt, but as for free mods go i was only going to share the one.

as i get better i would like to start making paid mods. Offering up a simple version for a free mod then having a paid mod that is more complex.

1.) simple version you can hunt a deer in the woods.

2.) Complex version you can pick from many animals to hunt from with each having a few different hunts to them.

 

 

How are you going to determine where the kill shot and non-critical area's of the deer are?

Also, if you only need two images, the woods and the deer in the woods, does that mean the deer will always end up in the same place?

If so, could a player not just find the kill shot and keep their mouse hovered over that area?

How are you going to determine where the kill shot and non-critical area's of the deer are?

Well for a text game this seemed like something not possible when i first had the idea. but i have made this work.

When i find or make two images i will showcase the functionality of the mod.

if you only need two images, the woods and the deer in the woods, does that mean the deer will always end up in the same place?

If so, could a player not just find the kill shot and keep their mouse hovered over that area?

For now yes the deer shows up in the same place. I am still looking for images to make the mod more complex so this will be delt with.

In the long run it would need several images with the animal in various places on the screen.

 

Until i find someone who can make more images this will not change.

 

Link to comment
Share on other sites

I can and had planned on making more animals to hunt, but as for free mods go i was only going to share the one.

as i get better i would like to start making paid mods. Offering up a simple version for a free mod then having a paid mod that is more complex.

1.) simple version you can hunt a deer in the woods.

2.) Complex version you can pick from many animals to hunt from with each having a few different hunts to them.

 

 

 

How are you going to determine where the kill shot and non-critical area's of the deer are?

Well for a text game this seemed like something not possible when i first had the idea. but i have made this work.

When i find or make two images i will showcase the functionality of the mod.

if you only need two images, the woods and the deer in the woods, does that mean the deer will always end up in the same place?

If so, could a player not just find the kill shot and keep their mouse hovered over that area?

For now yes the deer shows up in the same place. I am still looking for images to make the mod more complex so this will be delt with.

In the long run it would need several images with the animal in various places on the screen.

 

Until i find someone who can make more images this will not change.

 

What I'm trying to do is to get you thinking.

You only need two images.

An image of the woods, an image of the deer (just the deer)

You would then create the situation for hunting with these two images.

You would create three divs.

Like so:

<div id="hunting-holder">
   <div id="woods"></div>
   <div id="deer"></div>
</div>

 

Next up you're gonna need some CSS

#hunting-holder {
   position: relative;
   width: 640px;
   height: 480px;
}

#hunting-holder > * {
   margin: 0;
}

#woods {
   position: absolute;
   top: 0;
   left: 0;
   background: url("img/woods.png");
   z-index: 2;
   width: 640px;
   height: 480px;
}

#deer {
   position: absolute;
   background: url("img/deer.png");
   z-index: 3;
   width: 140px;
   height: 120px;
}

 

Basically, what this does is layer the two inner divs on top of each other, with the deer on top.

What you're gonna want to do next is set up some JavaScript to place the deer image in a certain position.

I'll use some jQuery to make it easier.

 

function setup_hunting(){
   var deer = $("#deer"),
   top = deer.offset().top + 100,
   left = deer.offset().left + 200;

   deer.css({top: top, left: left});
}

function find_shot(mX, mY){
   var kill_left = $("#deer").offset().left + 20,
   kill_right = $("#deer").offset().left + 40,
   kill_top = $("#deer").offset().top + 10,
   kill_btm = $("#deer").offset().top + 30;

   if(mX > kill_left && mX< kill_right && mY > kill_top && mY < kill_btm){
       // critical shot
   } else {
       // non critical shot or missed
   }
}

 

The setup_hunting will place the deer at the certain place in the woods.

The find_shot will take the mouse's x and y position as the parameters and compare that the kill area which is set up by the variables. That kill area will stay the same no matter where the deer gets placed in the woods

Edited by Coly010
Link to comment
Share on other sites

Okay now that i have had a chance to ponder over your suggestion on how this could and should work.

I come to realize that my simple version of this is no where near what it should be for this to be a proper mod.

But here is what i have it doing. Very simple in comparison to the code/suggested methods you posted.

Dont laugh to hard when you see how i was doing this. lmao

 

<?php

     $chance = mt_rand(1, 25);
     if ($chance == 3)
     {
     echo '<meta http-equiv="refresh" content="2;"> ';
     echo " <h2>Your Hunt has started.</h2> ";
         echo "
         <table cellpadding='0' cellspacing='0'>
   <tr>
       <td><img src='images/hunting/hunt1.png'></td>
       <td><img src='images/hunting/hunt2.png'></td>
       <td><img src='images/hunting/hunt3.png'></td>
   </tr>
   <tr>
       <td><img src='images/hunting/hunt4.png'></td>
       <td><img src='images/hunting/hunt5.png'></td>
       <td><img src='images/hunting/hunt6.png'></td>
   </tr>
   <tr>
       <td><img src='images/hunting/hunt7.png'></td>
       <td><img src='images/hunting/hunt8.png'></td>
       <td><img src='images/hunting/hunt9.png'></td>
   </tr>
   <tr>
       <td><img src='images/hunting/hunt10.png'></td>
       <td><img src='images/hunting/hunt11.png'></td>
       <td><img src='images/hunting/hunt12.png'></td>
   </tr>
   <tr>
       <td><img src='images/hunting/hunt13.png'></td>
       <td><img src='images/hunting/hunt14.png'></td>
       <td><img src='images/hunting/hunt16.png'></td>
   </tr>
   <tr>
       <td><img src='images/hunting/hunt15.png'></td>
       <td><img src='images/hunting/hunt17.png'></td>
       <td><img src='images/hunting/hunt18.png'></td>
   </tr>
   <tr>
       <td><img src='images/hunting/hunt19.png'></td>
       <td><img src='images/hunting/hunt20.png'></td>
       <td><img src='images/hunting/hunt21.png'></td>
   </tr>
</table>
         ";
     }


     else
     {
         echo '<meta http-equiv="refresh" content="5;"> ';
         echo " <h2>Your Hunt has started.</h2> ";
         echo "
         <table cellpadding='0' cellspacing='0'>
   <tr>
       <td><img src='images/hunting/woods1.png'></td>
       <td><img src='images/hunting/woods2.png'></td>
       <td><img src='images/hunting/woods3.png'></td>
   </tr>
   <tr>
       <td><img src='images/hunting/woods4.png'></td>
       <td><img src='images/hunting/woods5.png'></td>
       <td><img src='images/hunting/woods6.png'></td>
   </tr>
   <tr>
       <td><img src='images/hunting/woods7.png'></td>
       <td><img src='images/hunting/woods8.png'></td>
       <td><img src='images/hunting/woods9.png'></td>
   </tr>
   <tr>
       <td><img src='images/hunting/woods10.png'></td>
       <td><img src='images/hunting/woods11.png'></td>
       <td><img src='images/hunting/woods12.png'></td>
   </tr>
   <tr>
       <td><img src='images/hunting/woods13.png'></td>
       <td><img src='images/hunting/woods14.png'></td>
       <td><img src='images/hunting/woods15.png'></td>
   </tr>
   <tr>
       <td><img src='images/hunting/woods16.png'></td>
       <td><img src='images/hunting/woods17.png'></td>
       <td><img src='images/hunting/woods18.png'></td>
   </tr>
   <tr>
       <td><img src='images/hunting/woods19.png'></td>
       <td><img src='images/hunting/woods20.png'></td>
       <td><img src='images/hunting/woods21.png'></td>
   </tr>
</table>";
}
?>

 

This is just how it is displayed.

The links to shoot are not in this posted code, more a demonstration of how i was doing this.

I have the woods image split as well as the woods image with the deer included into it.

The split images with the deer inside of them are the images that will be links to shoot.

As the deer is split into several images the ability to have a critical hit zone and non critical are done that way.

 

Link to comment
Share on other sites

Yep, your way is simple, but it offers users only the same thing over and over, with a chance of having a smaller time to click.

The way I have shown offers more variety for the user. User's love variety.

It's a good effort though, and a good mod :)

I just wanted to see how the cogs would turn in your head and if you would understand my suggestion. The greatest thing about the way I have it is if you want to use a different animal, then you can use jQuery to change the background-image, then use jQuery to send an asynchronous POST to your code with the new type of animal and if the user got a kill shot and if so, it'll do a certain thing :).

Gotta love JavaScript.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...