Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Granito NPC for Rooted Forest #2635

Merged
merged 99 commits into from
Feb 18, 2024
Merged

Granito NPC for Rooted Forest #2635

merged 99 commits into from
Feb 18, 2024

Conversation

Rusty-Box
Copy link
Member

@Rusty-Box Rusty-Box commented Sep 12, 2023

Granito will be a friendly npc withi Rooted Forest levels. There are 3 variants planned, the small, big and giant Granito.

Small Granito:

The default variant, small Granito walk around randomly ocassionally stopping and looking around a bit and some may sit on the ground. They are also semi-smart, i.e. if there is ave ground to stand, they will drop of ledges otherwise they will simply turn around. If there is a wall in their path and the wall is low enough, they will jump over it! Otherwise, again, they just turn around.

And as a little bonus, if they see Tux close by they will also wave at him once and look up at the player if he stand on-top of their head :)

Big Granito: (sprites incomplete)

Big Granito are just a bigger version of Granito behaving the same as their small counterpart. The difference being they are a smart object, i.e. they do not walk of ledges! They also cannot jump. They do not wave at Tux.

Giant Granito: (sprites incomplete)

Giant Granito are merely meant as a background object. They simply sit around and don't really react to anything happening.

Note: All types of Granito, Tux can stand on but also walk past them, making them basically unisolid.

"Proof-of-concept" of small Granito behavior video, using scripted Objects:

granito_small_concept.mp4

TODO (Graphics)

  • Finish Small Granito sprites
  • Finish Big Granito sprites
  • Finish Giant Granito sprites

TODO (Code - need help)

Add images/creatures/granito along side a couple sprites. More to come!
They are not ready yet! Added them previously by accident
@Rusty-Box Rusty-Box added this to the 0.7.0 milestone Sep 12, 2023
@Rusty-Box
Copy link
Member Author

@MatusGuy wanted to work on the coding side of things!

@MatusGuy
Copy link
Member

i have no idea how i managed to not include granito.hpp in the commit

@FILIPOKonGithup

This comment has been minimized.

@FILIPOKonGithup

This comment has been minimized.

@tobbi
Copy link
Member

tobbi commented Sep 19, 2023

src/badguy/granito.hpp:10:3: style: Class 'Granito' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
  Granito(const ReaderMapping& reader);

Comment on lines 1 to 2
#ifndef GRANITO_H
#define GRANITO_H
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong header guard naming, also missing license info. (Same in granito.cpp)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the coding side, this PR seems to be very WIP so reviewing it now may be pointless.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I know, but I want to point out the obvious things.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still thanks for warning. Qt creator usually just does default

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's also other issues I notice on the surface, but would keep those for when it's ready for review.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How has this never been fixed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nvm github.dev fooled me

@NickerAban
Copy link

little reference to minecrafk villagers

@MatusGuy
Copy link
Member

:snowsmiley:

@FILIPOKonGithup

This comment has been minimized.

@MatusGuy
Copy link
Member

they may be uploaded when they're ready

@FILIPOKonGithup

This comment has been minimized.

@Rusty-Box
Copy link
Member Author

Giant Granito is still kill-able. Please fix :)

@FILIPOKonGithup
Copy link

why is it taking to long for them to get added?

@Frostwithasideofsalt
Copy link
Member

why is it taking to long for them to get added?

Their never getting added, because nolok killed them all! So sad.

@MatusGuy
Copy link
Member

They're not getting added because vincent stole industrial assets

@Rusty-Box
Copy link
Member Author

why is it taking to long for them to get added?

They are rather intricite and require a lot of tweaking and fixing since we never had a NPC type object/character in the game. There is also many other places we gotta work on so sometimes stuff falls behind, getting pickup later. Stay patient will you.

@Rusty-Box
Copy link
Member Author

@Vankata453 Marty told me awhile ago he may need your help with making Granito scriptable, when you have time that is.

@Vankata453
Copy link
Member

@Rusty-Box The SimpleSquirrel Squirrel API rework I'm currently working on is the perfect opportunity to add that. You can probably skip adding it until then?

@MatusGuy
Copy link
Member

Agree. Meanwhile, could you review the granito code?

@Rusty-Box
Copy link
Member Author

@Rusty-Box The SimpleSquirrel Squirrel API rework I'm currently working on is the perfect opportunity to add that. You can probably skip adding it until then?

Great. So let's get this thing reviewed and work on the scripting after alongside the API thing then

Comment on lines 219 to 238
// yo big granito can i sit on top of your head?
GranitoBig* granito = dynamic_cast<GranitoBig*>(&other);

if (!granito)
{
// i'm not a granito
return WalkingBadguy::collision(other, hit);
}

if (granito->m_carrying != nullptr)
{
// sorry im already carrying this guy
return WalkingBadguy::collision(other, hit);
}

// sure dude
granito->m_carrying = this;

// yay
m_state = STATE_SIT;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments are fine, could follow the convention of uppercase first letter though (and preferably, an end-of-sentence mark).

Comment on lines 84 to 85
bool m_stepped_on; /** true if tux was on top of granito last frame */
bool m_airborne; /** unfortunately on_ground() sucks */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for the comments.

@MatusGuy MatusGuy merged commit cfc226b into SuperTux:master Feb 18, 2024
33 checks passed
@FILIPOKonGithup
Copy link

why are the granitos only on the linux version of supertux and not the windows version?

@NickerAban
Copy link

at last the granitos have arrived :'D

@FILIPOKonGithup
Copy link

idk how many will take for them to add in the windows edition of supertux

@mrkubax10 mrkubax10 removed the status:needs-review Work needs to be reviewed by other people label Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

9 participants