Jump to content
IGNORED

LynXmas 2020 Game Jam


Igor

Recommended Posts

2 hours ago, Igor said:

I think that will be a must with the mascara! I like the snow splash on landing effect there!

Thanks. It starts to feel kind of funny to play this :)

1838009431_Screenshotfrom2020-12-1011-11-02.png.691694ae8605d387cf5efde57a881872.png

 

With this game I screw all my chances of getting any Christmas gifts at all...

  • Haha 3
Link to comment
Share on other sites

26 minutes ago, LordKraken said:

stupid me thought the exact same thing... maybe Karri is trying to deliver us a message here :D

Oh geeze. Swedes...

Here is a screenshot with perfectly ROUND snow... Snow GLOBES. Not snowb***s. Soon I change the title to not-nice ;) 

Screenshot from 2020-12-10 13-54-18.png

  • Haha 2
Link to comment
Share on other sites

4 hours ago, Igor said:

Awesome! :D

 

Hey @karri how do you keep track of and draw the snowballs?  Is it one SCB per snowball or do you use the same SCB and draw it multiple times?

I have linked all the sprites and allocated 8 sprites for snowballs. So each snowball has its own hpos/vpos field. Then I have also an extra field named "h" that contains the flight path index.

 

static signed char sparabel[] = {
 1,0,1,1,0,1,1,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0
};


static int flightpath(sprite_t *Spr) {
    int ret = 3;

    if (Spr->h < sizeof(sparabel)) {
        ret = -sparabel[Spr->h];
    } else {
        if (Spr->h < 2 * sizeof(sparabel)) {
            ret = sparabel[2 * sizeof(sparabel) - Spr->h];
        }
    }
    Spr->h += 1;
    return ret;
}

static void moveshots() {
    sprite_t *Spr = (sprite_t*)&SGirl;
    while (Spr->next != (char *)&SBall8) {
        Spr = (sprite_t*)(Spr->next);
        if ((Spr->sprctl1 & SKIP) == 0) {
            if ((Spr->data == Splash) &&
                (abs(Spr->hpos - SantaX) < 2)) {
                Spr->sprctl1 |= SKIP;
            }
            if (Spr->vpos > 97) {
                Spr->sprctl1 |= SKIP;
            }
            Spr->vpos += flightpath(Spr);
            if ((Spr->sprctl0 & HFLIP) == HFLIP) {
                Spr->hpos += 1;
                if ((SantaY == 98) && (abs(Spr->hpos - SantaX) < 8)
                    && (Spr->vpos > 97-58)) {
                    if (fightmode == 0) {
                        jumptime = clock() + 300;
                        fightmode = 1;
                    }
                    Spr->data = Splash;
                    abcplay (3, "X200I0V20T4R0H10K1O0 g");
                    reducehealth();
                }
                if (Spr->hpos > 168) {
                    Spr->sprctl1 = PACKED | REHV | REUSEPAL | SKIP;
                }
            } else {
                Spr->hpos -= 1;
                if ((SantaY == 98) && (abs(Spr->hpos - SantaX) < 12)
                    && (Spr->vpos > 97-62)) {
                    if (fightmode == 0) {
                        jumptime = clock() + 300;
                        fightmode = 1;
                    }
                    Spr->data = Splash;
                    abcplay (3,
                        "X200I0V20T4R0H10K1O0 g");
                    reducehealth();
                }
                if (Spr->hpos < -8) {
                    Spr->sprctl1 = PACKED | REHV | REUSEPAL | SKIP;
                }
            }
        }
    }
}

So no deep magic. Just a parabel tracking.
 

  • Like 1
Link to comment
Share on other sites

44 minutes ago, karri said:

a parabel tracking.

I think you mean a parabola ;)

 

Quote

Is it one SCB per snowball or do you use the same SCB and draw it multiple times?

 

You really can't do that, unless you want (!?) to miss the power of linked sprites. It really makes a huge difference. I think Nop in one of his previous game (was it lawnmower?) had huge performance issues, that got fixed once he put everything in a linked list.

  • Haha 1
Link to comment
Share on other sites

16 minutes ago, LordKraken said:

I think you mean a parabola ;)

 

You really can't do that, unless you want (!?) to miss the power of linked sprites. It really makes a huge difference. I think Nop in one of his previous game (was it lawnmower?) had huge performance issues, that got fixed once he put everything in a linked list.

Alltså en parabel på svenska.

Link to comment
Share on other sites

Yep I do use linked SCBs, mostly anyway. In some cases I find it easier to draw some sprites separate because I don't want to bother with sorting based on occlusion/depth i.e. the present can appear in front or behind Santa in my game. 

Link to comment
Share on other sites

28 minutes ago, Igor said:

Yep I do use linked SCBs, mostly anyway. In some cases I find it easier to draw some sprites separate because I don't want to bother with sorting based on occlusion/depth i.e. the present can appear in front or behind Santa in my game. 

You could simply allocate two present slots. One before and one after Santa. Depending on where you want it you can choose which sprite has the SKIP flag on it. Setting the SKIP flag could be in the final draw process just before the tgi_sprite command. In this way it can depend on the Y-coordinate of Santa compared the where the present is.

  • Like 1
Link to comment
Share on other sites

1 hour ago, Igor said:

I don't want to bother with sorting based

I wouldnt do any sorting in a gameplay loop.

 

You could for instance just look at your SCB list as a FIFO. New sprite is put at the beginning and then you just have to shift the other sprites in the list. You pay a bit at the insertion but then you're good. Main limitation is that the z-sorting is done once and for all so if you have different speed, it does not work :D

 

 

Link to comment
Share on other sites

I don't use linked sprites in Santa Factory because coded it "quick and dirty". If I find the time I'll clean the code ading them before the deadline, but it misses only 3,5 days and it's time to finalize everything.

 

My to do list to complete the game is:

- Make a end game screen

- Complete tune2 now at 25% (ingame tune)

- Add tune3 to the transition screen before starting every level (tune kindly composed by @miker , thank you friend)

- Design the puzzle mode levels (I have only 6 out of 32)

 

Decided to not add bonus tools and the password to resume the game because I'm short of time.

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

21 minutes ago, Nop90 said:

Decided to not add bonus tools and the password to resume the game because I'm short of time.

I have to complete the game today because there is no time left before the dead-line. The week-end is already spoken for as well as beginning of next week.

 

The good things: the music and sound effects are ready, the code is ready
The bad things: about 4 hours of graphics work today, no playtesting yet - but it does not matter as I did not write any bugs :) 

Link to comment
Share on other sites

I like the idea of the before and after slots, my current approach is to have the Santa and Squirrel SCBs swap next pointers around depending on which one is 'closer' to the player. Then the present sprite is either drawn before or after the Santa, but not linked into the SCB chain. I do this because the Squirrel doesn't care about where the present is since it either drops it and runs away or runs up to it and steals it.

 

The FIFO idea is good too but I'm not sure it will work very well in a dynamic system that I have where the sprites can move around each other unpredictably.

 

I'm certainly learning new things with this game jam and it feels a lot more like a community project even though we are all working on our own separate games! ?

  • Like 1
Link to comment
Share on other sites

If you have no more than santa and a squirrel, having a regular SCB linked list and just swapping the 2 data pointer is probably the best you can get. If you intend to have more squirels, then maybe not :)

 

That's ont of the thing I like with 8bits programming, the best engineering solution might actually not be the best in some circunstances :)

 

2 hours ago, Igor said:

working on our own separate games!

Aren't they going to be one single megapack game in the end ;)

  • Like 2
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.
Note: Your post will require moderator approval before it will be visible.

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.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...