Sep. 28th, 2017

Work Post

Sep. 28th, 2017 04:49 pm
relee: Picture of Relee Starbreeze, Wizard (Default)
4:49pm - Oh geez, I came to McDonalds and spent like 40+ minutes reading the Twitter again. Heh.

Anyways yesterday I got my guy to look at the mouse. Well technically he was pointing at the mouse to his right, so I just turned the sprite 90 degrees. Let's see if that comes back to haunt me! (it probably will)

Now one way to make this sort of thing would be to have a straight gun and have the bullets come out straight. Another would be to have the bullets come out the nose. I'm going to go for the complex way and have the gun be like a turret, so it has to point towards the mouse too! Let's see if I can do that.

5:04pm - Haunting time is now! XD

I had the bright idea to copy the turning code and put it in a new script in the gunhand itself. Of course the gun doesn't point towards the mouse, it points perpendicular to the mouse. XD

I need to fix the code in both now.

5:33pm - I got stuck on the 'learning experience' of trying to figure out why the triangle man was always looking perpendicular, even though I had already solved the problem by adding negative 90 to the euler angle applied to the rotation. It turned out that worked and was neccesary because Unity does angles up to 180 and down to -180 instead of 0-360 like you might expect. Well, if you have an angle greater than 180 it keeps going, but the whole thing caused the perpendicular facing.


Now that Triangleman is moving the way I want, I can move onto the next step, which was...

Oh geez I dunno. o.o;;

I could make his sword work.
I could make his gun work.
I could make enemies for his sword and gun to work on.
I could make him able to dodge.
I could make him able to slow time.

More abstract. I could make a world for him to explore.
I could make levels for him to switch between.
I could make a UI to see his stats.

Oh the places you'll go, Triangleman. <3

I think I'll go to the bathroom then make his sword work. It should be harder than the gun, so I want to make sure I can do it first.

5:51pm - Okay I've got an idea in my head how to do this, but I should probably write it down and logic it out.

Triangleman is going to have a three swing combo attack. When you press the button he'll do a slash from left to right, then if you press the button again in time he'll do a slash from right to left, then if you press the button again in time, he'll do a straight jab with the blade. I don't want to lock the player into it just by accidentally pushing the button twice really fast, so there's a sweet spot you have to hit the button at, and I have to track that.

Now, where should I track that? In an input controller independant of Triangleman? In Triangleman's Character Controller? Currently all the controls are both recieved and responded to by Triangleman's character controller script. Is that the way it should be done? What if I want to pause the game to bring up a GUI item like a map or a menu?

Actually, I think I'll consult THE BOOK for this.

6:06pm - Okay THE BOOK was a bit too low level for this.

I'm thinking of converting to using an input manager, but if I do that, I'll have to move the inputs off of Triangleman and put them in the Input Manager, and yet still quickly get the inputs over to Triangleman's scripts to move him when appropriate.

6:11pm - Alright. So I'm thinking of going with the input manager idea. So, I suppose I could put almost all the movement code right there, and tell it the player object to move instead of having the player object move itself. Actually this is a great idea, it'll make it easy to switch who or what the player is controlling, too. I should try and remember this for the future.

10:18pm - I got really involved in talking with a friend and really distracted for a long time. I was at least able to move the movement code over to the new Input Manager and it works fine. I'll have to make the sword do swordy things next time.

Profile

relee: Picture of Relee Starbreeze, Wizard (Default)
Relee Squirrel

July 2023

S M T W T F S
      1
23456 78
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 24th, 2025 02:36 am
Powered by Dreamwidth Studios