Programming Thread

Started by the-pi-guy, Mar 13, 2016, 10:39 PM

previous topic - next topic

0 Members and 3 Guests are viewing this topic.

Go Down

the-pi-guy

Wouldn't Super Mario Bros be pretty standard in VR? Just a big flat wall?
Depends on how they set up the display.  Having the game display directly on the headset without simulating a TV feels very weird though.  Shadertoy has a VR mode for those, so I was able to try it out.  Ish.  Kind of didn't feel like a TV, but it didn't feel like VR either.  

New Super Mario Bros or LittleBigPlanet would be pretty awesome though.  

the-pi-guy


the-pi-guy

This networking assignment is a lot bigger than the previous ones.  Already at 650 lines of code.  

Not the biggest thing I've done this semester at least.  :P

Legend


I heard about those tweets and loved it. Like if someone wanted to hack us we'd be screwed, but we do the standard things. Crazy how many companies have poor systems.

This networking assignment is a lot bigger than the previous ones.  Already at 650 lines of code.  

Not the biggest thing I've done this semester at least.  :P
Is that split up into separate files? I've always kinda prefered sticking lots of code together vs making unnecessary extra files so I'm a bad judge of what the industry considers large or not. (probably helps that no one but me has to read my code.)

the-pi-guy

I heard about those tweets and loved it. Like if someone wanted to hack us we'd be screwed, but we do the standard things. Crazy how many companies have poor systems.
Yeah, I'm just really hoping that person has no idea what they are talking about.

I don't have a whole lot of knowledge about security, there is a class about it next semester.  Not likely I'll be taking it, though.

But not storing passwords is like rule 0, I know that much.  

Is that split up into separate files? I've always kinda prefered sticking lots of code together vs making unnecessary extra files so I'm a bad judge of what the industry considers large or not. (probably helps that no one but me has to read my code.)
Separate files are all about putting stuff together that makes sense to put together. So there's not really a size.  Sometimes small makes sense, sometimes gigantic makes sense. I'm sure you're doing things the usual way.  

It's in 3 separate files, and they are all pretty tiny.  The files are server, client and game.  

We are making a Scrabble spin off.  

The server is only like 55 lines.  Servers are pretty easy.  

The game was a pain though, have to check 5 different conditions and like 3 of them required for loops, which needed their own if statement.  And two of those for loops we're actually embedded in the other.  

the-pi-guy

Servers and Clients feel weird to program.  

It just feels weird to have your server keep running, fix the client program, compile it, and then return to playing the game; all without doing anything to the server.  Server has no idea.  

It's obvious it can work this way, but actually doing it just feels weird.

Legend

Servers and Clients feel weird to program.  

It just feels weird to have your server keep running, fix the client program, compile it, and then return to playing the game; all without doing anything to the server.  Server has no idea.  

It's obvious it can work this way, but actually doing it just feels weird.
How does the server not notice the client disappearing during the compile?

the-pi-guy

How does the server not notice the client disappearing during the compile?
The server and client are completely separate programs that just happen to connect to each other.  The only time the server knows about any of the clients is when they successfully make a connection, which only needs an IP address and a socket number.  

It feels weird.  You could make several different client programs connect to the server, even if each one is doing something completely different from the rest.  

You could end up connecting completely different clients, one that's trying to play the game and another that could be sending random messages.  

Legend

The server and client are completely separate programs that just happen to connect to each other.  The only time the server knows about any of the clients is when they successfully make a connection, which only needs an IP address and a socket number.  

It feels weird.  You could make several different client programs connect to the server, even if each one is doing something completely different from the rest.  

You could end up connecting completely different clients, one that's trying to play the game and another that could be sending random messages.  
It's not real time I guess, that's what I was meaning.

Yeah I remember how weird it was learning about networking. Back in 2013 when VizionEck was still a PC game I was setting up multiplayer and it kinda shocked me how "fake" it is. I just kinda assumed multiplayer games would run on all systems as a shared program of sorts, instead of each system running a unique version of the game for that player. Like it blew my mind that one player they could see everyone as cubes yet the other player could see everyone as spheres by just building the executables separately.



I watched a GDC talk about light field rendering and it really made me nostalgic for my old work. ~10 years ago when I was building my light field displays I didn't know a thing about programing and actually rendered my first light fields manually over the course of a few weeks. Then I eventually set up an animation in Blender that could render the lightfield piece by piece as a video and then I'd composite every frame together. You have no idea how happy I was to be able to set up a light field within half an hour!

Nowadays it'd be almost trivial to setup Unity to run in real time on one of my light field displays.

the-pi-guy

It's not real time I guess, that's what I was meaning.

The server is set up not to care about the connection.  

If one of the players leaves, the server has no way of informing the other player.  But the other player can come back and start playing a different game.  

Yeah I remember how weird it was learning about networking. Back in 2013 when VizionEck was still a PC game I was setting up multiplayer and it kinda shocked me how "fake" it is. I just kinda assumed multiplayer games would run on all systems as a shared program of sorts, instead of each system running a unique version of the game for that player. Like it blew my mind that one player they could see everyone as cubes yet the other player could see everyone as spheres by just building the executables separately.

It's just weird and really cool.  On the one hand, it makes sense that it can be done that way and on the other hand it's so bizarre to actually do it that way.  

darkknightkryta

It's not real time I guess, that's what I was meaning.

Yeah I remember how weird it was learning about networking. Back in 2013 when VizionEck was still a PC game I was setting up multiplayer and it kinda shocked me how "fake" it is. I just kinda assumed multiplayer games would run on all systems as a shared program of sorts, instead of each system running a unique version of the game for that player. Like it blew my mind that one player they could see everyone as cubes yet the other player could see everyone as spheres by just building the executables separately.



I watched a GDC talk about light field rendering and it really made me nostalgic for my old work. ~10 years ago when I was building my light field displays I didn't know a thing about programing and actually rendered my first light fields manually over the course of a few weeks. Then I eventually set up an animation in Blender that could render the lightfield piece by piece as a video and then I'd composite every frame together. You have no idea how happy I was to be able to set up a light field within half an hour!

Nowadays it'd be almost trivial to setup Unity to run in real time on one of my light field displays.
That's how networking has to be though.  Sending vertices is way cheaper on bandwidth than sending textures.

the-pi-guy

@Legend
Do you know much about formal grammars?

I feel like that's probably one of the bigger topics that programmers that are mostly self taught don't know about.  It's basically a central topic in like 3 CS courses.
Theory, Compilers, and PL.  It's not something that I really knew about before taking Theory.  I've seen a grammar before, when you shared the link about L-systems, but I wasn't really familiar with them until I took Theory.

Legend

@Legend
Do you know much about formal grammars?

I feel like that's probably one of the bigger topics that programmers that are mostly self taught don't know about.  It's basically a central topic in like 3 CS courses.
Theory, Compilers, and PL.  It's not something that I really knew about before taking Theory.  I've seen a grammar before, when you shared the link about L-systems, but I wasn't really familiar with them until I took Theory.
Well to be frank, what is a grammar?

the-pi-guy

Well to be frank, what is a grammar?
They're a collection of rules that make words.  

S -> SS
S -> a

The words this grammar produces are a, aa, aaa, aaaa, aaaaa, aaaaaa, aaaaaa, etc onto infinity.  

Legend

They're a collection of rules that make words.  

S -> SS
S -> a

The words this grammar produces are a, aa, aaa, aaaa, aaaaa, aaaaaa, aaaaaa, etc onto infinity.  
Well outside of programing stuff for conlangs then no I don't know much about them.

Go Up