2021-07-09

relee: Picture of Relee Starbreeze, Wizard (Default)
2021-07-09 01:59 am

Work Post

2:01am - Well, I had been hoping to do a great many things today, but mental illness said no. But then I said, I'll do some coding ANYWAY.

It's two in the morning and I'm going to see what I can do about that unintended diagonal movement.

...

Actually, on testing it, it's not so bad. I think I'll leave it in, and keep my alternate movement key in for precision movement.

And that's already in also so I guess the next step is to start stripping down the GreenEnemy class into a generic Enemy class. It'll need to have some way to determine its proper graphic though.

The sprite sheet I'm using now is set up as an atlas texture. Different sprites are selected by only showing part of the picture, so basically all the sprites are the same picture repeated, showing only a tiny window of it.

The problem is, what if I want to put in custom sprites for characters or something? Or use this in some other way? I've been thinking about really open sourcing the project at some point, or using the engine elements in other games. I'd like to have the sprites be seperate, so that I can pick and choose them freely.

Ultimately it would be nice to be able to pick files from outside of the project and use them for sprites, but I'm not sure if that would be sensible at this protype stage.

For now I'm going to split up the tile sheet into individual images to use. I might also switch to the colour version of this sheet, which was something I was considering before, because I realized that the black and white sheet didn't use full black and white, so tinting wasn't an option. I could recolour the black and white sprites, but I'm not sure tinting was ever a good idea, given how it works.

4:13am - Well I did all the art stuff and now the game has nice looking colour sprites and tiles. I was going to start work on peeling the Green out of the Enemy class but it's a little too complicated to start at four am on a night before work.
relee: Picture of Relee Starbreeze, Wizard (Default)
2021-07-09 10:22 pm

Work Post

10:22pm - Time is fleeting, and tonight it's going particularly fast. I took the day off work again due to my mental health problems, and if I was still at work I'd be getting off in less than ten minutes (probably) but I've barely begun my day.

I was hoping to do some pasta up tonight, but other things have gotten in the way. I also want to do some programming work, and it's hard to do them both at once. The pasta is the more immediate concern, but it's not as appealing, so I've started working on my programming. I've been studying about the ADHD and ASD that art part of me and I realize this isn't that abnormal, but I'm not sure it's good either? At any rate I've got stuff I want to do.

GreenEnemy isn't just a class in my project, it's also a scene in Godot. It's got it's own scene, with a Node2D and a Sprite. It's instantiated by the main program, which is part of how Godot usually works. In retrospect I probably could have made this game more Godot style than I did. Usually in Godot or, also, Unity games, you create a lot of independant scenes or prefabs that go together and can operate independantly. In the game I've made you can't just slap down a Map and put an Actor down in the editor and expect it to work. But I might have been able to do that if I had really been aiming for it and embraced the Signal system for moving data and commands instead of the way I did it. That said, I've already remade this game so many times, I don't want to do it again, at least not now.

I've actually been thinking about formalizing my goal for this game more and making it a proof of capability project, like the Match 3 game I made a decade ago or more. Something I can finish and say 'This is a thing I did and didn't quit or change to something else'. But this isn't the time for that.

Right now I'm trying to decide if, when I change my GreenEnemy for an Enemy, I should change my Enemy and Player scenes for an Actor scene.

The Player scene has a bunch more stuff in it than the GreenEnemy. It's got a Camera with a CanvasLayer and a bunch of GUI bits on it. That ties the GUI to the Player scene firmly, meaning there's only one possible player scene. So that has to change. But how?

If I made all the Actors into a single Actor scene, with just an Actor and a Sprite, that would make it easier to just make any old thing. But, it would also mean that my Actor subclasses wouldn't have their own unique behaviors.

If I tied the unique behaviors to the AICore system, or made a Capability system of some sort, I would be able to make them transient and pluginable, but that seems a bit over the top for what I'm trying to do.

I could also make it so that all of the actors functioned the same, but their stats were different. That might be a good idea. Let's look at some cases.

What can the Player do that Enemies, NPCs, Items, and Effects shouldn't be able to do?

Well, I suppose there's manipulating the GUI, but that's going to be seperate from the Actor class anyways.

If something wasn't an NPC you wouldn't be able to talk to it, but you could still try. How would I handle that? The talk action would go to a dialogue handler anyways, and if the Actor didn't have one, it would just say something like 'You can't talk to that'.

What about the Use action though. That's meant to be different for every Actor type. But then, not just every type, but almost every Actor. Every different Item type would have its own Use method that was unique.

Hmm...

Maybe, like the pluginable AICore, I need a pluginable Use system?

Let's look at the major cases there.

Use Food, Use Potion, Use Door, Use Chest, and Use Wand.

Use Food, I'd want it to ... I just realized I didn't make an Affect action. I made a recieve effect from actor but nothing to give one. Weird. And I digress.

Use Food, I'd want it to Affect the Target Actor, who would be the user, with a food buff. It should also consume the food, removing it from inventory.

Use Potion, there could be lots of different effects given by potions, but it works the same as food.

Use Door, the door opens or closes. This would be an effect on the door itself, I think.

Use Chest, open the chest and take its items. This is a complex action since it affects the chest and the user and gives over items to them.

Use Wand, you point a wand at something and give it an effect remotely. This is pretty complex since it has to communicate with the AICore to figure out what, where, and when to be used. For the Player there would have to be a targeting system, and for the AI there would have to be something to know it has a wand, and to choose when to use it, and where and on what.

I'll give that a bit of thought.

11:07pm - I'm going to take a bit of a cuddle break while I think about this.

1:47am - Well, the cuddle break went on for a while and was nice but I got stuck, and when my roommmate helped me out I went and made the pasta and sauce.

2:02am - I looked away and it was fifteen minutes later. o.o;;

Anyways I think my idea of putting a plugin in for the use action and otherwise having static actions makes sense.


So, to be clear, moving forward, instead of subclassing Actor, and having different scenes for each actor, there'll just be one actor scene, which will represent all actors in the game. The Actor Factory will assemble the actors to differentiate them, and each Actor will also be assigned an AICore and a Use component. I can add other bits as neccesary too. I'll also have to pull the UI out of Player.

2:29am - Alright I've updated my TODO list with a bunch of tasks, and I'll work on them next time. For now, I'm tired and I have to work tomorrow, so I'm going to bed.