Jump to content


pyrozz

Member Since 16 Mar 2005
Offline Last Active Aug 29 2009 02:52 AM

Posts I've Made

In Topic: Custom Image Animator

08 November 2008 - 08:51 PM

Yeah, this is a pretty efficient method for animating sprites, depending on the application.
I made a similar system a long while ago, it used x/y offsets and angle values for each frame. Then I had a data structure for each arm of the character, the head, etc... So instead of 100+ sprite frames for animating, there were only 2 sprites for hands, and a head sprite. Another thing I added was fractional image indexing. So if you had image number 1.5, it will find the average x/y and angle values between frames 1 and 2 to a .5 degree. This allows you to create smooth animations, so if the game environment slows down (maybe for bullet time, or slow motion?), everything looks very nice and smooth.

Of course, animating becomes a pain when you're no longer dealing with images, but numbers. So you might want to create an external program for aiding in animating with this method.

In Topic: Help With "patch" System

29 October 2008 - 08:49 PM

Thanks for the response pyrozz but the file_compare script, I actually intended for it to find differences in files eg; Open up both new and old versions of files and see what has been added or changed. And yes I was intending to use external files but store them all together in one file and encrypt them.


Why would you want to find out the exact difference in the scripts? Why not have a description for each update, letting the user know what the update does.

If you really want to compare script files, you may need to look into regular expressions, and check out Yourself's regexp dll. Regexp syntax can get pretty messy, but it's very useful. But the way you are comparing files, it looks like the game needs to download the update before determining if it needs the update... Why compare the update with the current script? You can just replace the entire script with %100 grantee it will work.
This is how I see what you are doing:

//I am the script from January
draw_sprite(sprite,sub,x,y)
draw_text(x,y,string)
Then the game downloads the following
//I am the script from the year 2100 AD
draw_sprite_ext(sprite,sub,x,y,x_scale,y_scale,direction,c_whi
te,slpha)
draw_text_ext(x,y,string,sep,w)
Then the game analyzes what it downloaded and determines that it needs to replace draw_sprite with draw_sprite_ext.....

I am probably not on the same page as you, because this just seems redundant.


Since all of your scripts are external, it's probably best just to have updates that replace the entire script (since text files really aren't that big). Replacing single line commands can potentially cause more bugs in the game.

In Topic: Mplay Data Sending

28 October 2008 - 08:02 PM

Hmmmm

First... Did you put show_message(string(mplay_message_receive(0)))?
If you don't put the string() it won't display correctly.

Second, (This is just for improvement purposes)...
When a player is created, you should probably set my_id to mplay_message_player() instead... Buuut that has nothing to do with the problem... And you said the code works elsewhere.


Now you said you KNOW that script works on your computer? Well, in that case, you are probably giving the wrong information. Since you know the script works on your computer from experience, then the problem isn't within DD's code that you posted, it's somewhere else....  So, more info please.

In Topic: Windows Is Checking For A Solution To The Problem

28 October 2008 - 07:48 PM

You should do some tests to find out what's going on in the game when it crashes like that. So have it display how many particles are present, how many objects etc... Maybe there will be pattern?
And, is the game slowing down when this happens? Memory overload maybe?

...But yeah, try to debug the game so you know what is going on EXACTLY when your game crashes. ~I hate windows errors, they're so vague.  :skull:

In Topic: Help With "patch" System

28 October 2008 - 07:42 PM

Why not compare hashes? That would be much quicker, because the code you have, would require the game to download the update before decided whether or they needed it. Hashes eliminate that. Most updates, I'd assume would replace the exe entirely. It's just easier that way. So you need to have version numbers, and have the game check to see if there is a new version out, then have an update.exe that can delete the old game file and replace it with the new. Again though, you'll need hashes here to confirm if the download was correct... If not, return error :skull:

As for the PHP XML parser, I don't know how that would help, unless most of your scripts were external files, which you probably don't want... Or do you? And if you did, it be a heck of a lot simpler to download the updated script, rather than replace what is wrong with the old script. But I guess you cold still use some sort of XML file for updates. I don't know if it's completely necessary, since GM games pretty much consist of an exe and a couple of resource files. But if you did decide to go that route, it would probably be in your favor to create a text document that has a list of things needing updating, then the list is downloaded and the game updates itself. No need for php.