Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Wednesday, March 25, 2020

Shops!

Long-ish time, no see! I am almost done with university, one quarter left! And since the last time I posted, I got a job as a software developer! Busy, busy.

Well, it's my "spring break" right now, and due to COVID-19, I've been inside. So I had some time to work on Ponyland, and shops are functioning in a basic sense!

 

Those piles of coins on the ground are my "shops," heh. The shopkeepers are Sweetberry Medley and Lavender Lilac.

Some goals I have since I've implemented this:
  • Have each shop keep a stock of items that varies. Neopets did this; there is a random stock of items in their shop, the quantity of of each item varies, and therefore shops can sell out of items. I think this might be a cool concept because it means that the economy can vary, and indeed on Neopets, there were people who "restocked" items as a way of earning money and getting rare items. I wonder if I could set stock to "-1" for items that want to keep infinitely stocked, like some essentials or something. 
  • Make it so when you buy an item, have some coin particles appear near the buy button.
  • If you can't afford an item, maybe grey out and disable the buy button (but there's a check in place right now that won't let you buy something you can't afford anyways).  
Hmm, besides that, I'm not sure. I think saving the pony's appearance is still a thing to work on. And creating consumables to modify their appearance.

I could also work on Stella's interior, but that'd involve a lot of artwork.

I could try starting on networking, since I just finished a networking class at university. We made a poker game as our final project, and the class has helped me better understand how network architecture should work. Networking is still a really big topic to tackle, so I keep pushing it off.

It's been a while since I looked at my code, I'm thinking a good thing to do would be some code cleanup, and adding lots of comments, since the code-base is getting big.

Friday, September 13, 2019

Random ponies

Just messing around and made a random pony generator. On rare occasions, the Penny Tail gets weird and swaps the hair and hair2 materials... no idea why. Weird.

    

Wednesday, September 11, 2019

Manes, tails, and colors. Oh my! (And third year retrospect)

Hooray. I got the manes and tails in the game! There was a bit of a nightmare figuring out how to put the manes/tails onto the model correctly. Turns out I need to actually write a script that sets the bones of the hair objects as children of the bones of the pony rig. So weird. You'd think there'd be something to do that automatically, but no. Hmm...

I also made a temporary button that allows me to swap these pre-made ponies in and out to show some different ponies! With hair! And tails!


So, not as much has been done this year as had last year. I was mainly focused on university. University is fun, but it can be fairly stressful.

However, I think I crossed some things off the list, and kind of half-did some things.

I did add in the manes and tails, added the blink, started working on shops (got the Shop Editor working and a basic UI for shops, just need to finish it up in Unity), I got the inventory to save, and I am starting to figure out how to change player colors (but haven't saved them yet).

My next goal will be figuring out an Effects/Consumables type of system that will allow me to have objects that can change your colors. And also save your pony appearance.

Tuesday, December 18, 2018

Inventory saves and shops being worked on

Inventory items and gold can now be saved!

I also realized when I shuffled back into WPF to work on a Shop Editor, that I had already done so at some point in the past! I also added the Item Editor to my commit history, so it won't be a tragedy in the event of me messing something up bad.


I think I'll be working on shops for now.

Tuesday, July 24, 2018

More crafting

Woweee wow wow. I got the placeholder crafting interface to pull data from the crafting.xml, which is pretty cool. I followed the same code design as I did for the inventory; view, controller, and data.


The first crafting station (Stella's Cauldron) is just a test one, so it has items that can't actually be crafted, which is why it has that weird bar in the middle. And the other station has ones that have ingredients but no icons for them yet.

There's a bug when I had on my toggle code to enable/disable the crafting UI (it's been disabled for now) where I have to click on something twice in order to hide/show the interface. Need to figure that out. Or you just can't toggle the crafting menu on/off with the button, can only turn it on with the crafting button and have to close it with the "x" button I'll add later.

Can't actually craft anything yet. I need to figure out how to have the inventory system communicate with the crafting system.

Here's a WIP of the crafting menu design:


I'm going to make the background look like a wooden table from the face down. The list of options on the left will look like a scroll on the table. The potion bottle will also be something that changes based on the crafting station you're at (potion bottle for a generic station, sewing machine for clothing, mixing bowl for cooking, and so on.)

Thursday, June 7, 2018

Started to try Crafting

I made the mango tree bigger - it was too tiny.


 I also figured out why the marker is offset - because I made it offset on the y-axis. Haha. Because if it's not it sinks into the floor. I'll try to think of other solutions, but for now I will leave it be.

Here is dragging items around working! You can now drag items to wherever you want and they'll stay there, even to different tabs:


And I have started to work on how I will do crafting. I've tacked an additional menu onto the Item Editor for "Crafting Stations," where I will add all the crafting stations and what items you can craft there. It's pretty rudimentary right now. I'm not a pro at WPF, so I just mess around until I get something good enough to work. And it works. It exports an XML file of crafting stations, their IDs, and what they can craft.


Sunday, June 3, 2018

Mangoes!

Made a mango tree. :) Mangoes are delicious.




The target marker is back in business. It's a bit offset. I'll figure that out later.

I've also got the clover to work. I think it is pretty nice. Now that we're in 3D space, the clover is in the same perspective as the ground. Clover mayhem (I was testing all the different patches out.)


View in Unity:


Saturday, June 2, 2018

A lot of bugs squashed in parallax mode.

Good news! Almost everything is back to normal in 2.5D mode! I got fruits to bounce, all the fruit trees are functioning, all the flowering shrubs are working, background transparencies are working, and so on. A lot of things I had broken before seem to be working just fine.

The movement marker is kind of working too. It's just being a little weird because it's rotated onto the floor and I can't un-rotate it, but it's not the biggest issue right now.  So I just need to fix that. And I need to figure out what to do with items like clover patches where part of it belongs to the ground and part of it acts like normal objects.

Tuesday, May 29, 2018

Chaos

First things first, I got a menu to pop up when you click on an item and the ribbons animate when you hover over them. Haven't done anything to make the selected ribbon more noticeable yet.


And then... chaos. You see, a friend had recently played Don't Starve over the weekend, and I was very interested in how the game's camera works. It's like 2.5D. It has a parallax effect. In all my previous versions, Ponyland is stationary; nothing moves because it's all done with an orthographic camera. I really wanted to try this parallax effect and... everything is a mess now!

The pony has been sentenced to the warped dimension:


Good-bye, cruel world...



So, what has to be done in order to achieve a 2D parallax effect is to change the camera from orthographic to perspective. But alas... this creates a lot of problems. Things are no longer just 2D. Life is no longer simple. They must now be 3D. My sprites and artwork are fine, but all the components and tricks I used to sort and order my sprites had to be changed or modified. Now instead of using 2D colliders for things like clicking on interactive objects and sprite transparencies, I must use 3D colliders. Every asset needs to be updated. That's not all though, now my raycasts need to be converted and done in a different way.

My fancy golden crosshair marker is being wonky. My dropped fruits are now stuck halfway through the ground... I need to figure that one out. Oh, and the way the parallax is done is by rotating all the sprites 45 degrees, and the camera 45 degrees as well. It's very strange to work with the 3D colliders when everything is rotated 45 degrees. It's not a thing I can eyeball, I need to test out the position of every collider in order to make sure it's working well. See Stella's cottage with 3D colliders:




I've made a branch in my version control for this parallax effect stuff, so nothing is horribly mutated from my last post to the point where I can't get it back. This 2.5D/3D work would open the door to a lot of cool things. Like... uh... this ball:



And then I made it into an eyeball. Get it?! Ahahahahaha.

But seriously, I would be able to use all three axes now. In 2D mode, I used only X and Y. In 2.5D mode, I use X as my X, but Z as my "Y" which is a little strange, but now my Y can actually be used for things like height. Woah, I wonder if I can have clouds and floating platforms? The possibilities... I haven't thought of all of them yet. But I'd be able to have towers and bridges and other cool things! Gravity actually works now too. The pony can fall off colliders.

Here's a final shot of the parallax effect.


Sunday, May 20, 2018

More inventory advances

Whew!


As you can see, stacks now work. Tool tip hovering now works. When you modify the inventory it automatically updates.


And you can drag the inventory around! You can also switch tabs but I didn't show that. So all 80 item slots should be fully functional.

Next up:
  • Menu pops up when you click on an object
  • Drag around items to move them between tabs or in another slot
  • Animate the tabs when you hover over them, and make it better known which tab you're on

Thursday, May 17, 2018

Inventory has evolved beyond the debug logs!

The inventory has evolved past just listing all items that you picked up in the Unity debug logs, into a graphical interface that actually shows you what you picked up!


Tada! Stacks don't work yet, it's very basic. A function runs and updates your inventory's icons every time you click the inventory bag icon. The close button works, and the inventory bag icon reopens it. The ribbons will be for more inventory slots, so you'll have a total of 16 * 5 = 80 inventory slots.

Turns out I need to put all my icons in my Resources folder, I was trying to be clever with my Item Editor and keep them in the same path as my Sprites folder. Unfortunately didn't turn out to work. I think it's a waste of space to have both sprites and icons look the same, so I'm debating creating vector sprites for all items that can go in your inventory. It'd make them match the inventory better.

Inventory specific goals:
  • Make stacks work
  • Make the tabs work
  • Animate the tab ribbons when hovering
  • Allow items in inventory to be clicked on for a menu that allows you to remove/use them
  • Make the bag better, make it so that when you pick up stuff while the inventory is open, it updates it right away

 Also here are some other interfaces, for the quests and notifications, that aren't in the game yet.



Friday, May 11, 2018

Player Manager has started to blossom, and some UI icons

I got the Player Manager to start working. It will spawn a pony and set up all the references correctly. This is the first step towards having the same pony when you go in between scenes.

I've started working on some prettier UI stuff, starting with some icons for the GUI. Inventory, notifications, quests, and settings icons. Here's a picture of my UI workspace in Illustrator. The dialogue/chat bubbles have been done for a while, I just haven't had a reason to use them yet. NPC dialogue and chat functionality is far into the future.


The final placement of the inventory, notification, quest, and settings buttons will probably be to the bottom right. I just liked having them to the left while working on them.

I think next I should work on a nice looking inventory interface, or at least make a placeholder one. And then start seeing if I can make it generate the icons for the items you have in there. Right now if you hit inventory it lists all the items in your inventory, or that your inventory is empty if there's nothing in there. So it works, it's just all in the debug logs.

Wednesday, May 9, 2018

Minor tweaks for various things

I did a bunch of fairly uneventful things. They're actually pretty cool... to me. But nothing worth a screenshot.

I fixed the movement target reticle so that if you drag your mouse it'll drag with it. And it used to pop up an additional time after you'd already have reached your desired location. It doesn't do that anymore.

The I had a bit of script in the player movement that determined if your player was stuck behind something and so you can't get to your desired location and it would stop moving. But it worked off of how long it had taken you to get to a place. So you could be walking for a very far distance and it would consider you stuck because you hadn't reached your destination yet. It was a fairly easy fix, I just added a velocity check. Now it works well regardless of how far you're walking.

Last but not least, I did get the items XML in the game! This is very exciting. It was weird, since you have to work with the Item Editor and some .dll file in conjunction with Unity. But I got it in, and then changed all the items in Unity to reference the item XML item ID and it's working well! I also harnessed the power of enums for the wearable items slots, which makes it so much better than using an array of booleans for each wearable item slot, when I get to wearable items eventually.

Monday, May 7, 2018

Enhanced object transparency and hair!

Hello! Long time no post. I've been busy. Just booted up the project today, hoping to work on some items XML stuff, when I got distracted by the object transparency. I had originally made it work only halfway. See, if you were behind multiple objects, it would only make one transparent. Not really helpful there. So I changed it today so that being behind multiple objects will make them all transparent.


And I've been quietly modeling some hairstyles. Hair is difficult to model nicely. Trying to make something that's many thin shapes into one giant shape that still flows nicely. Need more practice.


Left hairstyle was based on a pony I made for a Flash dress-up game called Penny the Pony. Translating from 2D to 3D is always a pain. Now you have to make things look good from multiple angles on a 3D surface instead of only one dimension on a 2D surface.

My goals remain the same - work on interiors, (I've got a sketch of Stella's interior done) work on the items XML, work on a nice inventory interface, maybe get these hairstyles in the game so my pony is no longer bald... there's so many things I could possibly work on I don't think I should list all of them. So many!

Monday, September 4, 2017

Gem Glitz update and one-year retrospect

I renamed Gemswap to Gem Glitz, sounds cuter. Also it'll probably not be in Stella's cottage in its final location. Too fancy. But it'll be in there for now.


Tada! Added in a user interface and made everything look much nicer. It's almost done. Dropping down new gems works, adding points works, mechanically speaking everything works.

I just need to add buttons for "Send score" and "Exit," add a twinkling gem hint if the user hasn't made a selection in a while, add some audio effects, and some sparkly particle effects when a match it made. Basically just make it more exciting to play. I'm also lazy and decided it'll be like the classic untimed Bejeweled and just have a game over when there's no more matches.

It's been one year and one day since I made my first post on this blog. That first post was just three drawings of fruit trees. Since then, so much has been done — a 3D pony that walks around, interactable objects like fruit trees that have their fruits fall and bounce, basically an entire mini-game, the manifestation of a quirky NPC and her cottage, the beginnings of a town called Merryville, a bit of a user interface, an item editor that reads and exports XML, particle effects, the start of an inventory system, and so on.

I'm pretty proud of what I've accomplished. It's been fun. I hope someday I can make a game that others can enjoy playing as much as I enjoy working on it.

Thursday, August 24, 2017

Gemswap mini-game

I decided to work on a mini-game. It'll be a match-3, currently called Gemswap. I was trying to think of something that would fit in Stella's cottage, as it will be the first interior I do, but I was coming up blank. I decided match-3 games are decently fun.


A game within a game... but at least this game is much more do-able.

So far what I got working:
  • Generates a random board
  • The board generated does not have any matches right off the bat
  • You can swap the gems around properly
What I'll need to work on:
  • Removing matches and adding them to your score
  • When a match is removed, the board is filled up again
I'm not sure if I want to do a game where the game is over when a timer runs out, or if I want to do one that ends when there is no more moves. 

After I determine that, I'd need to work on those specific tasks. And once that is complete, I can work on prettier gems, particle effects, a graphical interface, and other fancy stuff.

Thursday, August 10, 2017

Item Editor

Haven't been working on any fun art or visual stuff lately. But I am learning how to use WPF to create an item editor.


It was pretty interesting setting this up. It doesn't look super great, but it gets the job done.

The next hard part for me will be to actually sync up the XML file generated by my item editor into Unity. Fingers crossed that it isn't too difficult.

What I want to accomplish:
  • Get my items.xml working in Unity
  • Get a working scene/game manager
  • Create Stella Portabella's cottage interior
  • Create one simple mini-game
  • And lastly, once I complete all those tasks, maybe work on some networking. Dun dun dun

Tuesday, July 25, 2017

So many things.

I like to do things in spurts. So here's some things that have been done lately:

Animations and particle effects! Also notice that little location marker the pony walks to? It's a small thing that needs a bit more work, but... razzle-dazzle.



And transparency when going behind large objects. And some regular trees! And an iron fence. And Stella' cottage!


I figured transparency would be pretty important with a game with a perspective like this. Everything being flat, and with some objects being tall and big, it would be pretty annoying to have your character hidden behind these things. It'd also result in wider level-design, as without transparency you wouldn't be able to see anything behind large objects, so there'd be no use placing objects behind one another.

Some things I'd like to progress on:
  •  Interiors, specifically Stella's, since she has story and character, which would make it more interesting to work on. However, with multiple scenes I would need to work on...
  • Scene/game managers. Currently I just have this once messy scene that I test everything in. In order to make new scenes right now, I'd need to copy and paste the player and camera into each scene. I should probably make a script that spawns my character automatically in every scene where I want characters to spawn.
  • The town of Merryville, where Stella lives. Town name's semi-undecided. Laying out a whole map of what the town looks like would be a good idea, to properly gauge size and playability. This game isn't going to be fast-paced, it's meant to be a chill, fun, pony-filled land. A Ponyland, you could say. But because the ponies move at a rather leisurely pace, I want to make sure the maps are condensed and interesting no matter where you are. I'd rather avoid vast, empty maps. 
  • Inventory system would be a great first piece of interface work. But alas, with inventories come XML files and thinking about how things are going to communicate with servers and bleh. Maybe a cute saddlebag inventory icon could be enough to work on for now.

Wednesday, July 5, 2017

Messing with particles, clovers, and characters.

Alright, so I know I said the shader wasn't made (I'm currently borrowing one my friend made) and I didn't want to show the pony yet, but I made my first particle effect - some falling leaves when you knock on a tree! Seriously, the tree shakes look better in game than in these GIFs.


Check out that clover. :) There's pink clovers, white clovers, three-leafed clovers, and four-leafed clovers.

Some work needs to be done to the particle effect - mainly I need to figure out how to apply them to each individual tree in a nice matter. Right now it's just on this tree, and messes up otherwise.

Here's an upcoming work-in-progress house for a special character, Stella Portabella. She's a bewitchingly sweet pony who is always happy to help those in need:


And while you're here, it might be interesting to see some of the old pony concepts:



My very original plan was to have sprites for walking forwards, sideways, and diagonally. Then I realized that would be a lot of work, coding and art-wise... So I decided that three-quarters view looks the best and I'll just use that for all movements. 

I tried to make a pony that's sweet and chubby, but doesn't stray too far from a real pony. Turns out that's a bit hard to do. Cute things don't usually have long, big noses.

I was heavily inspired by Nicole Gauss's original character designs for My Little Pony: Friendship is Magic. Her art is whimsical. 

The next things I feel like working on are finishing up Stella Portabella's cottage, and maybe adding some pathways and more trees. After that, I think I should get an inventory interface up and running - one where you can see item icons and descriptions, and items can be dropped from the inventory.

Tuesday, July 4, 2017

Updated fruit drops and a mouse cursor.

Lookie here!


Do you see it? The fruits now bounce! I think it's so fun.

The tree also jiggles when you hit it. It's better in the game than in the GIF.

Also see the fancy new mouse cursor? Yes, it turns golden when you can interact with something, and is otherwise purple. The mouse draws a bit of inspiration from "My Little Pony: Friendship Gardens," which was a game I spent much of my childhood playing.

The 3D model is hidden in this GIF, it isn't ready to show just yet.

I'm also in the process of adding clover patches. :-)

To do list:
  • Work on the inventory.
    I actually made a bit of progress with this. The inventory has a certain amount of slots, and now it doesn't let you pick up more items than your inventory can hold. And items don't get destroyed even if you don't have the space, hahahaha. Yeah, that was a thing...
  • Work on adding the walk animation.
    I do have a walk animation, I just need to put it in and make it work. That'd be very nice to see. Animation is life. But I'd need to fix some things about the pony model, namely the eyes and adding some blink controllers. 
  • Shader, seriously.
    Seriously, shader. But that's very hard to me, so I'm scared of it.
  • More art. If all else fails, art is my backup. I'm thinking of adding more trees - birch, oak, maple. And also some pathways, like dirt and cobblestone.