Offset when rotating object sprites more than once

Started by TheManInBoots, Sat 29/02/2020 14:54:28

Previous topic - Next topic

Snarky

... And when you say "round up/down", do you mean rounding the magnitude/absolute value (so, towards or away from zero), or always towards positive/negative infinity?

Khris

Good question, but I'm only using negative offsets, so "rounding down" means "towards negative infinity".

Edit:
Actually, that's not true. The offsets do get positive occasionally, but the code works fine regardless.
So "rounding down" apparently means: -3.5 -> -4 and 3.5 -> 3

TheManInBoots

#22
Height odd, round down?

Nah, it's for both rounding up, when it's odd, and rounding down when it's even.

I've just done several tests, and uneven lengths need to get rounded up, and even numbers need to get rounded down.
So it's not the ratio that matters what I thought before.

But I feel in order to understand exactly why it behaves that way one would first have to know what trigonometric formulas exactly are used to calculate the rotation and resulting sprite lengths.
It would also make sense that you need to round up uneven lengths for BOTH height and width, since probably the same formula is being used for both width and height.

So maybe you can check that again Khris.

Well, yes, rounding down means towards the mathematical negative. -4 is less than -3, so rounding down from-3.5=-4

TheManInBoots

#23
[offtopic]Also Snarky, your style is not okay at all!

You were insulting me just because you didn't understand what I was doing here in this thread!

And there were other occasions where you constantly criticizing my positive input.

There was in Critic Lounge the post for improving the walking animation and you said what I said wasn't right because you did not understand it, and you tried to undermine what I had said. And I tried to be inclusive of your view as well, but I saw no inclusiveness WHATSOEVER from your side.

As well when I proposed ideas for the shadow module, you immediately said you need something more advanced, as if my ideas were so stupid.
I don't mind if you don't like my proposals, but your attitude was just to prove that you are smarter.

And the same here.
You're just trying to make people stupid, so that you can look smarter.
But it does not make you smarter, it makes you a jerk.

Even if my code had actually not worked, your response was completely inappropriate and you should have given constructive criticism and tried to explain it to me.
Instead of just judging and insulting me.

If I had listened to your harassments and insults, then now we wouldn't know how to do perfect, smooth sprite rotation by the way.
No thanks to you.

I believe when Chris Jones made this software for free and created the community, he did so with the intention of creating an opportunity for EVERYONE to contribute and take part in. For those who just want to have fun and play around, for those who are more passionate dealing with more complex issues, for EVERYONE.

Not just people who believe they are elite, like you, and try to discourage others with insults and power moves!


Here for your info part of the AGS forum definitions:

As a community, we want to be as inclusive and welcoming as possible. As such, we strongly believe that there should be no tolerance for harassment, discrimination or expressions of bigotry.

If you want to be a jerk, I'm sure there are forums for that as well, so what are you still doing here in this forum?


I'm feeling stressed out posting in this forum, because I expect to be criticized and put down.
I try to be nice and help others in the forums, as an attempt to show what I'm looking for and live by example.

But I feel uncomfortable aboutit.[/offtopic]

Snarky

#24
This is really off-topic for the board and thread, but since you're raising it I'll respond.

Quote from: TheManInBoots on Thu 05/03/2020 21:37:33
Also Snarky, your style is not okay at all!

You were insulting me just because you didn't understand what I was doing here in this thread!

I am aware I can rub some people the wrong way.

Just for the record, I understood what you were trying to do, I just did not believe that it could possibly have any effect, because I was unaware that while FloatToInt() acts the same way as regular int-truncation for positive numbers, it rounds the opposite way for negative numbers. Apparently both Khris and Crimson Wizard were surprised by this, too, so I think it's fair to say it's an obscure and unexpected quirk of AGS, but clearly I was too cocksure about it. It's not fun to find out that you were wrong about stuff you were 100% certain of, but I always try to acknowledge my mistakes and accept correction cheerfully. Thanks to Khris for setting me right in this case (and not for the first time)!

I didn't mean "Cargo Cult Programming" as just an insult (though clearly it's not flattering); I thought it was an accurate term for what you were doing. I was wrong, and I apologize once again. But maybe you should also consider that responding to coding advice with "I don't care that you don't like it. It works. You sound very upset" may not be the most constructive attitude in the first place.

QuoteAnd there were other occasions where you constantly criticizing my positive input.

There was in Critic Lounge the post for improving the walking animation and you said what I said wasn't right because you did not understand it, and you tried to undermine what I had said. And I tried to be inclusive of your view as well, but I saw no inclusiveness WHATSOEVER from your side.

As well when I proposed ideas for the shadow module, you immediately said you need something more advanced, as if my ideas were so stupid.
I don't mind if you don't like my proposals, but your attitude was just to prove that you are smarter.

You're a relatively new member, and until right now I hadn't noticed that you're the same person from those two earlier threads. I've just looked back at them, and I don't think your characterizations are accurate or fair. For example, in the thread about dynamic shadows, my first response to you was "Thanks for the illustrations, ManInBoots! Yes, that's more or less what I had in mind" followed by some technical discussion. It was some dozen posts into the thread before I had any disagreement with you, and what I wrote then was "I love your enthusiasm, Man! I think your constructions are a little bit off, though" followed by an explanation of the mistakes I saw in your work.

Nor can I see that I "undermined" you in the thread about walkcycles: I merely said of the diagram you'd made, "Mmm, I think that diagram misses out a key point" â€" which it did.

QuoteYou're just trying to make people stupid, so that you can look smarter.
But it does not make you smarter, it makes you a jerk.

Even if my code had actually not worked, your response was completely inappropriate and you should have given constructive criticism and tried to explain it to me.
Instead of just judging and insulting me.

I did, though? There was an explanation, advice and everything.

QuoteIf I had listened to your harassments and insults, then now we wouldn't know how to do perfect, smooth sprite rotation by the way.
No thanks to you.

I believe when Chris Jones made this software for free and created the community, he did so with the intention of creating an opportunity for EVERYONE to contribute and take part in. For those who just want to have fun and play around, for those who are more passionate dealing with more complex issues, for EVERYONE.

Not just people who believe they are elite, like you, and try to discourage others with insults and power moves!


Here for your info part of the AGS forum definitions:

As a community, we want to be as inclusive and welcoming as possible. As such, we strongly believe that there should be no tolerance for harassment, discrimination or expressions of bigotry.

It may interest you to learn that I actually co-wrote that with the rest of the moderation team.

QuoteIf you want to be a jerk, I'm sure there are forums for that as well, so what are you still doing here in this forum?


I'm feeling stressed out posting in this forum, because I expect to be criticized and put down.
I try to be nice and help others in the forums, as an attempt to show what I'm looking for and live by example.

But I feel uncomfortable aboutit.

Well, I'm sorry you feel that way. I don't really see those earlier interactions as problematic in any way, though. Disagreeing is not denigrating.

Since you're being blunt, I'll be blunt: You seem to have a problem taking any kind of criticism, and you get a real attitude the moment anybody contradicts you. For example, this response to Khris:

Quote from: TheManInBoots on Fri 28/02/2020 02:20:06
Haha, Khris, this stuff with function is very interesting to me, even if I don't use that in game scripting.
I don't have to unlearn it at all, because I know what is useful and works, even when I know more stuff like this on the side.
Besides it teaches me about the nature of script transitioning to newer versions.
Exploratory mind doesn't stop with what's rule bound.
Also, I think you should relax a bit before telling me that I should unlearn that immediately. That's too krass.
Some people just do things differently and you don't need to wrap your head around it and can just accept it.

That's just obnoxious.

TheManInBoots

[offtopic]Umm, okay.

To me it came across like you just didn't like it when I proposed ideas that were a bit different and not obvious at first sight and you were directly dismissive.

The suggestions I made for the shadow module e.g. were meant as inspiration. And I just meant to propose general ideas and felt like you dismissed it because of one flaw in it without getting the bigger picture.

I don't mind you being blunt.
For me it's not about taking criticism, but about the intention behind it.
I don't mind someone just speaking their mind, but it's  not obvious they always do or what response they expect.

It might seem that I took things a little too personally.
I keep thinking about if I was over-reacting and I will take a break soon a bit and come back in a couple days.

I didn't know there is a board for this kind of topic[/offtopic]

Khris

The only thing I want to contribute to the OT stuff is a comment about shit like this:

Quote from: TheManInBoots on Wed 04/03/2020 04:33:47Of course the jerkiness is related to the rounding, just not in the way you guys think.

Just in case you don't realize this, but in that sentence you come across like a total douchbag. And it doesn't really help that you tend to write long-winded posts with huge explanations about stuff that's pretty straightforward and basic but in a way that makes it sound like you, the only expert, has decided to share his wisdom with the plebs.

So please take that into account when you complain about other people's behavior towards you.

Now *I* am sounding like a total douchebag to some people probably, so yes, I'm sure it's mostly enthusiam. Just wanted to make you aware of this.

PS: telling you that I'm not going to debug badly formatted code isn't the same as demanding that you fix the formatting.

Slasher

TheManInBoots

Guys that have helped me over the years that have enabled me to produce over 60 games are people such as:


  • Khris
  • Snarky
  • Crimson Wizard
  • And a few others.....

They have all proved their worth many many times over and are guys one should listen to. Khris has bitten my tail off many times in years gone bye but he taught me many things and for that I applaud him....

We all get ideas and look for ways that would improve the engine etc....  and everyone has a right to have their say..

If you feel that the ags engine is not for you than try other game engines that may be best suited to you...

Pride usually comes before a fall.

Viva la ags   (nod)



TheManInBoots

#28
Khris,

You think about it as what you want. Snarky told me just before that I should just "do as I was told", while the method I had described was actually working, and he called me a cargo cult programmer.
Context counts.

Slasher,

I don't say nothing against AGS.
It happened to me before that there were limitations what I described in the other thread about the sprites.
And if there are engine limitations, as long as people are improving them and willing to work on them, there is no reason for me not to stay.
If a limitation shows up, at least there is a point, because the engine is gonna get better for it.
And in this case it was my scripting error, not AGS, anyways.
There is value as well in having a forum where you can explore and learn, and where things are developped in the moment and everyone can participate and that's something I can appreciate and I've learned a lot from the forums and of course there were people who helped me a lot as well.

But a certain amount of decency is necessary.

Slasher, don't drag Crimson Wizard into this conversation, come onhe's too cool for this.

Anyways, I'ma be off for a few days.

Khris

Still incapable of taking any criticism I see.

TheManInBoots

#30
Well you can think that if you want no problem

TheManInBoots

#31
Above comment was by mistake and can be deleted.

Snarky, I thought about it and it's something you have done repeatedly.

Rotation post here:

I have a very experimental personality, so I like to try things out a lot and find stuff out that way.
So when I just find out about smooth rotation I don't know yet how to explain it, and when you just tell me all the reasons it does not work, call me a Cargo culter, and tell me to stop what I'm doing, there's nothing I can say to you.
And why would I, you won't change your mind anyways unless Khris tells you to.
Btw, calling me a cargo cult programmer is insulting, not only because it means I'm wasting my time writing useless stuff, but it also means that I'm lying about it working, which is extremely insulting.
You disrespect my experimental personality, and try to force me to adapt your perspective, instead of letting me program and learn in the way that's natural to me and my personality.


Walk cycle:

Again, that's extremely demeaning of you to say that my diagram is missing something.
My diagram is a "zoom in" into the movement of the leg while it's placed on the ground, and the subtle behavior of it.
Besides the fact that the leg on the ground is straight, the other bent, is pretty common knowledge, someone in the post already noted that the legs are too bent, and that they are completely straight when on the very left and very right (which is 100% accurate, unlike what you said in that post). So I'm not even sure if your post contributed any new insight at all at that point. Side note: If I had done the animation myself, your comment would not have helped me.
But that's not even the problem. My problem was that you had to place yourself above my idea, to make my idea look worse.
You could've said: The leg on the ground is rather straight, in the air more bent. Completely unrelated to what I said (because it is).
But you had to place yourself above me and above my idea and say trhere is missing something (even though there isn't).
Since you have treated me like a complete idiot this entire time, I do not expect your attitude to change towards me. So why don't you ask an advanced professional animator if it's a good idea to keep the grounded leg the ENTIRE time straight (especially while and right after the foot is placed on the ground)?


Thread on Crimson Wizard's timer module:

In the thread I created about Crimson Wizard's Timer Module I experienced something similar.
When I asked him if it was possible to add a certain kind of additional function to the module, you immediately intervened and replied :
Quote from: Snarky on Mon 06/01/2020 17:48:00
No, that wouldn't work, and how is it better than the standard way of creating an object?
I find that a little intimidating in that way.
You didn't give an explanation (which at least Crimson Wizard offered afterwards).


The Shadow module:

For the shadow module, there was not a big problem with your communication, but again I observed that you want only ideas that are charged with the scientific terms and programming slang before you even consider an idea. You were only able to focus on the flaw in it, and not see if there was any potential in it, or parts in it that would be worth to be translated into the module.
And that's not at all how I'm wired. I like to take a bad idea when I see potential in it, and work on it until I make it great.
Also it created this feeling that unless I can explain everything perfectly and give you a whole technical explanation on it, you will not even consider my ideas to be of any worth. That's just so close-minded and counter-intuitive to creating something truly new and original. Good ideas come from everywhere. Not just the one's who ignorantly consider themselves the best and think only THEM can create something of value. (Don't get me wrong, I have absolutely nothing against knowledgeable, competent people. But I truly hate ignorance.)

Quote from: Khris on Fri 06/03/2020 13:36:17
And it doesn't really help that you tend to write long-winded posts with huge explanations about stuff that's pretty straightforward and basic but in a way that makes it sound like you, the only expert, has decided to share his wisdom with the plebs.

This is 100% bullying right here. I write long-winded sentences. That's the way I think, and the way my brain is wired. I don't try to sound like an expert by writing long winded sentences. I worry a lot about details, and I want to make sure there is no misunderstanding, and everything is understood. Khris is totally attacking my personality and my personal style here.

I love working in an original, authentic way. I believe good ideas come from EVERYWHERE. Everyone can have a great idea and insight, not just the people who consider themselves smarter than everyone else. And believing otherwise is very blind and ignorant.
You showed that you do not like it when I share original or creative ideas. You try to place yourself above my ideas, you try to undermine my ideas.
That's bullying right there.

Quote from: Snarky on Fri 06/03/2020 07:05:15
It may interest you to learn that I actually co-wrote that with the rest of the moderation team.
Well I don't see that you want to enforce those rules even though you wrote it.
Inlusivity is not something that is created by avoiding exclusion in my opinion.
Inlusivity is something that is created by expressing it ACTIVELY and letting people know that they are welcome and their contributions are respected, through words and gestures. Only stating that this forum is inclusive does not make it one more bit inlcusive. Not one bit.

[/quote]
Quote from: Snarky on Fri 06/03/2020 07:05:15
You're a relatively new member, and until right now I hadn't noticed that you're the same person from those two earlier threads.
That's not re-assuring. That would mean that you are like that with every new member of the forum.
Especially if you just saw me as a random new member, you could have expressed yourself way more gently.
Expressing that I was welcome here.

I always try to come up with ideas in an original way. When I experiment with rotation, I cannot give you an explanation for it right away.
When I study and observe for myself the leg movement pattern (by observing people for example), I cannot give you fancy terms for everything all the time. But I simply say what I observed.
And you just think that your knowledge is enough to criticize everything, and it does not help or encourage anyone, nor improve much. Just discourage honest sharing of ideas.

In all the examples above, you could've shared your questions about the subject without immediately judging what I did, or placing yourself above me or my idea.
If you immediately judge everything you don't understand or don't like, then you will ensure that no more original and truly new ideas will be shared on this forum. Because they will be immediately trashed and criticized! That's one way to make the forum stagnate!
You know that EVERY new idea sounds counter-intuitive and illogical in the beginning? And by immediately destroying that idea you shut down all progress.
You have to look an idea, look what the core part of the idea is, what the value in it, the potential, what you could work it into, before judging if it was good or bad.
(And that's something every successful artist will tell you btw.).
You are being extremely ignorant and dismissive.
You criticized ideas that weren't bad ideas at all.
For me that's bullying and so far away from honest criticism.

Honest feedback can be important, even while tough to swallow, but what you do is not criticizing. It's attacking everything you don't understand. (so much about tolerance in this forum)

I love adventure games, I love creating games, I'm so passionate about it!
I love learning from other people's insights, listening to their explanations.
But I hate people who just attack every idea they don't understand and talk in an intimidating manner.
Quote from: Snarky on Sun 01/03/2020 11:22:27
So just do it like Khris showed.
When you tell me to just do as I'm told and not making sure I understood everything you said, you don't try to help me learn and understand. You're trying to make me do things the way you want me to do them. And that's control, not help.
And your attitude, as well as Khris', take all the fun out of it.

I believe it's more important to encourage people, show them they're welcome, that their contributions are respected, that their ideas are respected, that their originality is welcome here. Encourage the good parts in other people, to encourage them to keep going.
Not tear them down whenever you can. That's so toxic.

One learns by COMMUNICATING, by explaining and sharing your view point and ideas, by listening to one another and showing respect.
That's how one can grow and learn and grow one's horizon.
Not by tearing other ideas down, criticizing all the time. Placing yourself above other people, and dismissing all the ideas they have.
That's control-seeking, bullying, and very toxic.

And you have shown me mostly that, just trying to wear my ideas down.

Snarky

Very well. You've had your say. If there's more, I suggest you take it to PMs.

Mandle

#33
Wow... TheManInBoots, you must really have a huge amount of down-time on your game development cycle to get this butt-hurt about people who know much more than you about the AGS engine "talking down to you" and to get this caught up in the drama of arguing how badly you were mistreated.

Yes, people will not be 100% considerate to your feelings when addressing your questions. Sometimes you might even feel like they are being condescending. But the amount you can learn from them over the long run will always be greater than the hurt feelings you might have felt along the way.

ANYWAY, they are still taking their time to address your issues for free about a game engine that is available FOR FREE.

Have you considered asking for your money back?

TheManInBoots

#34
Don't worry about the money, Mandle. Your mom made up for what you owe me.
Her butt hurts too, now btw.
And next time, before replying to my comment, maybe make sure to read it first, so you can reply with something more substantial than just unrelated, personal insults.


Crimson Wizard,

so here is a function I created for doing C-style rounding.
Code: ags
int CFloatToInt(float q, RoundDirection dir)
{
    if (q < 0.00) 
    {float r=-q;
    return -FloatToInt(r,  dir);}
    else
    return FloatToInt(q,  dir);
}

Btw. for some reason it doesn't let me make the Rounddirection optional.
When I write...
Code: ags
int CFloatToInt(float q, RoundDirection dir = eRoundDown)//added optional
{
    if (q < 0.00) 
    {float r=-q;
    return -FloatToInt(r,  dir);}
    else
    return FloatToInt(q,  dir);
}

...I get a parse error message for that line, and I don't understand why.
Also, I started to wonder, are there more functions that are useful in AGS but currently not included, like the absolute value function (abs) or this one just above?
It would be fun to create a little module that includes all of those expressions, so that you don't have to write every function yourself.

morganw

To have a default value for a parameter, as far as I know, it can only be specified in an import declaration. So you would need to be using the export/import mechanism rather than using the function in the same file that you declare it. Also, for historical reasons, default values can only be integers. Enums might be OK though, as they are effectively integer values when evaluated.

https://adventuregamestudio.github.io/ags-manual/ScriptKeywords.html#function

TheManInBoots

#36
In the forums they mentioned import/export when talking about parameters, but I did not find it mentioned explicitly that you can add the optional parameter only in the import part.
So thank you morganw. It works perfectly this way. Also with the Enum.

SMF spam blocked by CleanTalk