Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / please take a look at my (poor mans) sony psp xmb menu wave background recreation.

Author
Message
zero32
7
Years of Service
User Offline
Joined: 28th Jul 2016
Location:
Posted: 19th Jun 2017 07:56 Edited at: 19th Jun 2017 08:18
Hey @all

have mad some progress with my other projects and i want to make them available on my website. but first i want to update that ugly thing i call my website. i had the idea to make it look like the xmb menu from the sony psp.
but before i get my hands dirty with javascript i want to see if i can get that wave background look right. as far as i know the waves on the psp are bezier curves.

i want to know if you think that the waves move like the ones from the psp.
and if not, maybe one of you can provide some ideas on how i could improve the movement?

the way i did it is that the anchors move around at random speed, changing speed to another random speed everytime the angle (used with sin and cos) overflows 359 and wraps to 0.
i'm no maths expert so the code itself is a huge pile of... a mess

here is my code:

set the first 3 globals to 1 to see whats going on.

Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 19th Jun 2017 09:02
I am not the one to answer because I've never used a Sony PSP. just wanted to say that the waves look pretty cool. Would love to see the end result.
zero32
7
Years of Service
User Offline
Joined: 28th Jul 2016
Location:
Posted: 20th Jun 2017 16:39
thank you for your kind words.

i'm sure that i can improve the wave motion in some ways, but i guess i must wait until my repair kit arrives so i can get my psp to work again.
until then, i updated my code so it looks more like what i want to do. code is still a mess

i had to write my own line function, the standard line function has issues with lock pixels/unlock pixels in for loops.
for the width, i just made a for loop that draws additional pixels below any pixel the line function draws. i think i need a better way to calc and draw the width.
for every pixel, before it get's drawn to the screen, it interpolates color with the pixel that's already on the screen, resulting in transparency.

Attachments

Login to view attachments
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 14th Jul 2017 06:32
Tried using sprites instead of drawing all those pixels? I tried running it and it only ran at 14fps for me and the curves didn't appear to change, only move up and down.

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Login to post a reply

Server time is: 2024-04-19 18:32:27
Your offset time is: 2024-04-19 18:32:27