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.

Code Snippets / [DBC] Awesome Underwater Effect!

Author
Message
thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 8th Apr 2009 00:57 Edited at: 8th Apr 2009 01:01
this is a cool water effect I made for a game.

A simple effect really, all you have to do is make a plain,
position it close to the camera, texture it,
and scroll the texture every loop.

Source:



---------------
Exe in download!


The media is:
"water.bmp"--a water texture
"under.bmp"--a little message
I will post again with attached media.

hi

Attachments

Login to view attachments
thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 8th Apr 2009 01:02
media

hi

Attachments

Login to view attachments
Yodaman Jer
User Banned
Posted: 6th May 2009 01:31
Pretty nice, I like the colors. This could be useful if I ever create a game in which the player gets submerged in water and I need something like that when the player moves. I'd have to modify some of the physics, but it could definitely work.

Maybe don't make the water go so fast though, it could go a bit slower. My FPS on this was a consistent 60 FPS.

"If you want lots of people to play your game make it simple; lots of people are simple." -Obese87
thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 6th May 2009 18:47
My FPS peaked at 400
I uncapped the 60 fps lock by loading an mp3.

a new version, this time actually using the scroll texture command.


Now is better than never.
Although never is often better than *right* now.
luskos
17
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 26th May 2009 13:32
Quote: "My FPS peaked at 400
I uncapped the 60 fps lock by loading an mp3.

a new version, this time actually using the scroll texture command.
+ Code Snippet

sync on
sync rate 0
hide mouse
backdrop on
color backdrop 0
load image "water.bmp",1
load image "under.bmp",2
make object plain 1,50,50
texture object 1,1
scale object 1,1090,1000,200
ghost object on 1
lock object on 1
position object 1,0,0,5
make object cube 2,50
texture object 2,2
dy#=0.8
do
text 5,5,str$(screen fps())
xrotate object 2,object angle x(2)+1
yrotate object 2,object angle y(2)+1
zrotate object 2,object angle z(2)+1
gosub _water_update
sync
loop

_water_update:
scroll object texture 1,0.001,0.001
return

"

man can you explain how loading of mp3 sound is breaking fps lock?

Where is a will, there is a way.
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 20th Jul 2009 15:12
Quote: "man can you explain how loading of mp3 sound is breaking fps lock?"


I think he means he did it, but judging from the fact that theres no mp3, he means you'll have to load your own.

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 20th Jul 2009 18:58
dark dragon, just a small bump?

loading an mp3 turns off vsync or something like that...
see this
the contents of the mp3 does not matter, you can use anything.
I attached an empty mp3 file, if you need one.

Now is better than never.
Although never is often better than *right* now.

Attachments

Login to view attachments
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 21st Jul 2009 01:49 Edited at: 21st Jul 2009 01:49
I'm dying to see what this looks like... Any chance of a screeny? (I can't access my windows computer until thursday)


Make the path of your enemies easier with Waypoint Pro!
thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 21st Jul 2009 19:38
Im not on the computer with db, sorry.
but it's not really that impressive, only a simple effect...



Now is better than never.
Although never is often better than *right* now.

Login to post a reply

Server time is: 2024-11-22 01:11:00
Your offset time is: 2024-11-22 01:11:00