hanghoavacongluan.vn
  • Trang chủ
  • Thời sự
  • Kinh doanh
    • Doanh nghiệp
    • Chứng khoán
    • Ngân hàng
    • Nhà đất
  • Thị trường
    • Năng lượng
    • Nguyên liệu
    • Nông sản
    • Vàng
    • Hàng thật – hàng giả
  • Đời sống
    • Ẩm thực
    • Du lịch
    • Giải trí
    • Làm đẹp
  • Sức khoẻ
  • Tiêu dùng
  • Công nghệ
  • Ô tô – Xe máy
  • Trang chủ
  • Thời sự
  • Kinh doanh
    • Doanh nghiệp
    • Chứng khoán
    • Ngân hàng
    • Nhà đất
  • Thị trường
    • Năng lượng
    • Nguyên liệu
    • Nông sản
    • Vàng
    • Hàng thật – hàng giả
  • Đời sống
    • Ẩm thực
    • Du lịch
    • Giải trí
    • Làm đẹp
  • Sức khoẻ
  • Tiêu dùng
  • Công nghệ
  • Ô tô – Xe máy
No Result
View All Result
hanghoavacongluan.vn
No Result
View All Result
Home Đời sống Giải trí

Making a 4D Game – 4D Explorer

3 years ago
in Giải trí
Making a 4D Game – 4D Explorer

Hey, I am jelle and after making a bunch of2D and 3D games, I was ready for the next step.

LIÊN QUAN

Làm thế nào để chọn một trang web cá cược phù hợp?

4 Lời khuyên để giành chiến thắng khi cá cược bóng đá

Xu hướng chơi game casino online, Tại sao? Lợi ích

Now what is there beyond the 3rd dimension? Well, the 4th dimension of course! Get ready for some hyper dimensional travel! (Intro) You may say, Isn’t the fourth dimensionjust time?? You could look at it that way, But that isnot what I mean.

We all live in a 3 dimensional world wherewe can move forwards, backwards, left, right up and down, or in other words: along theX, Y and Z axis.

Three perpendicular directions that can describeevery place in our universe.

What if… There was a fourth axis that we could movealong, perpendicular to all 3 other axis: a W-axis.

And define objects with those 4-dimensionalcoordinates Of course, We simple humans can’t perceivethese objects fully, but what we can do is look at some sort of 3D projection, or sectionof those objects.

There are a number of different ways to visualisethese 4D objects.

One very practical and useful way is to createa 3D section of the 4D shape, similar to what the upcoming game “Miegakure” does.

To understand this, I had to get to the sourceof this concept, A short novel named: Flatland.

Flatland tells the story of a 2 dimensionalbeing trying to understand the 3rd dimension.

So you are living on a plane and are tryingto grasp the concept of a 3D object, in this case a sphere.

The only thing we can see is the 2D sectionof that sphere, so a circle.

When the sphere moves along the 3rd dimension, all we can see is a growing and shrinking circle, until it suddenly disappears.

By layering all those sections we can kindof understand what a 3D sphere could look like.

From there we can use the same way of thinkingfor the 4th dimension.

So instead of taking a 2D section of a 3Dobject, We can take a 3D section of a 4D object.

I could create a 4 dimensional object, andthen set the w axis to a certain value, the resulting shape would then be something thatcould be displayed with the 3 remaining axis.

Now, how was I going to create this abstractgeometry and how was going to put it in a game, where all I have is a mathematical equationthat defines its shape.

If only I created something that does thatexact thing but with some other kind of mathematical functions, I don’t know something like:Fractals.

We’re going to use ray marching again! For those of you who need a reminder or havenever heard of ray marching, a ray marcher is a rendering method that draws shapes basedon distances from the camera.

Those distances are defined as formulas.

So What I had to do is define the objectsAs 4 dimensional formulas and let the camera make a 3D section of those shapes at a certainW position.

Tadaa: my first 4D object, a Hypersphere! Well it looks like a regular sphere but theradius of the sphere is not just determined by the x, y and Z direction, now there isa W axis a well.

So if we move our w position with a slider, we can see the sphere growing and shrinking, just like the 2d equivalent earlier, wherethe circle grows and shrinks when we move the sphere back and forth.

Of course none of this looks very exiting, it’s just a round thing that grows and shrinks.

The cool things start when we create otherobjects like a Hypercube and rotate them as well.

Because we Are now creating 4D shapes, wesuddenly have 3 more rotational axis we can play with, the xw, yw and zw planes! Aha, this looks promising! Let’s create some more shapes like a duocilinder, a 5 cell and 16 cell ! Placing these elements in the scene wasn’tvery easy with my old ray marching script, so I gave it an update similar to how Sebastiandid it in his video, where each object can be placed with an empty game object and ascript attached to it.

Of course I had to give it an upgrade to allowthe 4 dimensional movement and rotation by defining those in the inspector.

Now placing objects was as easy as click anddrag! Wonderfull.

There was one problem tough, The rotationdidn’t seem to work the same way as in the inspector… I dug into some unity meta code and realisedthat the order in which the rotations are applied is very important, so after switchingthose around.

The rotation did what it had to do.

I was getting exited and placed way too manyobjects in the scene, resulting in terrible frame rates.

I hadn’t even created a single level yet, and I was already pushing the game to it’s limits.

So I needed some way to optimise all of this:Then, I remembered that the performance of ray marching is heavily dependant on the resolutionof the game.

If I could lower the resolution, without havingit look like a dirty low res game, The game would run much smoother.

That reminded me of a beautiful indie gamecalled “A short hike”.

That game was rendered at a very low resolutionto get more of a pixelated look, while still remaining a full 3D game.

So, I just did the same thing! I let the camera render to a low res rendertexture and set up a second camera that would look at that rendered texture.

badabing, badaboem, 4 times the frame rate! This meant I had to keep everything very simpleand clear, I had planned to use my little astronaut from one of my previous games, andhe was in need of an upgrade to withstand travelling through the 4th dimension, so Idid! A Nic big neck brace! We wouldn’t want a whiplash! I added a cell shader so the colors wouldbe better defined and more clear.

I also created an invisible capsule that followsthe player around to cast a shadow on the ray marched objects.

To decorate the scene, I added some 4 dimensionaltrees and rocks.

The ground plane was given a waving patterncontrolled by a sin wave that was defined by all 4 axis.

So moving W axis would create cool wavy effects.

Because all the shapes were raymarched, Icould very easily apply boolean operators on them, like union, intersect and substract.

Allowing me to create more complex shapes! Like floating islands! Which were various objects intersecting withthe 4D planes.

This gave me a great idea for the gameplay.

Let me explain: You play as the little astronaut who wantsto get back to his ship! But there are of course numerous obstaclesin the way! Luckily there are these convenient buttonsin place that let you turn certain objects into a different boolean operator, so forexample, that cube that is blocking your way, could suddenly become a hole to get through! I created a button and an orb that you couldplace on the button.

However, the orb also lives in the fourthdimension, so the button would only be active at certain w locations, with you can see abovethe slider.

This created many opportunities for cool puzzles! Like a doorway that would appear or a slopethat would change shape and become its inverse.

I created 8 levels in total, each of thembuilding on the previous one, but all with the same goal of getting to your ship! You have to traverse the world and look forpathways throughout the fourth dimension by moving the slider.

If you don’t see anything, it’s probablysomewhere along the 4th dimension! I added a start and level select screen, andwith all of that the game was done.

I released the game on Itch.

io and you canplay it now for free, I’ve also added the 4D framework on GitHub so you can make yourown 4D boolean games! Be sure to like the video if you enjoyed thisjourney into the 4th dimension and subscribe if you want to see more in the future.

And I’ll see you guys next time, where Iwill contemplate the meaning of life.

.

Related Posts

Làm thế nào để chọn một trang web cá cược phù hợp?

Làm thế nào để chọn một trang web cá cược phù hợp?

by Hàng hoá và công luận
December 14, 2021
0
0

Nếu bạn đang tìm kiếm một nhà cái đáng tin cậy tại Việt Nam để xem tỷ lệ kèo Ngoại...

4 Lời khuyên để giành chiến thắng khi cá cược bóng đá

4 Lời khuyên để giành chiến thắng khi cá cược bóng đá

by Hàng hoá và công luận
December 21, 2021
0
0

Tất cả những ai đã từng tham gia cá cược bóng đá chắc chắn đều mơ tưởng về việc cá...

Xu hướng chơi game casino online, Tại sao? Lợi ích

by Hàng hoá và công luận
April 12, 2021
0
0

Ở thời đại công nghệ 4.0 lên ngôi như hiện nay, việc chơi game casino online đang dần trở thành...

RUPRISE S12E06 – WELCYUM TO SNATCH GAME

RUPRISE S12E06 – WELCYUM TO SNATCH GAME

by
August 25, 2020
0
0

don't let me in the bottom no but uh how did you feel about being towards the bottom but I...

Melted Cheese Pictionary Game

Melted Cheese Pictionary Game

by
August 25, 2020
0
0

(rooster crowing)(animal roaring) (wheel clacking) - Welcome to Good Mythical More. We're gonna play Pictionary with cheese. - But first...

Next Post
Stadia GDC 2019 Gaming Announcement

Stadia GDC 2019 Gaming Announcement

Social-Distance With a Nice, Long Game

Social-Distance With a Nice, Long Game

RECOMMENDED

Dự đoán kết quả bóng đá cho các trận đấu EPL sắp tới

Dự đoán kết quả bóng đá cho các trận đấu EPL sắp tới

January 4, 2022
0
Làm thế nào để chọn một trang web cá cược phù hợp?

Làm thế nào để chọn một trang web cá cược phù hợp?

December 14, 2021
0

HIỆP HỘI CHỐNG HÀNG GIẢ VÀ BẢO VỆ THƯƠNG HIỆU VIỆT NAMTRUNG TÂM TƯ VẤN, HỖ TRỢ DOANH NGHIỆP VÀ PHÁT TRIỂN THƯƠNG HIỆU (GBC) Giấy phép số 131/GP - TTDT, Cục Phát thanh truyền hình và Thông tin điện tử - Bộ Thông tin và Truyền thông cấp ngày 8/9/2015 Văn phòng Hà Nội: số 930, đường Trương Định, phường Giáp Bát, quận Hoàng Mai, Hà Nội Văn phòng đại diện tại Hải Phòng: Số 3 Lê Thánh Tông - Quận Ngô Quyền - Tp Hải Phòng. Điện thoại: 024.6260.1324 - 098 111 5848- 0904 658575Email: trungtamgbc@gmail.com Độc giả có thể gửi bài viết qua email: hanghoavacongluan.vn@gmail.com© Ghi rõ nguồn "Hàng hóa và Công luận" khi phát hành lại thông tin từ Website này. (Mọi thông tin lấy từ hanghoavacongluan.vn phải ghi rõ nguồn cấp)

CATEGORY

  • Ẩm thực
  • Chứng khoán
  • Công nghệ
  • Doanh nghiệp
  • Du lịch
  • Đời sống
  • Giải trí
  • Hàng thật – hàng giả
  • Kinh doanh
  • Làm đẹp
  • Ngân hàng
  • Nhà đất
  • Nông sản
  • Ô tô – Xe máy
  • Sức khoẻ
  • Thị trường
  • Thời sự
  • Tiêu dùng
  • Vàng

Đối tác liên kết

Foot.vn - Review giày


Nhiet.vn - Đánh giá sản phẩm

© 2020 Hanghoavacongluan.vn -Trung Tâm Tư Vấn, Hỗ Trợ Doanh Nghiệp Và Phát Triển Thương Hiệu (GBC)

No Result
View All Result
  • Doanh nghiệp
  • Nguyên liệu
  • Chứng khoán
  • Đời sống
  • Ngân hàng
  • Vàng
  • Thị trường
  • Hàng thật – hàng giả
  • Công nghệ
  • Nông sản
  • Food

© 2020 Hanghoavacongluan.vn -Trung Tâm Tư Vấn, Hỗ Trợ Doanh Nghiệp Và Phát Triển Thương Hiệu (GBC)