Bored programmer series

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
kazymjir
Posts: 727
Joined: Sat Feb 20, 2010 4:05 pm
Location: Munich, Bayern

Bored programmer series

Post by kazymjir »

Hello!

I would to present you new series of "Bored programmer", where I will show my new interesting effects in 2D/3D, games and maybe something more.
Please comment my work, feedback will be very helpful for me :)

This thread will be update from time to time, when I create something new.

----------------------------------------------------------------------------

Bored programmer - part one (balls)
UPDATED LINK
YouTube link: http://www.youtube.com/watch?v=VnhRtcIoiX0
Please view in HD! Quality is important!

Everything is rendered in real-time of course, using Irrlicht.
It's very simple algorithm, which checking in main loop positions of balls and colors with destination positions, and correcting them in single steps.
Little example:

Code: Select all

if ( ball.x > dest.x )
   ball.x--;
(...)
ball->setPosition(vector3df(ball.x,ball.y,ball.z));
Same is for color changing.
Everything is about 320 lines of code.
Very simple and simultaneously looking nice.


Update 15 May 2010:
Source: -DEPRECATED-


Update 25 May 2010:
License changed to zlib.
Source with new license: http://wklej.org/hash/985d5118917/
Last edited by kazymjir on Thu Feb 03, 2011 2:00 am, edited 9 times in total.
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

That's amazing! Any chance you'll share the source?
LosNir
Posts: 43
Joined: Wed Dec 19, 2007 6:38 pm
Location: Israel
Contact:

Post by LosNir »

That's awesome!
If I'm right, you load a JPG file, split it into pixels, and each pixel is represents a ball?
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

Haha! So simple, but so nice! I like the "Bored programmer" name choice either. :D
slavik262 wrote:That's amazing! Any chance you'll share the source?
You simply take an image of say 320x240 pixels, take a color sample for each pixel, create a sphere with material color the sample value took, position it at the same pixel Y position and perform the "very-very-simple-x-axis animation" aek already mentioned until it takes its correct position in the stack and you are done! You can use higher resolution image if you wish. If you put yourself a limit of say 10000 spheres and the image resolution would create more spheres, you do some check and take your sample from the average color of 10x10 pixels. You can put many kinds of optimizations like batch-per-material color rendering, use billboard nodes and on... You can do this very easily and you`ll be proud of yourself. Asking for source code for each project announcement may frigten some devs to work in the shadows forever... Just kiddin`... :lol:
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

nice!! can we include this into irrlicht examples lol.
anyway did you optimize anything? how was the performance?
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

Very nice looking! :)
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

Very interesting video! :) Looks cool!
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Kalango
Posts: 157
Joined: Thu Apr 26, 2007 12:46 am

Post by Kalango »

Pretty cool indeed, would be nice that these examples would come with irliht sdk....just fo fun...
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

Kalango wrote:Pretty cool indeed, would be nice that these examples would come with irliht sdk....just fo fun...
i'm agree with this, if the author allow this. it can be an irrlicht performance test too.
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

shadowslair wrote:Haha! So simple, but so nice! I like the "Bored programmer" name choice either. :D
slavik262 wrote:That's amazing! Any chance you'll share the source?
You simply take an image of say 320x240 pixels, take a color sample for each pixel, create a sphere with material color the sample value took, position it at the same pixel Y position and perform the "very-very-simple-x-axis animation" aek already mentioned until it takes its correct position in the stack and you are done! You can use higher resolution image if you wish. If you put yourself a limit of say 10000 spheres and the image resolution would create more spheres, you do some check and take your sample from the average color of 10x10 pixels. You can put many kinds of optimizations like batch-per-material color rendering, use billboard nodes and on... You can do this very easily and you`ll be proud of yourself. Asking for source code for each project announcement may frigten some devs to work in the shadows forever... Just kiddin`... :lol:
I'm fully aware how you'd do it, but I was just curious to see his implementation and how/if he optimized it. I'd even go as far as doing some LOD - given that they're just spheres, it wouldn't be difficult at all.

Also, it looks like the balls are moving along two axes - unless I'm mistaken, they don't all take a straight path to their final destination. Is this true?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, I'd also vote this one for the next Irrlicht example.
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

it looks great!

but i dont agree putting it into the examples. it looks good, but not something what beginners want to learn. IMPO
Image
Image
Kalango
Posts: 157
Joined: Thu Apr 26, 2007 12:46 am

Post by Kalango »

Not as a tutorial, but as a separate downloadable examples or as a performance test.
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

you'd be surprised what you can do with code very simply if you use your imagination. likewise you'd be surprised what an individual can learn from something you'd otherwise want to keep a secret in all it's otherwise magical uselessness. 8)

Interesting use of a single example to spread atheist/science propaganda, I love it!

edit, oh and WOW how could I miss the wonderful title of balls! :D
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

I wouldn't say he's "spreading atheist/science propaganda," his channel videos could just as likely be unrelated. I don't believe he ever gave a link to those videos or ever told you to view the channel either. Just my 2 cents :lol: BTW, here's another vote for an irrlicht example.

EDIT: Woops, I completely skipped a few parts of your post midnight, ignore me altogether :lol:
Post Reply