Welcome, Guest. Please login or register.
July 31, 2010, 08:00:52 PM
Home Help Search Login Register
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base

Qbasicnews.com  |  General  |  General/Misc  |  Topic: Particle fire routine « previous next »
Pages: [1] Print
Author Topic: Particle fire routine  (Read 1961 times)
SBM Productions
Senior Member
**
Posts: 163



Particle fire routine
« on: January 10, 2005, 04:17:39 AM »

www.geocities.com/shashiraja_1/fire.zip

A particle fire routine. My first Freebasic program. Tell me what you think.
Logged

 am part of the legion of n00b. We are numerous if dumb. We will enslave you all!
relsoft
*/-\*
*****
Posts: 3924



WWW
Particle fire routine
« Reply #1 on: January 10, 2005, 04:23:16 AM »

Rad!
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
Badjas
Member
*
Posts: 31



WWW
Particle fire routine
« Reply #2 on: January 10, 2005, 08:20:36 AM »

Looks cool

remarks though..
Use pretty printing.. X) really

I found the fire a bit slow moving.. I played around with upping the particle speed (say, RND*-16-0.5) but I dun like that either X) the base needs some extra attention, more yellow. So I made these cruel changes to the colorlookup X)
for i=0 to 255
colorlookup(i)=(i) shl 16
colorlookup(i+128)=16711680+(i*2-256) shl 8
colorlookup(i+256)=16711680+255 shl 8
colorlookup(i+512)=16776960+i
next

And that made me think it would be cool if some yellow or white particles would make it through the whole screen but I ain't gonna dive deeper into the code

And.. because of some clipping of particles at the sides there is somewhat of a line there which isn't that nice. I changed that so it doesn't clip, but doesn't draw outside of the range either. Bugs me though that the side of the fire is an almost static cone shaped thing. I made the particle x starting pos range much smaller but the cone stays at that position.

ehm.. I mostly just wanted to play ^_^ . cute program!
Logged
Blitz
I hold this place together
*****
Posts: 853



WWW
Particle fire routine
« Reply #3 on: January 10, 2005, 10:42:14 PM »

Nice, one question though. Do you hate indenting and seperating different parts with empty lines or what? =p
Logged

oship me and i will give you lots of guurrls and beeea
SBM Productions
Senior Member
**
Posts: 163



Well.....sort of....
« Reply #4 on: January 10, 2005, 11:37:31 PM »

I never indent my code. I do usually put spaces between them but if I ever release the source I've somehow made it a habit to remove the spaces(I sometimes leave 3-4 spaces and comment out 10-20 lines of code that I trialled).
Logged

 am part of the legion of n00b. We are numerous if dumb. We will enslave you all!
Blitz
I hold this place together
*****
Posts: 853



WWW
Particle fire routine
« Reply #5 on: January 11, 2005, 09:17:57 AM »

Any particular reason for that?
Logged

oship me and i will give you lots of guurrls and beeea
SBM Productions
Senior Member
**
Posts: 163



Particle fire routine
« Reply #6 on: January 11, 2005, 10:30:11 AM »

I somehow thought the emptiness spanning 5-6 lines might annoy some programmers looking at my code. Stupid me :oops:
Logged

 am part of the legion of n00b. We are numerous if dumb. We will enslave you all!
na_th_an
*/-\*
*****
Posts: 8238



WWW
Particle fire routine
« Reply #7 on: January 11, 2005, 01:44:31 PM »

It's exactly the contrary Cheesy
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
SBM Productions
Senior Member
**
Posts: 163



Particle fire routine
« Reply #8 on: January 11, 2005, 10:20:22 PM »

I know that now........As for indentations, I don't like them because when I was programming a few years ago(under 95) I used to cut and paste alot from Notepad. The indentations made the code go stair-case like and it separated chunks of code from each other. So I don't put indentations.
Logged

 am part of the legion of n00b. We are numerous if dumb. We will enslave you all!
1000101
Ancient Guru
****
Posts: 519



WWW
Particle fire routine
« Reply #9 on: January 12, 2005, 04:27:05 AM »

The solution to that is to use a real-editor and save the code in it, load in the compiler (of course, why would you need to use the QB IDE if you are using another IDE?)
Logged

Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
Antoni Gual
Na_th_an
*****
Posts: 1433



WWW
Particle fire routine
« Reply #10 on: January 12, 2005, 05:58:50 AM »

Use Metapad
http://www.liquidninja.com/metapad/
It has indent QB Style (Select+TAB) , configurable tab width, is only 100K.
I erased Notepad from my copy of W2000...
Logged

Antoni
Pages: [1] Print 
Qbasicnews.com  |  General  |  General/Misc  |  Topic: Particle fire routine « previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
SMF Theme © Gaia, Hosting by Employers Job Post
Valid XHTML 1.0! Valid CSS!