Posts for Huffers

1 2 3
8 9
Post subject: Encoding with snes9x 1.51 linux is broken?
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
I can't seem to get encoding working with snes9x 1.51. snes9x just freezes at frame 293 every time (it hangs with zero cpu activity), then when I kill snes9x mencoder goes on to encode a tiny (8k) avi with nothing in it. Doing exactly the same thing (but with an old-format smv of course) works with snes9x-improvement7. Before I start I run:
rm output*
rm videostream* audiostream*
mkfifo videostream1.dat
mkfifo audiostream1.dat
Then I open two terminals open, in one I run:
./snes9x sup.smc -dumpstreams -maxframes 4842 -r 7 -stereo -autodemo /home/ajh02/pythonSnesBot2/marioMC1.smv
in the other I run:
~/MPlayer/mplayer/mencoder -demuxer rawvideo -rawvideo format=bgr32:w=256:h=224:fps=60 videostream1.dat -ovc x264 -x264encopts bitrate=448:pass=1:me=umh:psnr:frameref=15:subq=7:direct_pred=auto:bframes=6:b_pyramid:weight_b:partitions=all:keyint=500 -o output.avi -audio-demuxer rawaudio -rawaudio rate=48000:samplesize=2:channels=2 -cache 65536 -audiofile audiostream1.dat -oac pcm -channels 1 -srate 4000
anyone got any idea whats wrong? Is snes9x 1.51 broken?
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
pirate_sephiroth wrote:
wtf... I can't predict what I'll have for dinner in a few hours!
Me neither - and I cook for myself.
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
Huffers wrote:
it might end up being best to do little "V" shapes bouncing back and forth off the wall rather than circles.
Spider-Waffle wrote:
I wonder if you could bounce across to the left again and keep going back and forth across the line while bouncing against the wall. Here he does one jump to the left to skip the line, then one jump to the right to pass over. His angle is more sevre after going to the right so it might take more than 1 jump to go back to the left again. But even if it takes 2 or 3 jumps both ways that still would be a lot faster. You do 10 jumps with the circle method; the wall way could be as low as 2.
I said the same thing in five times fewer words than you ;P Also, I've discovered that bouncing as you hit the wall isn't necessary to skip laps. Edit: The bot is coming along. After tweaking its genetic algorithm a bit, it was able to get a time of 61.53 seconds on Mario Circuit 1 (after I left it running all night). I still haven't taught it to hop, use items, boost or anything yet though. Edit: Taught the bot to do basic mini-boosts. It now gets a time of 58.93 seconds as Mario on MC1, after being left for one night to optimise its route. EDIT: left it overnight doing a second pass on the last route, and it now gets a time of 52.67 seconds. Without using any items. Next up I'm going to teach it how to get mushrooms.
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
Gunty wrote:
I inserted it in the function "void S9xMainLoop (void)" in "cpuexec.cpp", but unfortunately it doesn't work. Any idea how to make this work?
That sounds like you put it in the right place to me (though I'm no snes9x expert), I don't know why it wouldn't work. I usually litter the bit of code in question with printf statements to check that the code gets run, and the variables I care about all contain sane values. Or you could try using a debugger to place a breakpoint on/near/in your code and see what happens if you execute it a line at a time - I don't know how to do this in C though.
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
Interesting. I'll have to modify my "circle-skip" bot to do this... it might end up being best to do little "V" shapes bouncing back and forth off the wall rather than circles. Status of the bot for Mario Circuit 1: I've made a tool for drawing out routes for my bot (click to add waypoints, click on a red waypoint then click somewhere else to move it, to restart hit enter in the browsers URL bar), and the kart will then follow them quite nicely. After genetically-optimising some waypoints for 1 day on my CPU, it got a time of 67.69 seconds... which I think isn't bad considering I haven't taught it how to hop, skid, boost or get items yet.
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
Gunty wrote:
  • Saving the variable when a savestate is made
  • Loading the variable when a savestate is loading
Try adding code to write it out to a text file or something at the top of bool8 S9xFreezeGame (const char *filename) and to load it in from the file in bool8 S9xUnfreezeGame (const char *filename) in snapshot.cpp
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
Spider-Waffle wrote:
Did you decide between toad mario and bowser?
If I write a bot to optimise the run for me, it doesn't matter who I pick; as I can just run the bot again with another character to see if they're faster. I can already do this for the "small circles" tracks now.
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
Swedishmartin wrote:
Huffers wrote:
words
Thanks, Ill save it for when I can code. :)
yeah... even if you can code, that python script isn't the most comprehensible bit of code I've written; it's actually quite simple, but I was coding quickly rather than thinking about clarity. Anyway, next weekend I might have a go at doing one for Mario Circuit 1.
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
Well, Fabianx showed me how to wrap snes9x to allow it to be called from Python... and then I wrote a script that tries going round in small circles, in various ways, while it watches positions in memory to monitor how fast it's going or if it's successfully skipped a lap or not. If you're interested here is the python script.
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
I doubt anyone's interested, but I've written 231 lines of Python that can play the "little circles" tracks. I tried it on Donut Plains 1, with Mario, 150cc and it got a time of 17.18 (just fast forward past my crappy playing of Mario Circuit 1) (I got 18.80 seconds with Bowser when I did this track in my tas) Note: this smv only plays back with snes9x 1.51 EDIT: and on it's first try with Bowser it got 18.59
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
atro city wrote:
thats more likely to be because it eats the uni's upload bandwidth. Nah, my school has this big anti-file sharing thing going on. I've seen flyers posted about it, bulletin boards, and even commercials on DVDs.
do they block normal downloads too? No? Then it's not a file sharing thing
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
atro city wrote:
Eh? BitTorrent implies you're doing something illegal? Yep, which is why I never use BitTorrent as long as I'm on a university connection. Torrent activity is completely blocked on some other campuses as well.
thats more likely to be because it eats the uni's upload bandwidth.
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
Warp wrote:
feitclub wrote:
Frankly, there are runs I'd rather watch without having to download them first.
Could you describe the weird voodoo magic you use to watch a movie without having to download it? ;) The illusion of "faster download" in youtube comes from the fact that the files are about 1/10th the size and 1/100th the quality.
The illusion comes from pipelining downloading and watching at the same time. Pipelining is the same voodoo magic that makes AMD Opterons "faster processors" than Intel 386s from 1990.
Warp wrote:
My personal main objection against posting videos to youtube is the loss in quality. A rather good amount of work is put in each video in order to get a high-quality image. All this is poured down the drain when someone makes a crappy conversion to wmv and posts the video to youtube.
I agree with that
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
CtrlAltDestroy wrote:
Some people don't like breaking the law. Seriously, there are two ways to watch TASes: Emulation and Roms, which is highly illegal, and BitTorrent, which either implies that you're already doing something highly illegal, or you are about to.
Eh? BitTorrent implies you're doing something illegal?
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
I haven't been able to get this to work with snes9x 1.51 though :( EDIT: I now appear to have it working for snes9x 1.51 too EDIT2: But only without joypads (ImportError: ./_snes9x.so: undefined symbol: joypads) EDIT3: I think I've figured out a way to give it fake keyboard input from python, but it'll take me a while to implement it. EDIT4: got keyboard input from python working now If anyone wants the patch for snes9x 1.51, just ask
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
I would just like to point out that I have applied your diff (by hand) to "snes9x-improvement7-src-unix-dehacked-June20_2k6" to make a python snes9x scripter for Super Mario Kart. And it works. You sir, are a genius.
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
Boco wrote:
Huffers wrote:
it used an 8 bit processor, but 4 bits to represent each 'color' (16 shades of green)
Um, DMG has 4 colors.
I was wondering when someone would correct me on that ;-)
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
nitsuja wrote:
That's not why I stopped, and the first level is the least interesting one so it would only get less boring from there... To answer the poster's implied question, Snes9x 1.43 can't TAS mouse or superscope games. You should use Snes9x 1.51 for that.
I didn't think it was boring, mind. plus I loved the music in that game!
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
Boco wrote:
85%... even in my junior high an A+ was 97%. Maybe he goes to some school desperate to keep students and funding?
Unless you're comparing the same tests, those percentages mean nothing.
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
You know nitsuja did a test run of the first level of the fly swatter mini-game, right? I think he stopped because it was boring.
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
I've watched this run dozens of times, and I've played this game hundreds of times.... and now I'm wondering about attempting to obsolete SprintGod's run, mainly by using better accuracy, achievable by watching memory locations. I'm just mentioning this incase anyone else starts trying to obsolete it.
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
hehe, bot vs bot in a fighting game could be pretty funny to watch. If you could make it run real time, playing against it might be a fun challenge for those who can complete the game too easily, too.
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
Frenom wrote:
FODA wrote:
some videogames i know of: - 8-bits: gameboy (and color)
the first gameboy was 4-bit :)
it used an 8 bit processor, but 4 bits to represent each 'color' (16 shades of green)
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
I won't start a second run for quite a while - I need a break, and to play Planescape Torment :) If anyone else wants to start on a second run, or team up with me that'd be cool.
do not forget to *ENJOY THE SAUCE*
Experienced Forum User, Published Author, Former player
Joined: 3/23/2006
Posts: 211
Spider-Waffle wrote:
The way you did the last lap of VL2 was a good how you landed in the wall. This should be used on VL1 too of course. Do you think hitting the wall in some way, probably not the same as the last lap, could be good for lap 3 too so you dont' go so wide after landing?
I doubt it, as hitting the wall (on the way down in a jump) slows you down a lot, and it takes ages to regain that speed.
Spider-Waffle wrote:
For the last lap, I wonder if you could use a little sharper angle and not have to go so wide too. Also, it looked you had to turn on the gas for a little bit to cross the line, I wonder if you could hit the wall and then instintly cross the line.
Well, I was turning as much as I possibly could, I think.
do not forget to *ENJOY THE SAUCE*
1 2 3
8 9