Alvajoy123 wrote:

Yes, at the beginning of development I was "lazy" and ended up making the menu with sprites but ended updating/changing it yesterday. is this better?

Yes, that looks a lot better, much cleaner and easier to read (and probably more space-efficient as well). This is a neat project and it's good to see development resume on it.

Looking forward to more updates!
Update:

I noticed that ducks were rendering In Front of the trees but in the original game they render behind them so I went ahead and cleaned that up.


Game A


Game B


I Also started development for Game C, it's not much for now but I finished creating the sprites and setting up rendering. I just need to fix the enemies flying movement before I can move on.


Game C


Changelog (Pre-Alpha):
  • Added high score saving
  • Fixed minor bugs
  • Started Development for "Game C"


You can stay up to date with in-depth development via Github: https://github.com/Overload02/DuckHunt

epsilon5 wrote:
Alvajoy123 wrote:

Yes, at the beginning of development I was "lazy" and ended up making the menu with sprites but ended updating/changing it yesterday. is this better?

Yes, that looks a lot better, much cleaner and easier to read (and probably more space-efficient as well). This is a neat project and it's good to see development resume on it.

Looking forward to more updates!


Hey Epsilon, Thanks you for the support! Smile
Update:

I've added a forced fly away scene where the duck flyaway when the player does not shoot every 20-25 seconds. This forces the player to shoot or risk the duck flying away this was also in the original NES game.


Forced Flyaway Example

I also had some time to develop game C a bit more I believe I've got the clay duck movement packed down.


Game C showing Movement of "clay" ducks via lines.


Game C without the movement lines.

Of course the movement will not be this quick I just need to implement speed into the movement algorithm. But Overall, the game is almost done there could a ton of optimization that could be done but for now I'll be working on releasing it and adding those optimization after the game has been released.


Changelog (Pre-Alpha):
  • Added Forced Fly Away to Game A and B
  • Fixed Movement Algo for Game C
  • Optimized to Buffering Technique



You can stay up to date with in-depth development via Github: https://github.com/Overload02/DuckHunt
Update:


Pre-Alpha 0.1.0

I've released a Pre-Alpha version of Duck Hunt on Github!

Not much has changed besides the user not being able to play game mode C in this current release. My goal for this release is to get user input on design and debug any unknown issues.


Download Here: https://github.com/Overload02/DuckHunt/releases/tag/Pre-Alpha_0.1.0

Changelog (Pre-Alpha):
  • Restricted Game C "P-A 0.1.0"
That small duck sprite/icon is kind of awesome, not gonna lie.

I am so glad to see this project is still alive and kicking! It looks genuinely like the most faithful adaptation of Duck Hunt I have ever seen! Nice work!

It looks like the reticle has just a set move speed, is there any plans or thoughts on having a fast/slow move toggle? Or have a speed ramp?
CDI wrote:
That small duck sprite/icon is kind of awesome, not gonna lie.

I am so glad to see this project is still alive and kicking! It looks genuinely like the most faithful adaptation of Duck Hunt I have ever seen! Nice work!

It looks like the reticle has just a set move speed, is there any plans or thoughts on having a fast/slow move toggle? Or have a speed ramp?


Thank you! As for the reticle, when the user clicks up, down, left, or right in a combo (ex. [<][V] or [^][>]), it moves at a noticeably faster speed. I implemented a speed toggle a while back in development, but it didn't make the game enjoyable. As for a speed ramp, I might add it in the future. If I'm not mistaken, the ducks also have a speed ramp based on your level.
Hello Cemetech! It's been a while.

I finally released the pre-alpha version of Duck Hunt on cemetech! Razz

Download: https://www.cemetech.net/downloads/files/2413/x2898

The current version doesn't have Game Mode C.
Ya! I'm excited to try this.
Calculatordream wrote:
Ya! I'm excited to try this.


Yay! Don't forget to look at the manual and readme!

Manual: https://github.com/Overload02/DuckHunt/blob/main/docs/DUCKHUNT_MANUAL.pdf
Readme: https://github.com/Overload02/DuckHunt/blob/main/README.md
Hello Cemetech!

Quick Update:

I have now made sure the program lets you know when you are missing the sprite file! (minor update)



I am having a bit of an issue with the development of game C Wink I can't seem to get the movement code right.



So far, this is the movement with the line tracing where it should go, but as you can see, the movement is too fast! The user won't be able to shoot the clay. So I want to slow down the movement so the last game mode can still be fun! Any help would be very much appreciated (Credit will be given). Smile

Here is the current movement code:

Code:
            // Game C Updating
            /* Updating the X position */
            if (enemies[i].x != enemies[i].gotoX)
            {

               speed = abs(enemies[i].gotoX - enemies[i].x) / (enemies[i].speed); // pythagorean theorem

               if (enemies[i].x < enemies[i].gotoX)
               {
                  enemies[i].x += speed;
               }
               else
               {
                  enemies[i].x -= speed;
               }

               /* Check if the positing is in the radius of dest point */
               if (abs(enemies[i].gotoX - enemies[i].x) <= (enemies[i].speed * 2))
               {
                  enemies[i].x = enemies[i].gotoX;
               }
            }
            else
            {
            }

            /* Updating the Y position  */
            if (enemies[i].y != enemies[i].gotoY)
            {

               speed = abs(enemies[i].gotoY - enemies[i].y) / (enemies[i].speed); // pythagorean theorem

               if (enemies[i].y < enemies[i].gotoY)
               {
                  enemies[i].y += speed;
               }
               else
               {
                  enemies[i].y -= speed;
               }

               /* Check is the y position is in radius of the destination position */
               if (abs(enemies[i].gotoY - enemies[i].y) <= (enemies[i].speed * 2))
               {
                  enemies[i].y = enemies[i].gotoY;
               }
            }
            else
            {
               // Check if the duck has been shot if not drop
               if (enemies[i].x == enemies[i].gotoX)
                  enemies[i].angle = DUCK_FALLING;

               // Change costume
               enemies[i].cnum = 16; // Change to small costume

               enemies[i].speed = 1; // slowly fall

               // set new goto y
               enemies[i].gotoY = 128; // change the position
            }


Imagine the code is a loop running and updating the position.

Github link: https://github.com/Overload02/DuckHunt/blob/main/src/ducks.c#L532

What it should look like: https://youtu.be/J3sfsP9W048?si=ZUG_u0yM6nYwtdkc&t=1419
Awesome work on this. This is very true to the original. Hopefully you add the dog laughing at the player in future versions. Smile

I got to round 15 in Game B
This is a very classical problem due to inconsistancy between position and speed.

It would be best if you can measure the time spend to do the full gameloop (with a timer by instance). Let call this "dt"

then update position.x by adding or sustracting speed * dt.

speed * dt is a displacement increament.

if the game runs quickly then increment is small, if it runs slowly the increment is greater.
It also gives constant gameplay.
DJ Omnimaga wrote:
Awesome work on this. This is very true to the original. Hopefully you add the dog laughing at the player in future versions. Smile

I got to round 15 in Game B


Yayy!!! Thank you for playing; 15 rounds is a lot! I believe the dog does laugh in the current version, but it does it too quickly. I'll have to fix it before the beta versions.

slyVTT wrote:
This is a very classical problem due to inconsistancy between position and speed.

It would be best if you could measure the time spend to do the full gameloop (with a timer by instance). Let call this "dt"

then update position.x by adding or sustracting speed * dt.

speed * dt is a displacement increament.

If the game runs quickly, the increment is small; if it runs slowly, the increment is greater.
It also provides constant gameplay.


This sounds like a great solution. I do have a few questions about it before I implement it. You mentioned I need to implement a timer. How would I go about implementing it? I'm currently using the integer timer, not the one built into the C toolchain. Other than that, I believe I understand how to implement the math part, but the timer is a bit confusing, if you could explain a bit.

Maybe that will also help with the bug above, where the dog isn't laughing on some calc.
A simple approach on the CE is to use clock() to measure time; you get CLOCKS_PER_SEC (which is 32k) ticks per second which seems like it ought to be plenty of precision, and it's easy to time how long things take by saving the time when you start doing something, then subtract the time when you're done from the starting time to get the elapsed time.
Some minor problems that I have found in the game (same as the git-hub issue)
-Dog does not laugh at you for failing to shoot in time.
Likely due that speed issue stated earlier, did not even appear on my calc
-White rectangle is supposed to appear over the ducks, not the reticle.
Just some visual thing I've noticed
-Duck speed is supposed to be constant and increase through the rounds, not variable.
This makes some of the later rounds like 15 feel weird as the duck can go from a snail's pace to hyper speed
-Duck counter is supposed to be constant, not a fast variable speed.
Just some visual thing I've noticed
-No perfect message at end of a round
The original game awarded you 10,000 points for hitting all ducks at the end of a round
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 3 of 3
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement