Wednesday, December 14, 2011

A Different Type of Development


Decided to switch up my development type a little bit.  I picked up an Arduino today from Radio Shack and got back into some robotics stuff.  I had previously used the Parallax Propeller and had a lot of fun, but recently I had read a lot about the Arduino and it looked really interesting.  Radio Shack had a nice setup for ~$80 which I picked up.

So far I really like it.  I was able to get a little robot that I had frankensteined before up and running in it in a few hours.  You can see it there in the background.  I'm using an H-Bridge (SN75441) to control the rear motor and turning motor.  I also have a Parallax Servo up front that moves an Ultrasonic Distance Sensor around to find the closest object.  The little dude will just drive around and find the closest thing.  Then drive up to it and stay there.

It just wants to hug things :]

This isn't very AstroMiner related, but it is an area I'm interested in.  I have a lot of other projects that I don't post much about.  I also have a project for my website, http://www.pwned.com, that I need to start and finish soon.

On the AstroMiner front, I'm fairly certain that I fixed the bug where blocks were changing their drawing locations.  For some reason I was pulling in a new block object every single time I added a block to the world.  Once I fixed that and only pulled a new block object if the current block is null, the bug seemed to go away.  I'll continue to test it to confirm.  Next on the list is player inventory and a faster way to save/load worlds.

I probably won't do as much dev work starting next week due to the holidays.  I'll be back full swing come the new year though.

Sunday, December 11, 2011

Development Screenshot

Just thought I'd show you what 95% of my dev time looks look.


I'm currently trying to fix a bug where some blocks are getting their positions crossed and drawing themselves in the wrong locations.  This was introduced during the multiplayer addition.  I'm not sure if it's on the client or the server where the block is being corrupted.

You can see the server running in the background there as well.  It's not as pretty to look at.

Tonight's Multiplayer Progress

Block deletion/addition has been fixed and is now working.  I've removed almost all of the client-side detection for this.  The client tells the server that it is eating and that's it.  The server tracks how much health the block has and decides when the block is considered 'destroyed'.  When it is, the server sends the client a message saying "destroy this block" and the client does it.  The server now also tells the client when to add floating items (the little boxes you see when you eat a block).  The client's job is to tell the server that the player's bounding box has intersected with the floater and that the player wants to take it.

When it comes to multiple players, it's going to come down to whose call makes it to the server first.

So anyway, lots of rambling there.  That's what I worked on all night.  Next on the list is player inventory.  That should all be managed by the server as well.  Once that's done, I'm going to start saving the player's position on the map so when they exit, they come back to the right spot.  Then I'm going to start saving the map itself.  Fun stuff.

I miss the whole creative side of this game.  I miss adding a structure and functionality to it and seeing how it interacts.  I miss toying with the AI, or even just coming up with new AI ideas.  I know this part has to be done and when it gets done it'll be well worth it, but I sure do miss all the other parts.