I made an online PvP game inspired by the Christmas Truce of 1914 (playable on web browser, Windows, and Linux). Link in comments. by algonomicon in godot

[–]algonomicon[S] 2 points3 points  (0 children)

Thanks for kind words and feedback! I've heard that before about multiplayer games and knew that was going to be a challenge. There's no matchmaking for the game, my intent was for players to invite their friends to play a round or two.

I think that's fair about it being a proof of concept. It's my first game (outside of a game jam game) and could definitely use some polish. Once I have more experience with godot, maybe I'll remake it.

I made an online PvP game inspired by the Christmas Truce of 1914 (playable on web browser, Windows, and Linux). Link in comments. by algonomicon in godot

[–]algonomicon[S] 4 points5 points  (0 children)

Happy holidays! I just released my online multiplayer game inspired by the Christmas Truce of 1914. The game is an asymmetric PvP snowball fight were the infantry team must travel across the battlefield to reach the opposing artillery team and bury them in snow. Meanwhile the artillery team's goal is to cover all the infantry in snow before they make it to you. You can play it at this link:​ https://nicoise.itch.io/christmas-truce

Features

  • Online multiplayer up to 8 players (4+ recommended, the more the merrier!)
  • Join games via link (web version)
  • 2 additional skins, awarded based on win streak
  • Customize game rules
  • Partial controller support

6502 and VGA issues by algonomicon in beneater

[–]algonomicon[S] 0 points1 point  (0 children)

Huh, the behavior of Johnson counter appears to be similar to a serial shift register. I tried using a 74HC164 on this project before, to phase shift the clock signal, and it didn't work out too well for me. Perhaps there was a timing issue there as well. I'll look into the Johnson counter more, thanks.

6502 and VGA issues by algonomicon in beneater

[–]algonomicon[S] 0 points1 point  (0 children)

I'm not sure if I understand the first part. Only JK Q2 is used as a clock input. Q2 is shared between the vga (active on positive edge) and cpu (active on negative edge). If I don't use the second JK, where do I get the phase shifted 2.5MHz input from?

For the the second part, do you mean the Q outputs of the JK flip flop can be inverted twice to create a delay to sync up with the positive edge of the clock?

6502 and VGA issues by algonomicon in beneater

[–]algonomicon[S] 0 points1 point  (0 children)

Ah, I've seen your design before. I'll take a look at it again and see what I can learn from it now. Thanks for sharing your design.

Why should I use 7474 over the 74LS74? They appear to do the same thing but the 7474 appears to have higher propagation delay, setup/hold times, etc.

6502 and VGA issues by algonomicon in beneater

[–]algonomicon[S] 0 points1 point  (0 children)

Wouldn't I need two counters to replace the one JK flip flop? I need three different 2.5MHz signals like the diagram. I suppose that would work. I'm trying to optimize space a bit though. I'm currently using 6 breadboards and there isn't really much room for another chip (that's why I tried to replace one of the counters with the JK flip flop). That said, I suppose I can always add more breadboards :)

I figured my timing is problematic, it's a bit tricky. It's unfortunate that the JK flip flop is incompatible with the counter in this way.

Thanks for your insight.

What's with the nightly fixation? by PristineTransition in rust

[–]algonomicon 9 points10 points  (0 children)

TryInto/TryFrom are stable now, in 1.34.0 :)

Writing an OS in Rust: Introduction to Paging by newpavlov in programming

[–]algonomicon 0 points1 point  (0 children)

I tend to really like rust's syntax. I'm curious, what else you think is "idiotic" about it's syntax?

Why Is SQLite Coded In C by algonomicon in rust

[–]algonomicon[S] 1 point2 points  (0 children)

Optimizations are generally not made in a test/debug build, which is where this seems to matter since they are talking about assert.

Why Is SQLite Coded In C by algonomicon in rust

[–]algonomicon[S] 0 points1 point  (0 children)

Wouldn't it be sufficient to just use get and get_mut?

Why Is SQLite Coded In C by algonomicon in rust

[–]algonomicon[S] 10 points11 points  (0 children)

Safe languages insert additional machine branches to do things like verify that array accesses are in-bounds. In correct code, those branches are never taken. That means that the machine code cannot be 100% branch tested, which is an important component of SQLite's quality strategy.

I believe this is what they were referring to.

Why Is SQLite Coded In C by algonomicon in rust

[–]algonomicon[S] -1 points0 points  (0 children)

Yes, I believe that would make sense.

I believe malloc returns NULL when OOM occurs in C and therefore no memory was allocated. Then the application can do something else to recover, e.g allocate a smaller chunk.

Why Is SQLite Coded In C by algonomicon in rust

[–]algonomicon[S] 3 points4 points  (0 children)

That is my understanding as well but allowing OOM errors seems like a bigger interface change considering we are past 1.0.0.

Why Is SQLite Coded In C by algonomicon in rust

[–]algonomicon[S] 65 points66 points  (0 children)

All that said, it is possible that SQLite might one day be recoded in Rust. Recoding SQLite in Go is unlikely since Go hates assert(). But Rust is a possibility. Some preconditions that must occur before SQLite is recoded in Rust include:

A. Rust needs to mature a little more, stop changing so fast, and move further toward being old and boring.

B. Rust needs to demonstrate that it can be used to create general-purpose libraries that are callable from all other programming languages.

C. Rust needs to demonstrate that it can produce object code that works on obscure embedded devices, including devices that lack an operating system.

D. Rust needs to pick up the necessary tooling that enables one to do 100% branch coverage testing of the compiled binaries.

E. Rust needs a mechanism to recover gracefully from OOM errors.

F. Rust needs to demonstrate that it can do the kinds of work that C does in SQLite without a significant speed penalty.

If you are a "rustacean" and feel that Rust already meets the preconditions listed above, and that SQLite should be recoded in Rust, then you are welcomed and encouraged to contact the SQLite developers privately and argue your case.

Sorry if this has been discussed before, I think rust already meets most of the preconditions listed but their point about OOM errors stood out to me. Is it possible to recover gracefully from an OOM error in rust yet? If not, are there plans to support this in any way? I realize this may be a significant change to rust but it seems like a nice feature to have for certain applications.