A 4D video game?

Started by Legend, Feb 27, 2018, 04:58 AM

previous topic - next topic

0 Members and 3 Guests are viewing this topic.

Legend

Hyperspheres made up of tetrahedrons are difficult...

So far I can either represent a hypersphere with 5 tetrahedron cells (4d version of face) or represent one with 600 tetrahedron cells. I do not know of any convex shape between the two with only tetrahedron shaped cells and all points equally distanced from the center. I tried making a "subdivide" function and using it on the 5 cell shape and then stretching points to be equally distanced from the center, but it becomes convex. Only way to fix it is to shorten 5 vertices until those cells form an octahedron. Pretty nonoptimal since that's 40 cells wasting rendering resources!

A problem is that traditional subdividing is impossible in 4D. A regular triangle can be cleanly subdivided into 4 identical smaller triangles, but a tetrahedron cannot be subdivided into identical tetrahedron. My solution was to divide it into 4 identical smaller tetrahedrons and 8 additional tetrahedrons of similar size but it was less than ideal with the above example. Similarly that makes LOD generation really really difficult.


On the positive side of things, I think I've figured out the best approach for having a terrain feature in my engine. Instead of modeling the terrain by hand, it'd be generated during runtime by a 3D texture acting as a heightmap. This would save a ton of memory, be easy to stream in chunks, and solve the LOD problem. Close terrain could be generated at max resolution while distant hills and mountains could be generated using a lower resolution version of the texture. It could use the texture for physics too which would save a lot of performance.

Legend

Jul 15, 2018, 06:04 PM Last Edit: Jul 15, 2018, 06:28 PM by Legend


600 cell is in!

Definitely looks like what I'll be using for hyperspheres. It's fairly smooth and should work well.

EDT:




Here's the 600 cell subdivided into a 7,200 cell and rendered at 128*128*128.

It's way smoother but annoyingly so, it's actually spikey. The shape isn't convex.

Legend



I embraced the spikeyness.

Xevross

Is Vizioneck 4D now?

Legend


Xevross

Seems you missed a thread

http://vizioneck.com/forum/index.php?topic=6141
Oh yeah I forgot about that. So is this work going into Cube Royale or is it a side project?

Legend

Oh yeah I forgot about that. So is this work going into Cube Royale or is it a side project?
Check the date on that post  ::)

This is a fully separate thing. Due to some scheduling stuff I couldn't really be that productive with Cube Royale so instead I'm working on this atm.


It's a 4D game engine. In the future I might use it to make a game, but right now I'm just making sure the concept is viable. I don't know of anyone attempting to display a full 4D world before.

Legend



Alternative display method.

This is an image of the entire rendered image, including voxels on the inside. It takes the 3D volume and maps the colors to a 1 dimensional line, and then maps that line to the 2 dimensional display. It's using a hilbert curve if you're interested in the math.

No way would I expect most people to bother with a display like this, but I wanted to revisit it since it might make for a good dev tool.

(not like anyone would notice but a few pixels are in the wrong spot. This is using a 1024*1024 lookup texture which obviously isn't a pixel perfect match)

Legend





At the very least, it makes insanely cool patterns.

Example in motion:


This shows the 4D camera moving to the right.

Legend




It's fun how ghosty it looks.

Legend

A 4D video game.

Imagine a beautiful and surreal 4D island that you are free to explore at your own pace. Things aren't always peaceful though, as the island is inhabited by ~12 legendary beasts. Embrace your destiny and use swords, shields, and arrows to defeat them.



Not sure about a lot of things at this stage, but this is something I'm moving forward with. The main reason I'm going with this game concept is that it allows the game to be incredibly accessible for players that don't understand the fourth dimension while also still being an interesting game for players that do. Also it's a perfect setting for showing off interesting 4D geometry. Swords are really crazy in 4D and natural objects are also really crazy in 4D.

Legend

Moving and rotating the camera at the same time is too complicated. Instead I think I might set it up like metroid prime where you can only do one of them at a time.

Left stick moves you left when pressed left, ana when pressed up, right when pressed right, and kata when pressed down. Right stick moves you forward when you press up and backward when you press down. Movement is relative to the 4D camera.

In free look mode, it is essentially the same. Left stick has left/right and ana/kata panning while right stick has up/down panning. Tilting the right stick to the left or right would spin the camera although this is only a comfort option.

During gameplay, the camera would lock on to the beast. During regular movement, the camera would either stay static or follow the player depending on how well the player understands 4D.

As an option, I'll set it up so players can change the controls and manage player position and camera direction at the same time. It's a bit awkward moving forward using shoulder buttons but it'd be nice for players that want that.


Legend

I might add a horse type creature to the game. That way I can have a full mountain range. I also might scale up the beasts too.


Now I just need to call the game Shadow of the 4D colossus.

the-pi-guy

Now I just need to call the game Shadow of the 4D colossus.
Ha, I get it.  
Spoiler for Hidden:
<br><div style="margin:20px; margin-top:5px"><div class="smallfont" style="margin-bottom:2px"><b>Spoiler</b> for <i>Hidden</i>: <input type="button" value="Show" style="width:60px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Show'; }"></div><div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset;"><div style="display: none;"><br>Because a shadow of 4D objects is 3D! &nbsp;<br></div></div></div><br><br>Jk

Legend

Ha, I get it.  
Spoiler for Hidden:

Spoiler for Hidden:

Because a shadow of 4D objects is 3D!  


Jk
Ding Ding ding!

Right now sotc is pretty much what I'm going for. The game started out as 4D botw but I scaled everything back to keep things workable.


I'm worried about how empty the game is though. I want it to be large enough to have different biomes and feel like a place that is fun to explore. 4D trees and objects are cool but most areas would just be big and only interesting from a distance.

Sotc worked because it never expected the player to go off script and explore on their own.

Go Up