![Surprised :o](./images/smilies/icon_surprised.gif)
Bored programmer series
Thank you all for comments!
You will find everything in source.
![Smile :)](./images/smilies/icon_smile.gif)
Thank you all for your comments, it's very motivating to work![Smile :)](./images/smilies/icon_smile.gif)
Some people mentioned about adding this project to Irrlicht examples.
If you really think that can be used as example of Irrlicht perfomerance, I would be very honored if you add it to examples.
And of course, there is source:
(EDIT)-OBSOLETE -(/EDIT)
and ball.png file:
http://img532.imageshack.us/img532/2424/ballf.png
I have to write once again code with pointers in loop, but for now I don't have so much time.
Feel free to modify my code for your own purposes![Smile :)](./images/smilies/icon_smile.gif)
Yes, I do it this way. But instead of JPG I used BMP, it's easier to implement loader for this file format.LosNir wrote:That's awesome!
If I'm right, you load a JPG file, split it into pixels, and each pixel is represents a ball?
I used billboards instead of 3D shperes. There is no dynamic light, so sphere and billboard look indentical, but on billboards whole program run very faster than on spheres.Virion wrote:anyway did you optimize anything? how was the performance?
You will find everything in source.
Balls are moving along three axes and they are moving in straight path, but it's look that they not moving along straight path. Little illusionslavik262 wrote: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?
![Smile :)](./images/smilies/icon_smile.gif)
Thank you all for your comments, it's very motivating to work
![Smile :)](./images/smilies/icon_smile.gif)
Some people mentioned about adding this project to Irrlicht examples.
If you really think that can be used as example of Irrlicht perfomerance, I would be very honored if you add it to examples.
And of course, there is source:
(EDIT)-OBSOLETE -(/EDIT)
and ball.png file:
http://img532.imageshack.us/img532/2424/ballf.png
I have to write once again code with pointers in loop, but for now I don't have so much time.
Feel free to modify my code for your own purposes
![Smile :)](./images/smilies/icon_smile.gif)
Last edited by kazymjir on Sat May 15, 2010 11:56 am, edited 3 times in total.
http://wklej.org/hash/e6fd95975e2/
Updated code with pointers![Smile :)](./images/smilies/icon_smile.gif)
EDIT: please comment my code, I am new in C++ programming, every tips will be very helpfull for me![Smile :)](./images/smilies/icon_smile.gif)
Updated code with pointers
![Smile :)](./images/smilies/icon_smile.gif)
EDIT: please comment my code, I am new in C++ programming, every tips will be very helpfull for me
![Smile :)](./images/smilies/icon_smile.gif)
Little code snippet
Hi!
This is my first post here in the forum, the time has finally come - greetings to all!![Smile :)](./images/smilies/icon_smile.gif)
I have started using Irrlicht for the first time Feb. last year and I like it, thanks to all contributing to it.
Aek, the bored programmer
, has inspired me to implement his idea, I liked it very much when I saw it two days ago and started yesterday with the code snippet which I want to contribute. Maybe someone likes it and can make some use out of it.
It is a class which can be parameterized as follows
It can be used as follows:
then call tesImage->move(<time elapsed in seconds>) to let the parts move to the destination.
and do
to reset the positions and colors to random values and start again.
Note: to get it running you need an instance to the Irrlicht driver (I have used a Singleton here to get it), exchange
with your Irrlicht #include code to be able to make driver calls like
Here is the link
http://www.mediafire.com/file/j2mzmymyw ... dImage.rar
I have never used a free hosting service until now, tried it, works, hope the link keeps working.
Have fun and thanks again to aek for his brilliant idea.![Smile :)](./images/smilies/icon_smile.gif)
ciao
Airo
This is my first post here in the forum, the time has finally come - greetings to all!
![Smile :)](./images/smilies/icon_smile.gif)
I have started using Irrlicht for the first time Feb. last year and I like it, thanks to all contributing to it.
Aek, the bored programmer
![Smile :)](./images/smilies/icon_smile.gif)
It is a class which can be parameterized as follows
Code: Select all
//! Splits an image readable by Irrlicht of abitrary size into several parts and animates these parts from a given starting position to a given target destination.
class TesselatedImage
//! Constructor.
/*! @param img - The path to the image.
@param startFr - Vector defining the left(x1)/bottom(y1)/front(z1) position of the cube within the parts are being randomly positioned.
@param startTo - Vector defining the right(x2)/top(y2)/behind(z2) position of the cube with x2 > x1, y2 > y1, z2 > z1.
@param targetPos - The bottom left position of the final compound image.
@param speed - Amount of units per seconds a part is moving to its target position.
@param maxTes - The maximum number of parts that should be used to split the image. If resolutionX * resolutionY < maxTes then a part represents more than one pixel.
@param colChange - How quickly a part can correct its color to reach the final color, defined in 'one unit per RGB' per second.
@param type - What the parts should be made of, default is using a Billboard.
@param dim - The quadratic dimension of the billboard or the radius of the sphere. See parameter type.
@param gap - The gap between parts.
*/
TesselatedImage(stringc img, vector3df startFr, vector3df startTo, vector3df targetPos, float speed=10.0f, int maxTes=5000, float colChange=5.0, Type type=Billboard, float dim=4.0f, float gap=0.05f);
Code: Select all
TesselatedImage *tesImage = new TesselatedImage(<your image>, vector3df(-600,0,500), vector3df(500, 550, 1000), vector3df(-130,50,100), 45, 15000, 10);
tesImage->startAnimation();
and do
Code: Select all
if (tesImage->hasAnimationFinished())
{
tesImage->reset();
tesImage->startAnimation();
}
Note: to get it running you need an instance to the Irrlicht driver (I have used a Singleton here to get it), exchange
Code: Select all
#include "graphicsirr.h"
...
GraphicsIrr *graphics = GraphicsIrr::getInstance();
Code: Select all
IImage *image = graphics->driver->createImageFromFile(img.c_str());
http://www.mediafire.com/file/j2mzmymyw ... dImage.rar
I have never used a free hosting service until now, tried it, works, hope the link keeps working.
Have fun and thanks again to aek for his brilliant idea.
![Smile :)](./images/smilies/icon_smile.gif)
ciao
Airo
Hello Airo !
I am so happy, that my work inspired someone![Smile :)](./images/smilies/icon_smile.gif)
Your code is looking very nice! Everything is arranged, simply in use and very configurable. My code is one big mess and no configurability, everything like be written by 10-years old kid, but your code is showing beauty of code, simplicity and configurability.
Very nice work, I like it![Smile :)](./images/smilies/icon_smile.gif)
I am so happy, that my work inspired someone
![Smile :)](./images/smilies/icon_smile.gif)
Your code is looking very nice! Everything is arranged, simply in use and very configurable. My code is one big mess and no configurability, everything like be written by 10-years old kid, but your code is showing beauty of code, simplicity and configurability.
Very nice work, I like it
![Smile :)](./images/smilies/icon_smile.gif)
thanks for the code, works well and looks better than magic. i've been having issues with image loading (might be 64 bit bug) but it'll be fixed soon.
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
-- https://github.com/netpipe/Luna Game Engine Status 95%
I moved to new YouTube account, so there is new link to the project video:
http://www.youtube.com/watch?v=VnhRtcIoiX0
http://www.youtube.com/watch?v=VnhRtcIoiX0