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 / DBPro - No media sea-scape

Author
Message
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 2nd Sep 2006 14:40 Edited at: 2nd Sep 2006 15:27
I made this from boredom. You can use it if you like. Use the mouse to move around.



Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 2nd Sep 2006 15:21
cool nice job. It's funny how the clouds open for you.

The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 2nd Sep 2006 15:21
Looks very nice!

Good job!

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 2nd Sep 2006 15:27 Edited at: 2nd Sep 2006 15:27
Thank you. I dont think the waves are aggressive enough. Time to change that I think.

[edit]
Done!

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 2nd Sep 2006 19:36 Edited at: 2nd Sep 2006 19:42
Just made it much cooler + fixed the clouds. The skysphere, well, I don't know what it's ment to be, but I think it looks cool.


[edit]
It sounds quite good too with 'The Seven Seas of Rhye' playing in the backround , I'm addicted to this song at the moment. What does the Rhye bit mean anyway?


[edit]
Screenie for the non DBPro people.


Vues3d on Kalimee
20
Years of Service
User Offline
Joined: 12th May 2004
Location: NYON (SWITZERLAND)
Posted: 3rd Sep 2006 01:30
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 3rd Sep 2006 18:31
Thanks.

I just made the water cooler, and made a cool little ship to move around with.



Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 3rd Sep 2006 18:51
Nice!!! Really fun!!!


Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 3rd Sep 2006 18:55 Edited at: 3rd Sep 2006 20:28
Thanks. I think I'm gonna need some help getting this matrix to scroll, so you can't get to the edges. Any help?

[edit]

Made it better. also cleaned up the code a little.


Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 3rd Sep 2006 23:01 Edited at: 3rd Sep 2006 23:03
Wow, now it's even more amazing than it was before! I love it!

I added some boundarys because you could go off of the matrix. The variable BoundsPAD decides how far inland the boundarys are. The boundary code is in your ship movemet code.



Again, nice job!

EDIT: OOPS, just read about scroll thing lol.

Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 3rd Sep 2006 23:03
@Sixty- I think he wanted unlimited space, if he wanted boudries he would've done it in 2 seconds


Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 3rd Sep 2006 23:03
Yes I know take a look at my edit

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 4th Sep 2006 00:19
Thanks

David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 4th Sep 2006 03:49
very cool! i like the clouds,definately have to study this.
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 4th Sep 2006 20:21
Go for it. If you need any help understanding it just ask.

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 6th Sep 2006 22:07
Made the water better, and also some simple gravity so that you go off the water after going up a slope, but doesn't happen too easily, that would be unrealistic.

Code:



And a screenie again for the non-DBPro people:


Jack
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 6th Sep 2006 22:44


...





Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 9th Sep 2006 14:12 Edited at: 9th Sep 2006 14:44
Nice, but shouldn't the water reflect the colour of the sky?



Anyway, another update. Ahh, the joy of functions , so easy to add a little AI in. You can change the amount of ships that are in the area.




Pfft, slow downs. I added some vectors to check the distances between you and the ships so they can be hidden if they get too far.


Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 9th Sep 2006 14:55
Wow I come back and it looks even better! Now, try adding some water spray...

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 9th Sep 2006 15:06


Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 9th Sep 2006 19:03
lol

Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 9th Sep 2006 23:19
That was amazingly fun

this game is really turning out!!


Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 10th Sep 2006 03:18 Edited at: 10th Sep 2006 03:23
You're all probably getting bored with me always adding things, but I don't care, lol.

I just made islands, that are actually just sphere's with the bottom flattened and the rest randomised. Pretty cool I would say.




Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 10th Sep 2006 05:55
Awesome. Make some shooting


Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 12th Sep 2006 11:02 Edited at: 12th Sep 2006 11:04
Hey Zoto - that's very nice. From a physics point of view, you might be interested in this code I wrote a while ago, which simulates 'real' waves - that is, rather than moving according to a mathematical function (ie. sine waves) they use a physics model of interacting forces to produce a realistic effect.



(Use the mouse to steer the boat, and arrow keys to change speed.)

It's good to see you continuing to develop your code - I'm looking forward to seeing what you add next.
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 13th Sep 2006 01:21
I noticed this code when I was trying to make the waves more realistic. I found it was quite annoying thought that you had to move one tile constantly. Instead of moving that tile all the time, couldn't you just make it a seperate variable, and make the rest react from that?

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 13th Sep 2006 10:15
I know what you mean - those are the wave 'sources', which drive all of the other parts of the matrix. You could do as you suggest, and have a 'virtual' source, which is actually off the matrix completeley, or you can do what I've done a few times and have the source positioned underneath an island or something where you can't see it.
Crazy Ninja
19
Years of Service
User Offline
Joined: 27th Aug 2005
Location: Awesometon
Posted: 13th Sep 2006 16:16
wow that was awesome man. Felt like i was back in Loz:Wind Waker! Now just add in a port and some cannons and there you go! a sweet little pirate game!

____ ____ ____ ___ _ _ __ _ _ __ _ _ ____
|___ |--< |--| /__ Y | \| | | \| ___| |--|
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 13th Sep 2006 22:39 Edited at: 14th Sep 2006 00:31
@Ric

Nice idea. I never thought of that, only problem is with the island one is that the islands are randomly places - come to think of it, so could the source


@Crazy Ninja
Where'd you think I got my inspiration?


[edit]
Infact Ric, if it's not too much hastle, could you explain a little of the physics behind those waves? I know a little about physics myself, but not gone into anything quite like that before. I don't want to have to re-write it into my own coding style line by line without even understandingany of it


[edit]
Oh, and what's with the random cubes everywhere?


[edit]
Infact, I've worked out the waves now. Thanks Ric!

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 14th Sep 2006 11:03
Glad you figured it out - I basically thought of the water as being a set of surface points connected by springs - and just used Hooke's law (Force is proportional to extension) to work out the restoring force between each point on the matrix. Once the force is calculated, you can work out the acceleration using Newton's 2nd, and hence the velocity. The great thing about this approach is that you can model real wave effects - by forcing certain points to remain stationary, you can set up virtual barriers and watch waves being reflected, diffracted, formation of standing waves etc. Also, by placing two sources close to each other, you can show two source interference patterns - it works just like a virtual ripple tank.
Cave Man
18
Years of Service
User Offline
Joined: 22nd Aug 2006
Location: North Carolina, US
Posted: 14th Sep 2006 23:31
This is cool! Make a shooting game

Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 15th Sep 2006 01:27
@Zoto

very interesting piece of code. Very good job especially with no media

"We are what we repeatedly do. Excellence, therefore, is not an act, but a habit." - Aristotle
fire
20
Years of Service
User Offline
Joined: 30th Jul 2004
Location: israel
Posted: 16th Sep 2006 11:59
awsome!
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 16th Sep 2006 12:54
Thanks everyone.

Ric - You're right, it does heheh.

Cave Man - What, from this? Or just a shooting game?

Jrock
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Riven
Posted: 16th Sep 2006 17:13
This would be really really cool if you added reflection shading to the water .

Ok the mods got rid of my sig...
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 16th Sep 2006 17:55 Edited at: 16th Sep 2006 17:55
My crappy computer can't handle shaders ¬_¬', besides, it wouldn't be very cartoony with shaders.

lower logic
18
Years of Service
User Offline
Joined: 15th Jun 2006
Location:
Posted: 17th Sep 2006 06:12 Edited at: 17th Sep 2006 06:12
Looks really cool and felt really realistic, though I can't wait to see how it looks when you add Ric's code. Add a race track, a cool model, and some racing AI and you could have the next Wave Race, which was a really fun game.
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 17th Sep 2006 06:56
you can have fake reflections using a second camera and ghost the matrix


Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 17th Sep 2006 16:10
Hmm, not a bad idea.

I think I'll go and put Ric's code in now

Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 17th Sep 2006 17:59
Check my model in 3 dimension chat (the TLoZ topic) Im creating model in this one

FFXI <3
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 17th Sep 2006 19:01
That's a pretty cool model. You can use my code if you want.


Here's the code with the waves, not perfect yet, but doing good.
Anyone know how to get some good matrix normals?


Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 24th Sep 2006 03:53
I always use Yarble's function, but I don't know how it works.



Cave Man
18
Years of Service
User Offline
Joined: 22nd Aug 2006
Location: North Carolina, US
Posted: 24th Sep 2006 15:05
Quote: "Cave Man - What, from this? Or just a shooting game?"


From this. All the boats shoot little cannons, get hit, and sink!

And maybe, cannoneers on the island!

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 24th Sep 2006 16:30
Deamon:
It works ok, but not that well... besides, I think he stole it from a DBC example


Cave Man:
Hmm, I dunno, it already runs at only 30fps here, when it's set to 60, so if I made all of these bombs and stuff I would have a hard time running it.

Natflash Games
18
Years of Service
User Offline
Joined: 7th Feb 2006
Location:
Posted: 4th Oct 2006 22:43
Woah, thats pretty cool, the clouds look like you used HDR; wich is a good thing of course.


Check out my site for the latest on my games.
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 4th Oct 2006 22:53
What's HDR? And thanks

Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 5th Oct 2006 03:29
HDR is High Dynamic Range, they are a type of shader.

"We are what we repeatedly do. Excellence, therefore, is not an act, but a habit." - Aristotle
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 7th Oct 2006 00:19
Wow cool. My crappy PC can't do shaders, so I'm glad to hear I've got this far without them

Login to post a reply

Server time is: 2024-11-22 23:15:38
Your offset time is: 2024-11-22 23:15:38