Planet Generator

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Planet Generator

Post by Davidobot »

Just a basic planet generator. Might use it in a future project.

Controls:
Z - Toggle Shader
Space - Generate new planet

Runs LOVE 0.9.0
Attachments
PlanetGeneration.love
(1.08 MiB) Downloaded 596 times
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
jjmafiae
Party member
Posts: 1331
Joined: Tue Jul 24, 2012 8:22 am

Re: Planet Generator

Post by jjmafiae »

it could be awesome if you decreased the size of the pixels on the planets, but great job!
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Planet Generator

Post by Davidobot »

jjmafiae wrote:it could be awesome if you decreased the size of the pixels on the planets, but great job!
They are pretty small, it's just the tiles are 64x64.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
bekey
Party member
Posts: 255
Joined: Tue Sep 03, 2013 6:27 pm

[]

Post by bekey »

-snip-
Last edited by bekey on Fri Jan 24, 2014 1:42 am, edited 2 times in total.
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Planet Generator

Post by Davidobot »

bekey wrote:Permission to use this in gravinull? That'd be great to fake balls in 2D.
Sure! :awesome:
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
ArchAngel075
Party member
Posts: 319
Joined: Mon Jun 24, 2013 5:16 am

Re: Planet Generator

Post by ArchAngel075 »

Great stuff!
Why does this remind me of Starmade haha....

-edit-

Actually is it possible to change the direction the balls spin in? like an angle?
Be amazing because this is EXACTLY what I would need for my upcoming remake of InsanityEngine for LOVE 0.9.0!

Permission to use for said remake if the direction change is possible?
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Planet Generator

Post by Davidobot »

ArchAngel075 wrote:Great stuff!
Why does this remind me of Starmade haha....
Thank you! :awesome:
ArchAngel075 wrote: Actually is it possible to change the direction the balls spin in? like an angle?
Be amazing because this is EXACTLY what I would need for my upcoming remake of InsanityEngine for LOVE 0.9.0!
You can try to, I included a new version of the generator where you can mess around with the shader. :megagrin:
ArchAngel075 wrote: Permission to use for said remake if the direction change is possible?
And sure! :monocle:
Attachments
PlanetGeneration.love
(1.08 MiB) Downloaded 209 times
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
ArchAngel075
Party member
Posts: 319
Joined: Mon Jun 24, 2013 5:16 am

Re: Planet Generator

Post by ArchAngel075 »

I have tried making the spheres "roll" in another direction, yet I can't find out what exactly controls the direction...
Any advice on where to look or can you perhaps point me at what I should change to change the direction of roll?
Germanunkol
Party member
Posts: 712
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: Planet Generator

Post by Germanunkol »

ArchAngel075 wrote: Any advice on where to look or can you perhaps point me at what I should change to change the direction of roll?
It's in the shader code at the top of main.lua. There are two lines, defining number x3 and number y3.
The x3 is modified by the time value, which makes it scroll along the x-axis. For a first try, simply change the + to a - infront of time: that way it scrolls in the other direction.

If you also want to turn into the y direction, add the mod function to that line as well. Then modify the y3 value by time, just like above. For example:

Code: Select all

 
		   number x3 = mod(p2.x / (pi2) + 0.5 - time, 1.0);
		   number y3 = mod(p2.y / (pi2) + 0.5 - 2*time, 1.0);
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
User avatar
ArchAngel075
Party member
Posts: 319
Joined: Mon Jun 24, 2013 5:16 am

Re: Planet Generator

Post by ArchAngel075 »

Amazing!
Ive managed to tweak everything to now use player keys UHJK as WASD keys to direct the ball :D

I also found where position is handled.

My only concern is the direction totally relies on the v.time variable.
My goal is to be able to get an angle and convert it "into" v.time so that the angle the ball rolls in is changeable to a greater degree.

For instance, take the ball position and mouse position, get the atan2, or angle between them and make the ball roll with that angle - essentially roll towards the mouse.

The reason for this is im interested in the graphics style of BaboViolent and its simple yet functional character models. :P

If anyone is keen i can upload the modified .love with the changes ive made :)
Post Reply

Who is online

Users browsing this forum: No registered users and 77 guests