Posts for upthorn


upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
IdeaMagnate wrote:
The first point is clear and looks like a good starting place for discussion. The second point I don't get. Do you mind elaborating. I'm viewing the file as already having been read into memory, so I don't see what difference it makes one way or another.
It's not a matter of loading into memory, it's a matter of parsing the loaded data. I have it set up with two char *s (to reference null terminated strings.) One stores the whole line, the other stores from the final comma to the end of the line. When it's done parsing that segment, it sets the comma to a null character, and finds the new last comma in the line, and parses from that. That's not a very good explanation, but my loop looks like this:

(we get the line somehow, either it's passed to us read from a file, or read from elsewhere in memory)
	char *Line,*PadData;
	Line = strchr(Line,':');
	Line[0] = ',';
	while ((PadData = strrchr(Line,',')) != NULL)
	{
		//stuff to parse the PadData goes here. 
		//I use a "strcspn"s to get the controller, so that the controller number can actually appear anywhere in the segment
		//Then I use strcspn in a nested while to get each button.
		//The button must then be set to an invalid button value for this to work, 
		//but I could instead use strpbrk and gradually decrease the size of the string we're working with.
		//That would probably be faster, but I can't test any of this yet because I haven't got all the chunk parsing segments worked out 
		//for loading GM2 and GM2TEXT files.
		PadData[0]='\0';
	}
In this way, we only have to search through the segment we're currently parsing, which I imagine would be much faster than searching the entire string, and then having to figure out which set of commas each character is between. Of course, there are probably other ways that I haven't thought of, but this seems like the most efficient one.
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
xebra wrote:
Dacicus wrote:
xebra wrote:
No, it's built into the language. It doesn't require the loading of any packages like <<DiscreteMath`Combinatorica`.
I interpreted Gorash's challenge to mean that you were supposed to write your own permutation function/procedure/etc.
That's how I believe he meant for it to be interpreted, as well, but I think it is our responsibility to punish him for insufficiently detailed instructions and an insufficiently limited context. In the Mathematica Programming Language, Permutation[] is not a package. <<DiscreteMath`Combinatorica` is, but luckily you don't need it!
In the context of this challenge, the Mathematica Programming Language is a package.
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
AKA: Wobbling is a generic term for single frame direction presses which have effects visible at normal speed.
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
Holding up doesn't change the speed at which you're going, it changes the rate of acceleration. Every so often in the special stages, your speed will increase. This is faster as knuckles. This is also faster if you hold "up".
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
bkDJ wrote:
watching old wip.. 1) the 3rd and 7th emerald runs looked particularly though out.
For the Chaos Emeralds, I was following the routes Sprintgod mapped out, here: http://www.gdward.plus.com/special3.png It turns out I can do most of those faster, not by changing the route, but by holding up whenever I'm moving forward.
bkDJ wrote:
4) Since the Blue (3) one is so linear, I don't get why you didn't jump over the yellow and reds to get the final blues without using the bumper. Maybe you did in the new wip.
you move forward about four times as fast when bounced from a yellow sphere. More than fast enough to justify having to hit the star bumper. So I won't in the new WIP, even when I get that far. I will, however, use some slightly different routes on most of the emerald stages.
bkDJ wrote:
5) For Flying Battery 1, you should definitely jump so that you're falling when the missiles are done breaking the ground.
File this under "things I didn't think of until I started the new WIP."
bkDJ wrote:
6) In Flying Battery 2, you shouldn't wait on the spring to get the rings on the ceiling around 0:40, since there are plenty more on top of the vertical spinning thing and you don't need to be hyper before.
It doesn't take that long to hit the spring, and the sooner I go hyper sonic, the better my level time... in theory. But that's irrelevant, as I'll probably be going an almost entirely different route through both acts of Flying Battery.
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
NrgSpoon wrote:
I know that there are some cases where going super doesn't load the super music, and just plays the normal level song. It'd be nice if you could find out what causes that and make use of it.
Can you give me any examples, like links to videos that show it, or such? I'm getting quite sick of the "Super" music myself, and any possiblity at lessening it would be much welcomed.
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
This contains much less zipping than your sonic advance runs, but it contains so much more zipping than I expected to be possible. Definite yes. I like how you even managed to do some unexpected things on Sky Chase.
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
I started an all emeralds run as Knuckles about a week ago, got through Sandopolis 1, watched it, noticed way too many improvements, and started over. Here's the old wip. It shows off my mushroom hill route, and my Super Emerald routes. Here's the second wip it completes the game and shows (very unoptimized) sandopolis act 2, and lava reef routes. Zip contains savestates at the beginning of ice cap, and flying battery. This run has been submitted. View the submission here.
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
AKA wrote:
Incase anyone is interested this is how hyper Sonic looks and plays. I think he's just the same but with shield shield actions, although I don't know how they can be indivually activated.
If you had read what I said before when I answered your question about hyper sonic, you would know that hyper sonic effectively has access to all shield actions at once, by pressing (direction) + jump in midair. And he can breathe underwater without needing the bubble shield. Although this is useless in a speed run, because there is no water after Launch Base zone.
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
No... I actually meant last. For the following two reasons: 1) When a user adds new data, the instinct is to add it to the end of the line, not the beginning. 2) It seems to require fewer lines of code to parse lines in reverse. I would assume this means it's more efficient. (This would also make the first segment for each controller it reads the last segment on each line in the text file, which is consistent with my suggestion of using a boolean flag to to skip future iterations of the parse loop if it's already encountered that controller number)
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
DK64_MASTER wrote:
JXQ wrote:
Cage free!
Jonny Cage Free.
Then who will punch them in the nuts?
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
bkDJ wrote:
Ozmodiar wrote:
upthorn wrote:
As for the bittorrent situation... rather than have nach seeding the torrent, alone, with his 1kb/s connection, it's more efficient for him to send the file to someone who has better bandwidth. This is due to the fact that when seeding a torrent, the connection may be split multiple ways, due to multiple connected users, and there is no guarantee that when he has sent 100% of the filesize that he will have sent 100% of the file.
The point is that he has to send it to someone anyway, so it mine as well be however many people at once so that they are all able to send it to others right away. Also, his connection is 12 kb/s, but is only devoting 4kb/s to the torrent.
splitting connections is the best way to maximize your pipe.
This is not true. Every TCP/IP connection has overhead, so the more connections you make the less your maximum total speed becomes. And the reason I suggest sending it to a second person before splitting the pipe on the torrent swarm is because a torrent with only one seed is not a healthy torrent -- if something happens and the seed gets disconnected, noone can finish the file. Normally it's not a big deal, because it corrects itself in a couple of hours, but this is not the case when the seed has a 4 kb/s upload cap.
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
atro city wrote:
y helo thar.
fixed
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
HiddenGamer wrote:
hey jxq that signature is out of context. All three of those sentences are out of context, and I didnt say them in that order, and when people read them they will make wrong conclusions and think I'm an idiot and degrade me.Please respond right now , I want you to take it out. Irc stuff should stay in irc, because no one knows what the heck you are talking about in that signature. SHouldnt you get your own quotes in your signature?
This is completely unrelated to the thread, and should have been sent in private message. Also, reading JXQ's signature, it's fairly obvious that its out of context. I don't think you need to worry that people will read it and think you said those two things as one statement. [Edit: removed off-off-topic portion]
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
Mukki wrote:
That's very strange. Is there any reason why it can't play by the rules of hexadecimal?
It crashes after level 0xFF. I challenge you to find something that plays by the rules of hexadecimal better than that!
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
IdeaMagnate wrote:
upthorn wrote:
Notepad can't load files larger than a few hundred k. And when dealing with filesizes in MB or larger, most text editors (on windows at least), become sluggish with loading, finding, or saving. Also, I strongly suspect that base64 deencoding a 4 megabyte string will be somewhat sluggish.
In my XP virtual machine, both Notepad and Wordpad are quite usable for a 14M file. I wouldn't call them optimal, but they get the job done. Also, b64 encoding/decoding is pretty fast. It took my machine (1.6 gHz Core Duo) about .39s to decode 14M of base64-encoded random data. Either way, I strongly prefer to keep everything self-contained in a single file.
Though horrified by your nonchalant acceptance of multiple megabyte text files, I relent. Keeping the text file size down isn't really thate important, and I agree there is value to having the file completely self contained. Wiki page updated.
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
IdeaMagnate wrote:
in the wiki upthorn wrote:
There's an issue with this that needs to be addressed. If we're starting from a savestate, the start chunk alone could be larger than 4 megabytes. Not very helpful for our users who will need to go past this point to get to the frame data. For GM2text, we should probably save applicable srm and gst data into separate files.
Other chunks can become large, but manually scrolling to a certain frame is inefficient, especially when even Notepad has a usable search feature. Users will only need to search for "x:" to find frame x, since ':' isn't part of the base64 character set. Saving the file may take a second or two, but that's not a major inconvenience.
Notepad can't load files larger than a few hundred k. And when dealing with filesizes in MB or larger, most text editors (on windows at least), become sluggish with loading, finding, or saving. Also, I strongly suspect that base64 deencoding a 4 megabyte string will be somewhat sluggish.
ideamagnate wrote:
in the wiki upthorn also wrote:
What happens if it encounters the same controller number in multiple segments? I think that it should only pay attention to the last segment for each controller. EG: "testframe:1r,1lr,1lra,1ra,1rabc,1a" should produce the input "a" on controller 1. This would enable the user to test multiple sequences of input, and easily revert to prior versions if one version turns out slower.
I don't know how useful this would be. The way I'd implement it, your example frame would be equivalent to ":1rlacb". If you want to comment out a frame, you could just change the colon to a semicolon and ensure that the implementation silently ignores invalid frames.
The other reason I prefer it this way is because it's faster to ignore redundant data. In the implementation that only parses one segment per controller per frame, you can set a boolean flag for each controller, which causes it to skip to the next loop iteration if true.
ideamagnate wrote:
upthorn the prolific wrote:
These [buttons] should probably be case insensitive. Also, the routine should be able to encounter the same button multiple times without barfing. (although I don't see how the routine would barf in that scenario unless it were specifically designed to)
I don't like case-insensitivity because it's an extra check on every button character in the frame chunk. If it becomes a problem then it's easy enough to implement, but I see it as unnecessary cruft until then. I don't see how encountering the same button more than once in a frame could cause a problem either. ;)
If they aren't case insensitive they ought to be capitals. and case insensitivity is easily handled with
switch (ChrToParse)
{
     Case 'U':
     case 'u':
          SetButton(Up);
          break;
}
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
Python just feels wrong in so many ways. I need to clean myself of the ichor when I'm done.
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
I always feel the need to shower after using python. And how is C better than C++? Seriously, I have no idea what everyone keeps talking about when they say C is better, and they always refuse to elaborate when asked.
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
Gorash wrote:
Aren't all programming languages more or less?
No. Any program which is interactive cannot run correctly on a turing machine. They require predefined inputs.
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
Now that I can editify the wiki, I've made some footnotes I'd like you to check out.
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
primorial#soup wrote:
If you're a company wanting to develop a stable application for all platforms as quickly as possible, Java is probably your best choice.
Hahahahahaha. Java is sluggish and unstable on every system I've tried it on. Unless you suggest they don't require the JRE, in which case Java ceases to be "write once run anywhere".
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
Does anything happen before the 10053 connection reset by peer?
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
jimsfriend wrote:
What's the name of your "virus protector thingy"
avast! (home edition). No I don't think it mentions a firewall. Yes I use windows XP. Yes I got that code when I opened the link in my browser.
the problem is probably something with the way you have your windows or IRC program configured.
Probably. I wouldn't (and don't) know what to do about it though. I'm glad you figured that out. EDIT: I'm behind a firewall, but there is an exceptions tab and mIRC is checked so the firewall ignores mIRC or something like that. Of course, I might be behind more than 1 fire wall... I dunno.
What is the firewall you're behind? My suggestion is to, in order: Download zonealarm, disable the windows XP firewall, disable and/or uninstall any other firewall you have (besides zonealarm) Zonealarm works well, and is very easy to configure.
How fleeting are all human passions compared with the massive continuity of ducks.
upthorn
He/Him
Emulator Coder, Experienced Forum User, Published Author, Active player (388)
Joined: 3/24/2006
Posts: 1802
Yeah, I'm surprised BoMF hasn't posted in this thread.
How fleeting are all human passions compared with the massive continuity of ducks.