Recent posts by EndlessSporadic on Kongregate

Flag Post

Topic: Off-topic / Anime Addicts Anonymous (AAA)

Im actively watching Gintama at this very moment. Currently on episode 55 (season 2). I’ll be saying my thoughts as someone who is neither a fanboy or someone who hasn’t even seen the show. Gintama is quite episodic and each episode is hit and miss. The first few episodes were rather poor due to the need to establish the characters and the low budget they were on. As each episode goes on the humor slightly changes and the value slightly increases. Sexual humor is only a small part of the show. Yes, Gin makes quite a few crotch jokes, but most of the humor comes from references to other shows. Is it the best anime ever? No, I don’t think so, but I can’t say I’m not enjoying the ride.

Originally posted by KiNGDOMHEARST:

OreGairu S2 is pretty much God.

it fixes every single issue that Inferno Cop had.

I can’t tell if you’re joking or not.

Likewise, I can’t tell if you are joking either. OreGairu S2 is pretty average all around.

I get the feeling you went into Inferno Cop expecting something instead of enjoying it for what it is and tries to be. With that said Inferno Cop is pretty meh objectively (shitty plot, poor characters, bad voice acting, bad art, etc…), and Ninja Slayer only fixes the formatting issues that Inferno Cop had. The story is still kinda iffy, but the art, voice acting, and characters are overall better. Even so they are all still pretty bad, but the enjoyment value for both is extremely high if you go into it without expecting something serious.

 
Flag Post

Topic: Off-topic / Anime Addicts Anonymous (AAA)

Originally posted by Meistheman:
Originally posted by Seesine:

is anyone watching Ninja Slayer From Animation?
it feels like an alternative version of everybody’s loved Inferno Cop, but with longer episodes (12 minutes) and awesome battle cries.

I was planning to watch it
So I guess it’s good?

If you have seen Inferno Cop, it fixes every single issue that Inferno Cop had. The only downside is that all of the characters are now voiced by someone different (the women are no longer voiced by men). It’s too early to determine whether it is “good” or not – only a few episodes have aired.

 
Flag Post

Topic: Off-topic / Anime Addicts Anonymous (AAA)

Another spoiler on Tokyo Ghoul √A’s ending:

Hover over me for spoilers.

 
Flag Post

Topic: Game Programming / Loading external XML

You don’t need a domain of your own and it doesn’t need to be done with PHP, ASP, and the like. The process you will need to look into is called operational transformation. It’s a pretty neat system and you should be familiar with the concept regardless of whether you wish to implement it or not. Ultimately, however, you need something to act as a server to store the most updated version that all other clients can pull from before editing. That is generally where the server part comes in.

 
Flag Post

Topic: Game Programming / [Q]Effective way to calculate velocity

My implementation wouldn’t reasonably be able to cache anything.

This here is the key point I am trying to drive home here. Lists can handle numbers and bools just fine, but when it needs to inject functionality relative to the other components in the list, the list completely flops. Each item in the list has no idea what the other items in the list are, and in certain situations this isn’t ideal. Ultimately you get a really bloated “if/else” logic chain going to determine the actual method you want executed in the loop. If I have debuff X, debuff Y shouldn’t apply, but I don’t want to remove debuff Y from my list since it needs to remain persistent. Decorators KNOW what other things are attached to it so it can modify its behavior appropriately without bloat and redundant code.

I apologize. I am really really bad at making my point, but I promise you that lists can only take you so far and you will find yourself writing redundant and bloated code down the line to make it work properly.

I have a question about your code. What would you change to be able to do this in Program.cs :

Ball.AddBuff(new DamageMultiplierBuff(1.3f));

with 1.3 being used in the GetDamageModifier function
and AddBuff is a function to add a new buff to the existing ones.

The code would look like the following:

public class DamageBuff : BuffDecorator
    {
        private float Modifier;

        public DamageBuff(float Value, Buff BuffToBeDecorated)
            : base(BuffToBeDecorated)
        {
            Modifier = Value;
        }

        public override float GetDamageModifier()
        {
            return base.GetDamageModifier() * Modifier;
        }

        public override string GetDescription()
        {
            return base.GetDescription() + ", increases damage";
        }
    }

Then you can do the following:

Buff MyBuff = new MovementSpeedBuff(new DamageBuff(1.3f, new DefaultBuff()));

It is even possible through the use of default parameter arguments to remove the need for “new DefaultBuff()”.

As for adding buffs to existing ones, that would need a slight change in setup. I can write that up a bit later as I have class shortly.

 
Flag Post

Topic: Game Programming / [Q]Effective way to calculate velocity

You can download the app and source code here.

Note that adding and removing specific debuffs is not included. It only shows how decorator works.

Edit: I am extremely terrible at expressing my thoughts, so here are some resources that explain the differences between the decorator pattern and using a list.

Link 1
Link 2
Link 3

 
Flag Post

Topic: Game Programming / [Q]Effective way to calculate velocity

I am writing a C# app that explains the usage of this pattern. I will share the source code shortly.

You have a debuff that slows the player and applies damage over time. This is Buff A.
You have a buff that removes crowd control from the player. This is Buff B.

How do you change the functionality when iterating over a list? You would need to remove Buff A from the list and add a different debuff that only has the damage over time functionality – not only that, you need to copy over the old member data from the old Buff into the new one. I’ll let you sit on this one to think about why this is an atrocious idea. Here’s a hint. Your game has over 200 different status effects. Some buffs and debuffs override each other while some complement each other. Do you want to program the countless if-else statements needed to determine functionality?

 
Flag Post

Topic: Game Programming / [Q]Effective way to calculate velocity

Honestly, I never ever saw the point of using the decorator pattern.

The decorator pattern’s job is to inject functionality onto an object. You can’t do that via list iteration. You can, however, do it with pseudo-recursion by calling your method then calling the Super of said method.

Say you have method DoSomething(). You can iterate over a list and have all the DoSomething() do something, but what if you need to change the behavior of DoSomething at runtime to add or remove functionality? You can’t do that with a list.

 
Flag Post

Topic: Game Programming / WebGL and PlayerPrefs(Unity)

Good to know. Thanks for sharing, vsistudio.

 
Flag Post

Topic: Game Programming / [Q]Effective way to calculate velocity

There you go! Still using a list there, but it is satisfactory for what he intends to use it for and this setup can be quickly swapped to use the decorator pattern if needed. +1 for the solution to this person’s issue in question. Decorator is definitely overkill if you only need one stat modifier, so I’ll definitely give you that.

 
Flag Post

Topic: Game Programming / [Q]Effective way to calculate velocity

because even knowing what the two patterns are

you’d have just said “use a callback function” instead of describing it in terms of patterns. Right?

From this I get the impression you don’t quite know what these two patterns mean. As for you not being sure how to use them I am not surprised, and I even implied that in my post. Design Patterns only really matter in structured environments that demand the ability to expand easily as well as remain maintainable. Flash games made by 1-3 people do not fall into either of these categories, but I want to encourage good programming practices. I’ll be blatantly honest – not even I remember to use these patterns sometimes.

It is a little lengthy and it applies to buffs (if it can be used for buffs it can also be used for debuffs), but I recommend reading this reddit post that uses the pattern to create items with randomly generated buffs. It is more robust and allows you to quickly and cleanly create new buffs without having to alter any existing code.

A quick code example using the pattern:

//NOTE: This is considered hard-coded as making functions named like this is what
//this pattern actively avoids.
Debuff CreatePoisonBurnAndFrostDebuff()
{
    Debuff MyDebuff = new PoisonDebuff(new BurnDebuff(new FrostDebuff()));
    
    return MyDebuff;
}

void TickDebuffs()
{
    Debuff MyDebuff = CreatePoisonBurnAndFrostDebuff();
    
    //This will apply the effects all three status effects.
    //Not only will it apply the effect, each debuff can even terminate itself if you
    //program it to do so (think of it as a linked list - if you want the burn debuff
    //to exhaust itself, you can move the pointer to point to the next debuff in line)

    MyDebuff.Tick();


    //Alternatively, you can get the total amount of damage that would be applied
    //by the debuff - it will recursively go through the classes and add up the total
    //damage.

    float DamageToApply = MyDebuff.GetDamage(); //return PoisonDebuff.GetDamage() + BurnDebuff.GetDamage() + FrostDebuff.GetDamage()

    //Of more interest to you will be how much the debuff changes the velocity of the actor.
    Ball.VelocityMultiplier = MyDebuff.GetVelocityModifier();
}

So, any time you want to slow or increase the speed of the ball, whether it be when the game first starts or when it collides with another object, add a buff or debuff with a positive or negative velocity modifier.

NOTE: Altering the velocity of any object directly when using a physics engine is highly discouraged, instead opting to use “AddForce/AddTorque/AddImpulse” methods. In such a case (using Unreal Engine 4 as an example), you would use the VelocityModifier gotten from the buffs to instead adjust either animation time, maximum velocities, mass, or forces applied to the object.

While making a list and iterating through them is an alternative, the decorator pattern makes functionality much more transparent and actually lets you change the functionality of an object at runtime. A list also requires an owning object to iterate over the list while the decorated item does not (since it itself is the list). The Java InputStream is the poster child for this design pattern and why it exists.

If either of you are interested in a little console app demonstrating how both the strategy and decorator patterns are used for a buff system feel free to send me a whisper with a request and I’ll be happy to cook something up for you tomorrow.

 
Flag Post

Topic: Game Programming / [Q]Effective way to calculate velocity

I would say “Design patterns to the rescue!”, but I am tired, you probably don’t care, and everyone else will yell at me because they think the lazy way is easier. Upgrade systems should be handled using a combination of two design patterns called the strategy pattern and the decorator pattern, but I know these fellows here will all yell at me saying you can do something like the following (pseudo-code ignoring syntax):

ball.ballSpeedY = ( ( Math.random() * 7 ) - 3 ) * SpeedMultiplier; 

Whenever you collect an upgrade or hit something you increase that speed multiplier.

 
Flag Post

Topic: Off-topic / Anime Addicts Anonymous (AAA)

Originally posted by JayZeeM50one:

Started Princess Jellyfish yesterday, finished today. SO good.

I had mixed feelings about that show. On one hand it was sort of unique in a way, and on the other it was really dull.

 
Flag Post

Topic: Game Programming / WebGL and PlayerPrefs(Unity)

Wonky as in it builds but doesn’t work. I find it hard to believe that Unity would release a version of their engine that does not compile. Any compilation issues are likely on your end (either you coded incorrectly or you are attempting to do something that is not quite supported [as is generally the issue with Unreal 4 and Blueprints]).

 
Flag Post

Topic: Game Programming / WebGL and PlayerPrefs(Unity)

Is it only wonky for Chrome or for all browsers?

 
Flag Post

Topic: Game Programming / Key Duration Jumping Code

Google search goes a long way ;)

https://www.scirra.com/tutorials/1048/platform-jump-height-or-movement-based-on-tap-or-click-duration

Basically you need to do physics. Here’s an outline:

- onButtonPress, apply X acceleration
- while the button is still pressed, apply (X acceleration – Y decrement) where Y increases in value as time passes
- after Z time, (x acceleration – Y decrement) will equal 0 and acceleration will be 0, causing physics to take over.
- if the button is released early, immediately set the acceleration to 0.

 
Flag Post

Topic: Game Programming / Attention idle gme makers..

There’s only so much you can do with “sit and let it go” mechanics. You leave it alone and a number goes up. The only difference between games is the skin it wears. That is akin to cloning and is frowned upon in the development community.

 
Flag Post

Topic: Off-topic / Anime Addicts Anonymous (AAA)

Somehow I ended up with 25 airing shows in my To-Watch list this season. How did that happen? Last I checked I only saw like 3 shows I was interested in.

 
Flag Post

Topic: Game Programming / Words are Hard

http://stackoverflow.com/questions/234591/upper-vs-lower-case

This has some good answers, but to sum it up there are characters that can’t make the round trip with string conversions with Turkish being the most notable offender. In most C-based languages ToUpper handles these conversions better than ToLower does since that’s the way the languages were designed.

 
Flag Post

Topic: Game Programming / Words are Hard

Depending on the game most developers will compare strings by making them all uppercase (this avoids many cultural differences). I have a lot of questions if the game requires case-specific string comparison.

 
Flag Post

Topic: Off-topic / Anime Addicts Anonymous (AAA)

I really enjoyed watching the first season, but the sequel from what I heard wasn’t as good as S1?

S2 was a huge disappointment. They tried to compress like 131 chapters into 24 episodes or something like that. I’ll won’t spoil anything, but you’ll notice a difference and have loads of questions coming out of the second season.

I’m curious as to whose body it is that Kaneki is holding. I’m thinking either Touka, Hinami or possibly a new character whose death plays a vital role in our main character’s development. Don’t want to spoil it for myself so soon..

It never directly tells you, but it is obvious only after watching the final episode.

Another problem I had was the lackluster ending. I don’t wanna spoil anything, so I’m just gonna say that the order of events are too conveniently placed and skewed way too much in favor of the MC that it doesn’t really follow the same direction as the previous episodes.

Story was the absolute killer of this anime for me. The ending was complete bullshit in my opinion and the last episode wasn’t even needed.

Final note: I really dig the ending song. It’s been a really long time since I have heard a good anime song sang by a male.

Not sure what your tastes are, but go look at Death Parade’s OP and ED sung by BRADIO and NoisyCell respectively.

 
Flag Post

Topic: Game Programming / Switching to AIR

Most compilers ignore assets that aren’t directly linked/referenced. This is to save space and improve compile times. Getting and creating references by passing a string is atrociously slow unless the objects are already created in a dictionary or map of some sort. In Flash you had access to the files because there was a direct reference to them in frame 1. Likewise the application saw “_sound:MySound” and knew it needed to include the Sound classes. If you just say “private Class _myClass:Class”, the compiler only includes “Class” files and doesn’t know that file is a sound file at runtime (this is another reason I hate “var”).

As for your specific problem, I don’t work with any ActionScript oriented applications so I can’t be of much help there. All I can say is that if you want your file included you need to either reference them directly or force load them.

 
Flag Post

Topic: Off-topic / Anime Addicts Anonymous (AAA)

man that’s a good spring

I don’t know how next season manages to do it, but it looks really shitty and really good. Probably because the synopsis on a lot of them look really interesting but I have lost faith that the anime industry can deliver.

 
Flag Post

Topic: Off-topic / Anime Addicts Anonymous (AAA)

Nothing quite like seeing uncensored kitty tits.

But, I’d like to see some bust in a girl or woman before considering it pleasurable.

My comment was made sarcastically. That section in the show was unnecessary and seemed only to exist for the sole purpose of drawing pre-teen breasts. The point could have been made without the frontal nudity. Stuff like this is the reason we can’t have nice things.

For those interested, the image in question is this.

Some things didn’t seem to be quite clear to me, like the whole plan on convincing Japan to build some island off the coast of Japan.

I dont think this needs explaining. Vampires want their own land. Vampires are threatening to cut major funding to Japan if they don’t get it. Japan reluctantly gives them land.

And how Mina tends to make irrational decisions, like when she was following Akira, unguarded, in the school grounds during their first encounter. I’d almost forgotten that she was the one who was responsible for paying off much of Japans debts, and creating the district off the coast of the country. This is something that made her character look unrealistic and bothered me.

I can’t say any of the characters in that show were any good.

 
Flag Post

Topic: Off-topic / Petition to Officially Change this Forum Name to "On-Topic"

Joke or not, this is the first time I’ve ever seen OT actually accomplish something.