Player (201)
Joined: 7/6/2004
Posts: 511
It would be cool to make a video game where the speed of light is on the same order of speed as things that move in the game, and to implement relativity accurately. Some game types that come to mind are mario (platformers), pinball, space shootems. Point of view would be from mario's perspective, but possibly with an option of viewing it from the level's perspective (which I don't think would be that different than normal). When I say point of view, I mean keep the same 2d display, but updates would be lagged and positionally skewed based on the time light takes to travel from that point to the mario. This game would be cool for at least one reason, it should help make understanding relativity intuitive. I would hope that the game play would also be exciting and fun, although I cannot predict if it will be. Does anyone know of any open source mario or similar implementations for a starting point? Edit: maybe this simulator might be of use, haven't checked it out yet though: http://realtimerelativity.org/index.html
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Post subject: Re: Relativistic Mario
Senior Moderator
Joined: 8/4/2005
Posts: 5777
Location: Away
flagitious wrote:
Does anyone know of any open source mario or similar implementations for a starting point?
Like http://sourceforge.net/projects/mmario/ ? Just ran a "mario" query on SF.
Warp wrote:
Edit: I think I understand now: It's my avatar, isn't it? It makes me look angry.
Joined: 7/2/2007
Posts: 3960
Keep in mind that relativity doesn't just change where things appear to be, but also how fast they're moving, how big they are, and how much mass they have. As your speed increases, so does your mass. Additionally, you get contracted lengthwise along the direction of travel, and your clocks appear to run slower. This is all from the perspective of people watching you, of course; to you, the effects apply to everyone else (as they appear to be moving relative to your fixed position). So I think that a game of relativistic Mario would need to be done from an observer's standpoint, so we can apply all these neat effects to Mario himself. :) I seem to recall once seeing a Linux game that basically looked like a Mario clone with a penguin subbing in for Mario. This would've been a good five-six years ago, though, and I don't remember what it was called.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Chamale
He/Him
Player (182)
Joined: 10/20/2006
Posts: 1355
Location: Canada
So, I take it this game would use Lorentz' equation to calculate important values of energy, length, momentum, etc? Perhaps there could be a mechanic where Mario applies a certain amount of force to himself when he walks, and higher speeds require more energy to reach. c could be set to a value similar to Mario's top speed, assuming we remove friction from the game.
Joined: 10/3/2005
Posts: 1332
Derakon wrote:
I seem to recall once seeing a Linux game that basically looked like a Mario clone with a penguin subbing in for Mario. This would've been a good five-six years ago, though, and I don't remember what it was called.
Supertux: http://supertux.lethargik.org/
Active player (315)
Joined: 2/28/2006
Posts: 2275
Location: Milky Way -> Earth -> Brazil
There's Secret Maryo Chronicles, but I don't know if you can do all that stuff.
"Genuine self-esteem, however, consists not of causeless feelings, but of certain knowledge about yourself. It rests on the conviction that you — by your choices, effort and actions — have made yourself into the kind of person able to deal with reality. It is the conviction — based on the evidence of your own volitional functioning — that you are fundamentally able to succeed in life and, therefore, are deserving of that success." - Onkar Ghate
Bisqwit wrote:
Drama, too long, didn't read, lol.
Player (201)
Joined: 7/6/2004
Posts: 511
I am aware that relativity does not only affect where things appear to be, and it would be best if the game implements everything accurately, for example from mario's point of view level time and music would speed up as he speeds up (both views should be available). I guess it should use the Lorentz' equations, thank you for pointing that out. I do not have immediate plans to make this game (I am not an expert at either relativity or game making). However I created this topic to spark interesting, hoping someone else would! Haha I know that is lazy, and I am sorry. I may do it, but I make no promises. If I do start to work on it at least I will have a good place to go for help.
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Joined: 10/3/2005
Posts: 1332
To be honest, I don't really understand why a simulation of relativity would be interesting to implement in a game or what that would look like, but judging from a quick Google search, it looks like a graphical demo of the physics may already be done. You'd be free to add game-like interactivity on top, assuming any of these projects are the kind of thing you're talking about. Edit:
Light Speed! wrote:
When an object accelerates to more than a few million meters per second, it begins to appear warped and discolored in strange and unusual ways, and as it approaches the speed of light (299,792,458 m/s) the effects become more and more bizarre.
Okay, maybe that's why? :D
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
I'm not sure relativistic speeds look so "cool" as everyone seems to think. Basically things just flatten out and all colors shift to the blue or the red end of scale (depending on the direction) until it shifts so much that all light goes out of the visible spectrum and you can't see anything anymore. Playing on a black screen doesn't sound so cool. Even if we "cheated" and ignored color shift, I still don't think it would look that cool. Everything would simply flatten (the amount of flattening depending on which direction you look), and that's about it. Also, if we aimed for realism, it cannot be Mario. You can't move at relativistic speeds in an atmosphere because friction would disintegrate you long before you even reach speeds close to c. Mario would have to run in vacuum, in which case he would suffocate and suffer all kinds of other nasty stuff related to vacuum (such as his blood boiling and probably coming out of his eyes and ears). (And yes, I'm aware that eg. in Super Mario Galaxy Mario does kind of run in vacuum of space. But weren't we aiming for realism here?)
Player (68)
Joined: 3/11/2004
Posts: 1058
Location: Reykjaví­k, Ísland
Well, what if we just imagined that for some reason, c somehow got set to about 20 m/s. Also don't forget to alter the speed of sound as well.
Joined: 7/2/2007
Posts: 3960
Got something against sound moving faster than light does? :) But yeah, I agree; you'd need to slow light down for this to be remotely feasible.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Player (201)
Joined: 7/6/2004
Posts: 511
I think my idea is being misinterpreted, I meant for the speed of light to be greatly lowered, not mario's speed increased. Also I thought the high point would be the feel and mastering movement in such an environment, not graphical effects and how they appear (although they should still be as accurate as possible). Color change did not occur to me, but it would be best if colors were left the same, also for sound I would pretend it is just the same as light. This is what I had in mind as a challenge that would require mastering to become good at the game: as mario speeds up, time would seem to slow down for him, thus from his perspective, everything would be happening really fast, the timer would go down fast, the walls would approach faster, etc. This would be really hard to control, and I am sure there are other effects that might also add challenge, but which I am not aware of or do not understand yet (maybe general relativity effecting gravity?).
g,o,p,i=1e4,a[10001];main(x){for(;p?g=g/x*p+a[p]*i+2*!o: 53^(printf("%.4d",o+g/i),p=i,o=g%i);a[p--]=g%x)x=p*2-1;}
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
Blublu wrote:
Well, what if we just imagined that for some reason, c somehow got set to about 20 m/s.
If we go for realism, I think that would screw up things badly, such as the Earth becoming a black hole and stuff like that. (Changing c does not only change how fast photons move. It changes spacetime curvature and stuff like that.)
Joined: 7/2/2007
Posts: 3960
Okay, let's assume we can change the speed of light and yet have everything else still work the way it's supposed to (including e.g. neurons firing properly, electrical devices working, etc.). Did you complain when Super Mario Galaxy had 10m planets with gravity equivalent to Earth's? No? Same deal here.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
Derakon wrote:
Okay, let's assume we can change the speed of light and yet have everything else still work the way it's supposed to (including e.g. neurons firing properly, electrical devices working, etc.).
And what would be the point? It would in no way be even a remotely realistic simulation of what would happen in real life, due to all the exceptions being applied. The only thing you get is some distortion of the image (mainly flattening in certain directions). You might as well simply simulate how the game would look through a fisheye lens. In fact, that would be much more physically realistic.
Did you complain when Super Mario Galaxy had 10m planets with gravity equivalent to Earth's? No? Same deal here.
Those details serve a purpose in SM Galaxy. What would be the purpose of the suggested faux-relativistic effects? If you want the image to get distorted, there are much easier ways, as I already mentioned.
Active player (315)
Joined: 2/28/2006
Posts: 2275
Location: Milky Way -> Earth -> Brazil
I think I understand what he says... he want's something like bullet time, but reversed. It would speed them up and slow us down. In other words: the faster you go, the slower you go... (?) How is that possible, or going to be cool or what does that have to do with reality is what I don't understand.
"Genuine self-esteem, however, consists not of causeless feelings, but of certain knowledge about yourself. It rests on the conviction that you — by your choices, effort and actions — have made yourself into the kind of person able to deal with reality. It is the conviction — based on the evidence of your own volitional functioning — that you are fundamentally able to succeed in life and, therefore, are deserving of that success." - Onkar Ghate
Bisqwit wrote:
Drama, too long, didn't read, lol.
Patashu
He/Him
Joined: 10/2/2005
Posts: 4045
pirate_sephiroth, have you heard of special relativity before? Basically, it's a set of mathematical theories based around modelling a universe where any observer sees light travel at the speed of light relative to them, no matter who they are. The idea was concocted after Einstein after seeing that no one was finding evidence of an 'aether', a medium light would move relative to like sound waves through water. These models were found, in fact, to predict real life behaviour later on. It's called 'special relativity' because no frame of reference is special; no matter what velocity you're moving at light always travels at the same speed as far as you can tell. Without invoking a reference point, it's meaningless to say whether you're at rest or moving at constant velocity since no experiment can be done to show either is happening. (If special relativity was not true, moving at constant velocity would mean you'd see light move at that same constant velocity in that opposite direction, i.e. there would be an absolute frame of reference) This has all sorts of interesting consequences, because all observers still have to see all the same events; something has to give, of course, and when one observer sees another near the speed of light, they will be contracted relative to their direction of motion and their time relative to yours will appear to be running slower. You can prove results like this geometrically by imaging that a train is rushing past an observer on a train station while running an experiment which bounces light off a mirror either horizontally or vertically and back into a sensor. To the person on the train everything is moving at the same pace and he detects nothing abnormal, but the person on the station will see that the light is going at the speed of light for him, regardless of how fast the train is moving, so the trip will take longer (there is a horizontal component if the light is going up and down, or if it is going horizontally it has to move against the train's velocity on the return leg) The consequences of this are (and you can work it out) that the train's time will be slower relative to the observor on the platform and the train will contract relative to the direction of motion, such that all events are self-consistent no matter who is observing them and how fast they're moving relatively. Oh man...it's been ages since I've done it, but it's all so awesome and the best part is that phenomena like this, while unlikely to be seen in every day life (trains don't run close to the speed of light!) can be observed in astronomical and atomic phenomena. For example, particles (nuons I think) have been observed to last longer when moving at high speed, because relative to us their 'time' is running slower so we see them lasting longer even though they experience the same amount of relative time.
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu My twitch. I stream mostly shmups & rhythm games http://twitch.tv/patashu My youtube, again shmups and rhythm games and misc stuff: http://youtube.com/user/patashu
Active player (315)
Joined: 2/28/2006
Posts: 2275
Location: Milky Way -> Earth -> Brazil
Argh, I can't keep my concentration in long pararaphs. I believe I got it, but isn't it as I said? As our speed increases, time will feel slower for us. And we're observers, but with the point of view of the super fast Mario... So, we speed up and slow down... If you wanted the observers own point of view then it's just to distort the graphics a little, as Warp said. I guess I need some sleep.
"Genuine self-esteem, however, consists not of causeless feelings, but of certain knowledge about yourself. It rests on the conviction that you — by your choices, effort and actions — have made yourself into the kind of person able to deal with reality. It is the conviction — based on the evidence of your own volitional functioning — that you are fundamentally able to succeed in life and, therefore, are deserving of that success." - Onkar Ghate
Bisqwit wrote:
Drama, too long, didn't read, lol.