Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411476 Posts in 69369 Topics- by 58424 Members - Latest Member: FlyingFreeStudios

April 23, 2024, 03:30:38 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsApple and Worm: Patching Holes In Spacetime
Pages: 1 ... 11 12 [13] 14 15 ... 33
Print
Author Topic: Apple and Worm: Patching Holes In Spacetime  (Read 69259 times)
JobLeonard
Level 10
*****



View Profile
« Reply #240 on: November 03, 2017, 08:15:14 AM »

Not unless you can open a portal to Stockholm Tongue

But that particular installation is no longer working  Embarrassed
Logged
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #241 on: November 03, 2017, 08:49:49 AM »

It was worth the shot Tongue

Quick update. Got the transformations between patches completely working. Messy code needs cleaning though.



Logged

JobLeonard
Level 10
*****



View Profile
« Reply #242 on: November 03, 2017, 08:55:42 AM »

what happens if you try to move in a way that you're on all three surfaces?
Logged
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #243 on: November 03, 2017, 09:02:31 AM »

You are always in one specific region at all times. If a transition is detected you have a new region. So if you move outside the bounds and somehow avoid the transition detection there is still interpolation going on from your original region even if it looks like you are on top of the other one. These bezier surfaces actually extrapolate well outside, so it's only a problem if you go far or the surface is too deformed.
Logged

Zorg
Level 9
****



View Profile
« Reply #244 on: November 03, 2017, 10:55:23 AM »

What's going on with the size of the sprite? Did you manually add a size multiplier between the left and right patch?
Logged
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #245 on: November 03, 2017, 12:48:31 PM »

Yes, there is a multiplier, but it's necessary for the transition to be seamless, because an entire side goes to half a side. Without the multiplier the size would be always the same but between these two regions it would snap a little.
Logged

io3 creations
Level 10
*****



View Profile WWW
« Reply #246 on: November 03, 2017, 06:38:40 PM »

What the hell is that? It had me and 2 colleagues staring at this video for several minutes!
Not only I didn't get it but we were three physics grad students staring at it lol. Really cool stuff! I don't know if you posted it before but if you did it went under my radar.

I was wondering about that.  I'm sure it has something to with this ... but can't remember exactly what.  Grin






One of my "artworks" related to space-time I guess. I never shared it in this topic before?

I kind of expected you would get it though, given the game you're making Wink

Here's the basic idea:

- Take a video, preferably slow-motion
- load a number of frames equal to width into memory, creating an X,Y,T cube
- scan through the T,Y plane from one side to the other
- export frames to video
- now the horizontal width your video represents time from left right, and the passage of time represents a spatial dimension.

As a result of this, movement = compression. Just like relativity Wink. If the camera moves, the landscape gets compressed. If things move through the landscape, they get compressed.

This video was taken from a moving bus, which sometimes moves faster, and sometimes slower. And at one point it turns around a corner but the pivot of the turn is outside of the bus, leading to space-time folding in on itself Tongue
At first, based on people's and cars' movements and pixellation, I thought that it was animated.  But the the longer I watched, I wondered if there was a "simpler" way.

Is there a diagram or some kind of visual that illustrates the process?
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #247 on: November 08, 2017, 06:10:47 AM »

I was going to make a new thread to vent about this but figured it wasn't worth it. So it goes here.

Since the game now happens in 2D coordinates that unity doesn't recognize as native I can't really use a lot of its built in systems. Sprites and physics are notable examples. I have my sprite system working already but am I really willing to code my physics solution?

Possibilities:

1) The most basic solution. Tile based collision. Only squares. Can be done quickly. Good for puzzle games but limiting on other mechanics. Almost all those test levels I made that required physics become inviable. I could manually add the behavior of moving blocks to recover some of those levels, but the more creative use of physics are gone. I particularly liked jumping on brick walls from the side, jumping on a rope bridge from below and using the worm-rope to grab onto moving objects.

2) The most complicated solution. Create my own physics solution. It would be identical to Box2D or any other, except the trace calls would go through my curved regions classes. I'm only willing to do this if I find an implementation almost done and ready to use, for free, easy to read and change. Sounds unlikely.

3) A compromise? I don't know. Maybe a simplified physics system that allows for more than the most basic solution. Trace based collision and some impulse resolution for multiple collisions. If I can't find a solution ready to use as described above I could code my own simplified version.

4) Some risky and hacky way of using Unity's physics. Each patch of space on my project is its own coordinate frame with x and y going from 0 to 1. I could set up a scene hidden from the player where I stage the physics objects present in the current patch, simulate the movement there and transpose back. I can't do this for the entire level because the way it's connected is incompatible with the euclidean plane, (patches of space would overlap) so it would have to be for the current patch and neighbor, in the best case scenario. That means the rest of the dynamic objects in the level would have to be either frozen or incapable of transitioning to adjacent patches. This is super hacky! it would surely be a pain in the butt and the source of many bugs.

Considering I have already made some incredibly dumb decisions on this project that made it much more complicated than it should and re-implemented the whole thing 3 times, I'm inclined to go with the simplest solution. However, seeing how the game's charm comes from exploring curved space I feel like I'm compromising too much by ditching a proper physics simulation. You are an apple jumping on physicists' heads, after all!

I shall ponder further about things and stuff  Gentleman
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #248 on: November 08, 2017, 07:45:44 AM »

Unity: it's great as long as you do the same thing everyone else does!
Logged
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #249 on: November 08, 2017, 02:51:13 PM »

lol In a nutshell, yeah.

But in Unity's defense, you can do a lot worse than Unity when it comes to flexibility. The fact I can implement my own solutions for everything inside the engine is a good thing.

Also, I just found an open source 2d physics solution called Farseer. Works perfectly. But it's waaaay too complex and full of features. I really prefer doing something simpler from scratch than diving into a huge code someone else made.
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #250 on: November 08, 2017, 08:40:44 PM »



Found a an article showing how to build a very basic physics engine and decided to implement it myself. It works. And the code is extremely simple and easy to work from (compared to my previous expectations at least). I might have a good starting point!
Logged

Zorg
Level 9
****



View Profile
« Reply #251 on: November 09, 2017, 12:13:37 AM »

Long ago i stumbled upon this site https://wildbunny.co.uk/blog/2011/04/20/collision-detection-for-dummies/ which explains the basics of discrete and continuous collision detection (and a physics engine) with nice interactive examples. Found it very interesting, but never implemented it.
Logged
oahda
Level 10
*****



View Profile
« Reply #252 on: November 09, 2017, 12:28:38 AM »

It's so cool to see you're not just giving up on thus but are trying to come up with good solutions and are outlining them all to us! Coffee
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #253 on: November 09, 2017, 05:24:03 AM »

Honestly, I wouldn't be surprised if you end up with code so customised that the only thing Unity does is handle the cross-platform side of things.

So is your physics engine relativistic or newtonian? Durr...?

Are the clipping issues game-breaking or acceptable compromises?

By the way, since you're a physics guy, and since you're implementing your own stuff now, this might be relevant to your interests:

https://forums.tigsource.com/index.php?topic=62379.0

An introduction to the Clifford Algebra and why it is much nicer than the existing calculus in a 2D/3D engine context, with a ready-to-use javascript library linked as well (the whole bivector thing makes much more sense to me than the cross product ever did).
Logged
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #254 on: November 09, 2017, 07:03:34 AM »

Long ago i stumbled upon this site https://wildbunny.co.uk/blog/2011/04/20/collision-detection-for-dummies/ which explains the basics of discrete and continuous collision detection (and a physics engine) with nice interactive examples. Found it very interesting, but never implemented it.

Thanks for that! I knew nothing about physics engines until yesterday so any references are appreciated.

It's so cool to see you're not just giving up on thus but are trying to come up with good solutions and are outlining them all to us! Coffee

Absolutely. I'm too stubborn to quit Tongue Also, while I have important things due yesterday you can bet I will be working on this game or other side projects to distract me from the hardships of life.

Honestly, I wouldn't be surprised if you end up with code so customised that the only thing Unity does is handle the cross-platform side of things.

So is your physics engine relativistic or newtonian? Durr...?

Are the clipping issues game-breaking or acceptable compromises?

By the way, since you're a physics guy, and since you're implementing your own stuff now, this might be relevant to your interests:

https://forums.tigsource.com/index.php?topic=62379.0

An introduction to the Clifford Algebra and why it is much nicer than the existing calculus in a 2D/3D engine context, with a ready-to-use javascript library linked as well (the whole bivector thing makes much more sense to me than the cross product ever did).

Ooh! Clifford algebra. That was almost my graduation dissertation theme but switched to something else. I don't think I do anything too sophisticated to require though.

About the clipping and general state of the simulation. I have no idea if this will be usable yet. I'm optimistic but it will require a lot of tweaking to be acceptable, that's for sure. I do know the actual game will never have that much stuff bouncing around though. And the nice thing about doing it from almost scratch is that I don't have to deal only with exposed parameters and hope I know what they mean, I can hard code the thing to behave how I want it to!

All rightie, I really do need to forget about this project for a few days now. Hardships of life are harder than usual. Actually, here's a good advice for all of you making your own games: always stop working when things are looking promising, it makes getting back on it so much easier.
Logged

io3 creations
Level 10
*****



View Profile WWW
« Reply #255 on: November 09, 2017, 11:16:37 AM »

It was worth the shot Tongue

Quick update. Got the transformations between patches completely working. Messy code needs cleaning though.


So, if you move in a clockwise direction between those patches, you increase in size and turn upside down after one loop?
Logged

io3 creations
Level 10
*****



View Profile WWW
« Reply #256 on: November 09, 2017, 11:18:35 AM »

Unity: it's great as long as you do the same thing everyone else does!
You mean Newtonian physics, right? Grin


lol In a nutshell, yeah.

But in Unity's defense, you can do a lot worse than Unity when it comes to flexibility. The fact I can implement my own solutions for everything inside the engine is a good thing.
I agree.  I wasn't interested in Prefabs or the Unity UI and fortunately found that I could do what I wanted with programming.

Honestly, I wouldn't be surprised if you end up with code so customised that the only thing Unity does is handle the cross-platform side of things.
... and graphics
... and sounds
... and input
Wink


And of course, how can you argue with:
Quote
"Unity is the ultimate game development platform. Use Unity to build high-quality 3D and 2D games, deploy them across mobile, desktop, VR/AR, consoles or the Web, and connect with loyal and enthusiastic players and customers."
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #257 on: November 09, 2017, 12:03:59 PM »


So, if you move in a clockwise direction between those patches, you increase in size and turn upside down after one loop?

Yup. And shrink by going the other way. I'll have to impose a limit by hand before the engine starts to bug out with divisions by zero Tongue
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #258 on: November 10, 2017, 06:34:19 AM »

And of course, how can you argue with:
Quote
"Unity is the ultimate game development platform. Use Unity to build high-quality 3D and 2D games, deploy them across mobile, desktop, VR/AR, consoles or the Web, and connect with loyal and enthusiastic players and customers."
Well, they still haven't fixed the most basic of VSync bugs, leading to maximising CPU usage on all Linux machines even when a game idles.
Logged
io3 creations
Level 10
*****



View Profile WWW
« Reply #259 on: November 10, 2017, 11:08:27 AM »


So, if you move in a clockwise direction between those patches, you increase in size and turn upside down after one loop?

Yup. And shrink by going the other way. I'll have to impose a limit by hand before the engine starts to bug out with divisions by zero Tongue
Sweet (apple)! Wink

Yeah, you don't want the character to actually ... disappear. Grin   It's better to leave that for washing machines that taking *magically* transport socks to parallel universes.  Wizard
Logged

Pages: 1 ... 11 12 [13] 14 15 ... 33
Print
Jump to:  

Theme orange-lt created by panic