Zsenilia (256Kb intro by Resistance)
Moderator: Mask of Destiny
Zsenilia (256Kb intro by Resistance)
Hello,
it turns out this is my first post on Sprites Mind, but I've been lurking around and playing with the (amazing) SGDK for quite a while
Working with the demoscene groupe called "Resistance", we released a couple of days after Christmas a small demoscene intro for the Megadrive.
It is entirely writen in C, using the SGDK with a few (and dirty) tweaks.
Here is a Youtube capture :
Here is the link on Pouet.net :
http://www.pouet.net/prod.php?which=66742
I hope you will enjoy this little prod as much as we did when making it
it turns out this is my first post on Sprites Mind, but I've been lurking around and playing with the (amazing) SGDK for quite a while
Working with the demoscene groupe called "Resistance", we released a couple of days after Christmas a small demoscene intro for the Megadrive.
It is entirely writen in C, using the SGDK with a few (and dirty) tweaks.
Here is a Youtube capture :
Here is the link on Pouet.net :
http://www.pouet.net/prod.php?which=66742
I hope you will enjoy this little prod as much as we did when making it
640 polygons are enough for everyone.
Re: Zsenilia (256Kb intro by Resistance)
Thanks!!
Would be possible to release the src? I'm quite interesting in learning how those balls work.
Anyway, I've uploaded this demo in my Youtube Channel you can use as a mirror If you want.
(Travel Demo it was uploaded as well)
Would be possible to release the src? I'm quite interesting in learning how those balls work.
Anyway, I've uploaded this demo in my Youtube Channel you can use as a mirror If you want.
(Travel Demo it was uploaded as well)
Re: Zsenilia (256Kb intro by Resistance)
Sorry for spoiling it for you, but just checked and they're just sprites =P (and like 60% of the table only, 48 sprites). Layer priority is used to make them go behind and in front of the graffiti (which is plane A), if you wonder. (the background is plane B, predictably)
The paths may be more interesting. I know how those are made, they're just sines and cosines added together, but coming up with a combination of those that looks good is the hard part. You can happily spend just a few minutes getting the graphics on screen and hours trying to make a single path XD
The paths may be more interesting. I know how those are made, they're just sines and cosines added together, but coming up with a combination of those that looks good is the hard part. You can happily spend just a few minutes getting the graphics on screen and hours trying to make a single path XD
Sik is pronounced as "seek", not as "sick".
Re: Zsenilia (256Kb intro by Resistance)
yes, a lot of these demos are "basic" math
the art comes from the ways this math is used...
i made one myself...12years ago
http://gendev.spritesmind.net/page-stdream.html
I forgot to release the code, so I added it today !
the art comes from the ways this math is used...
i made one myself...12years ago
http://gendev.spritesmind.net/page-stdream.html
I forgot to release the code, so I added it today !
Re: Zsenilia (256Kb intro by Resistance)
@Sik
I already knew that balls were simply sprites put together but as you said create a sinus/cos line and put together at least for me it's really complicated.
PD: Thanks KanedaFr for the code. I'll check it ASAP
I already knew that balls were simply sprites put together but as you said create a sinus/cos line and put together at least for me it's really complicated.
PD: Thanks KanedaFr for the code. I'll check it ASAP
Re: Zsenilia (256Kb intro by Resistance)
Thanks for your feedbacks, guys.
As Sik mentionned, this intro is mainly made using a table of sprites, with a separate table of attributes to tell them, individually, when to remain behind the logo's layer.
The sin/cos was the fun part indeed. You might find interesting (or not at all) that the cos/sin tables are mainly precalculated, using a piece of Python code :
As Sik mentionned, this intro is mainly made using a table of sprites, with a separate table of attributes to tell them, individually, when to remain behind the logo's layer.
The sin/cos was the fun part indeed. You might find interesting (or not at all) that the cos/sin tables are mainly precalculated, using a piece of Python code :
Code: Select all
# Classic lissajou
def traj0x(a):
traj_x_amplitude = 128
return scr_x_center + int(traj_x_amplitude * math.cos(3.0 * a * math.pi / (rotation_steps / 4.0)))
def traj0y(a):
traj_y_amplitude = 64
return scr_y_center + int(traj_y_amplitude * math.sin(2.0 * a * math.pi / (rotation_steps / 4.0)))
# Pseudo bouncing
def bounce0x(a):
a *= 2.0
traj_x_amplitude = 128
return scr_x_center + int(traj_x_amplitude * math.cos(a * math.pi / (rotation_steps / 4.0)))
def bounce0y(a):
s0 = traj0y(a)
a *= 2.0
a += (math.pi * 0.353857)
traj_y_amplitude = 64
s = math.sin(2.0 * a * math.pi / (rotation_steps / 4.0))
s *= 1.0 - ((1.0 + math.cos(8.0 * a * math.pi / (rotation_steps / 4.0))) * 0.05)
s = 1.0 - abs(s)
s = 2.0 * (s - 0.5)
s *= (traj_y_amplitude * 1.45)
s -= 4
s = scr_y_center + s
s = (s + s0) * 0.5
return int(s)
# Alternate Lissajou
def traj1x(a):
traj_x_amplitude = 128
return scr_x_center + int(traj_x_amplitude * math.sin(2.0 * a * math.pi / (rotation_steps / 4.0)))
def traj1y(a):
traj_y_amplitude = 64
return scr_y_center + int(traj_y_amplitude * math.cos(5.0 * a * math.pi / (rotation_steps / 4.0)))
# Alternate Lissajou 2
def traj2x(a):
traj_x_amplitude = 128
s0 = traj_x_amplitude * math.sin(2.0 * a * math.pi / (rotation_steps / 4.0))
s1 = traj_x_amplitude * math.cos(9.0 * a * math.pi / (rotation_steps / 4.0))
s = 0.75 * s0 + 0.25 * s1
return scr_x_center + int(s)
def traj2y(a):
traj_y_amplitude = 64
s0 = traj_y_amplitude * math.cos(5.0 * a * math.pi / (rotation_steps / 4.0))
s1 = traj_y_amplitude * math.sin(1.0 * a * math.pi / (rotation_steps / 4.0))
s = 0.8 * s0 + 0.2 * s1
s *= 1.15
s += 4
return scr_y_center + int(s)
640 polygons are enough for everyone.
Re: Zsenilia (256Kb intro by Resistance)
Too much maths for a stupid guy xDD
I can't underestand nothing, but thanks a lot for sharing these piece of code.
I can't underestand nothing, but thanks a lot for sharing these piece of code.
Re: Zsenilia (256Kb intro by Resistance)
There's no such thing as a "stupid guy".
It seems complicated once turned into Python, but all you need to know is the basics of parametric equations :
The most basic figure you want to draw using a parametric equation is a circle :
http://mathworld.wolfram.com/ParametricEquations.html
Then, you can start playing with frequencies and draw some wavy figures :
http://mathworld.wolfram.com/LissajousCurve.html
If you want to 'live experiment' such equations, I suggest Wolfram Alpha :
http://goo.gl/Prtrr4
'hope this will make it less obscure
It seems complicated once turned into Python, but all you need to know is the basics of parametric equations :
The most basic figure you want to draw using a parametric equation is a circle :
http://mathworld.wolfram.com/ParametricEquations.html
Then, you can start playing with frequencies and draw some wavy figures :
http://mathworld.wolfram.com/LissajousCurve.html
If you want to 'live experiment' such equations, I suggest Wolfram Alpha :
http://goo.gl/Prtrr4
'hope this will make it less obscure
640 polygons are enough for everyone.
Re: Zsenilia (256Kb intro by Resistance)
Much better now!
Its time to learn I guess!!
Its time to learn I guess!!
Re: Zsenilia (256Kb intro by Resistance)
Dude you'd sail this sort of stuff! I've seen your coding abilities you'll be finenolddor wrote:Much better now!
Its time to learn I guess!!
Last edited by matteus on Tue Jan 05, 2016 10:04 pm, edited 1 time in total.
Re: Zsenilia (256Kb intro by Resistance)
Have I got any code abilities? xDDDDDDD
Anyway, It seems to be that you need some math knowledge to reach this kind of movements... It's not related to code ability
Anyway, It seems to be that you need some math knowledge to reach this kind of movements... It's not related to code ability
Re: Zsenilia (256Kb intro by Resistance)
It was one of the courses I enjoyed the most at college :')
Back then I wouldn't have imagined it will help me 25 years later!
It was more or less like this :
Back then I wouldn't have imagined it will help me 25 years later!
It was more or less like this :
640 polygons are enough for everyone.
Re: Zsenilia (256Kb intro by Resistance)
The source code was pushed on Github :
https://github.com/ResistanceVault/demo-Zsenilia
https://github.com/ResistanceVault/demo-Zsenilia
640 polygons are enough for everyone.