Parallax Scrolling Example 2

Yep, havin’ fun here. :slight_smile:

Structured things a bit and added a third parallax layer, maps for all layers
and vertical scrolling. (Yo! Beware of the “OO style” C code. :wink:

Next: “Advanced Parallax - Overdraw Optimization”

I’ll have a go at drawing front to back with a recursive algorithm and
clipping. This is probably not going to be very simple, so I don’t know if it
would belong anywhere near the basic introduction we have been playing with
so far. Could be mighty cool, though: Practically unlimited number of
parallax levels. :slight_smile:

BTW, what kind of license are we talking about here? GPL, LGPL, “pure” Public
Domain…?

(I might do something on sprites first though; kind of feel like working some
on that Project Spitfire port/rewrite, and the sprite engine is next…)

//David

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------> http://www.linuxaudiodev.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |--------------------------------------> david at linuxdj.com -’

Whoops!!! Wee bit fast on the button there - here’s the code. :slight_smile:

Structured things a bit and added a third parallax layer, maps for all
layers and vertical scrolling. (Yo! Beware of the “OO style” C code. :wink:

//David

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------> http://www.linuxaudiodev.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |--------------------------------------> david at linuxdj.com -’
-------------- next part --------------
A non-text attachment was scrubbed…
Name: parallax-2.tar.gz
Type: application/x-gzip
Size: 10421 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20010221/6f74d13f/attachment.bin

Whoops!!! Wee bit fast on the button there - here’s the code. :slight_smile:

Very cool everybody. :slight_smile:

Akawaka, can we add this to the SDL Guide?

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Sure…if you tell people to stop posting binaries:)On Tue, Feb 20, 2001 at 10:36:48PM -0800, Sam Lantinga wrote:

Whoops!!! Wee bit fast on the button there - here’s the code. :slight_smile:

Very cool everybody. :slight_smile:

Akawaka, can we add this to the SDL Guide?

Martin

Bother! said the Borg, we just assimilated Pooh.

David Olofson wrote:

Structured things a bit and added a third parallax
layer, maps for all layers and vertical scrolling.
(Yo! Beware of the “OO style” C code. :wink:

That’s usually how I write all my C code. If an argument list doesn’t start
with a pointer to a typedefed structure, I feel uncomfortable … :slight_smile:

BTW, what kind of license are we talking about here?
GPL, LGPL, “pure” Public Domain…?

Sam’s “aliens” demo is GPL and I have been using GPL on my stuff, but this
is a pure demo so I don’t know. Anything you want to slap on it is fine with
me.

I do have a “parallax” project for VC6 working on both Windows 98 and NT4.
(I think I could create an SDL/VC6 project in my sleep :slight_smile: Someone probably
needs to supply a set of makefile/autogen files. I haven’t had a chance to
try it under Linux yet and am not set up for either BeOS or Mac development.

(I might do something on sprites first though; kind
of feel like working some on that Project Spitfire
port/rewrite, and the sprite engine is next…)

Certainly is an inspirational little piece of code, might make a good screen
saver … :slight_smile:

  • Randi

Regimental Command
Generic Armored Combat System
http://regcom.sourceforge.net

Binaries?

//David

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------> http://www.linuxaudiodev.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |--------------------------------------> david at linuxdj.com -'On Wednesday 21 February 2001 15:43, Martin J Donlon wrote:

On Tue, Feb 20, 2001 at 10:36:48PM -0800, Sam Lantinga wrote:

Whoops!!! Wee bit fast on the button there - here’s the code. :slight_smile:

Very cool everybody. :slight_smile:

Akawaka, can we add this to the SDL Guide?

Sure…if you tell people to stop posting binaries:)

David Olofson wrote:

Structured things a bit and added a third parallax
layer, maps for all layers and vertical scrolling.
(Yo! Beware of the “OO style” C code. :wink:

That’s usually how I write all my C code. If an argument list doesn’t start
with a pointer to a typedefed structure, I feel uncomfortable … :slight_smile:

Does get way easier to keep track of things that way. :slight_smile:

BTW, what kind of license are we talking about here?
GPL, LGPL, “pure” Public Domain…?

Sam’s “aliens” demo is GPL and I have been using GPL on my stuff, but this
is a pure demo so I don’t know. Anything you want to slap on it is fine
with me.

One could just slap GPL on it, and then add “Contact the authors if you want
to use all or part of this code in a closed source product.”

I do have a “parallax” project for VC6 working on both Windows 98 and NT4.
(I think I could create an SDL/VC6 project in my sleep :slight_smile: Someone probably
needs to supply a set of makefile/autogen files. I haven’t had a chance to
try it under Linux yet and am not set up for either BeOS or Mac
development.

Linux only here, but I’m net very much into automake… (Yet.)

(I might do something on sprites first though; kind
of feel like working some on that Project Spitfire
port/rewrite, and the sprite engine is next…)

Certainly is an inspirational little piece of code, might make a good
screen saver … :slight_smile:

Yeah, I was actuall thinking about that… hehe

I think I’ll try a cute oldtimer effect with sprites; a “ballfield”.
Basically a 3D starfield (move + rotate), but rendered using a precalculated
set of zoomed sprites instead of single pixels.

Anyony have one of those 9 element rotation vectors (optimized, that is) for
3 axis rotation lying around? I should have my version + sources in various
languages somewhere, but it was a looong time ago I did 3D all in software…
:slight_smile:

//David

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------> http://www.linuxaudiodev.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |--------------------------------------> david at linuxdj.com -'On Wednesday 21 February 2001 18:38, Randi J. Relander wrote:

I suspect (and this is only a guess :slight_smile: he was referring to the fact that your
tarball was attached rather than inlined with uuencoded text.

You can please some of the people some of the time … ;-)On Wed, 21 Feb 2001, you wrote:

On Wednesday 21 February 2001 15:43, Martin J Donlon wrote:

On Tue, Feb 20, 2001 at 10:36:48PM -0800, Sam Lantinga wrote:

Whoops!!! Wee bit fast on the button there - here’s the code. :slight_smile:

Very cool everybody. :slight_smile:

Akawaka, can we add this to the SDL Guide?

Sure…if you tell people to stop posting binaries:)

Binaries?


Sam “Criswell” Hart <@Sam_Hart> AIM, Yahoo!:
Homepage: < http://www.geekcomix.com/snh/ >
PGP Info: < http://www.geekcomix.com/snh/contact/ >
Advogato: < http://advogato.org/person/criswell/ >

Whoops!!! Wee bit fast on the button there - here’s the code. :slight_smile:

Very cool everybody. :slight_smile:

Akawaka, can we add this to the SDL Guide?

Sure…if you tell people to stop posting binaries:)

Binaries?

I suspect (and this is only a guess :slight_smile: he was referring to the fact that
your tarball was attached rather than inlined with uuencoded text.

Ah! Well, it’s either that, or others complain about seing “lots of garbage”

  • or I have to see my file names get mangled by the only web server I have
    access to ATM! Cruel world… :wink:

You can please some of the people some of the time … :wink:

hehe

BTW, I’m working on a “video buffer server” to deal with the tearing and
retrace sync issues on targets without hardware pageflipping.

I also have a partially working, but terribly unoptimized front-to-back
rendering version of the 3 layer parallax. Will have to clean up the code
some, though - the clipping calculations seem to fail under some
circumstances, and I can’t figure out why. Nice and simple recursive code,
you know! :wink:

//David

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------> http://www.linuxaudiodev.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |--------------------------------------> david at linuxdj.com -'On Thursday 22 February 2001 02:35, Samuel Hart wrote:

On Wed, 21 Feb 2001, you wrote:

On Wednesday 21 February 2001 15:43, Martin J Donlon wrote:

On Tue, Feb 20, 2001 at 10:36:48PM -0800, Sam Lantinga wrote:

I’d prefer just a link.On Wed, Feb 21, 2001 at 06:35:33PM -0700, Samuel Hart wrote:

Binaries?

I suspect (and this is only a guess :slight_smile: he was referring to the fact that your
tarball was attached rather than inlined with uuencoded text.

You can please some of the people some of the time … :wink:

Martin

Bother, said Pooh as he wished everyone a Happy Pearl Harbor day.