May 08, 2024, 09:31:03 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Hello :) and need some help :)

Started by iloveTALLwoman, September 04, 2007, 05:55:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

iloveTALLwoman

Hi everyone :)

I'm trayimg to make a screesaver.
If you know Linux, you knew a xscreensaver, so I want to change the "bubble3d" to heart instead bubbles. (to gave to my girlfrind)

In windows, they have a wonderfull and rare freeware called "Dancing hearts" That I will put in atacchment, If you want to see this screensaver, just try :)

I knew this languages : HTML, PHP, MySQL, and BASIC.
I found This softeware (Emergene Basic) and I like very much. I'm glad to be here :)

Well, anyone have some tips to me do this screesaver hearts?

Thank you so much for any help

iloveTALLwoman

J B Wood (Zumwalt)

Somewhere around here is a program I wrote and has code for it, that has bats flying around the screen.
All you have to do is replace the bats image file with your own image file (hearts, what ever).
As far as screen saver goes, not sure how to set that up since those are a type of scr file or something proprietary.

Ionic Wind Support Team

scr files are just executables that respond to command lin arguments. 
Ionic Wind Support Team

iloveTALLwoman

September 07, 2007, 11:18:29 AM #3 Last Edit: September 07, 2007, 11:46:39 AM by iloveTALLwoman
Thank you Jonathan (zumwalt) Wood, I'm studing your bat code

Thanks Paul, I looikg for commands line in google and found a nice tutorial :)

-------

My goal in screensaver are:

1. Make the "Dancing Hearts" screensaver (files posted in first post) works like "Drempels" in desktop mode
Drenpels site: http://www.geisswerks.com/drempels/
- or-
2. Like "Xwinwrap" for linux (I use Ubuntu). The Xwinwrap, take one xscreesaver and put in background in desktop
Site: http://en.opensuse.org/Xwinwrap



TO ISNTALL Xwinwrap on UBUNTU:
   
1. sudo apt-get alien


1.1 Install  Compiz, Beryl


2. Downloados:

- http://software.opensuse.org/download/X11:/XGL/openSUSE_10.2/x86_64/
- xgl-git_070104-44.1.x86_64.rpm
- xwinwrap-061227-8.1.x86_64.rpm

4. Convert  .rpm to .dep using alien:


    sudo alien xgl-git_070104-44.1.x86_64.rpmsudo dpkg --install
    filegenratedname.deb

    sudo alien xwinwrap-061227-8.1.x86_64.rpmsudo dpkg --install
    filegenratedname.deb


5. Install  .deb

6. Open your terminal and digit:

    coolbg

7. done :)

iloveTALLwoman

September 08, 2007, 07:32:35 PM #4 Last Edit: September 08, 2007, 09:39:27 PM by iloveTALLwoman
An Update:

See My progress :)

Now I have to learn how to spin/rotate the center function (x)

iloveTALLwoman

I did... Hehehe
Finish part 1... Hehehe

See the code:



/*
Windowed 2D DirectX screen example
Requires EBASIC 1.0
Requires 2D command set
--
Ensure that heart.bmp is in executables path
--
Modificated code by iloveTALLwoman
--
*/



WINDOW win
speed = 0
width = 640
height = 480
run = 1
'Calculate the correct window size based on the desired client size
WINRECT rc
rc.top = 0:rc.left = 0:rc.right = width:rc.bottom = height
DECLARE IMPORT, AdjustWindowRectEx(pRect as WINRECT, Style as UINT, bMenu as INT, ExStyle as UINT)
AdjustWindowRectEx(rc, @CAPTION|@BORDER,TRUE,@EXWINDOWEDGE)

OPENWINDOW win,rc.left,rc.top,rc.right-rc.left,rc.bottom-rc.top,@NOAUTODRAW,0,"Function",&handler

'Create Menu
BEGINMENU win
MENUTITLE "Options"
MENUITEM "Quit",0,1
ENDMENU

IF(ATTACHSCREEN(win,width,height,FALSE) < 0)
MESSAGEBOX win,"Couldn't create DirectX window","Error"
CLOSEWINDOW win
END
ENDIF

BACKPEN BackBuffer,RGB(0,0,255)
'Text color
FRONTPEN BackBuffer,RGB(255,0,255)

sprite = LoadSprite(GETSTARTPATH+"heart.bmp",0,0,1)
IF sprite = NULL
MESSAGEBOX win,"Couldn't load mouth.bmp\nMake sure it's in executables path","Error"
CLOSESCREEN
CLOSEWINDOW win
END
ENDIF
sprite2 = LoadSprite(GETSTARTPATH+"heart.bmp",0,0,1,TRUE)

SpriteDrawMode sprite,@TRANS
SpriteMaskColor sprite,RGB(128,128,0)
SpriteMaskColor sprite2,RGB(128,128,0)
SpriteAlpha sprite2,180
SpriteShadowOffset sprite2,-20,-20


x = 100
x2 = 0
y = 200
y2 = 300
ydir = 4
xdir = 1
frame = 0
s2frame = 0
s2xdir = 4
s2ydir = -4
j = 0
p = 0
jdir = 20
pdir = 20


'2D. Hypocycloid
'Constant
a = 13
n = 15



DO
'Filling the buffer  with a solid color
        FILLSCREEN RGB(0,0,255)
WriteText 180,0,"PRESS ESC TO CLOSE, FPS: " + str$(speed)
'play with the sprites
SpriteFrame sprite,frame
       SpriteDrawMode sprite,@TRANSROTOZOOM


for t =0 to 300

'2D. Polar Coordinates
r = t / 2

DrawSpriteXY sprite,300 + r * cos(t) ,250 + r * sin(t)

next t

SpriteFrame sprite2,s2frame
'draw a sprite and an alpha shadow
SpriteDrawMode sprite2,@TRANSSHADOW
SpriteDrawMode sprite2,@TRANSROTOZOOM


for t =0 to 350

'2D. Hypocycloid
'Calculations
k = n * a * cos(t) + a * cos(n * t)
l = n * a * sin(t) - a * sin(j * t)
k1 = n * a * cos(t) - a * cos(p * t)

DrawSpriteXY sprite2,300+k ,250+l
SpriteAngle sprite2, 90 * .01745 - j

next t


       speed = FLIP



IF SpriteCollided(sprite,sprite2,1)
xdir = -xdir
s2xdir = -s2xdir
ENDIF

'adjust sprite1 direction
x+=xdir
if(x + GetSpriteWidth(sprite)) > width | x < 0 THEN xdir = -xdir
y+=ydir
if(y + GetSpriteHeight(sprite)) > height | y < 0 THEN ydir = -ydir



'adjust sprite2 direction
x2 += s2xdir
if(x2 + GetSpriteWidth(sprite2)) > width | x2 < 0 THEN s2xdir = -s2xdir
y2+=s2ydir
if(y2 + GetSpriteHeight(sprite2)) > height | y2 < 0 THEN s2ydir = -s2ydir



      'adjust the polar rotation direction
j+=jdir*cos(x)
if(j + GetSpriteWidth(sprite)) > width | j < 0 THEN jdir = -jdir
p+=pdir*sin(x)
if(p + GetSpriteHeight(sprite)) > height | p < 0 THEN pdir = -pdir


UNTIL run = 0 OR KEYDOWN(1)
FREESPRITE sprite
FREESPRITE sprite2
CLOSESCREEN
CLOSEWINDOW win
END


SUB handler
SELECT @message
CASE @IDCLOSEWINDOW
IF MESSAGEBOX(win,"Quit Demo?","Quit",@IDOK) = @IDOK
run = 0
ENDIF
CASE @IDCREATE
CENTERWINDOW win
CASE @IDMENUPICK
IF @MENUNUM = 1 THEN run = 0
ENDSELECT
RETURN
ENDSUB

jerryclement

 :)
Very nice "ILoveTallWoman"!

Jerry C.
Jerry - Newbie from TN


J B Wood (Zumwalt)