SakeTami
Speiger
Speiger

patreon


Motivation, Refactoring and Milestones

Motivation is a Strange thing. Especially if focus switches around a lot.
But if you know the source of your strongest Motivation then you can use it for your advantage...

Well that didn't happen for me, at least not in a way you would expect.

So yeah, hey everyone.
Its been now almost one and a half years since my last post.

I could now say that I was busy with other projects, didn't want to work on this and IRL was causing me a lot of trouble.
While some of that was true, it was not the main reason... Well it was but it was more of a Symptom then a Problem.

The main issue is I am horrible with planning my time. I think this should show it more then enough.

I am not really sweet talking it.
On top of that I just realized that my last update was on 0.2 and I am already at 0.4...
Yeah I just forgot to do one update..

Modeling Tool


Time for a Update I think on what I have been working on.
But before we start I want to explain this "Motivation" speech a bit more.

Motivation is really strange for me. It is usually based on stuff that annoys me,
like if something annoys me really a lot it is such a motivation booster and that happened twice. To which extend becomes visible very quickly.

I wonder if you remember my Modeling Converter that I have written.
If not here is a Image how it looked like.

Yeah lets say I was getting a frustrated with that tool and decided after seeing Cout970 Modeling tool. That mine needed to be changed.

So a full rewrite came into place. Because I wanted be able to do certain things that were not possible.

Well this is how this tool now looks:

This Tool actually uses my game engine now fully. I split the engine part into its own project.
It was not easy to achieve this since my engine needed a lot of fixes and Adjustments.

But to list a few features:

- It can import Blender models (Triangles only)
- Transform Models either itself or the entire children/parent area or Each vertex directly
- Tool Material that can be either a color or texture. Textures just use UVs to add vertex colors
- Edit in Triangle/Vertex/Model mode (Deletion)
- Undo/Redo System
- Add Cube shapes that can be transformed later in what you need. (More shapes are planned)
- Export in my Deprecated model format (yes already planned a new one, its fully designed already)
- Duplicate Models. (I wish it had model splitting. That's soon though....)
- Project System that just keeps everything remembered so you can work on different projects as you need and not re-import/recolor everything again and again...

Why I did this was most likely obvious. It helped me to make Models easier and also was a interesting project at the time.

This actually happened roughly after the 0.3 Patch was completed because I wanted to do more modeling and I actually needed to do models but felt like I was limited by blender.
My Blender Knowledge is as bad as it was before but now I can model with my own Tools.


Patch 0.3

So what was Patch 0.3?

It was partly some things (Terrain-Tools/Tile Place Handler) from 0.2 Patch,
and some features.

Entity System should self explain. Moving Actors that just interact with the world and do things.
These are mainly Harvesters & Transporters right now. I am going to show the actual progress at the end, I made a small recording.

So what is a TicketList?

The TicketList is if we go Programmer explanation just a long[] that's it, but that explains nothing and is boring.
No the TicketList is my way of handling Updates in the game world with the Tile Grid.
Instead of Updating every single Tile manually or having a list of positions where placed tiles are and updating these i am using a Schedule System.

You basically add a Ticket to the TicketManager and say "At position XZ I need a update at game tick x with the following information" (provide information)

That gets saved as a long in HashMap that uses the expected time as key and a list of tasks as value. Map<Long, List<Long>>. And the world just removes the tasks list of the current game tick and processes these. 

This has the major upside of If nothing is going on, then nothing wastes CPU time.
Now there is 3 types of TicketLists.

- Simple Ticket Lists: Allows only 1 ticket per position to be present.
- Multi Ticket Lists: Allows multiple tickets per position to be present.
- Clocked Ticket Lists: These allow only for Positional Registration and get fixed update cycles. (Useful for Plants/Trees and anything that just acts on a clock)

And for all the Programmers out there on how much memory i am wasting.
First of all i am using PrimitiveLists/Maps so that isn't an issue.
Other then that I am highly compressing the update information.
Here is the memory Layout:
- First 32 bits are xz coordinate.
- Last 4 bits are what type of ticket it is.
- 28 Bits that are left for the ticket itself so you can store at least some data in there.

So that was the 0.3 update. That I forgot to tell.
It was more of a lets clean up my mess update.


Patch 0.4

The 0.4 Update which seems small had a VERY LONG tail attached was more thought out though.
Because I wanted actually something to show for being away for 6 months...

The First actual content Upgrade that allowed me to at least have something that would represent a game.. Ofc no balance or anything like that but I could show something of what is going on in the engine and what I am doing.

So my thought Process was? What do I need to achieve that.

- First: Resources. The trees should give wood. And my Forester also should have these resources stored somewhere?
- So a Inventory System was needed. These were really Quick implemented.
- Pathfinding was needed to get from A To B without walking through walls. It is not perfect and ThinMatrix  has been a great source of Ideas how to improve one this...
- Last was ofc some buildings that could then interact with each other.

And before i go into this deeper what these buildings were, I bet some of you wonder.
What was the giant Tail I was talking about... 

Well, the Path finding System was giving me some grief. To be exact it was not the Path finding System itself but a Combo of me wanting to be Memory Efficient and FastUtil being as glitchy as it is was driving me mad. (I check it frequently and all these issues are still there)
So what was the problem?


Primitive Collections

Lets being with this: What is FastUtil?
FastUtil is a Library that provides you with Primitive Collections so you don't have to Wrap Primitive (int/byte/long/float) into Objects. It saves a lot of ram and overhead.

What is the issue:
- The implementation is shoddy... to a Point where if you were try to use anything outside of: ArrayList/LinkedOpenHashSets/LinkedOpenHashMaps
You would fall into holes of: Bugs, Missing/Slower implementations, Packaging is hell, to right out not usable implementations due to the first two points...

It was getting out of hand for me so I hoped to either get bugs fixed or help getting them fixed.
Now I am going to say out right: No my manners were not the best, I should have been more professional. But in that time I already learned to cope with these issues...

Anyways that resulted in nothing being fixed/addressed. Nothing was addressed.
I had patches already as pull request (already deleted) provided but they were against their design, which is a fair point to some degree, but nothing was/has been done to address issues either.

And this lead into the huge tail...
I didn't link to FastUtil by the way because I don't think its a good library anymore.

If you remembered the first part of my post. I was annoyed/frustrated and just let my new found motivation into this tail... Well I basically made my own Primitive collections library.

Since I didn't have a good name for it I temp/final name called it: "Primitive Collections"
It is a replacement for fast util that has all the bugs of FastUtil that I found fixed.
It has Dedicated new functions for optimizations, or just straight out imported them from FastUtil. It supports all features that java has by itself. (For Programmers: NavigableMap/Set)
And it does not require "CMake" to be compiled or edited. All in 1 Gradle Project.

If you used: ArrayLists/Sets/Maps/PriorityQueues (not Big variants or indirect ones)
It is a 90% re-import of classes and 10% just fixing names.

Now that this self promotion is over this were 3-4 months of my life invested into this.

Yep I basically recreated a giant Primitive Collections Library from scratch...
This ate so much time before I could even start thinking about adding more content.
At the same time it was a great learning experience since I know now so much more about the inner workings of Collections and Java itself. So I wouldn't call it a waste of time.


Patch 0.4 Content

So after this happened. I started implementing Models & Content.

The idea was to implement a simple Work Tree that just could show pathfinding and some resource Production Tree.

Using Trees & Wheat to make Bread and store it in the final Result in Global Storage.

This is basically a production I just build. To show it off.

But yeah this is basically the Progress I made. Sorry for being Anticlimactic

I got massively sidetracked and made a lot of things happen that I needed in the long run.
And then finally got back on track.

Patch 0.5

So whats the next patch going to be?
Something really small.

Basically the Safe File System and the New Model part.
Though a Couple optimizations/Refactors are planned too.

Though this should be done by the next month.
Though I want to take a week break too, because I just got of my 5th large project in a row.

We will see what happens. But this chapter is finally done.


Anyways thanks for reading.

Speiger

Small edit: I hope the Gifs load for you... If they don't then i change them tomorrow

Motivation, Refactoring and Milestones

More Creators