Post news Report RSS Half Craft - In development

In this article I summarize the development process of Half-Craft.

Posted by on

Hey!

My name is b4n4n4, and I created this mod. I like Minecraft, also Half-Life, and I think that combining these two would be awesome! But how did I came to the conclusion? Long story short, I was chatting with one of my friends that I met during the summer and it came up in our minds that a Minecraft mod in Half-Life would be cool. I then immediately started working on the mod.
I was slow at first, I only added the HUD on the first week. I still had to familiarize myself with the internal structure of the GoldSrc engine, so this was a huge learning experience. In the end, it looked really nice.

This screenshot is the earliest screenshots of the mod.

First image of the HUD and mod

After the HUD was done, it was time to implement the inventory. The inventory was at first pretty hard to realize since Half-Life behind the scenes actually manages the weapons like individual linked lists in a 1 dimensional array, so I had to remove all of the code that managed that and make it a 2D array. After that, I modified the clientside to open the inventory when I pressed E. There's only one problem with this: You can't move the items! Me being tired already of the spaghetti code that Half-Life had, I quickly implemented the inventory and it worked like an actual inventory. With lots of bugs.
The block system was the most exciting thing to implement since I had to do it from scratch and I had plenty of freedom to do stuff. The blocks are actually models that interact when the user right clicks on them, however, they mesh together nicely when they are put next to each other as seen in this screenshot.

I got tired of widescreen Half-Life due to the Alt-Tabs that I had to do

And now here we are! Of course there was a rewrite and a couple of bug fixes, but I don't think they are worth a mention in this article.

I uploaded a video (without the history of this mod) in case this article is too boring for you :)

Post comment Comments
Ogdred
Ogdred - - 463 comments

Rather impressive!

Reply Good karma Bad karma+5 votes
Blue199
Blue199 - - 6,971 comments

Good luck.

Reply Good karma Bad karma+4 votes
Hezus
Hezus - - 562 comments

Haha, nice job! Altough, since you're using models for these blocks, I guess the most prominent problem you'll face is the model limit. Eventually blocks will start disappearing or the game will crash when you'll go over the num_edicts limit.

Reply Good karma Bad karma+3 votes
NapoleonII
NapoleonII - - 126 comments

The edict problem is easy fixable.. you can have up to 4k those days... The model precaches... that's another story... The limit is 512. (hard coded in the engine). Maybe the DEV can implement spawning of preset brush blocks instead of models.

Reply Good karma Bad karma+2 votes
b4n4n4 Author
b4n4n4 - - 28 comments

Nah, I will instead implement an OpenGL routine on the clientside that would independently draw the cubes, and the cube info would be sent in messages. 4096 edicts is not a much since that's pretty much 16^3, barely a chunk in Minecraft.

Reply Good karma+2 votes
PowerMind
PowerMind - - 675 comments

This could be fun.

Reply Good karma Bad karma+2 votes
b4n4n4 Author
b4n4n4 - - 28 comments

Hmmm, seems like this article blew up.

Reply Good karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: