Pagina's

Monday, 27 May 2019

A block platformer

Because of my rib, which appears to be bruised, I have not been able to sit in front of the Big Computer for too long stretches of time, so I took my slow laptop "out of the mothballs" like we say, and sit on the sofa. I wanted to make something easy to make and be able to finish something to get the sense of having made something to show going. So what do you make when you already made an endless runner? A simple platformer.

I'm not going to bore you with any graphics, except two sprites called White_pixel and White_circle which I resized and coloured to suit my needs.

The story is simple. You are - and you always kind of knew you are - a white box, navigating a world of black platforms. You really like turning coins and you have three lives. Red blocks try to kill you and... the floor is lava. Can't go wrong.



Sunday, 26 May 2019

Go-kart ruined my weekend

First of all, don't get me wrong. I loved Friday night's go cart and dinner with colleagues. What people don't know is that I don't have a driver's license and Friday was my first time as a driver on a motorised vehicle. It was fun, but there's always that moment when a crash happens and 9 out of 10 times it is alright. As usual, I'm number 10. In a good way, because I once was in a car, as a passenger, and we went for a roll in a way that cars aren't supposed to go (sideways). Me and the driver only had a couple of scratches and we experienced life in a washing machine, so to speak.

And in a bad way, because with the crash, I hurt my rib or my back or whatever and that ruined my weekend. Yesterday I could hardly physically get out of bed, so we decided not to go on our little city trip that we were so much looking forward to. We'll go soon, as soon as my body allows it. It left me some time to work on my game, because my wife went to work in the garden, which I was in no way able to assist her with.

Well, nother much came from that. I was planning to have a GUI day, as opposed to a good day, but I couldn't stand sitting on my desk chair for more than maybe 30 minutes in a row. That's why I did not make much progress.

What I did do is create a couple of  elements for the canvas to show stuff in the player's journal. Right now it holds generic journal entries that are just strings, quests that the player is involved with and relationships with NPC's. What I want to do is show these in some way in the interface and possibly build on the journal itself, because I might want to have more specific information on entries and be able to link certain quest actions to my reputation with certain NPC's.

This mess actually looks as it is supposed to...

That'll be totally unrelated to the GUI, so I'll be able to work with that later, but now I'm what we dutch call "broken". Very tired. I've not been able to sleep well and while my wife does everything she can to make my life easier when I feel like I cannot do anything at all, there's only so much that bundle of goodness can do.

So for now, all glory to my wife for being kind of nice and stuff.

Wednesday, 22 May 2019

Dropping and the big drop

It took me some frustration and two days not working on the game, but it's working, the dropping of objects from the inventory. It was actually quite easy, but it was not something I expected to happen. You know, destroying children (which is only admissible in a software development context), it has some peculiarities if I understand it right and I needed to learn something new in Unity to find that out: The debug mode in Unity. I looked at this video and it helpen me on my way. Just wanted to share this one and others from Unity3DCollege which you should check out.

What seems to have happened if I understand it well, is that stuff happens in another order than I expected. I destroy and object and then check the state of things. Well, that was too soon, probably, because after the Destroy-command, the object sticks around for a while. Took me some time to find that out.

Now the sollution was not difficult in this case, because instead of object 0, which was the one supposed to be destroyed, object 1 was the one I needed. In the end all I did was change a digit.

And then I dropped the objects and tried to save one of them... In vain.



By the way, I think I'm going to use my YouTube channel more now. Gifs are all nice for a couple of seconds, but a longer video is better to show bigger pieces of the game's workings. For anyone interested, you can follow me here.

Sunday, 19 May 2019

Do I have this or not?

Alright, before my wife gets to go on the computer, a little update. Yesterday and today, I made some progress in the Inventory GUI. I put quite some thought (and YouTube tutorials) in it but it took me a day to be where I were in the earlier iteration of my game. Now that I am there, let's build.

Like with the dialog/quest boxes, I learned it is easier to keep GUI and mechanics separate, but now that I'm working on the inventory, I see the disadvantages too. Just have a look.



The inventory screen (which needs some visual changes of course), it contains two major parts: the list on the left and the details part on the right. The list part simply lists the inventory, which contains all the objects that the player picks up, or nothing. The part on the right is going to be more flexible, but what it should have now is either nothing(if there are no objects in the inventory), or the top object in the list (if there are). The buttons in the bottom are going to be Use and Drop (or equivalent, like Equip, Eat etc. That's why they don't have text yet).

It seems the display objects have a hard time communicating with the objects themselves. There's dropping mechanics in the actual objects that place the object in front of the camera and remove them from the inventory, but then... Somehow the game does not yet understand which object to work with and when to update the view.

It'll all be fine, but this is not ready by far. I'm probably making a thinking mistake, but you know how it is with thinking mistakes? You're thinking wrong, so they're especially hard to spot. I'll be back working later. Hopefully with a fresh look and it I'm lucky, I immediately see where I botched it. Wouldn't be the first time and certainly not the last either.

Friday, 17 May 2019

Very specific rocks and rats

So the weekend is here and I get to have time to work on my game. My wife is off with friends and family and the football season has finished, so hardly anything to distract me. This week's been a busy week, but I did make progress in the quest system.

I already had some gathering quest mechanics. Now I also have movement quests. Furthermore I added a way to start and finish a quest. The only way to do that was to talk to an NPC. Now moving to a designated location can also trigger the quest.



Finally, I implemented something to have completing a quest make other quests available. While this is not finished yet, I could be used to guide bigger story lines. For instance, an NPC might send you on a quest to go somewhere and that location will trigger a gathering quest or another move quest. It still requires some work to finish it, but it's starting to work a bit and, like the enemy AI, to me it kind of feels alive already, which is a good thing. I do need others to share that feeling, because such things are deceptive.

Another thing: a gathering quest is now about gathering a specific object. That's fine when I need to fetch the Special Unique Sword of So-and-So, but when I need to gather a flower or a rock, I should not need to get that one unique one. A flower is a flower, so what I'll add is that a gather objective can either point to some specific object, or one of more objects with certain characteristics, like a tag or some information about the object.

Same will be with killing objectives that i'll add later. I can be asked to kill a very specific knight or a monster or something, but it can also be that we need to get rid of a rat. Rats are not unique, unless we're talking a special one. Once I have my combat system, I'll make sure that killing a generic enemy like a rat or a guard will trigger something else than killing a special character, like that one knight,

Also, There's the matter of marking where to go for a quest. Especially now that a quest could turn another quest from unavailable to available, there needs to be some sort of recognizable thing to tell the player a certain NPC might have a quest or a certain location might. For that, I'll probably use some marker near the quest giving object like an exclamation mark or some particle effect that I never worked with.

In the next week, I'm going to work on the GUI again. I would like to have my GUI for journal entries, inventory and quests first (in no particular order). Furthermore, I would like to refactor some stuff in my worldobject class. That'll make it more flexible and easily implemented, especially for the inventory. Here I also want to prevent the GUI to show "Flower", "Flower",  "Flower", "Flower" and "Flower" when I actually just have 5 flowers. An object is unique or it isn't. If it isn't, We shouldn't spend too much space on showing them.

This'll be useful for things like arrows too. I don't want the player object to keep track of 2000 individual arrow objects. I just need the game to understand this particular object is an arrow so that it will be stored as an amount so that the game might pull arrows from a pool. But that's for later.

Wednesday, 15 May 2019

Been a while

Alright, quickly before I hit the sack. It's been a while since my last post. Life interfered like it sometimes does. Went away for a weekend with my wife to celebrate we got married a year ago, so that was nice. The neighbours and some famous tv-show both took an evening and then time goes fast, but I'm back, I guess.

What I've been working on and have not finished yet is a system of quests being triggered by a collider. Once the player moves into a trigger area, it should evaluate if that trigger completes a moving quest and then check if it offers a new quest.

Of course this does not work yet, because it seems I have trouble triggering a dialog screen to notify the player the first quest's been completed, AND somehow the new quest starts off "completed". Not sure what that is about, but I'll find that out later this week.

Now off to bed. Tomorrow gamedev time, because I refuse to watch Eurovision and having a lady in the house, that's what is happening here..

Monday, 6 May 2019

Video: So Far So Good

I did not have too much time to work on my game, so I thought It'd be nice to show some game footage of me playing whatever it is that I do have. I know it's not perfect and you'll see a couple of bugs, but it's starting to get interesting, if I can say so myself. 

`

Sorry about the video quality. I'll try to fix that later. There's a little letter pinned to the wall that I can read. It's all placeholder graphics made in Piskel to have anything to serve as a letter. It'll be replaced once I make the graphics or have someone else do that. not sure yet, so I'll focus on the mechanics, GUI and the like.

Looking at letters user the same mechanics as picking up things, opening doors and talking to NPC's. There's an interact script to do things with objects, depending on what kind of object it is. Is it an interactable, like a letter, examine it, is it an NPC, talk to it, etcetera.

Well, if it's a door, open or close it. Behind the door, there's the blue Friendly Guy that wants a red ball from me, and a red Unfriendly Guy that wants to walk towards me in a buggy fashion. Talking to the Friendly Guy reveals a quest that he has. This one is easy to complete, so I do that and return the ball. Turns out out friend does not have enough stuff on him to reward me. Usually, I'd be angry, but he, this is a public video, so I'll let him go.

I might have more time tomorrow and Wednesday. Hopefully I'll be able to complete the quest for movement quests too. There are - for now - three kinds of quests (or rather objective types; a quest can have a number of different objectives to complete): Gathering quests, movement quests, and defeat quests.

The defeat quest will have to wait before I have combat mechanics, which is not my first priority right now. That'll be movement objectives. Movement objectives are mainly meant as helper objectives to get the player to a place to have him receive further instructions. it should be quite easy to implement. That's what I'll do next.

Furthermore, I plan to make GUI for inventory, journal and quests. Later there'll be trading, equipment and player stats screens. There will probably not be based around the dialog window that I use for examining and dialoging.

Saturday, 4 May 2019

Multipurpose mechanics

The quest system really starts to look like something. A quest can be accepted or rejected and if you don't answer and return later, the NPC wil phrase the question differently. Quests have objectives that can be gathering of an object, defeating an enemy or moving somewhere. Gathering now works. When you get asked for a red ball and you get one, the NPC will understand your success and ask for the thing:



I'm pretty happy with that, because I think I built a dialog system in the progress. Not only are quests starting to be implemented, I also nog have some GUI and mechanics to run a dialog window with one or two buttons to work with. It's always nice to be able to reuse the stuff you build for seemingly unrelated purposes. With hardly any changes, the player can now read a letter on the wall.



Of course I know the letter is not easily readable, so I'll make the panel less transparent and lighter of color, but it pleases me that it works so nicely. Pretty proud of myself.

Before I get ahead of myself. That's it for now.

Thursday, 2 May 2019

A quest in its own right

So I'm implementing quests in my game and since I had been quiet for a while, I'll start with a cheap joke: that's a quest in its own right. It looks like it's taking shape, but it's all looks now.


The first thing I needed to do is have the game understand there's such a thing as a quest, which is now actually nothing more than a class with a couple of strings to contain text. Most of the text is for  dialogs, so I created a dialog handler that can show whatever you want to show in a dedicated dialog window when the rest of the GUI is hidden.

Quests are connected to WorldObjects via a script so that when you interact with that object, it'll view the dialog box. That's kind of all I did tonight. What I'm going to do next is make this a real exchange. There's a couple of lines the NPC can speak, depending on the status of the quest, but that status will never change. For that, I need to have the player actually get the quest. Getting it will change the status. 

Next, I want to add mechanics to the quest so that it has objectives. A delivery quest, like this one, needs to have information on what the NPC wants to have delivered. In this case, the red ball. Furthermore, finding the red ball should change the status of the objective so that when I return to the NPC, it'll be able to decide what to say. A lot of stuff.

And... I need to get the NPC to respect me enough to stop patrolling when we're talking and maybe other NPC's to wait for the dialog to complete before doing their things.