• entries
    18
  • comments
    108
  • views
    845

About this blog

Where science, that brings happiness happens. ...Or not. :D 

Entries in this blog

Pause Menu Still in Progress - Programming | MLP:SH Devlog #12

Programming Pause Menu in progress... > also implemented 'pause' --- , so that everything stops while the menu is opened. 
> also added background && shading to Twilight's Profile Pic in the menu --- now it doesn't look that plain. 
> also configured fonts --- now that was time-consuming, I had to nicely align each character, then load that to the project properly. For example, here's my hand-drawn font for GUI with just few characters:
The font used in the commands however, uses small and large cases, numbers and all the potentially needed characters for dialogues and such... It is also hand drawn, for the most part at least. I used an existing font to start with. ...Comic Sans turned out to be pretty good for a pixel font.   Well, that's all for now!   Thank you for visiting!

Rikifive

Rikifive

Pause Menu in Progress, Also Something About Spell Tiers | MLP:SH Devlog #11

Hmm.. so after few days of wondering on how things will work like, I think the pause menu will look like this: Of course the ABCDEF thing will be replaced by proper description of highlighted option/item/spell.   What these  below spells are? These determine the spell's tier. Basically you'll be able to improve them along with progress, sometimes it will be a slight change, sometimes a major difference in behavior and whatsoever. To give you an idea on how more or less it will work like, here's the table I've prepared for the basic spell:  is TIER I
 is TIER II
 is TIER VI -and if someone is wondering what "A-F SPD" means, it stands for Auto-Fire Speed. This spell doesn't have auto-fire, hence [ - ]. This is what Element of Laughter specializes in, for example. Anyway, as you can see, not much changes there, as basically it's a 'default' spell. It gains damage, speed and size, but still behaves as a normal straight projectile.    Note, that things may be changed in the future, as I suspect I'll keep re-balancing things over and over again along with progress (development-wise). I probably won't be updating this, nor posting more tables, because nu spoilers for you. It is meant to be discovered on your own.    Thank you for visiting!  

Rikifive

Rikifive

Hopefully It Will Do for Now... | MLP:SH Devlog #10

Hello everypony!   Finally the HUD has been reprogrammed!  ~And length of the HP bar increases along with maximum HP! For some reason I always like that little feature in games, because that makes increasing max HP more interesting --- especially checking if you can go off-screen with this.   I thought it all will take few hours, but it ended up taking two days, heh. Why it took so long? I had to replace most of the HUD graphics in game files and reprogram the HUD in general, mostly spell icons, due to their new switching animation. I also have optimized the code, now it's shorter, organized better, thus more efficient & readable. I also have added some script functions that will come in handy when programming features in the future.  ...Also I discovered, that previously there were two typos in the code.  It wasn't a big deal, as things still worked in the end without crashing the game, nevertheless it's of course better to not have any of this floating in the code.    I guess this design will do, at least for now. And as always, thanks for visiting!      

Rikifive

Rikifive

Hmm That HUD Could Be Improved... | MLP:SH Devlog #9

Hello everypony!   It's been a while, hasn't it?  Last year turned out to be kind of busy for me, but hopefully this one won't be like this! I've been wondering on which project I should be working on and to this moment I have no idea. I've decided to poke this one first, but I think I may be switching between this one and MLP: The Game, as I'd really love to get these two done. My priority project will always be the first one I have ever started - MLP: The Game, but it's good to work on different things once in a while to avoid getting bored. I'm also having 999 other ideas for games and I'm trying my best to not distract myself with these.   Okay, so let's get to the point. Mooooonths ago in one of the updates, @HereComesTom mentioned moving things in HUD: For a reference, here is how it looked like so far:
The 'mana bar' he mentioned is the energy bar with Elements of Harmony seen to the right. For me it looked fine as it was, as I kinda didn't want to throw everything into one corner... until I realized how inconvenient it was in practice. You see, switching spells was confusing when these were on the right side, due to the order of them appearing mirrored. I thought players will eventually get used to that, but I couldn't really get used to it myself. Switching spells wasn't a big issue, but whenever I looked at HUD, it was confusing me. The order of icons wasn't really readable and I imagine it could get worse when more spells would become available. There was one thing I was sure of... That these have to be on the left side. So today I've been working on redesigning the HUD ... the whole day.  I was moving things around and finally came up with this: SOME OTHER CHANGES I'VE MADE:
- HP bar is now thicker, because I wanted to make it stand out more, to make it more noticeable even without really looking at it.
- HP bar's length now grows along with maximum HP.
- Spell icons have less details in order to save some space and make the HUD less spammy.
- Spell icons have thicker energy bars, because I removed the long energy bar and used numbers only. I wanted to give those little bars more highlight and make these more readable.   ...Though I had a feeling, that something was wrong. It seemed so... clogged. One of my fellow devs suggested me this: ---and that made me realize, that it's all messy indeed. Colorful bars and icons, big numbers-- all over the place, yet so close to each other. So I got to this again and decided to get rid of some details, as well as using smaller numbers to make it all look neater: Now only HP has big numbers, as it's the most important part of the HUD. I think it looks fine now, though knowing me, I'll probably end up redesigning it over and over again along with development.
I was also thinking of something like this:
--- buuut decided to have it all in one place.   What are your thoughts?    And as always, thank you for visiting!  

Rikifive

Rikifive

Art of the Dress | Puzzle Game

Remember when I said, that the "Art of the Dress" event with @Rarity and all the amazing dresses members have drawn filled me with inspiration? I mentioned a puzzle game (click my reply above for more information) and I kept thinking about it. Soooo... I couldn't resist! I've drawn a concept art showing how more or less it could look like.   Disclaimer: Carousel Boutique background, all the gems, elements of harmony, spool of rainbow thread and the Rainbow's dress sketch weren't made by me. I've made hourglass, menu scroll, cursor and the rest.

Now the general idea is, that Rarity would be sewing a different dress for each level. The first levels would take place in Ponyville, where Rarity would make the dresses for the Gala, nothing fancy.
There would be some cutscenes and some other basic stuff.
With progress, she'd be moving to different places, where dresses would follow different styles.

Levels 2-X would take place in Manehattan.
Levels 3-X would take place in the Crystal Empire.
Levels 4-X would take place in Canterlot. Busy and demanding ponies - fits great for more difficult levels, that require more work in less amount of time. Rarity's Boutique would be such a great location. (and perhaps more...)
Now talking about some inspiration from that thread and event altogether--- I'd like to mention something, that gave me that one more sparkle. I haven't seen many -- actually I don't really recall seeing any dresses inspired by the Crystal Empire. I have to say, that @bornAgainEquestrian's dress is absolutely great.   As for the game itself - there would be some bonuses, that would impact the field by destroying things here and there; there would be upgrades to these to give that feeling of progress/improvement. Also, this time I'd totally go for Full HD resolution as the default one!  As much as I love pixel art, I think this one would perform better with high-resolution smooth art.     If I'd knew about that event sooner, perhaps (with a huuuge question mark) I'd attempt to create that game, or at least come up with a demo for that event, like it was with Twilight's day. The huuuuuge question mark is because I suspect that game would take way longer to program, so I'd probably need a lot of time.  These events made me think of a possible idea of making a game/minigame for each pony from the mane six and I happen to have some more ideas already, but I won't reveal these yet! The Bookhorse               Minigame             Art of the Dress            Puzzle Game          ????????????????            ???????????          ????????????????            ???????????          ????????????????            ???????????          - not sure yet -            -----------              Oh I wish I wouldn't have to be bothered by my job - There are so many exciting things to do!   Either way, that's all for now;
Thank you for visiting!  

Rikifive

Rikifive

This Ship is Sinking More Accurately! | MLP:SH Devlog #8

Hello everypony!   I've made some very little, tiny progress.   I plan to implement slopes for more natural looking environment, rather than have a completely blocky world, where you need to jump all over the place, even on stairs.  And possibly few other features...  For that, I had to improve the coding behind the whole movement system first, optimize it a little, fix some minor imperfection related to collision, reprogram it to use more variables, that I'll be able to manipulate etc. etc.. While the main plans are still before me, I've added a little detail, making sinking more accurate.   Obviously, Twi's head is lower when she's ducking, so it felt kind of weird still being able to breathe while having her head submerged. But not anymore!   And better don't idle in there!   Though I wonder if preventing her from sitting down while in water wouldn't be better.  Though it's so cute, that it's worth sinking!   Either way, after I'll be done with movement, I'll start working on the Ponyville. I've made a plan for the layout, I'll be working on the graphics and whatsoever next. This is what I have now: Not sure of that design to be honest; We'll see. After the Ponyville will be ready, I might release a playable alpha demo without any objectives - just to let you see how the game plays etc., if anypony would be interested, that is.   I hoped to make much more progress, but I have tough times at work this week. It takes almost all of my free time, due to working for ~12-13 hours/day. Better luck during weekend hopefully!   Thank you for visiting!  

Rikifive

Rikifive

game STREEEEEEAMERS! | MLP:SH Devlog #7

Hello everypony! Made some progress! Things are getting more... DESTRUCTIVE!   - MAIN CHANGES -  + NEW SPELL! ~ Element of Laughter
Be just like Pinkie Pie and throw streamers at everything!
For some reason I want to yell "AT THE GALAAAA!!!"      + NEW SPELL! ~ Element of Honesty 
No jokes with that one! I HONESTLY love that spell! Wreck everything!
   + Enemies Can Now Drop Elements of Harmony SEE ABOVE
These refill energy of the elements (spells). Extend the fun!  + Enemies Can Also Drop Hearts
Not only these recover your strengths, they also look kind of cute.    + Along With New Spells; There's Something New in the HUD
As you may have noticed, spells have their icons in the upper right corner, but did you notice, that they show their remaining energy even when they aren't selected? It is for your convenience! x3
You don't have to scroll through these to see which one can still be used; just take a quick look! c:
  - MINOR CHANGES -  + Twilight Cannot Cast Spells When Her Horn Points to the Wall
If your horn is 'in the wall', there's no point to waste energy just to throw some particles. It is also to just make it visually better, as the particles were spawned in the wall and getting stuck there.
Exception are Area of Effect spells, such as Element of Honesty. These still do their job there.  + Lowered Amount of Particles Generated by Element of Laughter
Initially that was actually kinda too spamy.
And that's all I think...  
As always, here's a longer gifv with some gameplay.
    Thank you for visiting!  

Rikifive

Rikifive

game LEVEL UP! | MLP:SH Devlog #6

Slowly everything starts to work!  + Added Enemies
By enemies, I mainly mean their mechanics. They have HP, can take damage and can be defeated. Such an amazing feature, isn't it?  + Added Damage Popups
Whenever you or enemies take damage, there's a little popup showing how much damage was dealt.  + Added Enemy Life Bars
Along with damage popup, for a short time you can see how much HP enemies have.  + Added Drops
Enemies drop items, mainly experience stars.      + Added Experience Gain Popup Same as for damage, but it displays how much experience you have gained from stars.    + Added LEVEL UP! Popup When you'll get better, you'll have a chance to see this shiny popup! c:      + Low Life Warning & Low Oxygen Warning When things will not be going well, you'll surely notice it. Be careful!    + More Particles! Experience Stars throw sparkles from time to time. ...And they're bouncy in general!
   BUG FIX Fixed collision issue, where Twilight was 'teleporting' to the other wall when standing up while holding the key in another direction after ducking near a wall. That was pretty convenient, but illogical and unfair, sorry speedrunners.        Here's a gifv showing all the new features: CLICK ME!

Rikifive

Rikifive

game Sinking in Another Room? | MLP:SH Devlog #5

Hello everypony! Next day full of progress!  -{ *gasp* I didn't notice that before - fancy doors! )  + Implemented Movement Between Rooms
Now Twilight can go out and explore!
 + Programmed the HUD in the upper right corner
Now you see these amazing spells, that Twilight knows!    + Implemented pretty basic room transition
Still better than fade out and in I suppose.     But what's there? Where did that water come from?  ++ Implemented Water System™
There's water!  Swimming in liquid slows down movement, allows to jump higher and lets you SINK!  
Also - splashy splashy particles!    + Added Oxygen Meter to HUD
You obviously need to know when to come out...     Jumping around and stuff. I already love the platforming aspects of the game.     Now my favorite- All in one - The full playthrough of the game!    CLICK TO VIEW

Rikifive

Rikifive

So That's What Was Beyond the Screen! | MLP:SH Devlog #4

So much progress!!!     + Implemented Camera Movement
Twilight finally can see more! Now we can talk about true exploration.  + Implemented In-Game HUD For Main Parameters
Because in previous gifs it was a fake, but *shush*!  + Slightly Improved HUD Design For Spells And Designed Few Other Things...
Though it's not visible below, as it's not implemented yet.  upper right corner is a blank flank!   + Some Other Progress in Programming
..that you can't see.       I swear it's already fun to play! ...even if there's pretty much nothing to do at the moment.   

Rikifive

Rikifive

Moar Particles! | MLP:SH Devlog #3

I always pay attention to even the littlest of details - particles are the details, that make the game look more alive.   Now even shooting at the wall is interesting enough!   (simplified level design for better view - plain background, that is)  

Rikifive

Rikifive

 

game Yet Another Idea | MLP:SH

Hello everypony! At first I didn't think I'll push that project that far-- that fast-- But it turned out, that I really enjoy working on it and I do love how it nicely goes. So... it's about time to share the updates in a better way, rather than just randomly put these in the statuses, heh. In order to keep things organized; I want to include the status updates I've made back then - in this blog, so I'm shamelessly going to repost these here.     Sooo.. Let's get back to the beginning, shall we?   STATUS UPDATE from May 12 I've been having a yet another idea for a game... A ponified adventure platformer shooter.   Basically what the game would be about is -- hmm.. actually I won't be saying much at the moment. All I can say is, that along with progress, you'd have more elements of harmony available to use. Now what these do - each element is a different spell; think of having few guns and collecting some ammo here and there. As can be seen in the top right corner, these contain their own magic energy (as mana/ammo) and Twilight can switch between them. That non-element-of-harmony spell is Twilight's basic projectile spell, that doesn't require energy. So... That would be one of the features. The rest of things visible in the image above are pretty much obvious.   The game would be called "My Little Pony: Shattered Harmony" ... or at least that's the first thing that came to my mind... (MAY BE SUBJECT TO CHANGE)

Rikifive

Rikifive

 

It Starts to Look Somewhat Awesome! :D

Step by step, I'm slowly finishing the status screen.  
I've added things here and there and now it starts to look like a legit thing!     A thing, where I got stuck for a little moment was: How to write a single line of text with multiple colors, that will be centered like this?  
  And turns out, that it is kinda messy to achieve and there were some maths behind that one as well, because why not!  
First of all, again, I'm not sure if I approached that in the best way, but well, it works!   The thing with coloring text is, that I had to set the font color before drawing the text- so to make it have multiple colors, I had to split it into parts and basically draw each word/part separately, with correct positions to make it all be drawn next to each other in one line. 
The tool that was helpful there was a function, that calculated the width of the string (text).   So as I've mentioned ages ago, I wanted to do this:     First thing first, I needed to calculate the width of each part to know how much space it will take. 


To show how that does look like... let's take the second possible number as for example: That part contains [ +3 ] First, I needed to get the value form the character. var value = actor.eq_bonus_mhp This will store the character's MAX HP bonus from equipment into a variable.
Then, since [ + ] isn't drawn by default, but [ - ] is, I had to put an 'if statement' to check if that value is above or below 0 and add [ + ] if above 0 or leave it without symbols when below 0. if value > 0 { sym = "+" } else { sym = "" } If the value is greater than 0, store [ + ] in a [ sym ] variable. Otherwise leave it empty.   and now merging things together...
that [ +3 ] will be a string: string = sym + value where sym either has [ + ] or nothing; value is a number. Now the last part, just get its width.   value_width = string_width(string) This will store the string's width in a [ value_width ] variable.  -{ Well that was complex, wasn't it? )    -{ But what if the character wouldn't have any bonus? Is there any need to draw "+0"? ) ( Of course not you silly! }-  For that let's use another 'if statement' before merging stuff: if value == 0 { string = ""; value_width = 0 } else { ... Putting that before merging will simply check if the value equals 0. If it does, it will leave the string empty and we manually can tell, that the width will be just 0, thus basically skipping that part.   And now we have one part configured...   Now do the same for the others...
And you probably got your own lame code    -{ This looks funnier, doesn't it? ) So as you can see, I specified the center value - 344th pixel (horizontally) then calculated widths of the parts and merged it all in the end.
The last line sums everything up ~ divides the result by 2 to make it centered, by moving the 50% of the text to the left. The rest 50% will go to the right.   Now the drawing method is simpler, simply put the part in the result we got, then add its width to a variable, then put the second part in the result+width; add its width to that variable; draw 3rd part in the result+width and so on...   So now that you've read (or not) that boring wall of text, let's head to the results.   Note, that it's still a work in progress.

Rikifive

Rikifive

 

A Rectangle with Bubbles? :O

Today I've been wondering how could I draw something within a specified area like this: That bubble is sneaky! Be careful!    And of course, there seem to be multiple ways to achieve that, yet I've picked a pretty much basic one. My favorite!    So besides obvious x and y position of the image bubble, I had these variables available:
- left offset (basically cutting the left part)
- top offset (same, but vertically - it cuts the top)
- width (the lower the value, the more cutoff from the right side the image bubble is)
- height (same, but vertically - it cuts the bottom)   After doing some visual representation, maths and silly mistakes, to help me imagine the situation better:

I came up with this code: ///draw_self_rect(rect.x, rect.y, rect.w, rect.h, x, y) // 0 1 2 3 4 5 var spr_x = round(argument[4]); var spr_y = round(argument[5]); //--------------------------------------------- // Don't draw if the sprite is outside the rect //--------------------------------------------- // left border // x < rect.x - spr.w if (spr_x < argument[0] - sprite_width) { exit }; // right border // x > rect.x + rect.w if (spr_x > argument[0] + argument[2]) { exit }; // top border // y < rect.y - spr.h if (spr_y < argument[1] - sprite_height) { exit }; // bottom border // y > rect.y + rect.h if (spr_y > argument[1] + argument[3]) { exit }; //--------------------------------------------- // Cut-off the sprite to fit it in the rect //--------------------------------------------- // left = rect.x - x = horizontal-left cut (0 ~ spr.w) var left = clamp(argument[0] - spr_x, 0, sprite_width); // top = rect.y - y = vertical-top cut (0 - spr.h) var top = clamp(argument[1] - spr_y, 0, sprite_height); // width = rect.w + rect.x - x = horizontal-right cut (0 - spr.w) var width = clamp(argument[2] + argument[0] - spr_x, 0, sprite_width); // height = rect.h + rect.y - y = vertical-bottom cut (0 - spr.h) var height = clamp(argument[3] + argument[1] - spr_y, 0, sprite_height); //--------------------------------------------- // Draw! //--------------------------------------------- draw_sprite_part(sprite_index, image_index, left, top, width, height, spr_x+left, spr_y+top); Calling this script basically cuts the sprite if it goes beyond the specified borders, eventually doesn't draw at all if there's no point in making further calculations.   And voila! There are some bubbles within a specified area!  
You're trapped, ya silly bubbles!    I'm pretty sure, that soon it will turn out, that there was a much better way and I was just unnecessarily over-complicating all of this, just like always.     So YAY! Some progress is finally being made!   Oh it all would be done ages ago if not the job.  It goes sooooo slowly.  

Rikifive

Rikifive

 

The Maths Return!

And the blog starts with maths...  Shush, I have no idea how to blog!   *ahem* Welcome class! It's time for your favorite thing! MATHS! Isn't that awesome!? It's like the number one thing!  Get it? Number...? ONE..? Maths??? No?  Alright then, let's get to the lesson!  Run away while you can.   Joking aside~~ So yeah, some time ago I've posted a status update mentioning some maths to achieve this effect:


Long story short;
I wanted a formula, that raises as gets closer to a certain point, then decreases along with the distance.
The first thing, that came to my mind was a quadratic function, because their graphs seemed to be similar to what I was looking for. You may have seen these parabolas, where it was raising to some point, then going down. Just by that image my mind suggested me something...

"Hey, what if the top of the parabola would be the center and then the value would be decreasing the further it goes from that point? Wouldn't be that what you're looking for?" And I was like
"Yeah! That should work!"     Even though I was thinking of some other possibilities, that would be even better (we'll get to this later), I decided to stick to my very first thought. (silly me, told ya I tend to unnecessarily make things more complex than they should  )

So I've started thinking of a formula, that would do what I want and after some time I came up with this:
>>> Putting into game...
  What this formula does is to get the "Y" value from the function based on the icon position.
So point x=38 on the graph is where I want to put icons. Now I'd like to give them a smooth floating animation. To do that, I've decided to move them up and down by up to 6 pixels away from the center. It could be achieved in a really simple way, like move it up with a constant speed, then bounce it back and forth, with the same speed. Heh, that's actually what I did in my previous design ages ago...


That doesn't look bad, that's true. Thanks to very low distance (6 pixels in total; 3 from center), it's not really noticeable. It's just few pixels up/down after all.   Now that I'm working with a larger resolution, it would be nice to make it actually smooth and that's what the formula does. As you can see, the further the icons move from the center (x=38 on graph) the lower the value gets, which is what I needed.
So I've used that fancy calculation then moved the icons by the returned amount, eventually changing their direction when getting far enough. That was a success.
The formula did exactly what I wanted. However, there was a much simpler and more automatic way to achieve this. There is a similar graph, but instead of parabola, there's a wave.
Now since the wave doesn't end and goes up/down through positive and negative values all by its own, it could be easily used to replace a pretty big chunk of code.

Now guess what that wave is... Have you ever heard of sines?
Sounds like another silly thing to learn during math classes, but turns out these actually have some usage!   It pretty much follows the same idea-
The horizontal line showing point 0 would be the center. Now as seen in the graph, it goes up and down with time.
At this point I could forget about the previous 'if' statements and all that stuff and just use the time and some maths of course. I wanted to see how it all behaves in the software I use, so for some testing I've created a thingie, that draws the waves based on thrown formula, so brace yourselves, I present you the SINE SIMULATOR 2018! (also supports other functions, but who cares)   Let's try the simplest one- the one shown in the image above.
Oh that's sooooooo coooool! It lacks of ponies though, I should have put some...  Everything works.    Also some other example (suggested by fellow developer in chat)
 -{ Uuuuuh fancy! ) I know, right?  Still lacks of ponies though, perhaps in future updates of that useless program-thingie...   Okay, so all I had to do was to follow the damn train, CJ - not this again, my bad!  --- Was to use these values for the icons.
For that, I came up with a pretty much the same formula as before, but using sines this time. icon[i].y = 38 + 6 * sin(icon[i].timer); icon[i].timer += 0.05 So basically:
38 - is the center
6 - is the amplitude - the maximum distance they can travel from the center
and then the timer (0.05) - basically represents the x position increment in each frame - the higher the value, the faster it goes.   So yeah, the code has been shrunk to only two lines and it gives an extremely accurate result!     The only one question is... Why did I waste the whole weekend on toying with this!  Such a relatively simple thing, a tiny piece of code, yet I had to do science for hours anyways...     Well, either way...    And with that being said, you're free to go now!  If you haven't run away already.  

Rikifive

Rikifive