#Another first rust project looking for feedback! ๐Ÿ˜„

50 messages ยท Page 1 of 1 (latest)

shut swan
#

If someone have the time I would really appreciate some feedback on the code of my first rust project. The readme should describe the project and the code is all there so..
https://github.com/tedsteen/nes-bundler

I know no rust devs myself so this would be my first (and only) feedback on the code.

In a nutshell this thing transform your NES-game to a single executable targeting your favourite OS!
It basically wraps a NES rom-file and runs an emulator. On top of that I've added input (keyboard+gamepads), save/restore state, a simple UI to fiddle with the settings and Netplay (ggrs - rollback networking)

It's been a blast :)

past belfry
#

I have a copy of micro mages to try it out with ferrisHmm

shut swan
#

Awesome ferrisBased

#

If you do, then you should know that nobody has ever built it on Windows or Linux, only Mac so... who knows what will happen!

#

but it should work โ„ข๏ธ

past belfry
#

I can do both ferrisHmm

#

I will try it out a little later and let you know

shut swan
#

Great! I'm going to bed as it's late here, but will check back here right after my morning coffee!

#

Also note, only NTSC! rusticnes-core does not support PAL yet.

past belfry
#

There is a bug in src/input/keyboard.rs:55 that causes it to crash if you press the windows key

#
if let Some(key) = input.virtual_keycode {
    match input.state {
        winit::event::ElementState::Pressed => self.pressed_keys.insert(key),
        winit::event::ElementState::Released => self.pressed_keys.remove(&key),
    };
}

Fixes it

past belfry
#

You can also remove all the pub(crate) and just use pub

#

for binaries it doesn't really matter

#

I also went and setup nrom with save support so micro mages works

past belfry
shut swan
#

Great feedback! Thanks!

#

Very nice to see it building on non-macs! Is that Windows?

#

So did you implement save_state/load_state for nrom on the for-rusticnes-test branch?

past belfry
past belfry
past belfry
#

The remote multiplayer seems to work very well

#

Though I was only able to test it on the same machine

past belfry
shut swan
past belfry
#

Sure

#

I can do it a little later

shut swan
past belfry
#

I actually have a nes core ferrisHmm

#

Though the ppu isn't done

shut swan
#

Ah, you're building a nes emulator?

past belfry
#

Yeah, it was one of my previous projects. I haven't finished it because I started some other ones

#

It has a built in disassembler/debugger

#

And it's cycle perfect

#

(well to my knowledge)

shut swan
#

I've been digging around in rusticnes-core a bit and it looks like a lot of fun

past belfry
#

Yeah emulators are quite fun to put together

shut swan
#

could imagine

past belfry
#

Oh, I did notice that the netplay let's you connect to another instance running a different ROM

shut swan
#

hehe, yeah!

#

or you can load (F2) in the middle of the netplay and have a fun time ๐Ÿ˜›

past belfry
#

Oh yeah, didn't try that

#

Maybe you could hash the ROM

#

To at least show a warning

shut swan
#

yeah, maybe, I was thinking that perhaps it could be up to the people bundling their games to suffix their matchbox servers somehow if they need to segment players per version.

#

atm one matchbox server is kind of made to serve only one game, but that could be changed and then you'd need to segment somehow

#

I just saw that matchbox supports TURN servers which means that it should be possible to play over the internet even if they can't connect p2p directly!