Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Btw, if you like these programming challenges (not so much the code golf, but to write something with very specific output):
http://projecteuler.net/
Has a number of challenges where you have to enter the output on the site and you get ranked by the number of proper solutions you supply etc. Still haven't had the time to get into it myself, but I will... :)
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
I didnt know, or at least think about, embedding the increment in the for condition, that saves 4 bytes. Afaik PHP treats ++$i and $i++ the same (unlike C etc..).
I see the point of the ternary operator except that i need to break, which would be impossible.
And this all still only explains half your gain :p
--
(by now I completely understand how :p)
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Well skipping the ?> only explains two bytes. I must be missing something. I (think I) know about obfuscating php enough that obfuscating the submission beyond the obvious, would make things longer. I guess I'll learn something in two days :)
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
I was kind of busy getting my internet back up actually :p But I am curious as to what you used. Some php code I don't know about or a shorter way to determine primes...
When does the code golf end anyways?
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
andymac> maybe this will help... (was gonna post this anyways ;p)
[12:39:36] <Didgeridoodle> I need to contact one of those code golf pythoners from the forum
[12:40:25] <Didgeridoodle> tell them a secret :>
[12:40:47] <Shinryuu> secret... what kind of secret?
[12:41:34] <Didgeridoodle> if they do this:
[12:41:43] <Didgeridoodle> print("hello world"),
[12:41:49] <Didgeridoodle> with that comma afterwards, yes
[12:41:59] <Didgeridoodle> then print will not print a newline
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Mine is pretty warning free, I think. Short tags are (obviously) required for the shorter version :p
I still believe something can be gained in combining the check for both given conditions, but I can't come up with one. But since it's pretty short and I already KISSed, I doubt PHP will reach beyond the ... 70'ish boundary. Part of that is because PHP vars take up at least two variables (not counting defines, but they take longer to set up and, obviously, can't be redefined, so are pointless as a replacement for vars ;p).
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
70 stars seems pointless when a 120 star run exists. There's no added value to it. LBJ vs non-LBJ is another matter alltogether. There should be a LBJ run, like there is a fast alttp run, but there should also be a non-"warping" run, imo. It's actually games like these where I like the enumerous strats being used in each level without getting too repetative.
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
I think the challenge is gone when anyone is allowed to use cheats. There'd be no limit to it.
It might produce some amusing video's, but the point (especially the object of the game) would be completely gone.
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Tools, in this context, refer to any tools that do not change the internal game state. So any visualisation or speed enhancement is ok. Actual cheats like godmode or frozen timer are not permitted.
The reason, I think, is partially because there would be no end of movietypes but mostly because the challenge is to finish a game as fast as possible while keeping in mind that it could technically have been done on a real console. Even though that's usually rather improbable, eh Andrew? ;)
The reason for condoned consoles, as stated above, is to verifiy that a player indeed only used tools that did not affect the game whatsoever (and also to have an exact framecount, which is rather difficult to do on youtube).
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
mr_roberts_z wrote:
Actually it's funny, about 1900 pages ago I suggested FODA try BLJing to the Metal-Head star to avoid the ! switch ground pound.
Good job, I can definitely use that.
1900 pages ago, this was still just a game... what changed?
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
The problem has been fixed. There was a small error in the safeguard where not all instances were captured. This affects the memwatch and debugger and will be fixed in the next release.
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Nope, it's in the interim (the current unreleased build) because I've changed it to work that way last friday :)
I've also added a setrenderplanes() function to fceux, explained here: http://cbc.qfox.nl/emulua#emu.setrenderplanes
But! Don't get used to the syntax yet. This is unreleased and the syntax will probably be changed to something more flexible. The principle will stay though :)
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
It is most likely a config problem. Next time it happens, can you try just moving your config to a different directory, restarting fceux and see if it still happens. Probably not. If so, please upload the config somewhere so we can check it out and debug a bit :)
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
The current interim of fceux will always return a framecount for movie.framecount(), even when no movie is playing. Like on screen, it will then return the number of frames since last reset. Needs a little testing, but I think it's ok. That should solve your problem as well.
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Well I'm not saying it's an ideal script. And multi angle camera games would not work, period. But I'm just saying that in most 2d games, it will suffice.
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Well, more like, you need positioning. But if you have a static MEM_X_COORD MEM_Y_COORD then all you have to do for the ghost to work for a game is to find the x/y coords for the character.
Well, basically anyways.