Bubble Lava Lamp
Bubble Lava Lamp
Hey folks, I was playing around with some partitioning and spherical physics when all of a sudden this happened. Reminds me of a lava lamp from back in the 70's
Built with VS 2017 on Windows 10
There is a text file called runData in the Solution Explorer you can alter a couple numbers that the app will load in and parse so you just change the text file.
This runs best in release mode.
I found with the data used in runData.txt on my machine gives the best results, yielding about 57 fps.
I know i have alot of work to do with this yet but I found the visuals pleasing
Peace Out
Built with VS 2017 on Windows 10
There is a text file called runData in the Solution Explorer you can alter a couple numbers that the app will load in and parse so you just change the text file.
This runs best in release mode.
I found with the data used in runData.txt on my machine gives the best results, yielding about 57 fps.
I know i have alot of work to do with this yet but I found the visuals pleasing
Peace Out
- Attachments
-
- CBaller2.zip
- (62.98 KiB) Downloaded 133 times
Curiosity killed the cat, satisfaction brought him back
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Bubble Lava Lamp
Why capture by value?
That means that for each component in m_components, make a copy of the m_componentArray array. Wouldn't it be better to capture by reference?
Actually, in this case, you could just get away with capturing the 'this' pointer.
It's in the GameObject::Remove() function btw.
Code: Select all
m_components.erase(std::remove_if(std::begin(m_components), std::end(m_components),
[=](const std::unique_ptr<Component>& comp)
{
return comp.get() == m_componentArray[getComponentTypeID<Type>()];
})
, std::end(m_components));
Code: Select all
m_components.erase(std::remove_if(
std::begin(m_components),
std::end(m_components),
[=](const std::unique_ptr<Component>& comp)
{
return comp.get() == m_componentArray[getComponentTypeID<Type>()];
})
, std::end(m_components));
It's in the GameObject::Remove() function btw.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Bubble Lava Lamp
Though, I suppose if you were to throw in some multithread support, you'd probably want to capture by value on some things, but I'm not so sure this instance would be a candidate.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
Re: Bubble Lava Lamp
@ chili, I am no where near your comprehension of coding so don't laugh lol
Curiosity killed the cat, satisfaction brought him back
Re: Bubble Lava Lamp
@albino.. i'm just a fuck around hobby guy, if it works it works .. to a fault i tend to do that lol Peace brother
Curiosity killed the cat, satisfaction brought him back
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Bubble Lava Lamp
Coolio, peace.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com