Monday, July 30, 2018

Attack Vs DPS

 This post is unrelated to TNR project, but if you're an aspiring developer, I recommend you to read.

People usually makes a formula to determinate what is the dps of a weapon when attacking, generally getting the weapon speed, pass it to seconds and then multiply by the base damage of the weapon, but what If one wants to make the weapon deal the exact dps damage per hit?

Having the damage being discounted before checking the defense of the enemy, or if it's a critical hit, may cause devaluation of the equipment, causing the weapon itself to feel really not worth using compared to a one second attacking weapon, so what you have to do is leave that calculation of dps to after you have the final value of the damage to inflict.

Let's say that I have a weapon that inflicts 40 damage, the enemy has 10 of defense, but it's dps is of 0,8 seconds, that's when I build the formula:
Damage * Dps - Defense
If I do the calculation on that formula, the damage inflicted will be 22.
40 * 0.8 - 10 =  22
Ps:. In this case I didn't needed to round the result, since 40 * 0.8 results in 32, but if your game health status isn't a decimal variable, you'll have to convert it to integer when placing the value, or rounding it.

But If I do the calculation:
 (Damage - Defense) * Dps
The damage actually will actually be:
 (40 - 10) * 0.8 = 24

Do you notice the difference? It's small but very significant, that little difference of 2 numbers may end up defining if the equipment is worth using or not, aswell as cause frustration on the players, a player may find a dagger that inflicts damage every 0,33 seconds of use, is actually better at damage dealing than a hammer that takes 1,5 seconds to use, the players may avoid using it due to the low damage dealt per second, compared to a weapon that has the damage near 1 second of use, so when you attempt to make a game where the inflicted damage of the weapon is actually the dps, do not discount the damage before the defense calculation, do the damage minus defense calculation first, and then apply the DPS mod.

That's all for my developer blog post.

Monday, July 23, 2018

Well, I just did it. TNR Spriting and minor skills progress.

Hey guys, remember the two monsters I spoiled a few posts ago? Well, I finished a number of their animation sprites.

I made the Dog Slime sprite be less detailed, because that would give me one hell of a job to do all the other frames sprites coloring, aswell as made the Attacking, Hurt and Defeated animation, here a look on how the Dog Slime look right now.


Don't be tricked by it's eyes and silly face, that may be one of the most dangerous monsters in the game, at least right now.

For now I'm going to neglect the Dog Slime monster,  in the future I may post a news talking more about it's animations, because right now the spotlight goes to Cait Sith. Ps:. If I forget to place a spotlight on the Dog Slime, please remember me.

Another monster that also got some more sprites is the Cait Sith, It has gained a proper tail animation for when walking, aswell as attack sprites, check out the animation:

You wont believe, or maybe will believe, but the tail was the hardest part of the animation, If the image weren't blurry, you would see that I have done some extra work on the tail to make the animation look more fluid, and not need me to make the tail move in weird ways during movement.

But the best part of the day was doing the attack animation, I did it right, I'd say, because even I am impressed with how the animation look, but I'll not show that yet, to keep the drama. *evil face*

Alongside the Tail animation while in movement, aswell as the attack animation, I also made an preparing to attack animation... Which actually doesn't seems really cool?

Well, I'm using the main menu to see how the monsters are looking while in battle, so that explains... What you see. (Ps:. Don't mind the fact that the eyes of the Dog Monster is transparent, I'm still studying how to add eye colors on the game, so they have no retina right now, beside saying this makes the monster sounds way more creepy.)

That was intended to be the preparing to do an action animation of the Cait Siths, I did that animation before making the attack animation, but after I did the attack animation and were doing some basic shading on it, I found out that one of the frames from the animation is actually good enough to be the preparing to do an action animation, and so I changed the animation above to:
I got really impressed at how I did that sprite, I guess I could even use that sprite as avatar somewhere in the web, but still, that sprite animation called my atention, most likelly the one where the monster is facing the screen, If I keep doing cool sprites for the monsters, soon you guys will have one interesting looking combat, beside the sprites...

Anyway, about the sprite is my opnion, maybe someone will dislike the sprite, and that person may probably be you.

On other hand, I've also made a change on how the skills will handle the attack animation, when the monster is created in the database, It will bind the animation id of the monster that will be used on the skill, so when the skill goes on effect, the animation will be used when necessary, the animation itself wont have impact on the skill effect, like damage and etc, but at least will make the skills more livelly, I  guess that is how it is said?

In the battle planning, I still have a number of things to do, includding adding a proper interface to the battle, aswell as making so the battle isn't confusing to find out whose team is which, or whose monster is from who, because right now, I wonder if you can distinguish from which team is each monster, beside thanks to the Kangaroo Mob that wont be too hard to find out, sigh...

Well, until next news.

Oh, anyway, as a kind of extra, I'm not really the kind of guy who'd spend more time spriting than programming, but in my case, I used a technique that is actually working, involves listening to some radio, aswell as when procastination tries to attack when you're doing something, just think of that ad motto, "Just do it!", you'll feel like continuing what you were doing, and when you notice, you already did a lot.

I've been able to do wonders due to that phrase, because seriously, just do it, don't think.

Edit:. Talking about the avatar, here it goes.
 Hehe, I still can do a few tricks with Paintm beside the shadow on the center of the body is weirdly placed :/, gotta check that out later.

Tuesday, July 17, 2018

Some progress, some ideas and no photos for TNR progress.

Today's news wont involve photos, since I will only talk about the plannings, and what I'm currently working on in the project.

I'm doing some works on the battle to make so the combat animation doesn't cause bugs depending on the position updated the monster is, since if a monster is updated after the skill animation happens, some effects may go missing, I've been trying to fix that issue.

I also added a new monster to the project, and with that new monster, I'm also testing effect scripts that certain animations can do in the game, so it be better looking when the animation is happening, those battle animations may happen for the one doing the action, aswell as for the one suffering the action, so let's say, a monster is punched another monster, It will play the hurt animation on the attacked monster.

Now on the part of the planning, in the future of the project, some of the monsters in the game  may be big, reeeeeeeeally big, so big in the party that they may need some extra space far from other monsters in combat, but also with their size, their status also needs to change, then I thought about something, since the monsters size is big, and their status increases, then there should be a reduction on party members carried in combat if that happens, what I mean is.

Currently you can carry up to 4 normal sized monsters in combat, if you have 1 big sized monster in combat, you can only bring 2 more normal sized monsters, or another big sized monster, but in case you have in the party one really big sized monster... Well, you have no other slot to place monsters.
The inverse could also be possible for small monsters, like being able to bring 8 small monsters on the same battle, but I will need to study the battle system, so carrying a really big monster in a battle that the oposite team will easily lose, awards way less exp than facing an oposite team that has a chance of winning.

Alongside that sizeable idea, I believe some skills will also need to have different effects depending on the size of the monster, let's use Body Slam skill for example, If a normal sized monster uses it, the skill would only affect 1 monster, but if a big monster uses it, could actually affect 2 monsters at the same time.

Another idea I had, is that from the abilities the monster can learn naturally (the skills that already comes or are unlocked when the monster levels up), there could be a some magic abilities the monsters could learn, like Fire, Healing, Ice, etc. Those magic abilities would of course make use of the Mana status, but in my planning, each monster kind would be able to learn certain kinds of skills, like Kangaroo be able to learn Earth and Fire type spells, and the Dog Slime monster Poison and Water skills, for example. That would need me to do a casting and launching animation for the monsters, but I don't really think that would be really that hardcore to do.

And that's all for today's news.

Tuesday, July 10, 2018

Colorful world on TNR Project.

Battle, battle, battle, battle, battle. I guess even you is getting tired of so many Battle related news, then I've changed that a bit right now, I'll talk 50% of Battle and 50% of the map.

First of all, I speculated on Terraria forums about changing the coloring of the monsters to not be related to the animal the monster has taken base of, and instead take a random rgb color to use as skin, so if you want a blue or pink kangaroo monster, you may have, but need to find it on the world.


I've also changed a few codes on the part of the script that handles the monster direction sprite, so I wont need to make a special code on the drawing script to make the monster look upwards when... Looking upward.

I've also made changes to the monsters that roam the fields, so I can leave a bit all that air of "Battle, battle, battle", changed their field sprites, aswell as made their animation work normally, beside I've already scripted part of the field animation handling script, had to mess a bit more on the codes to make the animation work as intended on the field, and resulted into this...

Look's ridiculous, right? Well, It I scaled the monster twice the size, would be far more ridiculous, you know what that means? That means I'll have to change the Player textures too, increase them in size to fit the monster sprite size, which means that in scale 1x1, from 16x16 pixels tamer sprite, I'll have to do 32x32, maybe that will lead to a more detailed sprite and animation.... And more work to me, since I doubt the maps will keep up the pace with the new Tamer sprites...

Anyway, that is all for today's news, enjoy the night, and until next time. (Crap, didn't rhymed)

Saturday, July 7, 2018

And the battle intensifies on NTNR Project.

Today was one interesting day for the battle development of the project, I've been able to
change the ugly plain colors for the backgrounds for tiled images, whose tiled images that resulted into this...

Quite cool, isn't? I made that design based on a boat, beside when It's in a photo, you can see that is abit ugly the sprites of the new battle floor.

Another thing you may notice in the image above, is that the characters will enter a "preparing attack" pose when they have an action scheduled, and when we talk about action scheduling, the first thing that comes in mind is ATB Battle System, yes, the project is going to use ATB as battle system because of the ease and simplicity to play, aswell as will not hinder the gameplay when on multiplayer, who knows when another player will think too much to take an action?

Also, when the monsters have their HP on 0, they will play a defeated animation, which is the animation the Kangaroos above are playing right now, that they are actually lying on the floor, I didn't had much idea of perspective for the Kangaroo defeat pose, so I leaved that as it is shown in the image above, until I get some idea of making the sprite better.

I've also made a battle sprite for grassy areas, at it resulted into this:

To make the grassy floor sprite less plain, I added a few dots, and I don't know if you noticed, but the center area of the grass stretches based on the battle angle, which also explains why I made the boat layout to the battle and spoiled it above, but in this case, there is no fence on sight.

But then there were something bothering me a lot, there has been weeks I've been debugging the battle system, while seeying the monsters colors being gray scale, then I decided to do some work on their coloring, I noticed that the Kangaroo colors are kind of variants of Red and Green, so I've made a range coloring system for them to pick their color randomly when creating a new monster, and since the game color picking system is basically in multiples of 16, I created the Hexadecimal Color, which aids me into creating and handling the coloring of almost everything in the game, includding player outfits, and resulted into this:
Do notice that I've changed aswell the animation of preparing to attack, now It look's better, I've also added a few new animations to the monster, like Defending (there is no use right now), and a few others, anyway, the result is quite ok, but I believe I'll have to check up the tone of the Kangaroos fur later.

Anyway, since I've won today's fight, the mission is complete, time to do the victory dance and then take a break for today, until next time.


Friday, July 6, 2018

Where the boredoom leads us to...

So, I was bored and decided to make an auto leveling application, where you could just leave it running while it gathers exp.

The program is as silly as you think, but by the way time passes, the more experience the game acquires, and depending on how far the level is and how much time were spent with the game opened, you gain way more experience.

The game has also a built in save and loading game, each time you level up or close the program, the game will save your progress, and when you open the game the next time, It will load the game automatically. And I added a log, so if you want to know how much time your pc has taken to reach certain level, go ahead, It measures time up to weeks. Also, If you don't want the window to appear on your list of opened programs, you may right click it's tray icon and then select to hide the window, passing the mouse on it will also show you the progress to the next level.

There is no other purpose to leave this running, unless you want to see how many levels you can reach while the game is running, do notice that I didn't tested the game with fullscreen applications, so the balloons may annoy you.

That's not the highest level I reached, or at least without cheating to test the program.


To download the game, just get it on the link bellow:
Mega - https://mega.nz/#!YlZnUQ5Z!bMwoYgrhrKvft53fgjrtzCVAKhJ14WTwjrGNks8-Eic

Sunday, July 1, 2018

A quick update on battle system progress.

Today I'm gonna post a quick update, because I'm going asleep in a few moments, It's about 6am here and I should be on the bed right now.

Anyway, I've worked more on the battle system (not exactly today though, through out the days after the last update), made a basic skill system for the project right now, which is useable and works, made the skill "Punch" to debug it, beside It of course will be in the final game, I've also worked some more on the way the battle monsters are tracked for skill usage, so when the project gains multiplayer, will be less head achey to sync the battle, beside I still need to do some work on the "divergence" of players and npcs in the future, since I don't want the game to pick the wrong player/npc/monster on multiplayer because of ID problems.

Another battle change is that I also added a basic skill picking AI for the monsters, they right now will only cast the skill Punch, but in the future, I'll expand that so they pick the skills more wiselly, aswell as the target depending on skill and situation. Thanks to the animations and the testings, the walking, attacking, hurt and defeat animations are working as intended in battle, but without effects, the battle is quite boring to watch.

The battle also gained some backgrounds, aswell as a special vector to handle rotations, the rotations will not only affect the monsters, but also the background, on the image bellow shows the battle arena at some degree of Y rotation, making so the grassy area is limited, and the dirt layer be exposed.

Sorry for the color selection on the dirt layer, took me a while to notice that the "Brown" XNA offers is not the "Brown" I wanted. I've also added a basic hud for monster status display, which is not visible in the photo, even more since It's kind of pointless to display in the photo, since It's purpose for now is just to debug the skills dealing damage or not (and yes, they do deal damage, level 100 Kangaroo Mobs deal one good damage on their punch attacks).

Anyway, that's all for today's news, I said it was going to be a quick news, and ended up that I made a full news on what changed in the project.

Now I gotta go, since in about 20 minutes, will be 7am, and I don't want to be scolded for going asleep too late.

See ya!