Minegistics [Game Jam 2021]

Post Reply
logalog
New member
Posts: 4
Joined: Tue Apr 21, 2020 00:46
GitHub: logalog42

Minegistics [Game Jam 2021]

by logalog » Post

This is my first dive into actually coding an addition to minetest. I have done a lot of configuration work with modpacks in minecraft but never new content like this. So it might not be the prettiest or most functional right now but I'll keep working on it. I see now that I haven't really been clear on what I hope for with this project. This is mostly a project to help me learn lua and minetest programming so sorry if it's a little disjointed I'll try and keep updating as things go along.

You can find it https://content.minetest.net/packages/l ... inegistic/

Goal
I wanted to create a basic economic and logistics game for minetest. Basically you will be putting down collection nodes on the random generated map and then trying to get them were they need to go.Right now its just getting the basics of that system enabled, mainly the moving/collecting of goods. I see I need to write down a clearer roadmap so that others can understand what I'm thinking.

Bellow is my current mind map of content that I"m working on.
minegistics-copy.png
minegistics-copy.png (170.57 KiB) Viewed 3630 times
Last edited by logalog on Mon Jan 03, 2022 23:13, edited 3 times in total.

logalog
New member
Posts: 4
Joined: Tue Apr 21, 2020 00:46
GitHub: logalog42

Re: Minegistics [Game Jam 2021]

by logalog » Post

Developer logs:

So I'm not the best when it comes to code but I thought that I would start a place that listed some of the issues I'm running into in case someone out there knows how to fix the issues that I probably create for myself. Any help or constructive criticism is welcome there is a lot I'd like to do with this game but it might be a slow and steady pace.

12/23/2021
The current frustration I"m running into is I've figured out how to generate items at the collectors and get the cart to transfer them over to a property on the entity but not how to keep that property instead of resetting it after a pause. I had a variable I was using called load but it doesn't seem to want to change after the loop runs. It could be the same thing as the permanent property issues.

12/30/2021 Thanks to Droogi71 I got through the attachment and movement of item stacks from node to cart entity. I've come to realize that I feel my logic makes sense and would work. Unfortunately when it comes to implementing it in code is where I struggle which I think is the same for all people that are starting to learn how to code. It just will come down to time learning proper code and syntactic which is annoying but necessary.
Last edited by logalog on Thu Dec 30, 2021 17:46, edited 1 time in total.

Droog71
Member
Posts: 37
Joined: Sat May 29, 2021 21:09

Re: Minegistics [Game Jam 2021]

by Droog71 » Post

logalog wrote:
Thu Dec 23, 2021 17:36
The current frustration I"m running into is I've figured out how to generate items at the collectors and get the cart to transfer them over to a property on the entity but not how to keep that property instead of reseting it after a pause. I had a variable I was using called load but it doesn't seem to want to change after the loop runs. It could be the same thing as the permanent property issues.
I downloaded the game, played a bit and looked at the code to see what you're talking about.

In your cart entity's structure_check function, you create a local variable called cartInv.
When items are added or removed from the cart, you modify this local variable.
The problem is this doesn't affect the cart's actual inventory variables (coalInv, copperInv, etc.)
The cartInv table does not contain references to those variables, it just contains their values.

So, it is the same as this:
local cartInv = {0, 0, 0, 0, 0}
cartInv[1] = cartInv[1] +10

The result is: cartInv[1] = {10,0,0,0} and coalInv = 0

Then, since coalInv was not affected by this change, when the function is called again, this happens:
local cartInv = {0, 0, 0, 0, 0}
cartInv[1] = cartInv[1] +10

The result is once again: cartInv[1] = {10,0,0,0} and coalInv = 0

The cartInv table is modified and reset repeatedly without ever changing the coalInv variable.

I hope I have explained this in a way that is understandable.

I forked the minegistics repo and fixed this problem.
I also made it so the cart entity's attached items and these inventory variables are always in sync.
That way you can toss items into the cart or have the collector add them and the end result is the same.
You can also see items appear in the cart when the collector adds them and disappear when removed.
I added the ability to pick up the collector and market nodes to make it easier for me to test my changes.
I also added "allowed_mapgens = singlenode" to the game.conf because the game doesn't work right
if you choose v7 or something else.

If you want to use my changes directly, let me know and I will create a pull request.
Or if you want to just read through the changes and remake them in your own style, the fork will be there.

https://github.com/Droog71/minegistics/ ... ee716715d6

I like the concept of this game.
Some ideas I have would be:
Automated cart movement (so you don't have to punch them).
Currency (earn money from the market nodes and use it to buy more collectors, carts, track, etc)
Electricity (to power the buildings)

I see in the code there seems to be plans for factories, towns, warehouses, etc.
Would be nice to see this turn into a city builder, factory builder, transport tycoon style game.

User avatar
Wuzzy
Member
Posts: 4786
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: Minegistics [Game Jam 2021]

by Wuzzy » Post

I don't understand, what is this game even about? What is your goal?

Do you have a plan? Based on your posts, I have no idea what this is supposed to be or become.

logalog
New member
Posts: 4
Joined: Tue Apr 21, 2020 00:46
GitHub: logalog42

Re: Minegistics [Game Jam 2021]

by logalog » Post

Thanks wuzzy for the reminder that I need to get things out of my head and on to a clear location for others to understand I updated my top post and I'll work on a clearer roadmap or at least getting my thoughts down for others to understand.

lazerbeak12345
Member
Posts: 47
Joined: Sun Dec 12, 2021 01:55
GitHub: lazerbeak12345
In-game: lazerbeak12345

Re: Minegistics [Game Jam 2021]

by lazerbeak12345 » Post

I love how far this has come! I can't wait for some of the other features in your mindmap!
Chocolate armor is tasty :)

Droog71
Member
Posts: 37
Joined: Sat May 29, 2021 21:09

Re: Minegistics [Game Jam 2021]

by Droog71 » Post

Great job on the new train tracks @logalog. I really like the way everything looks now with the smaller buildings and the trains really look like they are riding on the 3D rails. Much better than the original flat tracks and large buildings.

User avatar
Wuzzy
Member
Posts: 4786
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: Minegistics [Game Jam 2021]

by Wuzzy » Post

Ohhhhh, it seems this game has seen some updates and I finally understand what this is about. So apparently you're supposed to build industry buildings and build a train network to make as much money as possible.
That's quite unusual for Minetest.

The game seems still very incomplete and buggy but now it's clear what you were going for.
The graphics are the ugly DevTest textures except in this game is actually makes sense. XD. The smoke particle effect sadly is buggy because there is some proplem with overlapping particles which look wrong; this seems to be a Minetest problem, however. The models look a bit too simple for me? Are they unfinished?
BTW: If you really want to go all-in with the retro look, I recommend to take a look at the Retro Plus texture pack.

Trains are confusing and don't make a lot of sense to use. I have no idea when items are sold. Trains refuse to bring items from the market to towns, they only seem to do it once and never again so I am stuck because I can't earn money.

Seems like this game still needs a lot of work but it's interesting to follow the concepts.

Droog71
Member
Posts: 37
Joined: Sat May 29, 2021 21:09

Re: Minegistics [Game Jam 2021]

by Droog71 » Post

Wuzzy wrote:
Fri Mar 10, 2023 02:32
Ohhhhh, it seems this game has seen some updates and I finally understand what this is about. So apparently you're supposed to build industry buildings and build a train network to make as much money as possible.
That's quite unusual for Minetest.

The game seems still very incomplete and buggy but now it's clear what you were going for.
The graphics are the ugly DevTest textures except in this game is actually makes sense. XD. The smoke particle effect sadly is buggy because there is some proplem with overlapping particles which look wrong; this seems to be a Minetest problem, however. The models look a bit too simple for me? Are they unfinished?
BTW: If you really want to go all-in with the retro look, I recommend to take a look at the Retro Plus texture pack.

Trains are confusing and don't make a lot of sense to use. I have no idea when items are sold. Trains refuse to bring items from the market to towns, they only seem to do it once and never again so I am stuck because I can't earn money.

Seems like this game still needs a lot of work but it's interesting to follow the concepts.
For towns, all you need to do is connect the town to a market with rails and place a train on the rail.
There is a sound effect that plays and a particle effect (stick figures) symbolizing people going to and from the market. So, you will know when it is working.

When you connect a collector, workshop or factory to the market using rails and place a train on the rail, the train will deliver the items produced by these buildings to the market.

Once you have items for sale being delivered to the market and a train going between the town and the market, you will get notifications about items sold with the x,y,z coordinates of the market an the amount earned.

The usage of each building is described in the tooltips. Just hover over the building in your inventory and you will see instructions about how to use it.

For example, the tooltip for towns:
"Town: Required to earn money from markets.
Connect to a market with rails and add a train."

lili36
New member
Posts: 6
Joined: Mon Apr 03, 2023 16:08

Re: Minegistics [Game Jam 2021]

by lili36 » Post

Hi !

I just tested the game and found the concept intersting (it changes from other games !)
But some bugs discouraged me :

- if link gold to workshop, the gold just.... disappear ! I get no gold product. Only if I link the workshop to the market, then the gold product is displayed, else it is lost
- I can't take back a train, ever. Or stop it. [Edit : looking in the code I saw I had to sneak to do it ! This was unclear to me, adding an explanation would be great. I still didn't find how to stop them yet)
- If I build tracks, then automatically link to everhting around (I can't choose) and then trains do a big mess. They all do the same path and never ever deserve the other industry again. And no way to take back or stop the trains to rebuild things.
- I tried to delete the track under it but... train still working (with only one tile space)

We would need to be able to decide which train does what, and collect trains back.
Gold product should appear in the case even with no train link.

Also, we can only earn money, no cost, and that would be interesting !
I hope you won't take my message wrong : it is not to say your game is bad, at the opposite, I write here because I lliked the idea and would like to see these improvements to play more of it !

Thanks you for all the job you already did !

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests