[Prototype][Game a Month]Cube Miner
Hey guys this will probably be my first actual game prototype post, going to try and not wall of text you. So I have been of the grid for a while now busy making my own engine using c++ and SDL, it is a struggle but one I would do again as I have a great passion for programming engines but this leads to my next point. As we all know engines are great but they are not games and with this I have decided to start using game maker to prototype small games while working on the engine, my aim is to make games and I also want to fail fast so I'm going to start a game a month seeing as I'm not that good with game maker yet then later try to amp it up to a game a week. So without further ado this months prototype is Cube World.
Objective: Collect treasure and clear the dungeon
Mechanics:
Must haves:
1. Generate random dungeon with multiple floors
2. Most of the walls are destructible (in a bind facing 5 monsters, break through the wall and pick them off one by one)
3. Collectable treasure
Hoped for:
1. Items for character (maybe a diamond pick axe, now where have i seen that before)
2. Level system
3. More than one monster type
Done:
1. Character cube is walking and facing the mouse
2. Destructible blocks are in place
3. Enemy cone of sight working, player can hide behind ground
To do:
1. Add some AI
2. Scoring system
Busy:
Trying to implement random map generation using BSP trees... If it takes up more than a week I think I should just hack the map and move on to other mechanics
Screenshots/Vid:
Download:
https://www.dropbox.com/s/ktauspl9gae40w2/Cube Miner v0.0.0.5.zip
Controls: WASD and Left MB for attack and mining :)
Objective: Collect treasure and clear the dungeon
Mechanics:
Must haves:
1. Generate random dungeon with multiple floors
2. Most of the walls are destructible (in a bind facing 5 monsters, break through the wall and pick them off one by one)
3. Collectable treasure
Hoped for:
1. Items for character (maybe a diamond pick axe, now where have i seen that before)
2. Level system
3. More than one monster type
Done:
1. Character cube is walking and facing the mouse
2. Destructible blocks are in place
3. Enemy cone of sight working, player can hide behind ground
To do:
1. Add some AI
2. Scoring system
Busy:
Trying to implement random map generation using BSP trees... If it takes up more than a week I think I should just hack the map and move on to other mechanics
Screenshots/Vid:
Download:
https://www.dropbox.com/s/ktauspl9gae40w2/Cube Miner v0.0.0.5.zip
Controls: WASD and Left MB for attack and mining :)
Comments
Looks like a pretty good tech demo there. Not really a game yet.
You might want to change the name to something else. There is already a pretty well known game called cube world https://picroma.com/cubeworld
If you get stuck with the generation of levels, I have done a shitload of work with PCG in the past so I might be able to lend you some code. Just say the word.
Oh and I know you like making game engines but yeah for a game a month unity/gamemaker is really what you want.
http://www.vlambeer.com/2013/04/02/random-level-generation-in-wasteland-kings/ I mix that with
{cant find the other link will update when I find it}
But what is nice about that vlambeer way is that you guarantee that all the rooms and corridors are connected which is a common problem.
So what I would do if I were you is to create a 2 dimensional array lets say 100 x 100
Then I would create a "floormaker" in the middle of that array at 50,50
Floormaker runs 1000 times in which it chooses a direction and then empties that square.
The floormaker would have a 10% chance to spawn room maker and then room maker would have
The roommaker would clear out a random amount of blocks in width and height.
The roommaker would have a 1% chance of spawning another floormaker if there is less than 4 active floormakerss.
Then I would run a cleanup method across that array to delete blocks that aren't connected to other blocks and smooth out the
cave more.
Then lastly I would run a population script across the array that spawns enemies in random places. Or based of off conditions.
And here is a good pathfinding tutorial if you need it http://www.policyalmanac.org/games/aStarTutorial.htm
I have code for all of this so PM me if you want that aswell. Its a bit long to post.
-Kobus
I'm happy so far with the results here is a screenshot:
I'm moving on to the AI and game objectives to make something fun.
Let me know what you think so far?
Some screenshots:
https://www.dropbox.com/s/gj5uzbcbktu66f3/Screenshot2.png
https://www.dropbox.com/s/j9yhiet31szb6d5/Screenshot3.png
and a video :)
for y = 0; y < 100 y ++
{
for x = 0; y < 100 y ++
{
// this one removes extra blocks that have no connections to them.
if (map[x,y] == 1 &&
map[x+1,y] == 0 &&
map[x-1,y] == 0 &&
map[x,y+1] == 0 &&
map[x,y-1] == 0 &&)
{
map[x,y] = 0;
}
// another thing thats cool is when you have spesific corner tiles that you place. this makes the whole cave feel smooth to run through but is not applicable everywhere.
// this checks if the block on the right is a solid and the block on the bottom is a solid. If it is I create a corner tile
if (map[x,y] == 1 &&
map[x+1,y] == 1 &&
map[x-1,y] == 0 &&
map[x,y+1] == 1 &&
map[x,y-1] == 0 &&)
{
map[x,y] = "C1" ; // Corner one
}
// then you just repeat that for all of the corners, but like i said its very case spesific. I like to use it in FPS's cause // you dont want to stick to the walls the whole time. I used it in my quaternion a tale of destruction prototype. Look at the edges
}
}
The new and last build for this month is loaded and the link is in the original post above :) any feedback is appreciated and a screenshot or two will be added later today but for now sleep is needed -_-
I'm sure you have taken note of those problems and you planning on fixing them shapa :). Oh regarding level design i prefer the old fashion way if laying out every aspect of it because this way it is much easier to control the way the levels feel for players. Man i really like these type of games and If you need any puzzle ideas I'm happy to help design them for you SHAPA.
@Cheatsi Thanks for the playing :), yea the range for the attack is horribly short but I did it to motivate players to hide and break through the rocks :P I was planning on putting in a long range weapon but I ran out of time lol. The project was just a month push to see if I can make something playable so I don't think I will return to it easily but I do appreciate the comments none the less, it shows where my shortcomings are.
This month I am going to resurrect my old project I did for a competition a while back, the project is called Boost. I'll make a better post later on the new project.
For those who played the game thanks allot for the support and comments! For those who want to play the game I will leave the download link active.
Till the next post cheers :)