to like this
and i want to create something like this but only using 2d graphics and also want to make an spaceship to rotate around the star like in real life.Any ideas how to make it ?
The way the interior of the ring around the sun becomes more visible as the camera moves would be a massive pita in 2D imo (some shader sorcery perhaps). Seems more likely this is a 3D scene with a low poly aesthetic and a static camera angle, with a low FPS animation style making it appear 2D-ish.
The ship being 2D is entirely reasonable, would just need to create a flipbook of available rotation angles from a static viewpoint, though again, probably isn’t 2D because why bother.
If that star’s 2D… notice how it looks round? That’s probs just the animation being good but it definitely looks at the very least like a recording of a 3D object being played there.
It wouldn’t really work for the sun, being the light source itself, but if you want 2D planets to look round via shadows, try this:
moving the ship 2dSprite around a fixed path. just the look of it. you could do some smoothing or add more points. depending on your end goals. if you just want the look of something over a realistic orbit.
Secondly, normal maps are about shadows. You can’t really cast shadows on the sun, so you probably don’t need one for it.
(In the event that a visible shadow is successfully cast on the sun, we will have much bigger problems than game development)
What I meant by ‘recording’ was, it looks like a rotating 3D object. If it isn’t, it’s probably a video of a 3D model being rotated - notice how sunspots seem to appear and disappear at the sides - with some particle effects thrown in.
yes you are right there is no shadows on the sun but with this normal map it looks more realistic but its now just becoming invisible (
I am thinking maybe just this space scene create like 3d scene and the spaceship 3d too? Maybe that will be easier but is there any way to make 3d ball use that my pixel sun texture ?Okay i just understand that i cant use that 3d because i dont know how to texture and animate a 3d ball in godot with sprite sheet
Your pixel sun looks good, but there has to be a better way to code the flight path than to brute force it like that. I’d use the actual equation of a circle for that (maths I know). Try the old (x – h)^2 + (y – k)^2 = r^2 which in gdscript is pow((x – h), 2) + pow((y – k), 2) - pow(r, 2) = 0.
(h, k) is the (x, y) of the middle of the path and r is its radius. Though you’d probably have to convert that into two functions, one for each half-circle. So that’s if y <= k:
[tab]x = h - pow((pow((y – k), 2) - pow(r, 2)), 0.5) else:
[tab]x = h + pow((pow((y – k), 2) - pow(r, 2)), 0.5)
…maybe.
Honestly I don’t trust that I got that right but if you want a good circle you will absolutely need something like that. And about the rotation of the ship, you could probably teleport something to you at the end of each frame, then before it teleports to you again next frame, get the angle from it to you and point the sprite that way. Hope this helps