Showing posts with label coding. Show all posts
Showing posts with label coding. Show all posts

Tuesday, 31 March 2015

31/3/15 - Whack-a-Mole no more!


I've likened my problems in Unity to Whack-a-Mole.
When one problem goes down, another pops up.



So here's what's happened so far:

***Problems working out how big the sprites are when imported into Unity***
Cheating with a sized box around each sprite won't work - it's a case of going into photoshop, cropping it down to the pixel, and dividing the dimensions by how many sprites are across/down


***Problems with sprites not lining up***
That's a case for pivots, and not sprite sizes, as I initially thought.


***Assorted coding issues***
For whatever reason, I missed whole lines of code. I don't know how. The secondary issues were missing curly brackets and capital letters where they were/weren't supposed to be


***Jumping***
Turns out, I had my gravity on waaaaaaaay too high. The next problem was getting the animation to play properly when she falls. That was just trial and error.



But guess what?
I've done it!... For now at least. 





I've got a minor issue going on with the camera tracking, but I'm pretty sure this is easily sorted out with a bit of code that keeps the Y axis fixed. I'm not a coder, so this'll take a bit of research, or some help with someone in the know.





Ahhh. The sense of accomplishment is overwhelming right now.


Monday, 23 March 2015

23/3/15 - I owe you some progress

From my last post a few weeks ago, I've been trying to get things to work in Unity.

Here's what I've got so far!

And sweet baby jesus has this taken a long time to do.

I've had such a problem with sprites. I never would have guessed that would be my biggest problem.

My first problem was getting everything to slice nicely so I didn't get a jiggly frame without guesswork. With the help of Wayne Peters, a game art tutor, I've managed to get that bit down! Great!

Problem two was an issue with the code. I followed this tutorial, and for whatever reason, I could swear on my life code just kept appearing out of nowhere. Thankfully, I have my talented brother to help me see where I'm going wrong - hint: It was capital letters, lower case letters, wiggly brackets and semi-colons.

So! All coded up, and problem three is again an issue with the sprites. As you can see from the video, there's a nasty jump there between an idle animation and the run. I'd wager it's because the sprites aren't the same dimensions.

Either way, enjoy my progress and look out for more stuff. I might need to change that picture on the banner, I'm not going to have much hair left once this software has made me pull it all out.

Monday, 20 October 2014

15/10, Coding Test

Today I've been practicing coding in Flash to make a character follow my mouse. I'll admit, I wasn't particularly original and totally ripped the idea off this fun whale that follows the cursor.

http://img0.liveinternet.ru/images/attach/c/5/3970/3970473_sprite198.swf

Mine happens to be a mouse. It's nowhere near as flashy, but it was a start to work out how this whole thing works. I had a bit of trouble with the animal not sticking together in the right places. It turns out it was an anchor point problem. It's all alright, now! Admittedly, it does glitch occasionally, but for a first try of putting something together, it's not half bad.