This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Tjakka5's profile picture

Opinions of the idea of this game?

Started by Tjakka5, 30 June 2013 - 09:59 AM
Tjakka5 #1
Posted 30 June 2013 - 11:59 AM
Hey guys,

Me and my friend had a idea for a game (Mainly me), and we want to know your opinions on it.


The basic idea is that you are a person, stuck in a weird world, where floating objects… float around, and all have their own gravity force.

The goal is to use these objects in your advantage to solve puzzles, and get to the end of a level.
All the objects are interactive, meaning you can move them around, crash them into other objects, and even 'move' gravity(mass) from 1 object to another.

The game will be programmed in c++ and will be 2D.


This is just our basic idea for now, what do you think of it?



Edit: Wow, that's awesome 150th post. :)/>
oWave #2
Posted 30 June 2013 - 12:07 PM
It sounds really interesting and funny. You should try and create an alpha for testing. Then I could tell you more
Tjakka5 #3
Posted 30 June 2013 - 12:16 PM
We won't start development for a couple weeks as we're both quire busy.

However, I will try to make a littke sketch and post it herebto show how ut looks like.
Tjakka5 #4
Posted 01 July 2013 - 12:28 PM
Humpediebump-a-dumb?
ikke009 #5
Posted 01 July 2013 - 12:39 PM
you realise that theres some pretty complicated physics if you wanna have multiple objects with gravity interact with each other?
It'll be very hard to simulate if you're not using an engine.. So good luck with that ;)/>
Tjakka5 #6
Posted 01 July 2013 - 01:12 PM
you realise that theres some pretty complicated physics if you wanna have multiple objects with gravity interact with each other?
It'll be very hard to simulate if you're not using an engine.. So good luck with that ;)/>

We know, we might even switch up the whole idea of the game. :D/>
TorakTu #7
Posted 02 July 2013 - 07:55 AM
you realise that theres some pretty complicated physics if you wanna have multiple objects with gravity interact with each other?
It'll be very hard to simulate if you're not using an engine.. So good luck with that ;)/>

We know, we might even switch up the whole idea of the game. :D/>

If this was more in 3D I would have been interested in seeing this for myself. I love indie games, just not 2D ones. I left the 80's behind. I'm all about 3D games now.
Yevano #8
Posted 02 July 2013 - 08:13 AM
you realise that theres some pretty complicated physics if you wanna have multiple objects with gravity interact with each other?

Actually the physics for Newtonian gravitational forces are pretty easy to calculate. The force of object A pulling object B is the inverse square of the distance between the objects, multiplied by their combined masses. Basically: F = (GM/d^2). Where G is a gravitational constant you want to impose, M is the combination of masses, and d is the distance between the objects.
billysback #9
Posted 02 July 2013 - 08:19 AM
but it's not as simple as calculating the force, you have to then decide which direction… I guess you could just get the forces acting on you, split them to left and right (off of the current trajectory), add up the forces acting in both directions, make the left force negative and add both sides together, this then gives you your change in trajectory, so a negative one would push you left and a positive one would push you right, the hard part would be deciding how much it changes your direction based off of the force…

I dunno, there is most likely a far more mathematical way to do it, this is just me thinking out loud.
also, this is a little off topic, sorry
Yevano #10
Posted 02 July 2013 - 08:56 AM
but it's not as simple as calculating the force, you have to then decide which direction…

The force vector (direction) is just the normalized difference between the two object vectors. Don't ask me how to normalize a vector, because I kind of forgot. :P/>

You can use this equation:



If you don't know about vector normalization, it basically makes it so that the vector points in the same direction as the original, but its length is also equal to 1.
Mackan90096 #11
Posted 02 July 2013 - 09:29 AM
Seems cool but that the code will be complicated.
billysback #12
Posted 02 July 2013 - 09:57 AM
You can use this equation:



If you don't know about vector normalization, it basically makes it so that the vector points in the same direction as the original, but its length is also equal to 1.

could you link to an explanation of this equation? I couldn't find anything via google..
Yevano #13
Posted 02 July 2013 - 10:09 AM
could you link to an explanation of this equation? I couldn't find anything via google..

I found the formula on an eHow page. :P/> The formula looks complex, but it just divides the vector by its length. Length, in case you don't know, is the distance of the vector from the origin vector (0, 0). So if we want to normalize a vector like (24, 32), we start by getting its length, which is the square root of the sum of the squares of the vector's components (this is using the Pythagorean theorem). We get sqrt(24^2 + 32^2) = 40 (what a nice even number :P/>). Remember that this just means that (24, 32) is 40 units away from (0, 0). To normalize the vector, we dive the vector by its length (40). Our resulting normalized vector is (0.6, 0.8). This vector points in the same direction as our original vector and has a length of 1. I hope my explanation was easy to understand.
ikke009 #14
Posted 02 July 2013 - 01:28 PM
you realise that theres some pretty complicated physics if you wanna have multiple objects with gravity interact with each other?

Actually the physics for Newtonian gravitational forces are pretty easy to calculate. The force of object A pulling object B is the inverse square of the distance between the objects, multiplied by their combined masses. Basically: F = (GM/d^2). Where G is a gravitational constant you want to impose, M is the combination of masses, and d is the distance between the objects.

Oh I didn't know that. That is by the way almost exactly the same function as the force between two atoms, but in chemophysics we use that function to calculate the vibration frequency between atoms in infrared spectroscopy.. Funny how those formulas can be scaled up so much..
On topic though, how would you simulate such a thing.. The only way I can think of is by using differential equations (dV/dt), which would be a fun bit of homework given your last functions for unit(V)
Tjakka5 #15
Posted 02 July 2013 - 01:35 PM
13 posts, and only 1 posts of someone else that stayed on topic, xD
Also, I see Lyqyd down there…
I wonder what he's up to…
Lyqyd #16
Posted 02 July 2013 - 01:43 PM
No, the physics/mathematics are actually quite complicated, such that no general solution to the n-body problem is known to exist.
Tjakka5 #17
Posted 02 July 2013 - 02:13 PM
Goodness, even a moderator didnt stay on topic?


Remember guys, we want opinions, not math. xD
ikke009 #18
Posted 02 July 2013 - 02:22 PM
No, the physics/mathematics are actually quite complicated, such that no general solution to the n-body problem is known to exist.
Yeah that's more like the math I imagined for this xD
It's still possible to simulate though I think, though maybe in a simplified form.. If you differentiate the vectors for each moving planet you can probably give this equation for every planet without breaking the whole simulation:
Vx(t+dt) = Vx + ((dVx/dt induced by other planet 1) + (dVx/dt induced by other planet 2) + …)*dt

I have no idea if that would actually work though, but it seems legit :P/>

by the way tjakka, welcome to the world of forums, where no post is ever completely on-topic and where you should just go with the flow of the conversation
My opinion though: Don't do gravity, it hurts your brain
Tjakka5 #19
Posted 02 July 2013 - 02:25 PM
Hehe, wi'll use simple gravity then. :P/>

But does anyone like the idea of the game, thatz what I am wondering.
Yevano #20
Posted 02 July 2013 - 02:56 PM
The math to the n-body problem is complicated, but one does not need to know all future and past motions of a system of point-masses in order to approximate a simulation of gravity between an arbitrary number of objects. For the simulation, you can simply apply the gravitational force to all bodies per game tick.

@Tjakka5: I would try to make something like a sandbox game out of this. It's a cool idea, but I think I've seen it done on the forum here before. Not to say that means you shouldn't try, just a suggestion to find a way to make your game unique.
Tjakka5 #21
Posted 02 July 2013 - 03:11 PM
I was actually thinking of making it a sandbox too!
Will definatly consider this with ny friend!
Pharap #22
Posted 08 July 2013 - 01:31 AM
I'd consider helping a bit if you can decide on a framework/engine and the like.
Here's hoping it stays afloat more than any of my game projects ever have.

*has 5 different versions of the same game, only one of them actually got to the stage where something was drawn to screen*

Oh procrastination, why must you curse all programmers.