Posts for GMan

Experienced Forum User
Joined: 4/7/2008
Posts: 117
So a bit more digging, there are four values (all floats) related to facing:
  • Current Facing: 00C68110
  • Goal Facing: 00C68114
  • Last Frame's Current Facing: 00C67B78
  • Last Frame's Goal Facing: 00C67F74
You can edit the first two to directly manipulate Banjo. Also while we're here, position (all floats):
  • X Position: 00C68020
  • Y Position: 00C68024
  • Z Position: 00C68028
I'll try searching for some sort of status variable (in water, swap boots, etc.).
Experienced Forum User
Joined: 4/7/2008
Posts: 117
Facing address seems to be right after the speed, at 00C67F74. It's a float in the range [0, 360), though I can't seem to edit it (it's as if it ignores the new value).
Post subject: Re: small test
Experienced Forum User
Joined: 4/7/2008
Posts: 117
Kyman wrote:
As a side note, for this route, I almost went from the top of one of the trees right on to the spiral. I couldn't do it, but it was very close.
Is this something that may be possible? I suddenly find myself with more free time and could spend some time trying to make it, if you think it could use more testing.
Experienced Forum User
Joined: 4/7/2008
Posts: 117
Tseralith wrote:
Has it been proven to be possible to win the game with defeating Bowser only twice (or once for that matter)? I mean does the game check up somehow on how many times you actually have defeated him to reach the final stage? Also can you exit the basement from the inside?
The game almost certainly does no such check, for two reasons:
  1. The creators have no reason to expect that anyone can beat the third Bowser without beating the previous two (and likewise w.r.t. the second and first); they've been right so far! The check would just be useless code.
  2. If they checked and found it failed, what should they do? They could make a scene calling you a cheater and deleting/reverting your save file, but that's both expensive in resources (and those are not to be squandered away) and not very kind. (And don't forget safety; consider the check is wrong and punishes a perfectly valid game!) So they won't do that, and pretty much would have to do nothing anyway. Might as well omit the check altogether, especially considering, from the previous reason, that it's probably not going to happen anyway.
Experienced Forum User
Joined: 4/7/2008
Posts: 117
Can you guys find another place to talk about this drama? Nobody cares. Private messages are great at private stuff. Please stop making people avoid this thread, nobody wants to get on here to read about how stupid people think someone else is, we'd go back to highschool for that if we wanted. If you're going to ignore him, do so. Telling everyone, "I'm gonna ignore him!" is missing the point. Ignore him because you want to, not to gain approval from others in some dick-waving competition. That's all I have to say as a lurker who's getting turned off by it, and I'm sure there are others who aren't speaking up. If you disagree with it that's fine; but message me in private. We can find ways to talk about this elsewhere.
Experienced Forum User
Joined: 4/7/2008
Posts: 117
scrimpeh wrote:
So I watched the 120 star WIP. Didn't like the camera angles, would vote No.
I don't get it. The run isn't even 30 stars in — that's less than 25% done — and you already feel like you can justifiably say "No" to the entire finished thing because of some camera angles? That has to be a joke. That's like sitting down for dinner and saying, "Nope, don't like the food. The seats aren't as comfortable as I'd like." What would you prefer instead? That they email you personally before every frame asking, "Sir, which camera angle would you like now?" Please, tell me how you can possibly feel justified in saying no. This is an honest query; I really want to understand how you feel you can turn down a run because a bit of it wasn't framed exactly how you wanted it. And if you really wanted to help instead of babble, you could at least specify the segments you felt had bad camera angles, so people could be more aware of what others don't like. You know, contribute; provide constructive criticism.
Experienced Forum User
Joined: 4/7/2008
Posts: 117
TheRealOne wrote:
The moat door is locked from the outside
No it's not, it's just not able to be opened because it's underwater. (According to the games theory, obviously; we'd like that to be otherwise.) But the only thing that changes when you "unlock" it is that the water is gone so you can properly walk into it and open it.
Experienced Forum User
Joined: 4/7/2008
Posts: 117
Pipe or clock.
Experienced Forum User
Joined: 4/7/2008
Posts: 117
mmbossman wrote:
I feel the need to post this link YET AGAIN, just to show that not all of our movies are about "time, time, and time." And regarding the racist remark: How completely dumb. A better argument would be that the current team is being less vocal than you (and a lot of other people) would like them to be, possibly due to a language barrier and cultural differences (i.e. deference to and respect of peoples opinions).
I used the word "primarily" for a reason, and already said we have other categories for other intentions aside from speed. Thanks for the link, though, I appreciate it. Perhaps I should rephrase my argument: most runs are made for speed; this is an implicit assumption we all make when we hear "new run", for example: we think it's faster. Yes, there are exceptions. No, this game isn't one of them. Unless a run was made explicitly to not aim for the fastest time (and would be a parallel submission to one that is, like N64 Super Smash Bros.), it should be obsoleted by a faster run. Use the objective measurement unless the submission category/intention is to be subjectively entertaining.
Experienced Forum User
Joined: 4/7/2008
Posts: 117
Scepheo wrote:
GMan wrote:
Tool-assistance is trivially primarily about speed, or we wouldn't obsolete runs primarily based on time.
We don't.
Huh? Go pick random submissions and see why they were obsoleted: time, time, and time. How is the site, then, not primary about time?
Experienced Forum User
Joined: 4/7/2008
Posts: 117
CosmoZSR wrote:
It depresses me that both SDA and TASVideos have this strange subjective attraction to "entertainment" versus speed and somehow weigh them against eachother as if that is a fair system. Publish the fastest run. This is the fastest run.
Absolutely spot-on. More importantly, speed is an objective measurement, while "entertaining" is a subjective measurement. These submission issues would be resolved if we simply appealed to an objective standard. Tool-assistance is trivially primarily about speed, or we wouldn't obsolete runs primarily based on time. It's silly to say, "A faster submission? Submit! A faster submission? Submit! A faster submission? Well, this ones not as incrementally faster as the others, maybe faster isn't better..."; be consistent. We're suppose to find maximizing speed entertaining, or that wouldn't be the overarching goal of TASing. And in the cases where we feel we want both speed and completeness, we have those categories too. If a run is made for non-speed entertainment, it should go in the hacks/demos/other section; and if you want to watch runs based on non-speed entertainment instead of for-speed, head on over there. Leave the for-speed sections alone.
Experienced Forum User
Joined: 4/7/2008
Posts: 117
Just a random bump for the hell of it. hgr128 has a new video: [TAS]Star Fox 64 (JP Ver.) Area6 809HIT
Experienced Forum User
Joined: 4/7/2008
Posts: 117
Awesome. Nice little trick with the log.
Experienced Forum User
Joined: 4/7/2008
Posts: 117
Probably not. If the goal is close enough, the time wasted by pausing isn't made up by the quicker travel. For example I think this star is close enough that pausing wouldn't help.
Experienced Forum User
Joined: 4/7/2008
Posts: 117
AngerFist wrote:
To be honest, I think that pause trick looks really ugly and is a big turn-off.
People will probably get used to it. previously, whenever a BLJ happened it was like "yea, bunch of jumping seen it" then Mario took off and we're back into being interesting. Same here, though it's definitely more of an attention getter.
Experienced Forum User
Joined: 4/7/2008
Posts: 117
You can pause at any time (as long as it's not in some sort of transition). What's restricted is your ability to exit the level. If you're not standing still, you cannot exit.
Experienced Forum User
Joined: 4/7/2008
Posts: 117
RT-55J wrote:
I want a million dollars.
lol, that's exactly what I was going to say.
Experienced Forum User
Joined: 4/7/2008
Posts: 117
cwitty wrote:
This was undefined in C89, but C99 (the current official standard for the C programming language) does define it such that (-1)%2 is -1. I didn't understand the last sentence... was one of your `n&1` at the end supposed to be something else?
Oops, I'm a C++ programmer, it's undefined there. My last one was showing the transformation, poorly. Replace the first == with ->. Even so, I'm utterly surprised the optimization isn't universal, I swear I've seen an article on it before. You had -O3 and stuff?
Experienced Forum User
Joined: 4/7/2008
Posts: 117
cwitty wrote:
Note that n%2 and n&1 don't mean the same thing... (-1)%2 is -1, but (-1)&1 is 1. The code for "int n = ...; return n%2" is much longer/slower than the code for "int n = ...; return n&1". For this reason, I would use n&1 instead of n%2 (or else make sure that n is an unsigned int). (gcc 4.3.4 is able to optimize "(n%2)!=0" to use the same fast code as "(n&1)!=0", but I prefer not to depend on the compiler being smart enough to implement non-obvious optimizations. I don't know whether other compilers include this optimization or not.)
Non-obvious? Are you kidding? Any compiler worth a grain of salt does that, even old Borland I'm pretty sure. Also, you can't say `(-1)%2 is -1` because this is undefined according to the language. It very well could come out 1. That said, because compilers will optimize this to `n&1`, it then becomes trivial to see `n%2` == `n&1` == `n&1`
Experienced Forum User
Joined: 4/7/2008
Posts: 117
Do what's readable.
template <typename> // not by reference, would likely be slower
const bool is_even(const T pValue)
{
    return (pValue % 2) == 0;
}

template <typename>
const bool is_odd(const T pValue)
{
    return !is_even(pValue);
}
The compiler will choose which bit tricks are best for you. EDIT: wtf? I can't put "T" after "typename".
Experienced Forum User
Joined: 4/7/2008
Posts: 117
Alternate Text: Real programmers set the universal constants at the start such that the universe evolves to contain the disk with the data they want. Obligatory.
Experienced Forum User
Joined: 4/7/2008
Posts: 117
Yes. 0 is an integer, while a pointer is not an integer; the types are incompatible. By casting to void*, it then becomes allowable (pointers are freely cast in C). This is not so in C++, where void* cannot be implicitly converted to other pointers, and 0 has special meaning. C++0x will introduce nullptr, which alleviates this issue.
Experienced Forum User
Joined: 4/7/2008
Posts: 117
Here is the fixed code:
#include <cstdlib>
#include <ctime>
#include <iostream>

#define DISABLE_RUNNING_OUTPUT

class coin
{
public:
	coin(void):
	_tosses(0)
	{
	  // seed the coin
	  std::srand(static_cast<unsigned>(std::time(0)));
	}

	bool toss(void)
	{
	  ++_tosses;

	  // fair enough, can replace with something with
	  // better distribution if you really desire
	  // (boost works well here)
	  return rand() < RAND_MAX / 2;
	}

	unsigned toss_count(void) const
	{
	  return _tosses;
	}

	void reset(void)
	{
	  _tosses = 0;
	}

private:
	unsigned _tosses;
};

class game_trial
{
public:
	game_trial(coin& c) :
	_c(c),
	_winTosses(1),
	_playerA(0),
	_playerB(0)
	{
		play();
	}

private:
	void play(void)
	{
		#ifndef DISABLE_RUNNING_OUTPUT
			std::cout << "Playing game." << std::endl;
		#endif

		bool bullyWon = false;
		while (!bullyWon)
		{
			bullyWon = play_session();

			// 1 (of 1), 2 (of 3), 3 (of 5), 4 (of 7), 5 (of 9), etc...
			++_winTosses;
		}

		// results
		#ifndef DISABLE_RUNNING_OUTPUT
			std::cout << "Coin was tossed " << _c.toss_count() << " times before the bully won." << std::endl << std::endl;
		#endif
	}

	bool play_session(void)
	{
		while (_playerA < _winTosses && _playerB < _winTosses)
		{
			++(_c.toss() ? _playerA : _playerB);
		}

		#ifndef DISABLE_RUNNING_OUTPUT        
			std::cout << "\tA: " << _playerA << " B: " << _playerB << std::endl;
		#endif

		return _playerA < _playerB; // returns true if the bully won
	}

	coin& _c; // the coin to use

	unsigned _winTosses; // number of successes needed to win
	unsigned _playerA; // scores
	unsigned _playerB;
};

int main(void)
{
	const unsigned trials = 1000;
	coin c; // our coin

	unsigned tosses = 0;
	for (unsigned i = 0; i < trials; ++i)
	{
		// play game
		game_trial g(c);

		// tally results
		tosses += c.toss_count();
		c.reset();
	}

	// results
	double average = static_cast<double>(tosses) / static_cast<double>(trials);
	std::cout << "On average, it took " << average << " tosses for the bully to win." << std::endl;
}

Experienced Forum User
Joined: 4/7/2008
Posts: 117
Yup, you're right. I understand the problem better now, let's redo this...
Experienced Forum User
Joined: 4/7/2008
Posts: 117
<snip> (I understood the problem incorrectly)