Author Topic: Pretty earth and sea terrain.  (Read 4245 times)

0 Members and 1 Guest are viewing this topic.

Offline Pixel_Outlaw

  • Pentium
  • *****
  • Posts: 1390
  • Karma: 84
    • View Profile
Pretty earth and sea terrain.
« on: July 01, 2008 »
This is a sort of quick and dirty terrain maker I made in Blitzmax.

I might add some more features, would look great in 3D for a game perhaps. Something like a 3d shooter with boats in the water and players on land. You could in theory have infinite play maps. Demo makers have really inspired me with procedural content. I think it will be a great way to make a dynamic game that never grows old.  :clap:
Challenge Trophies Won:

Offline Hotshot

  • DBF Aficionado
  • ******
  • Posts: 2114
  • Karma: 91
    • View Profile
Re: Pretty earth and sea terrain.
« Reply #1 on: July 01, 2008 »
look very good  ;D

Offline stormbringer

  • Time moves by fast, no second chance
  • Amiga 1200
  • ****
  • Posts: 453
  • Karma: 73
    • View Profile
    • www.retro-remakes.net
Re: Pretty earth and sea terrain.
« Reply #2 on: July 01, 2008 »
Nice!

I definitely see a remake of "Buggy Boy" mixed with some "Live and Let Die".

Regarding the code, what about replacing the "640"'s and "480"s by some symbolslike "Width" and "Height" ? that would bet better practice, especially if you have to change them. Also why use floats for indices in you arrays? Ok it may have been "fast coding" but still..

A lot of your code calculates values depending on x and y. If you look closer, you will see that you have a lot of linear functions, that can be easily replaced by accumulators to which you simply add the same fraction at every new x and every new y. This will save a lot of computations too.

Just my 2 cents.
We once had a passion
It all seemed so right
So young and so eager
No end in sight
But now we are prisoners
In our own hearts
Nothing seems real
It's all torn apart

Offline stormbringer

  • Time moves by fast, no second chance
  • Amiga 1200
  • ****
  • Posts: 453
  • Karma: 73
    • View Profile
    • www.retro-remakes.net
Re: Pretty earth and sea terrain.
« Reply #3 on: July 01, 2008 »
Some further optimization/approximation...

you could render your map at a half or even a quarter of the current scale, which will save a lot of processing. Then scale it by a factor of 2 or 4 and apply a 3-pass box blur (you can separate the blur on x and y, i.e. rows and columns).

This would improve the rendering speed and the results are very comparable, although not quite the same. But for a game, who will see the difference?
We once had a passion
It all seemed so right
So young and so eager
No end in sight
But now we are prisoners
In our own hearts
Nothing seems real
It's all torn apart

Offline Pixel_Outlaw

  • Pentium
  • *****
  • Posts: 1390
  • Karma: 84
    • View Profile
Re: Pretty earth and sea terrain.
« Reply #4 on: July 01, 2008 »
Thanks stormbringer. I'm always open to optimization. I was just excited a bit since this has been a week long project. Fasters with little loss in quality is almost always better.
Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: Pretty earth and sea terrain.
« Reply #5 on: July 01, 2008 »
@PO:

Looks very cool indeed. Also reminds me on a nice island / ship driving
game! Good job.

Btw. Concerning better coding style - it is always a good thing to check
for external files if there are available - like checking for the PNG before
trying to load it.

I know that this is a boring task and especially while prototyping it seems
not necessary - but sometimes this can help you - and external testers a
lot.
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: Pretty earth and sea terrain.
« Reply #6 on: July 01, 2008 »
Great stuff P.O. another interesting project you work on. As to what storm bringer said this would be a great time for you to start into interpolation. it would improve speeds by some magnitude without hurting quality too much to be noticed. And you will be doing basically the same thing as the simple blur

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17427
  • Karma: 499
  • evil/good
    • View Profile
    • My Homepage
Re: Pretty earth and sea terrain.
« Reply #7 on: July 01, 2008 »
Looks pretty cool, if a little flourescent!
Shockwave ^ Codigos
Challenge Trophies Won: