Minecraft Fangame Poll.
Poll: Which version of MineCraft should I make?
Ended May 15, 2014
Poll: What should be developed first in the games?
Ended May 15, 2014
Poll: Should I make an account system first/at all?
Ended May 15, 2014
Ended May 15, 2014
Ended May 15, 2014
Ended May 15, 2014
After numerous tests, I've finally decided on a "view". I will be making it in 2.5d. It will look exactly like the minecraft world, from top-down, but still rendered in 3d. YoU Will be able to see the edge of blocks and such, and hills will have definition. When you scroll up, you will get closer to the ground level. There will be an option to free-look at your world from any building, but you will not be able to select or command units from that building, it's just for fun.
You will drag-select units and RIGHT CLICK on a building or location to set their goal to it. Units will clamber over the terrain to try and get closer to their goal.
The UI for Humans will have all the staple resources somewhere on screen, either as a docked bar or small movable window. This is also where all the current placeable buildings will go. Remember, you can not "create" units, only Humans.. Wolves are tamed and will be placed across the map for either team to capture. So you create a human at a house, and send it to the Barracks to be trained as a Swordsman, for example. This takes a short amount of time, of course. You CAN untrain units in this game! An Archer can become a Civilian again. Also, any unit can help build or gather although will be about 33% as efficient at it.
Mobs, being simpler, the UI is bare except for the souls and blocks meters. Click on a zombie to place the plot, a building to create a unit, etc. Highly simplified.
So to summarize: Create humans and train them by assigning them to the correct building. Wolves are random. Any unit can help build and gather but civilians are best. The game will be in 3d top-town view.
Programming jibbywabby: The terrain will be a HEIGHT map, with floor(z/32)*32 heights. Units will not be slowed by different heights and the maximum height difference between any 2 tiles will only ever be 1. Every grid will have a height variable, water variable, light variable. Things like Trees will be made of blocks, as will every building.
Small teaser for anyone still reading... As a building gets destroyed, the blocks that make up that building will slowly fall off and disappear! They will then slowly be re-built as you repair the building! This is because the buildings will not be models, but lists of blocks relative to the center, and in-game will have a separate list of actual blocks representing it. Funny thing, if you use Piston-Block auto generators to repair your buildings, any missing blocks will be replaced with Cobblestone instead of the original block. :tongue.gif:
Here's my blabbery/progress.
So we know we have 3 levels of thinking for any unit. So I had a few random throws at it, and none of them were quite good enough to keep... So here's my thoughts on making it better. When you give a unit an action, it puts that action on a stack. The action will then decide if it is done, or if it needs further action to be completed, which needs to be added to the stack. When the stack empties, the unit idles.
It's actually interesting. The stack of a simple command could quickly become huge. Say there is no mine on the map yet, you don't have enough wood for a mine, but you order a unit to find and gather from stone? That units stack will quickly grow, and at its longest, will be the following...
get infinite stone requires I gather stone from a mine requires I build a stone mine requires I place a stone mine requires I get 100 wood requires I chop some trees requires I get to some trees
So this will be the first RTS ever made where, if you start a new game and order a unit to become a Warrior, it will actually run to the nearest tree, cut wood down, create a mine, mine enough stone and gather enough wood for a Barracks, and go and train itself. :tongue.gif: The other thing I have to make sure to program is units re-running their task list every frame, and if they find that something's already complete, delete the rest of the stack. For example, the above unit.. Suddenly, in the next frame, discovers that we have 100 wood.. So even though that's the third thing in it's stack (get 100 wood), it still detects that it's been done, and removes the "chop some trees" and "get to some trees" actions.
// Techy Time!
Hopefully I can do this by reference. In other words, every action will simply be a function, and the stack will be a stack of functions it tries to get through during every step. An action can return either true (ie,I'm done, delete me) or another action required for it to become completed. Ie, the get_infinite_stone command obvious will never be complete, so it only ever returns the "gather_from_mine" command, thus repeating it indefinitely. However, that command requires you be at a mine, so if you are, it'll mind some stone and then return "true", so it gets removed from the stack. If you aren't at a mine, it'll return a command that will move you to a mine.
The gather_from_mine function would be this:
The move_to_nearest_mine() function would be this:
Have you gotten multiple levels of depth done in the game (like hills)? That was one of the problems I've historically had with Game Maker, figuring out all the collision masks and such. Grr!
Also, for the Humans maybe there can be a player character hero that you start out with, who does extra damage and can use special equipment?
I'd definitely give it a shot when you finish.
Hey. =D
However, tomorrow is all free and open, and I'll be doing an all-day coding session. Expect a release by the end of the day, of whatever I've made, which may be a lot or may be a little. :smile.gif:
Great! Just don't work yourself to death.
<------
I will gladly test the game for you AND I have a SMP server.
PM me for all the deatails
for yeh.
Thinking up the solutions to a few small problems.
Problem: Functions such as "go to tree" and "build building" need a target.
Solution: Simply pass the object to the "move" command and it will move to the nearest one.
Problem: A "move" gesture needs a target, but what if that target is open ground?
Solution: Make an target at the mouse position and set your target to that.
Problem: Clicking somewhere will create a new target, leaving the old one taking up memory.
Solution: Every unit creates a fake target upon creating and simply moves it where it needs to be.
Problem: Every unit now doubles its memory and performance hits.
Solution: A unit can set the "target" to itself, in which case functions know to use an x, y stored in the unit.
In other words, problem solved. Just needed a place to think the problem through and this seemed like a good place. :smile.gif:
Remember- This process is good. Elegant coding is more efficient, so the game will run smoothly. The less conditions running, the better.
So to get my instruction set down to zero conditionals, I may make every unit have a "target position". It updates constantly to be where the unit wants to be.. Whether it is the x,y of the tree it's picked, or simply where it's moving to next, it will have that x, y. Even tree's will have it. Then, when a unit is told to move to open ground, it sets its target to itself, and its x, y to the mouse coordinates.
No conditionals at all! Could even do some nifty things, for example, the target x, y of a building could be it's entrance, making an easy way for units to enter buildings without having to have extra variables.
Any questions? It seems solid in my head. Elegant, efficient...
Download it here, and you NEED windows!
Controls: Click to select a unit, or click and drag to select multiple. (Hold control to add them to the currently selected units). Click a tree to send your units to harvest it, or click the ground to move them.
What's next: I'm going to add the "house" building. If I can get them to construct it, entirely un-aided, then I'm good to go. :smile.gif:
The wood does collect way too far, I haven't added "delay" to each collection yet. Ultimately, trees will disappear after 25 resources have been collected from them, and a unit will take about 1.4 seconds per piece of wood.
The controls ARE very easy (a-la C+C 2). However, I'll be adding a few modes..
Mode | Left Button | Right Button
One | Selects/Action | Deselects
Two | Selects/Deselects | Action
Three | Action | Selects/Deselects
What's next?
Last poll results: Piston mechanisms will be added as both bridges/towers AND self-erecting/repairing buildings.
Also, that's not a bug, they are simply going to another tree. You should have 7 units. :smile.gif: