How excited are you for this project???
SUPER EXCITED!!
 9%  [ 19 ]
SUPER FRUITY EXCITED!!
 44%  [ 89 ]
All of the above
 46%  [ 93 ]
Total Votes : 201

About how long does it take to compile this? If it isn't too long, I would recommend compiling it as well and putting the conpiled version into github every time an update arrives. That way, us that might not be able to compile it or are restricted from compiling it, can have a pre-compiled version to use.
TimmyTurner62 wrote:
About how long does it take to compile this? If it isn't too long, I would recommend compiling it as well and putting the conpiled version into github every time an update arrives. That way, us that might not be able to compile it or are restricted from compiling it, can have a pre-compiled version to use.

If I make a pre-release I’ll let you know.

In other news, I did a ton of work on the graphics today. Most of the sprites just needed to be centered, but I also touched them up all up a bit. Pieman helped redo the pineapple and I completely redid the bomb. I'm pretty proud of how it's all turning out. Of course, there are still many fruits I haven't added.

The "xxx" counter works now too, for when you fail to slice a fruit.



I did try to add some fruit juice earlier, and it looked okayish, but I've come to the conclusion that it will just be too much for the processor.
You should regulate the game loop time / frame rate, as currently you can see the game slow down whenever you slice.
commandblockguy wrote:
You should regulate the game loop time / frame rate, as currently you can see the game slow down whenever you slice.

Yeah, I just don't know how to do that exactly. Others have told me to do it already but so far no one has explained it to me in English terms.
Here's how I would do it (roughly based on the second_counter2 toolchain example) to get a fixed frame rate:

Code:
#define ONE_SECOND 32768/1
#define DESIRED_FPS 30 //or whatever
void main(void) {
    /* Set the minimum frame time */
    timer_1_MatchValue_1 = ONE_SECOND / DESIRED_FPS;

    /* Reset the counter */
    reset_counter();

    /* This is your main game loop. --Signed, Captain Obvious */
    while(game_running) {

        /* Game code here... */

        if (timer_IntStatus & TIMER1_MATCH1) {
            /* Game is running behind, maybe do something about that */
           /* dbg_sprintf(dbgerr, "Error: Can't keep up! Did the system time change, or is the server overloaded"); or some other suitable method of keeping track of the fact that the game is running to slow */
        }

        /* Pause until we reach the match value */
        while (!(timer_IntStatus & TIMER1_MATCH1));

        /* Reset the count */
        reset_counter();

        /* Acknowledge the interrupt */
        timer_IntStatus = TIMER1_MATCH1;
    }
}

void reset_counter(void) {
    /* Disable the timer so it doesn't run when we don't want it to be running */
    timer_Control = TIMER1_DISABLE;

    /* By using the 32768 kHz clock, we can count for exactly 1 second here, or a different interval of time */
    timer_1_Counter = 0;

    /* Enable the timer, set it to the 32768 kHz clock, enable an interrupt once it reaches 0, and make it count down */
    timer_Control = TIMER1_ENABLE | TIMER1_32K | TIMER1_NOINT | TIMER1_UP;
}

You could also just multiply the velocity of a fruit by the amount of time the last tick took, then divide by the expected amount of time for a tick, when calculating the amount to change the fruit's position by. You would have to do the same for the amount of velocity due to gravity, too , I guess. That wouldn't run at a fixed framerate, but the physics would run at the same rate regardless of how slow the game is being.

EDIT: looking through the code to see if I can optimize the actual issue. You should split the project in to multiple files, at least so that the menu/graphics are separate from the main game. It makes it easier to read.

EDIT 2: It might be all the floats, which are probably unnecessary. I made an integer-only version of your line collision function for my Tanks! game,shameless self promotion, I know so if it is the problem I can find it for you.
Thanks, I’ll see if I can get that to work and then I’ll let you know.

Does anybody think the sprites should be bigger? I’m kind of looking at the game now and thinking the watermelon and other fruits are pretty small in relation to the screen size. What if they were scaled 2x?
Michael2_3B wrote:
Does anybody think the sprites should be bigger? I’m kind of looking at the game now and thinking the watermelon and other fruits are pretty small in relation to the screen size. What if they were scaled 2x?

2x seems a little big, I'd need to see it to know for sure if I liked it better or not, but I think its fine how it is.
We'd need to see a screenshot of 2x big sprites to find out.
Something happened and I don't know what



ShinyGardevoir wrote:
We'd need to see a screenshot of 2x big sprites to find out.

I'll get back to you on that
Michael2_3B wrote:
Something happened and I don't know what



ShinyGardevoir wrote:
We'd need to see a screenshot of 2x big sprites to find out.

I'll get back to you on that


Unmapped sprite. obviously Check the variable name to see if it is exactly the same as you defined it Razz
If you are using an appvar, verify that the sprite was put in there correctly, as well as the variable used to draw the sprite is pointing to the right offset in the file Razz

This happens to me in ICE all the time XD
If possible with the X-lib CE variant pallete, try to make the background a set of dark wood planks, like the default background in the mobile game.
Looks great, though I second wondering what it would look like/how it would run with sprites 2x the size?
ShinyGardevoir wrote:
If possible with the X-lib CE variant pallete, try to make the background a set of dark wood planks, like the default background in the mobile game.

I’ll try to do that soon, not sure when or how but that is on my list.

As for the 2x size, I severely miscalculated and that is actually way too big. I may just keep it 1x, but I also am really liking either 1.2x or 1.3x. And The scaling isn’t slowing it down very much by what I can tell.
Are you sure you can scale the fruits to a proportion between 1 and 2? Sounds to me like the fruit would look distorted.
ShinyGardevoir wrote:
Are you sure you can scale the fruits to a proportion between 1 and 2? Sounds to me like the fruit would look distorted.

I'm guessing he could remake the sprites based off an original reference.
ShinyGardevoir wrote:
Are you sure you can scale the fruits to a proportion between 1 and 2? Sounds to me like the fruit would look distorted.

I wouldn't have said it if I hadn't already done it. Using the RotateScaleSprite( function, with the value 64 as a scaling factor of 100%, I easily just do 1.2*64 inside the function to scale it accordingly. And it does not look at all distorted.

On another note, I've been getting a good bit done lately. The unmapped sprite function was fixed. At the same time, I was able to fix the speed issue when slicing. Both issues were actually related to my entity counter variable (eC), which I went in and reworked as well. eC tracks the amount of unsliced sprites on the screen at any given time, and so now I only check slices for the amount of whole entities on the screen, and only at spots in the array that actually contain those entities.

The reason slicing slowed everything down so much earlier is because I was running the isSliced( function over 20 times for each and every line in the slice (I only just recently realized how stupid I was when I wrote the code earlier). And I was doing all the calculations involved for array slots that didn't even contain an entity.

Anyways, that's a mouthful. I've got some bigger updates to come. Speed is more consistent now because I fixed the root of the problem. More entities on the screen still means a slight slow down, but I can probably fix that with a bit of velocity multiplication or something.

I'll update the GitHub and make another screenshot after I finish a few other things.
Alright, so I've got a major update!

-As I said, the speed issue with slicing is fixed.
-I implemented the high score.
-Pause menu is added.
-"Game Over" title is added.
-Fruits in-game are now 1.2x the size.

Source code is updated in the github.

Still left to do:
-Add wooden plank background
-Add more fruits
-Try to smooth out game speed, more sprites onscreen == slower game
-Try to make slicing and things more organic if possible
-Finish up submenus
-Figure out why the heck my recent APNG's I've made are being played back 3000 times slower than they need to be
I wasn't kidding when I said the screenshot I took was 3000 times slower than real time. I'm not sure what the problem is, but I ended up converting it and speeding it back up in ezgif. Here's some of the new stuff:



Yes, I did actually play and get a high score of 89. And no, I haven't added point combos or anything yet. I will soon, though.

One of the other things I forgot to mention is that I've started reworking the fruit throwing, as you can see now sometimes 2 or 3 fruits are thrown at the same time. I'll add a combo mechanism soon and also eventually special fruits and the pomegranate.
Looking very, very spiffy!

Maybe you could use the "sliced fruit input system" for the pause menu? Even if it was just a hard coded animation it'd be cool.
_iPhoenix_ wrote:

Maybe you could use the "sliced fruit input system" for the pause menu?

In the mobile game, I don't think it's like that. But that...well...can go both ways.
  
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
» Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
» View previous topic :: View next topic  
Page 5 of 9
» 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