Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Bloobs!

This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
Bloobs!
Zaphos
Member #1,468
August 2001

Quote:

But, sin and cos wrap round every 2*pi (approx 6) so the bloob will oscillate very rapidly indeed.

No ... Johan didn't include math.h, so sin and cos wrap around every 255 as allegro's fixed point sin and cos are used implicitly (with mingw, anyway).

Edit: Marcello: No!

Richard Phipps
Member #1,632
November 2001
avatar

It's nice code. I like! :)

Marcello: Certainly hot!

Billybob
Member #3,136
January 2003

Umm....was hot intentional, RP? ;)

EDIT:

Richard Phipps said:

Marcello: Certainly hot!

There, just in case he changes it.

Richard Phipps
Member #1,632
November 2001
avatar

Of course! I think any body could see that. ;)

X-G
Member #856
December 2000
avatar

Just an ordinary Freudian tit.

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

Chris Katko
Member #1,881
January 2002
avatar

Quote:

Of course! I think any body could see that. ;)

Apparently everybody didn't. ;)

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs

Richard Phipps
Member #1,632
November 2001
avatar

spellcaster
Member #1,493
September 2001
avatar

It's so easy to derail a thread, it's soo easy to derail a thread...
(Sung to the music of "It's so easy to fall in love")

--
There are no stupid questions, but there are a lot of inquisitive idiots.

Bruce Perry
Member #270
April 2000

X-G said:

So... are bloobs and blits related in any way? ;D

Well if 'blit' is 'block image transfer', then 'bloob' must be 'block oesophagus obstructus'. It's a kind of snake, I think. ???

I tried to download it but KGet is the most evil download manager in the world and I don't seem to be able to avoid it, short of loading Mozilla, and my X is being slow enough as it is. Maybe I should just go back to Windows :-/

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Billybob
Member #3,136
January 2003

And Windows will be faster...how?

spellcaster
Member #1,493
September 2001
avatar

I think it should be "bob" and not "bloob". Bob is short for blitter object the term used for sprites on the amiga. And this particular effect is called "shadebob", AFAIK.

--
There are no stupid questions, but there are a lot of inquisitive idiots.

Bruce Perry
Member #270
April 2000

WH, I use it at work, and it's a lot more responsive.

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Billybob
Member #3,136
January 2003

Same computer speed?
latest version of X + latest version of KDE/Gnome shouldn't really be any less responsive than Windows XP.
If you're comparing it to a lesser version of Windows than you aren't making a good comparison.
If you're running on a low-end computer you shouldn't be using flashy and powerful window managers, gotta go for the efficent ones. You'll need to talk to a Linux expert about which ones will be best.

Bruce Perry
Member #270
April 2000

AthlonXP 1800+, 256 MB. I would expect it to be a lot more responsive than it is. I don't actually know the spec of the system I use at work, but it's a recent version of Windows. I also use Windows XP on my laptop, and that's a lot more responsive. It has a nice flashy and powerful windowing system, and the system spec is not much different from my desktop's (except it's Intel).

Why do I get the impression you're sticking up for Linux just for the sake of it? :P

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Now I'm waiting for metaballs demo done in software. ;)

Billybob
Member #3,136
January 2003

Well then, I guess the Linux window manager and desktop managers suck.

EDIT: Metaballs can be done in software just fine. I read an article about them a few years ago (they were called metagoop). Same thing as this Bloobs, except in 3D.
I believe the article described the walking cubes or whatever method, which is patent and can't be used comercially :-/

Zaphos
Member #1,468
August 2001

Just in case anyone else wants it; I hacked (very quickly and unprofessionally) peitz's demo into the screensaver example. I changed the ball movement in a very simple way; to change it back don't include math.h and change the tick increment back to one.
Source attached.

Peter Hull
Member #1,136
March 2001

Johan Peitz said:

Hah, I had no idea this piece of code would get so much attention

More than that! Anyway I think I understand what has being going on, see my other thread.

Basically, Allegro 4.0 is implicitly converting to/from the 'fix' data type in the trig functions (lines 99 and 100) but Allegro 4.1 won't do this and gives an error.

Johan, if you want to used Allegro's fixed point functions, you should strictly cast to 'fix' there, or alternatively include math.h and cast to double. (if the latter, you'll need to tweak your parameters)

It is a cool effect, you can get something that looks like the moon reflected on moving water if you tweak the parameters.

Pete

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Quote:

I believe the article described the walking cubes or whatever method, which is patent and can't be used comercially :-/

AFAIK you can't patent algorithms in EU at the moment and I hope you'll never be able to. Also I wonder how anyone would guess you've used certain algorithm without having your source code? ;)

gnolam
Member #2,030
March 2002
avatar

It's "marching cubes", and software patents are on their way in the EU unless a miracle occurs.

And metaballs have also been a standard Scene effect for many years... ;)

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

Bruce Perry
Member #270
April 2000

We were taught marching cubes at uni, and no one told us they were patented. Shinjirarenaaai!

Oh, I managed to download it. It's cool :)

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Billybob
Member #3,136
January 2003

Oh, awesome, found the article I read. It explains both meta-goop, marching cubes, and the patent ;)
[url http://www.gamasutra.com/features/20000523/lander_pfv.htm]

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Quote:

I like to imagine the state of the industry if Bresenham had patented his method for drawing a line on a graphic display and then charged a licensing fee for every line drawn.

I have strange feeling that something like this (by probably in more subtle way) will happen if patents will be allowed.

btw. Do you have to prove you have invented the thing in order to patent it? If not, line drawing algorithm could probably still get patented. :-/

(sorry for off-topic, but this entire patent thing is making me sick :-/)

Bruce Perry
Member #270
April 2000

In theory, patents are void if prior art, i.e. the same technique provably used by someone else before the date of the patent (or the date of development or whatever), is found. I'm not sure how much that applies in practice though. I'm not well up on the whole patent thing.

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Billybob
Member #3,136
January 2003

I read up on the U.S. gov's patent office site when I was contemplating patenting Progranisms, and if I read everything correctly, which I probably didn't: You can only patent something if you were the first to invent it, and you can only patent the invention within 1 year of its creation. If, after 1 year, you haven't patented the invention you cannot patent nor can anyone else. It becomes public domain.

Of course, a lot of patents get "passed" even though they aren't original. However, if you do take a patent to court and can prove the invention was used prior to the patent, then it'll be torn down.

 1   2   3 


Go to: