Did some texture work. Going to remove the grooves on the edges of the textures and keep them flat. Will emphasize that it is an edge with the art within the tile.
*Ladders can now be placed above or below another ladder without the need to have a solid block adjacent to each piece of ladder. As long as one piece has a solid block adjacent, the entire vertical stack is free to build on. Ladders that used to have a solid adjacent block still keep their position. Haven't decided if a ladder without a block or wall to tie itself to will fall apart or not.
*Ladders no longer stop damage from large distance falls. Can no longer toss a piece of ladder at the base of a pit to prevent damage.
*Fixed a bug with torches being placed on an invalid block location.
*Fixed a bug tied to the above, where this invalid block location would not show a texture for the torch, but would still give off light.
01-14-2012, 04:20 PM
billygoat333
Re: My Summer Project
I really enjoy this thread. We get to see the process of building a computer game! very cool thanks for sharing!
01-14-2012, 07:22 PM
NightrainSrt4
Re: My Summer Project
Thank you. I enjoy sharing. When I started this I never thought I would have anything near what I have, nonetheless all the things I have plans for and know I can do now.
01-15-2012, 10:53 PM
NightrainSrt4
Re: My Summer Project
I spent all day working on tiles and only ended up with a slightly better dirt block. I guess all the practice will pay off, even if I can't (won't) use most of it.
01-16-2012, 10:56 AM
NightrainSrt4
Re: My Summer Project
Made a wood block I'm relatively happy with.
Wall blocks are already in the game, I just have to code a function to check if you have a wall block equipped and if so apply it at the correct index. Then define an item type that can break the walls down. Once that is done, you'll be able to place walls / backdrops manually.
01-16-2012, 11:03 AM
AmEv
Re: My Summer Project
Looking better by the minute!
Got a level editor in the works?
01-16-2012, 02:12 PM
NightrainSrt4
Re: My Summer Project
Thanks.
Not currently. Everything is stored in text now, but will all be converted to binary when I'm done. Either way, I won't do any special encoding, so if you know all the ID's for the tiles it wouldn't be difficult to make. I was thinking about doing it, as it was on my original list, but I've got to worry about more important gameplay aspects first. Limited time plus feature creep is a developers enemy.
When everything is done I may come back to it and write a quick level editor. Thing is, very few people are going to want to populate a huge world by hand, so I'll probably have to expose some of my internal cave system algorithms / functions and include those with the editor. Click and drag a region, type in the base type, the number of cave systems, etc.
I don't know. I'm worrying about game stuff for now, don't want to get to distracted. I might just make a level design mode that you can select when the game runs. I could have it ditch all the usual UI stuff, and when you open inventory just display a huge selection of blocks. Turn on no-clip and let the player fly around and have at it.
Not really sure yet. I want to get an actual game before I worry about that. If I don't get around to it, and somehow the game magically becomes popular, I'm sure modders will make one at the very least. Not that I would rely on them and just brush it off and leave it to them, but a collective group of people could probably make a better app than me with splitting my time up.
01-16-2012, 02:37 PM
Kayin
Re: My Summer Project
Do you want me to take a look at doing some graphic work for you? I did all my own sprites for FO as well as some of the tiles. If you're using GraphicsGale it'll be no problem at all.
01-16-2012, 04:29 PM
NightrainSrt4
Re: My Summer Project
Thank you for the offer. This is probably going to be the biggest piece on my resume / portfolio, so until I land that first critical job I want to keep everything just me.
I've been flipping back and forth on putting out feelers for art donations, but I don't know. I'm also not sure about any of the legal stuff if the game ends up being something I can go commercial with when it is all done.
If you, or anyone, has any ideas or wants to draw up some concept art or tiles I suppose it can't hurt to post them up. I can't guarantee that I would use them, but if something really jives then maybe we can work something out with formal credits / thanks in the game or something. Many people here I can trust. Other places, and even with my own brother when he was doing some art, I would have to worry about scouring the internet to check and make sure each piece wasn't ripped from something else.
As you can see, I'm torn about it. I don't see how it can hurt if any of you guys want to post any art up though that may or may not be used or edited, etc. I'm not ready to make any formal commitment to anyone, but if there is something posted that really works then I suppose we could talk when that time comes.
01-16-2012, 08:40 PM
NightrainSrt4
Re: My Summer Project
You can now place background walls. I still need to define which item breaks them down, but placing works correctly. Select the item in the inventory and place just like any other block.
Again, I thought to darn much when I was putting this in. It wasn't working , so I started scouring my code for an hour again. All the signs slapped me in the face and I still went with thinking that something critical with my engine code must have been wrong. Nope, when I made the call to place the wall I accidentally called it with the x and y indices in the wrong order. So it was working, just placing and drawing the blocks in the wrong locations, lmfao.
01-17-2012, 01:05 PM
NightrainSrt4
Re: My Summer Project
You can now break walls down in addition to putting them up. I've tied the wall breaking attribute to the hammer status. I currently haven't made a hammer set of sprites, so I gave the morningstar the hammer attribute. This just means that its alternate click (right click) has the ability to break down walls. Seemed fitting, for now at least.
Trying to improve the animation engine. I original only thought of looping animations, and the ability to tell it to play and to stop playing. I know I had a way to make it only play the animation once, but I didn't make it an explicit function, so I have to remember how I wanted to go about doing that. I can do it by just making a function in the main game class, but I feel like it should be within the animation class, but I failed at getting that working. Shrug, maybe I'll just take the easy route and go back and get it within the animation class at a later point.
01-17-2012, 04:40 PM
NightrainSrt4
Re: My Summer Project
Pretty large improvements today:
*I can now loop animations for those I want looped, and play individual animations when I need that.
*Clicking when using a weapon now plays the animation once. If you hold it, it will play the animation repeatedly until you release the button and it completes that final animation. After each time playing the animation, a trigger goes off, allowing me to do other things such as: fire a projectile, cause damage to a block, etc.
*Blocks now have hit-points, and weapons have tile type specific damages. A pickaxe will do more damage to a block than to a wall, while the hammer excels at breaking down walls. If a block takes more damage than it has hitpoints, the block gets destroyed and a block item is spawned.
*Damage over time is now dependent on not only how hard the weapon hits, but how fast it swings. A wooden pickaxe swings at 2 full swings per second, and can hit a tile for 50 damage. A dirt block with 100 hit points will break in two hits, which takes about one second. A stone block with 150 hitpoints would take three hits, and can be destroyed in 1.5 seconds. So the rate of destruction depends on how much damage the weapon can do, how many times it can swing each second, and how many hitpoints the block has.
*I also figured out a way to save A TON of memory. . . again. I'm storing a lot of data in each of the 5million+ blocks, much of which is specific to the block type and not the individual block itself. All blocks of that type are the same in that specific regard. I don't need each block to store that data, I can store it in the base blocks and look up the data when needed. 5 million blocks each storing a bunch of 32-bit integers adds up to a lot of memory I can save. Going back and changing the references to the individual blocks will take the most time.
01-17-2012, 09:01 PM
AmEv
Re: My Summer Project
Are you able to use the "find and replace" to update names (of vars and functions)?
01-17-2012, 09:28 PM
NightrainSrt4
Re: My Summer Project
Yes, I just have to figure out what the current calls are for each, and figure out what I need to replace it with.
Example:
Replace something like this:
Code:
if (map.tileMap[indexY, indexX].isSolid == true)
{
doThis(indexY, indexX);
}
I didn't mean it would necessarily take a long time, just that finding each and changing it to the right thing would take the longest of the entire implementation. It will be quick to remove the attributes that never change from the maps blocks and place it into its own data structure; it will take longer to change all the references.
Also, working on a new player character. The bubbly funky proportions should help ease the animation side of things.
@800x600 to enlarge the character a bit:
Still needs work, but I like where it is going. Also, his backpack either isn't necessary, or needs to have straps. It's just hanging on his back, lmfao. I'll make his helmet give off a bit of light, as its a pain falling into a pitch black hole and not knowing where your character is, where you can place torches, etc.
01-18-2012, 08:17 PM
NightrainSrt4
Re: My Summer Project
Spent nearly 12 hours today working on the lighting. Why I started to work on it, I'm not sure.
Before:
After:
Still needs some work, but I now have a more intuitive system going. I can set the light easily to any color I want or need, and set colors individually for different objects. The banding you see in the first image is now gone.
The way the light looks depends on the gradient (or not in the case of flat colors. A better gradient and color choice will get me closer to the look I was going for. Easily changed via textures now.
This paves the way for a more natural dawn / dusk / sunset / sunrise. Instead of timed jerky lighting, with a few tweaks I should be able to have a smooth transition.
I could do a vector based blocky style lighting like Terraria, but this really helps differentiate things visually. I'm working on a way to hide parts that wouldn't be hit with the light, but keep the type of lighting I have. Lots of math.
01-18-2012, 09:26 PM
NightrainSrt4
Re: My Summer Project
I almost forgot one of the most important things, and the big reason I spent so much time reworking the lighting:
The game should now run on non Nvidia / AMD DX10+ gpu's. Integrated Intel DX10 GPUs and most DX9 GPUs in general could not run the game. According to Steams hardware surveys, this is only ~5% of the market, but still something I wanted to get fixed.
This should now be solved. I am getting set to test this on the integrated Intel gpu in my laptop that could not run it due to the lighting system before. I will report back once I do.
01-18-2012, 09:56 PM
Kayin
Re: My Summer Project
If you want me to put backpack straps on your bro there I can, just need the .PNG.
01-18-2012, 10:32 PM
NightrainSrt4
Re: My Summer Project
Feel free to have at him. It was my first try at him. I still have to make all his different frames and animations, on top of cleaning him up, etc. But, have a go at him if you want to. The image size for each frame is 28 wide by 56 high. This way he easily fits in one block wide holes and 2 block high ceilings.
The game now works on integrated DX10, and should work fine, even better, on a dedicated DX9 card. Playing on a 1.6Ghz CPU with an intel 4500 played well at 800x600. Playing at 1366x768 chugged a bit. The water simulations are expensive and they are applied on more blocks the higher the resolution. There are still a lot of optimizations I can make, but I'm going to worry about that at the polish stage. I will start looking into what I can thread, as the game is running high usage on one of these cores.
01-19-2012, 03:31 PM
NightrainSrt4
Re: My Summer Project
I'm going to have to start watching the performance and thinking about ways to speed things up.
This is on a rig with a 3Ghz CPU and a GTX470. I'm getting these figures in debug, so I know to not worry too much, but there are some definite considerations I need to think about. To hit a steady 60fps, which the game needs or it starts running update more frequently than the drawing to catch up, I need everything to complete in under 16ms. The lower the better as it means it will run well on much lower spec'd computers.
@1680x1050
Code:
Water Simulation: ~3-4ms
Draw Calls: 6-7ms.
Everything else: <<<< 1ms
@800x600
Code:
Water Simulation: ~1.7-2.2ms
Draw Calls: 2ms
Everything else: <<<<<1ms
The water simulation is expensive as its a nested loop running a cellular automata algorithm. Every block on the screen plus a buffer zone gets run through and checked with its neighbors every frame. The higher the resolution the more blocks it has to run through and compare.
The drawing is similar in that the tiles are run through on a nested loop (run through each tile in a row, move down a row and run through that row, etc), but it is doing this multiple times for each layer it has to draw. If you don't draw things in the correct order you end up with random funniness with blocks being drawn behind things, in front of things, the wrong order.
I think I can speed up the drawing quite a lot by only running the loop once, but grabbing everything I need for all the different types of drawing I need to do and putting them in a different data structure. The water simulation I'm going to have to think about. I might be able to save some time by converting it to integer based instead of calculating water masses with floats. *Shrug*. If it gets to be a problem I'll simplify the modeling. I tried putting it into its own thread, which helped cpu load across the board, but randomly something bugs and the water then starts multiplying.
01-19-2012, 08:21 PM
NightrainSrt4
Re: My Summer Project
Trees now have tops / leaves. When the block below the top gets destroyed, the top will disappear. Trees will get destroyed at a whole tree, and the amount of damage needed will be based on the size of the tree. Currently you have to break each block of the tree trunk to get rid of it, like trees in Minecraft.
Blocks now display how much damage they have taken, giving a visual indicator to how many more hits you need to destroy it.
Textures, as always, need work, but the code is there and placeholders are better than putting off getting it in until I get a texture I'm relatively happy with. Will get pictures sometime along.
01-20-2012, 10:39 AM
NightrainSrt4
Re: My Summer Project
I'm so dense! I know how to make the lights look blocky while still keeping the kind of lighting I have.
I can't believe it hadn't come to me before. It's so simple!
Blargh, I can't do it until I come back from classes, otherwise I'll get distracted and won't go. Expect a change later.
01-20-2012, 06:50 PM
NightrainSrt4
Re: My Summer Project
And the new lighting in. I whacked at a few blocks to show the cracking. The texture sucks and will be improved at some point but I wanted to get a base functionality in, and worry about polish later.
I went back to compiling for DX10+ gpu's only (according to Steam's Hardware survey that is 95% of the market) because the lower setting doesn't allow me to use the screenshot function I wrote, as the lower function doesn't allow you get get access directly to the backbuffer.
This is only a problem if when the game released I was magically accepted by Steam, as I don't think they allow two different executeables. If I just release the game as a standard release then I can just include two compiled versions, one with whatever extra bells and whistles and a version that would run on integrated graphics.
01-20-2012, 11:09 PM
NightrainSrt4
Re: My Summer Project
The evolution is incredible. It's really starting to look like a game. I can't believe I've actually come this far.
01-21-2012, 02:01 AM
AmEv
Re: My Summer Project
Now I'm willing to go buy it.
Once you get the objective down, that is.
01-21-2012, 10:47 AM
NightrainSrt4
Re: My Summer Project
Thanks. As always, it means a lot to see you guys post. It is encouraging.
We are getting closer to the first Alpha that I will release to playtesters. I want to get more blocks drawn up for all the different regions so you at least have some more areas to explore even if they aren't fully developed. Get chests working, which should be simple based on the code I've already written. The main thing is getting the crafting in, which isn't that hard as I've got the basis already done. I just need to create a structure to hold the recipes, draw them to the right places, and handle the input when you are in the crafting menu.
When those things are in and working, along with a few other minor things, I will release an Alpha for people to playtest for me. It will be like Indev on Minecraft, where you can explore the world, gather blocks, create a few things, and build using any of the blocks you've found or crafted. So it won't be an action-packed hack-and-slash fest, but it will be great for adventuring.
I'm thinking at that point I will create a video and write up a well thought out post about the game and what the release gameplay will be, and post it on Minecraft and Terraria's forums. At that point I should get a good idea whether the game really has a chance, or if it was just a good addition to my resume. Either way, I will continue to push the game to where I imagined it as the initial reason for me making the game was to make the game I wanted to play.
01-21-2012, 01:43 PM
NightrainSrt4
Re: My Summer Project
Cobblestone blocks and walls are in. Until I get the crafting system in you have to inventory edit to get the different walls and such, but they are in the game nonetheless.
800x600 in the basement of the house.
1680x1050 showing the entire house.
01-21-2012, 06:38 PM
NightrainSrt4
Re: My Summer Project
By popular request, different colored cobblestone:
I may have it so you craft these by using normal cobblestone and paint.
01-21-2012, 09:30 PM
AmEv
Re: My Summer Project
Wait, what language are you programming this in?
If it's C/C++, I got a working Linux compiler.
01-21-2012, 11:50 PM
NightrainSrt4
Re: My Summer Project
C# with XNAs libraries so Windows only. When I started this, all my experience was in console/command line applications, so this was a nice way for me to abstract a lot of the drawing aspects of game programming.
On another note, crafting is on its way to being integrated into the game. The recipe structure is all in. The UI knows what base tab you are on, and what tier tab you are on, and accesses the recipe list for that particular type/tier combo. These images are from the game naturally doing its thing.
I will add more recipes as I go. I'm worrying about the underlying code before content at the moment. It's simple to add recipes, just a little tedious.
What is left is to add the left-right page buttons and show them if there are more items than fit on one page. Then, check which crafting item you've clicked on and load the item into the bottom block along with what items make up the recipe. If you left click on the item, and you have all the necessary items, then draw the item at your pointer. Continue holding and it adds more of the same item to the stack if the item is stackable. Right click the desired item and it will decrement the number in the stack; hold to continue to decrease. When you left click on an open spot in your inventory, or a spot containing the same item that isn't a full stack, then add the item(s) to your inventory and remove the needed materials. If the item is a weapon or armor piece, only calculate the random stats once it has been added to the inventory. No cheating the system.
The hard part is done. Now its just recognizing input and responding to that. A few more draw calls. Then the tedium of creating all the different recipes.
01-22-2012, 04:40 PM
NightrainSrt4
Re: My Summer Project
Getting there. It now tracks and handles which item within the tab you have clicked on, draws a highlight so you can tell which is selected, and loads the item you want to make down bottom with all the items that are necessary to make it.
Currently highlighting a slot that doesn't contain a recipe. Therefore nothing shows down bottom.
Highlighting Miscellaneous/Tier 1/Page 1/Item 1, which happens to be a torch. So it loads the torch down bottom, and loads the items that are needed to make the torch: wood and coal.
Just need to draw the quantities needed, handle clicking on the wanted item, and adding to the inventory when you drop that into your inventory.
01-22-2012, 05:09 PM
AmEv
Re: My Summer Project
Need any help with music?
I'm sure I could throw a few chiptunes your way.
But WOW that is a GREAT idea!
01-22-2012, 06:23 PM
NightrainSrt4
Re: My Summer Project
I haven't started anything audio yet. If you want to throw together a few things you think might work, then I'm all for it. I can't guaranty I will use any of it, but as I mentioned in an earlier post, if there is something that really works, then we can work something out with crediting and such.
What is a great idea? The way I did the crafting? Just wasn't sure what you are referring to. Either way, thanks!
01-22-2012, 07:09 PM
AmEv
Re: My Summer Project
The crafting ;)
01-22-2012, 07:48 PM
NightrainSrt4
Re: My Summer Project
Thanks. It's nice when a plan starts to come together. Haven't had any hiccups with the design yet *knock on wood*.
01-23-2012, 10:26 AM
NightrainSrt4
Re: My Summer Project
Now, when you click on the lower box of the item to create, it searches your inventory and checks if you have all the required ingredients for the current count of how many you want to create.
EX: You want to create some torches. You click the torch icon in the crafting to load it into the crafting slot. You click the crafting slot the first time, the count goes up by one, and it searches your inventory for one wood and one coal. If you don't have those items, the count goes back down by one. Say you do have those two blocks and you click the crafting slot again. Now you are trying to make two sets of torches. It scans the inventory for the amount of material to make two sets of torches. If you have it then good, if not the count goes back to 1.
The count gets set back to zero if you click on any other tab, or any other item. I also noticed a bug where you would have been able to build up the count based on what you had in your inventory, grab the item from your inventory, close the inventory screen, drop the items, and the count would still be at the higher mark. This would have allowed you to create items without actually having to spend any of the materials. This has been addressed.
TL;DR - Crafting is almost complete. After classes I will work on finishing the basics up. Then onto fringe cases and bug hunting. I will try and get a video when that is done to show the crafting in action. Much easier than me trying to explain it.
01-24-2012, 03:33 PM
NightrainSrt4
Re: My Summer Project
EDIT: You guys get a more in depth look here @ TBCS, but I also have a facebook page: http://facebook.com/ram3software
Feel free to like it, or not, 8).
A video update:
*Showing off all the different resolutions supported by my monitor and graphics card. Your list may vary. I can't change the resolution while Fraps is running, it causes a freakout. I don't know if that is my code, xna in general, or just fraps. Not a huge deal.
On top of not feeling well yesterday, my cat had another seizure, so I was coding in a fog. The crafting is almost complete, but there are a few bugs. I'm pretty sure I'm just not updating a few pointers. If it loads a recipe that needs more ingredients, and you then go back to a recipe that needs fewer ingredients, it will allow you to increase the quantity to create, and does the proper check if you have all that is necessary in your inventory. When you go to drop it in the inventory, which is where the actual item creation occurs, it will not let you, as it is still reading needing a quantity for that necessary item from the last recipe. I just have to find where the pointer needs to be updated and that should be good to go.
I need to add a box around the quantities so I can get a background behind the font to increase the contrast, as the quantities are not very legible.
01-24-2012, 05:03 PM
Neodymium
Re: My Summer Project
Awesome...my 7 year old who is also a huge Minecraft fan, loves it! When do we get to play? :D
01-24-2012, 05:27 PM
NightrainSrt4
Re: My Summer Project
I'll release an exploration alpha once I finish the crafting, get some basic movement animations drawn, chests, and get the base world populated with blocks.
I have to make base blocks for 8 more regions:
Snow / Ice Region
Underground Plague Swamp
Underwater City
Hell / Fire Region
Granite Mountain
Underground Desert
Petrified Forest
Steampunk / Dwemer Styled Region
For this very early alpha release I don't care if it is just placeholder tiles, I would just like to get something in these regions. Currently, if you dig through the stone layer you fall to your death as there is nothing beneath. I could easily just extend the stone layer down, but I'd rather have at least a hint to what kind of zone it will be.
The character just slides around the screen. The animation system is all in, and the movement animations are triggered, they are simply blank. Swap in new textures and things will look much smoother.
01-24-2012, 05:31 PM
NightrainSrt4
Re: My Summer Project
I was just playing around with the search on Youtube, and that video is the first result for both "tile miner" and "tile mining game". Keywords FTW.