• Advertisement
  • entries
    707
  • comments
    1173
  • views
    435201

AGH, MY MEMORY!!!

Sign in to follow this  

77 views

I implemented some memory leak detection and found some MAJOR bug leaks (biggest being 40000 blocks, for my map.) So, I spent about 10 minutes fixing all of that (I had A LOT of memory leaks. In my defense though, it wasn't coded today, it's from before that I copied and pasted. Oh wait, that's not much better.)

Anyway, I got scripting hooked right in and a few functions setup (MoveTo() and Speak().) I don't have a dialogue system implemented yet, so for now I just have a listbox on screen (to make sure it was working.)

I got about halfway through hooking up my functions and I realised that when they try to talk to someone, it needs to move you to that character. But wait, it starts talking before you get there, that's no good. So, I figure "ok, I can talk to Raymond and have him help me set up a system similar to his", but he's really busy at the moment and I really don't need a system that powerful. So, I decided to just setup a simple queue system. When you hold down the control button and do an action, it's added to your queue. If you don't hold down the control button, the queue is emptied and whatever action you were trying to do, is pushed on and executed.

Anyway, here's a little video of it in action (1.39MB): ! Link !

First I click on Derek to select him. Then I hold down control and click to his right and then below that. Then I press the S button (to select the 'speak' action; no it won't be like that in the game, there'll be a button), press control, and click the trash can. (Notice that the second text doesn't appear in the listbox until after you get close to the trashcan.)

One thing that I'd like to note is that Entity has a m_bMoveable variable, so you may end up being able to control more than one character. I'm not really planning on it (I want to get this done ASAP), but it may allow for some pretty neat things via scripting.

I don't know if any of that is readable or not. Either way, I'm off to bed.

PS: A while back I said that I planned on releasing the source code for any non-commercial game. Well, I lied. The truth is that this source is so hacked that it makes me want to cry, but I'm not rewriting it because I want to finish the project so that I can move on. I mean, if I get enough requests after I release it, I guess I'll post the source code, but seriously, it'll probably make you dumber.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement