![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on Fractal Universe V1 within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Fractal Universe V1 for Sony PSP by Art 2009 PSP Version: Canon Digital Camera Version: Hi Guys. This is my ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
![]() ![]() Bush Programmer
|
Fractal Universe V1 for Sony PSP by Art 2009
PSP Version: ![]() ![]() ![]() Canon Digital Camera Version: ![]() Hi Guys. This is my first version of Fractal Universe for the PSP. I wasn't going to write any more PSP apps since I'm actively programming for another platform and all, but this one was actually done to speed up the process of writing the same program to run on another platform (and then I got carried away with it). This is a relatively fast Mandelbrot set fractal explorer. You can move left, right , up, down, and zoom in & out of the image you see at any time. The fractal universe is limitless, and you can zoom in as many times as you like without losing any detail. You can also save an image to Memory Stick. Download backup link: Send big files the easy way. Files too large for email attachments? No problem! Cheers, Art. Last edited by Art; 07-04-2009 at 12:29 AM.. |
|
|
|
|
|
#2 |
![]() Developer and Tutor.
My Mood:
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,646
Trader Feedback: 0
|
Nice Art i love the apps and programs that you make you always provide screenshots and good documentation aswell, well done
__________________
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference. My Website: is down for a while ... I'll bring a new one back soon. Currently working on: (0) PGE Gears Of War - On hold (Very large project). (0) PS???? - A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix). |
|
|
|
|
|
#5 |
![]() ![]() Bush Programmer
|
It's pretty intensive work for the computer to render a fractal.
This algorithm is "relatively" fast (ie. faster than some other algorithms out there). The PSP isn't the fastest platform to run it on though. It takes some seconds to render each frame. The previous PSP fractal explorer was able to do it faster sacrificing quality. This one should be virtually infinite (for as long as you can keep dividing a double precision float by 2), which means you can keep zooming in forever and not lose any detail. |
|
|
|
|
|
#7 |
![]() Developer and Tutor.
My Mood:
Join Date: Jul 2007
Real First Name: Craig
Location: Widnes, England
Just Played: Life.
Posts: 1,646
Trader Feedback: 0
|
o_O the quality is fine, you zoomed in so you get more black, what did you expect it to look like that is not pixilated! good quality.
__________________
------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference. My Website: is down for a while ... I'll bring a new one back soon. Currently working on: (0) PGE Gears Of War - On hold (Very large project). (0) PS???? - A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix). |
|
|
|
|
|
#8 |
![]() ![]() Developer
|
Pretty Nice, Art, I tried it.
I have been working on the same topic, in Lua. I found the whole script on my laptop. Code:
depth,x0,y0,x1,y1 = 32,-1,-1,1,1
--x0 = -0.65
--y0 = -0.7
--x1 = -0.5
--y1 = -0.6
collist = {}
for i=0,depth do
b = math.floor(i / depth * 1024)
if b > 255 then
b = 255
end
g = math.floor((i - depth / 3) / depth * 1024)
if g > 255 then
g = 255
end
if g < 0 then
g = 0
end
r = math.floor((i - depth / 3 * 2) / depth * 1024)
if r > 255 then
r = 255
end
if r < 0 then
r = 0
end
collist[i] = Color.new(r, g, b)
end
collist[depth-1] = Color.new(0, 0, 0)
-- Drawing Fractal
w,h=480,272
render = Image.createEmpty(480,272)
deltax = x1 - x0
deltay = y1 - y0
for y=0,h-1 do
for x=0,w-1 do
r = 0; n = 0; b = x / w * deltax + x0; e = y / h * deltay + y0; i = 0
while i < depth-1 and r * r < 4 do
d = r; r = r * r - n * n + b; n = 2 * d * n + e; i = i + 1
end
render:pixel(x, y, collist[i])
end
screen:blit(0, 0, render)
screen.waitVblankStart()
screen.flip()
end
while true do
screen.waitVblankStart()
screen:flip()
end
And result:
__________________
00:00: Windows is loading...Come back tomorrow. 01:00 : Booting done.Not yet errors encountered... 01:10: Fatal error.Windows has been detected on logical drive 01:22: Keyboard Locked, try everything. 01:42 : Mouse Device Pilot not found, or uninstalled.Press Left-Bouton to continue. 01:50 : Ending User session.Do you want to play another game ? 01:59: Not enough memory.Only 508'312'583 bytes available. 02:00 : System is shutting Down. |
|
|
|
|
|
#10 |
![]() Pro Hacker
|
They are nice for screensaver.
Is it possible to make it ?
__________________
Phat PSP 1004 TA-079 v3+Sony 16GB Mark II with 5.00 m33-6+1.50 kernel+5.01 patch+6.10 version.txt iPhone jailbroken with OS 3.0 PS2 Slim model SCPH-75004 + MC boot 1.8 Fujitsu Simens Amilo PA1510+2.5GB Ram+AMD Sempron 3400+ 1.8GHz+Windows XP My site My qj blog My guides Patch the 5.50/6.00 games to work with all FWs My CWCheat databases ![]() ![]() ![]() ![]()
|
|
|
|
|
|
#12 |
![]() ![]() ¡Éste es Spartaaaaaaa!
|
Sometimes my memory stick led keeps blinking for ever when I use this.
You should have a list of "known to look cool" color palletes
__________________
You didn't hear it.
You didn't see it. You won't say nothing to no one, never in your life. You never heard it. How absurd it all seems without any proof. |
|
|
|
|
|
#13 | |
![]() ![]() Bush Programmer
|
Quote:
I have a fix that will allow many more levels of detail: ![]() And note you can't see the transition between colours. This level of detail at high zoom costs a lot of time, so I'm thinking of a trick to use like zooming in at low detail, and then turning on high detail once you're already there. I also have saving of multiple images ready. Art. |
|
|
|
|
|
|
#17 | |
![]() ![]() Bush Programmer
|
Quote:
of colours in the palette. There's also an "auto mode" that will zoom out to 0 from where ever you are, and save a numbered image for every frame. |
|
|
|
|
|
|
#19 | |
![]() ![]() Bush Programmer
|
Quote:
The colour palettes are auto generated with the code from the PSP Plasma demo ![]() It would be possible to remember the number of iterations used to generate each palette to reproduce good ones. |
|
|
|
|
|
|
#20 |
![]() ![]() ¡Éste es Spartaaaaaaa!
|
When it shows the intro screen and I press a button to show the first image, the MS LED starts blinking. It keeps blinking until I press a button again and it says CALCULATING. It would be nice if it didn't exit immediately when pressing the Home button.
__________________
You didn't hear it.
You didn't see it. You won't say nothing to no one, never in your life. You never heard it. How absurd it all seems without any proof. |
|
|
|
|
|
#21 |
![]() ![]() Bush Programmer
|
Ah, I was using the exit callbacks, but it either hung or took a very long time to exit,
so I set to exit on popup screen. Here's a demo I'll be using in the thread for version 2. Done by incrementing the max number of iterations by one for each of 256 frames ![]() http://www.youtube.com/watch?v=vOYNpAPuClE There's plenty of zoom videos on YouTube, but I haven't seen this effect yet. Art. |
|
|
|
|
|
#23 | |
![]() ![]() ¡Éste es Spartaaaaaaa!
|
Quote:
I don't see why it would take long using the exit callback. As long as you check the done=1 or whatever variable that gets set in the callback from withing the rendering loop it should terminate instantly.
__________________
You didn't hear it.
You didn't see it. You won't say nothing to no one, never in your life. You never heard it. How absurd it all seems without any proof. |
|
|
|
|
|
|
#25 |
![]() ![]() ¡Éste es Spartaaaaaaa!
|
No you can't read the Home button from user mode. You're using the kernel mode Ctrl functions if you can do that. Or you're using kubridge. Which means its not firmware independent like you said it was. kubridge is only available from 3.something CFW onwards and directly calling the kernel function would only work on the 1.50 kernel.
__________________
You didn't hear it.
You didn't see it. You won't say nothing to no one, never in your life. You never heard it. How absurd it all seems without any proof. |
|
|
|
|
|
#26 |
![]() ![]() Bush Programmer
|
Doesn't this line:
PSP_MODULE_INFO("Fractal Universe", 0, 1, 0); cause a program to be unable to use kernel mode functions? then this: // if(pad.Buttons & PSP_CTRL_HOME) { // sam = 1; // set sample address counter // samlock = 1; // re-enable player routine // samsel = 1; // select click sample // sceKernelExitGame(); // } is what I was using. THe problem is if I check for a done var for every iteration it will probably add significant delay with so many iterations. I could compromise and check once each line or something. |
|
|
|
|
|
#27 |
![]() ![]() ¡Éste es Spartaaaaaaa!
|
Right, I forgot. In user mode it doesn't return the physical state of the Home button (whether its pressed or not) but returns whether the Exit screen is visible or not. Thus it would return true even after you release the home button.
You have to be checking for the Home button in a loop as well right? That consumes WAAAAY more CPU, 1000s of instructions, as its a Syscall into a kernel export. Checking if done!=0 would be compiled to 3 or 4 instructions. It just needs to respond in a reasonable amount of time, so just put it in an appropriate location.
__________________
You didn't hear it.
You didn't see it. You won't say nothing to no one, never in your life. You never heard it. How absurd it all seems without any proof. |
|
|
|
![]() |
| Tags |
| fractal , universe |
| Thread Tools | |
|
|