Making a 4D Game

Ideas about how a world with more than three spatial dimensions would work - what laws of physics would be needed, how things would be built, how people would do things and so on.

Making a 4D Game

Postby gonegahgah » Sun Jul 01, 2012 10:42 pm

I'm not going to but I just want to start suggesting how it can more practically be done.
Again it comes back to my notion of 360deg of sideways rather than the ana and kata directions of sideways.

Let's take a land based and road based game as this will be easier to represent.
A car race game is a good example to start with.

We'll go back to the 2Der because it is always easier to project up from there.

On their vertical screen they will only see a cross section of our 3D road.
Rather than providing buttons to move the camera sideways into the left or right dimensions I would provide buttons to rotate the camera sideways.

So what the 2Der gets to see are shaded segments of our roads with the shade depicting the rise and drop as we follow along the road.

Now, obviously the 2Der can't see what the other 3D cars are doing via this, except when they are are in line, so we need to provide extra information and place it above the road depiction.

So you need an extra little line that depicts lighter cars as ahead and darker cars as behind when they are close.
They are smaller lines when further away and longer when closer with some cars partially or fully hidden beyond each other.
How far the car is above/below the centre of that line depicts at what rotation to you they are.

Another line would be above this again to depict your sideways tilt in relation to the road/ground.

This should allow a fairly representative game of 3D racing to be developed for a 2Der.

In the same respect, this could be developed up a dimension for us 3Ders where instead of moving the camera into the ana-kata directions; the buttons instead rotate the camera to bring us into the other 359.99999deg of sideways provided the 4th dimensions. Again we would also need a circle depicting our 4D tilt and a circle with bigger lighter circles to depict cars in front of us at what angle of rotation sideways and darker cicles for when they are close behind us.

In this way the road could simply be represented as a flat road; just as a 4Der would see it; and when we rotate into the sideways dimension the road remains flat, as it should, and the 'tilt' and 'other car' would provide us with the extra information we need.

That would be an interesting test of driving. How does that sound?
gonegahgah
Tetronian
 
Posts: 490
Joined: Sat Nov 05, 2011 3:27 pm
Location: Queensland, Australia

Re: Making a 4D Game

Postby gonegahgah » Mon Jul 02, 2012 8:31 am

As I've suggested before I would make the car have three front wheels and three back wheels to keep it from falling sideways.
So I would probably extend the above and have three views from the vehicle (probably side by side or above each other); each with respect to one wheel.

Another interesting thing I realised for our 3D cars is that you could probably most comfortably have three front seats with a driver occupying one of the three sideways directions. But which one would that be I wonder. I wonder which would become the dominant hand, the secondary hand, and the tertiary hand? I guess we could, for simplification, call them the prima side, the secard side, and the tertiard side. Unlike our definite left hand and right hand sides; the three handed 4Der has no one or the other side. They instead have one, of an apparent triangle of arms, becoming dominant. I guess the secard arm could definitely be to one side or the other of this then.

Anyhow, there would be less reason to make a road that allows three vehicles to pass when there are only two directions of travel. It may be the case that their roads tend to often have overtaking lanes for one direction at a time - where funds are limited - or it would be cheaper for them to make two separate roads for either direction of travel rather than our single road divided into traffic going one direction and traffic going another direction. They could then fill this in more to add an overtaking line or enlarge the two lanes to make them two lanes both ways.
gonegahgah
Tetronian
 
Posts: 490
Joined: Sat Nov 05, 2011 3:27 pm
Location: Queensland, Australia

Re: Making a 4D Game

Postby gonegahgah » Fri Jul 06, 2012 11:30 pm

Using the projection method it is possible to imagine a road that is projected directly into the 4th direction. If we realise that both 4th directional ends are on the outside then it would be unusual for the tyre to be on either of the outside extremities of the road. So instead you can put the tyre somewhere in the projection and project it slightly as well to show its 4D depth.

This helps us to think that the tyre is still on the 'surface' although there are caveats to that. We can even turn the tyre towards left or right and watch as the entire tyre turns like that - in our sideways - across the projection. But this is only our sideways and the vehicle dutiful moves towards our left or right across the projection.

The real trick of understanding is that the tyre can also turn towards a full 360deg of sideways within that projection and move towards all forward points in the projection.
I always say towards because car wheels can only turn to a certain angle certainly less than 90deg.

But how would you depict this in projection? That's all I've got time to type for at the moment but it is what I am pondering at this stage. The tyre may grow narrower at either end of its projection as it is turned towards the projected sideways; not sure. I wonder how it would look?
gonegahgah
Tetronian
 
Posts: 490
Joined: Sat Nov 05, 2011 3:27 pm
Location: Queensland, Australia

Re: Making a 4D Game

Postby gonegahgah » Sat Jul 07, 2012 1:00 pm

I imagine that the truth of the matter is that you want to produce a line to wherever you are going forward to; whether there is sideways deviation or not.
So just as our 3D tyres describe a ribbon in the direction of travel; a 4D tyre needs to describe a tube in the direction of travel.
So the basic commonality is that the tyre has to unfurl its path of travel so a turning wheel remains true regardless of however many dimensions.

I guess it's time to resort to 2D where the 2Der can only imagine going over hills and valleys with no ability to steer.
There projection method would be say 5 lines above each other; each representing a cut at 2/7th, 3/7th, 4/7th, 5/7th & 6/7th.
To show a 3D tyre that can steer they must draw part of the tyre at 2/7 and so on through to 6/7.
Depending on how far the wheel was turned they would show more of the wheel lines for greater turn and less for smaller angle of turn.

Same goes for our projection method, though we can show more.
Turning sideways is easy to show for normal sideways.

I realise now from the above that it should only appear in the one frame when it is turning in the 'normal' left-right. Just like it does for driving directly forward for the 2Der.
It is only when it starts turning towards the ana-kata directions that it should be represented only by a small place-holder in the central frame.
Depending upon the direction this will grow smaller in the central frame of the projection until it finally forms a square when we are moving ana or kata-wise.

Then you can start representing more of the tyre into the ana and kata-wise frames when turning is done towards them.
Then as the tyre moves further forward it will likewise move further into or out of the 4th dimension as the tyre proceeds.

So the tyre remains like our basic wheel shape except that it leaves a tube track instead of a ribbon track.
You would project the road to give it its full volume but you would not project that tyre as the tyre is only going towards one sideways.
If the tyre occupied the space that I was originally talking about then it would not move; so I believe now.

Here's an example of depicting turning right in 4D. The tread should really be a series of circles in the ana-kata direction instead of just a ribbon forming the tyre.
Image
The picture on the left depicts going straight ahead. The picture on the right depicts turning towards the right side of the road.
I'll try to depict a picture of turning towards the ana-kata directions hopefully as a follow-up.
gonegahgah
Tetronian
 
Posts: 490
Joined: Sat Nov 05, 2011 3:27 pm
Location: Queensland, Australia

Re: Making a 4D Game

Postby quickfur » Sat Jul 07, 2012 2:34 pm

This is my approach, which may not be the same as yours, but maybe you might get some ideas from it:

I think of a 4D racing game from an FPS kinda viewpoint, where you're looking in the direction you're going (more or less), parallel to the ground. So the horizon would project to a plane halfway up the projection volume, and, let's take the simplest case of a straight road, the road will appear as a tapered thing, say a square pyramid or a cone, with the tip touching the horizon (that's the point where the road "meets" the horizon), and whose base is the bottom of the projection (where the viewpoint is "standing on").

Before we talk about cars, let's first talk about how wheels will look like, and how tyre rotation will appear, because they are very different from what we might imagine according to our 3D-centric thinking. Let's say we have a cubindrical wheel, and for simplicity, let's consider a detached wheel just rolling along the road (we'll worry about attaching it to a vehicle later). What will it appear like? Our 3D-centric thinking will probably imagine the cubinder resting on one of its cylindrical surfaces, and it will turn along the axis of this cylinder as it rolls forwards towards the 4D viewpoint, which will appear to be getting larger and moving downwards from the tip of the cone to the base. At least, this is the way I thought of it at first. But actually, that's completely wrong. The surface that the cubinder will roll on is actually not any of the 4 cylinders on its surface; those cylinders are flat from the 4D POV, the shape can't roll on them at all! (They are the analogue of the circular lids of a 3D cylinder: place a cylinder on its lid, and it won't roll at all.)

So what you will actually see, if the cubindrical wheel is rolling towards you, is actually a cube-shape volume (slightly bulging around its 4 horizontal sides) doing the "inside-out" rotation as it moves downwards from the tip of the cone to its base. Well, it's the "ana" part of the inside-out rotation, that is, because the wheel is opaque, so you'll only see a cube slightly bulging around the sides, and horizontal squares appearing at the top (they are the tyre treads) and "sliding down" the sides of the square before disappearing when it touches the bottom face of the square. They aren't really sliding in 4D, of course; they are fixed ridges on the curved surface of the cubinder (which is a square torus, that is, the torus formed by sweeping a square in the XY plane along the circle in the WZ plane, assuming Z is the vertical direction). As they rotate with the cubinder, they come into view at the top of the bulging cube image of the cubinder, and slide downwards (actually rotating forwards) and touch the road at the bottom of the cube, then disappear from view. The part of the cubinder that touches the road is not any of its cylindrical cells, but a square-shaped cross section of its square torus.

This, of course, is the simplest case of the wheel farther along the road, rolling directly at the 4D viewpoint. If you were sitting in a vehicle with, say, 4 exposed front wheels, they would appear as the top half of a bulging cube in 4 corners, arranged in a square, at the bottom of the projection volume (touching the base of the conical image of the road, and maybe protruding from the cone a little, if they are tall wheels or if the road is very narrow -- note that the bottom of the wheels are actually within the road surface; the protruding is just a visual artifact).

Now, what if the wheels are turned? First, let's say the 4D viewpoint is standing in the exact center of the road, and a wheel is rolling on the road towards the viewpoint, but along the +X side of the road instead of directly at the 4D viewpoint. How would it appear? It will still project to a bulging cube, except now the cube's volume consists of two distinct volumes, one is like a square tube bent sideways into a C shape (well, not as extreme as that, but just slightly bent) and then a cylinder-shaped volume fitted into the C shape, filling up the rest of the bulging cube's volume. The cylinder appears very flattened sideways, and as the wheel turns, you can now see the cylinder turning too. The tyre treads are still squares that appear at the top of the cube, but now they move down in a C-shaped curve instead of straight down as before. As the wheel approaches the 4D viewpoint, its image will move down the sloping side of the conical image of the road, from the tip to the edge of the circular base.

Now, notice that the cubinder's image is a bulging cube, which means it has 4 horizontal sides. When it's directly facing the 4D viewpoint, all you see is the bulging cube. There are 360° of freedom where it can point away from the 4D viewpoint; so the bent C-shaped image can be along any of the 360° horizontal directions. You can have an entire circle of wheels on the road rolling towards you along the side of the road, and in projection you'll see a circle of bulging cubes with the C-shaped volumes pointing outwards from the axis of the cone, all apparently sliding down the sides of the cone until they sink into the bottom of the image. They won't actually collide with you, of course, even though from your 3D viewpoint one of them looks like it might -- but actually, they're all "off to the side". What will collide with you is the case where the bulging cube is moving directly downwards from the tip of the cone to the center of its base: when it gets there, it will bump you in the face.

Now, let's say you're sitting in a vehicle with four front exposed front wheels (like your typical racing car has uncovered wheels). As I said, they will all appear as the top halves of bulging cubes, in a square formation at the bottom of the projection volume. When you turn +X-ways, they will twist in that direction to make the square tube bent into C-shape shape (well, the top half of that shape). When you turn -X-ways, they will twist in the opposite direction. When you turn +Y or -Y, they will also twist in those directions. In-between directions will also do the same thing. So how do you tell which way the wheels are pointing? Just look at which way the front of the bulge is pointing. Opposite of that will be the image of the cylindrical volumes (which are actually the hub caps of the wheels). There are 360° of directions your wheel can turn in -- this is the XY component of the wheel's actual 4D direction. How distorted the C-shape curve is, is how far in that direction the wheel is actually pointing, so every one of the 360° directions actually has their own 360° direction. In 4D, you have a sphere of possible directions to travel in. The analogous 3D case only has 2 sideway directions, left and right, and you can turn slightly to the left or very sharply to the left; in 4D, you can turn in, say, the 47° direction either very gently or very sharply. If you like, think of this as a sphere with an arrow pointing from the center to the "north pole"; the first 360° sideway directions determines the longitude on of the arrow head when you turn it, and the 2nd 360° sideway directions determines the latitude of the arrow head.

If you want to give a more obvious clue as to which direction the vehicle is moving, you can draw an imaginary arrow in front of the vehicle pointing forwards, which in projection will appear to be an arrow starting at the base of the cone (the road's image) and pointing in some upward direction. When it's pointing directly at the tip of the cone, you're parallel to the road; otherwise, you're misaligned and will drive off the road shortly.

Of course, all this is just the simple case of a single straight road. If the road curves, then its projected image will be a zigzagging cone (or a twisty tentacle, starting from the bottom of the projected volume and winding until its tip touches the horizon plane). Now, notice that there's a lot of volume under the horizon, which is actually the amount of land area (or rather, land volume) that is available. It's very easy to imagine, say, a torus encircling the cone image of the road: that torus would be another road, a circular road, that encircles the road you're on, but isn't connected to it. It could be full of cars, or boulders, or whatever, and you could still drive through without hitting them because your road passes right "through" them (well, not through them literally, of course, technically speaking you're passing "by" them, even though they're all around you when you pass). Navigating on a curving road in 4D is tricky business; you have to be able to steer in 360° of sideways, plus control how much you're veering in that direction at any given time so that you remain on the road. There are just so many more ways to fly off the road if you're not careful!

While driving around in 4D, you may also see other landscape features, like mountains, which will appear as jagged cones above the horizon plane, and rivers, which will appear as winding "tube" shapes below the horizon plane. Note that the road can easily pass beside the river without ever needing to cross it. It can even spiral around the river and you never have to get your wheels wet. Other straight roads can criss-cross the volume below the horizon plane without ever touching the road you're on. You may also see the sun as a sphere somewhere above the horizon plane. Note that it has full 3D freedom as to where to be! Sunrise/sunset will appear as a hemisphere on the horizon plane.

Even more interestingly, if you drive past a city, you can have houses all around the road (in fact, the same building can completely encircle the road, and you can still just drive right through without hitting any walls).

Lots of fun can be had in 4D.
Last edited by quickfur on Sun Jul 08, 2012 5:22 am, edited 1 time in total.
quickfur
Pentonian
 
Posts: 2955
Joined: Thu Sep 02, 2004 11:20 pm
Location: The Great White North

Re: Making a 4D Game

Postby gonegahgah » Sun Jul 08, 2012 12:33 am

Hi quikfur, I haven't had a read yet all of what you have provided, except a couple of paragraphs, but I just wanted to quickly add something to elucidate what I'm saying.
Again we prod the poor 2Der out onto public display (we might have to do so with those nasty zappy things as I'm sure he just wishes we would leave him alone).

Anyhow, again, if the 3D wheel is driving in line with a 2Der's plane they will simply see a wheel as they would expect to see it.
In the same way, if a 4D wheel is driving in line with our volume frame then we may simply see a wheel as we would expect to see it.
That's how I have projected things framewise using this '2D->3D then 3D->4D' analogy.
Even if the wheel turns left or right, as long as it only turns in our frame then it will look like a wheel I would think at this moment.

It's when it turns into the Ana-Kata direction that we would need to represent it via multiple frames which can be done within the projection model. ie.

Just as the 2Der sees a circle edge when the tyre is straight on, until the 3D tyre turns right and breaks up into a left-forward diagonal cross section of the tyre - with later diagonal cross sections in projected frames; I would imagine that a 3Der would see a tyre shape until the 4D tyre turns kata-ward and breaks up into ana-forward diagonal cross section of the tyre - with later forward diagonals in projected frames.

If I may, I would have seen it as something like:

Image

Here's a closer view of the tyre as depicted being seen across multiple ana-katawards frames:

Image

Because each frame only holds a cross section of the tyre, when it is turned kata-wards, this is what I have shown.
Actually although the diagrams say ana-wards; I would tend to think of that direction as kata and ana the opposite.

I'll have a study what you've written while eating brekky QuickFur but does the above add anything to the discussion?
gonegahgah
Tetronian
 
Posts: 490
Joined: Sat Nov 05, 2011 3:27 pm
Location: Queensland, Australia

Re: Making a 4D Game

Postby quickfur » Sun Jul 08, 2012 5:34 am

Ahh, I see, you're using cross-sections. I've to admit I'm not very well-versed with that approach; I'm using the 4D->3D projection method. Here's an example middle-of-the-road scene I cooked up in povray:

Image

The outer bounding cube is just an arbitrary decision to designate the target projection volume of the 4D->3D projection to be a unit cube. The lower half of the cube represents the ground (or what's visible of the ground), with the horizon at the middle of the cube. The top half is the projection of the sky, and just for fun I made a little yellow sphere for the 4D sun. The cone in the middle of the ground is the road, which I chose to be a cylindrical road just 'cos it's easier to draw in povray :). For no good reason, I added evenly-spaced markers to the middle of the road in the shape of cylindrical stripes, just for fun. (A real 4D road wouldn't have this kind of marking, since it's not very useful, but I did it this way just for the direct analogy with 3D roads.)

The road is a boring plain straight road extending into infinity, and the road markings also do the same (well, not really... i stopped after 30 stripes 'cos it wasn't worth going any farther anyway, and povray can't handle an infinite number of objects).

Anyway, this is what I envision a 4D scene would look like from the road. Note that this scene isn't an actual projection render; I just doodled it up in povray to show what I have in mind. (The road markers' positions are actual calculations, though, which were easy enough to do in povray.) As it stands, this scene is rather bare, there's nothing except a single straight road, a horizon, and a sun. Trying to draw wheels is rather hard... I might have to actually use my renderer to render duocylinder projections or maybe cubinder projections, and import those into the scene. But that will have to wait for another day -- it's bedtime for me.
quickfur
Pentonian
 
Posts: 2955
Joined: Thu Sep 02, 2004 11:20 pm
Location: The Great White North

Re: Making a 4D Game

Postby wendy » Sun Jul 08, 2012 8:56 am

You don't need the dotted line down the middle of the road. It's like putting a pole in the middle of a room, and expecting everyone on (one side) to face down, and the (other side) to face up. But there's no easy way to say one side of a dotted line. Make the lanes separate. Blood vessels (arteries and veins), don't need no left and right, level crossings and right of ways.
The dream you dream alone is only a dream
the dream we dream together is reality.

\ ( \(\LaTeX\ \) \ ) [no spaces] at https://greasyfork.org/en/users/188714-wendy-krieger
User avatar
wendy
Pentonian
 
Posts: 2014
Joined: Tue Jan 18, 2005 12:42 pm
Location: Brisbane, Australia

Re: Making a 4D Game

Postby quickfur » Sun Jul 08, 2012 2:42 pm

wendy wrote:You don't need the dotted line down the middle of the road. It's like putting a pole in the middle of a room, and expecting everyone on (one side) to face down, and the (other side) to face up. But there's no easy way to say one side of a dotted line. Make the lanes separate. Blood vessels (arteries and veins), don't need no left and right, level crossings and right of ways.

Yes I know the dotted line doesn't make any sense. I just did it for the visual analogy to 3D roads. :) As I said, a real 4D road would have some other kind of road division method, either two separate lanes where there is enough materials to build two roads, or a 2D divider to split the road into two halves.
quickfur
Pentonian
 
Posts: 2955
Joined: Thu Sep 02, 2004 11:20 pm
Location: The Great White North

Re: Making a 4D Game

Postby quickfur » Sun Jul 08, 2012 2:43 pm

Having said that, though, it might make sense to have wider-spaced markers down the middle of the road to indicate mileage, though that is not mandatory and is mostly just decorative.
quickfur
Pentonian
 
Posts: 2955
Joined: Thu Sep 02, 2004 11:20 pm
Location: The Great White North

Re: Making a 4D Game

Postby gonegahgah » Thu Jul 12, 2012 7:32 am

The following is a little more detailed:

Image

Turning in a right+kata direction would just be a combination of both turning right and turning kata.

In the diagrams I've put the tyre on a '3D plane of existance' that I call "our 3D plane". This includes the ground plus the sky indicated by the blue arrows.
I've also extended how much of the road is shown for our 'plane of existance' to highlight it and show that the wheel is on it even if the wheel is 4D.
You can see that the tyre cuts through our plane of existance into adjacent planes of existance when the wheel is turning kata-wards.

I'm thinking that this diagram will give us some more clues about the steering mechanism...
gonegahgah
Tetronian
 
Posts: 490
Joined: Sat Nov 05, 2011 3:27 pm
Location: Queensland, Australia


Return to Higher Spatial Dimensions

Who is online

Users browsing this forum: No registered users and 10 guests

cron