I'm currently making an Entity System, using C++, and I've questioned myself about how I should interface some methods. Specifically in my Entity and ComponentManager classes. The ComponentManager, manages all components for all entities in a specific world. It can add/remove/determine if a Component exists, etc. Now to retrieve a component, I was thinking of using a template function, that way it looks neater and it doesn't have as many casts (outside the method). But then I want quick access to components through an Entity object. e.g. entity.getComponent<VelocityComponent>().x = 30; (and yes I know an Entity is just an ID, that's why I have my components in the ComponentManager class, and each Entity is represented by an ID). i.e. ComponentManager's get function: (Components are stored as a 2d array, with the first element being the ID of an entity and the 2nd element being the ID of a component's class type) template <typename Comp> // Comp = Component Comp* … [Read more...] about Should I wrap a template function with another template function, or…?
C h i overhead doors inc
I mean i'm not the like super great at DirectX or C++… but I'm decent enough to know what i'm doing for the most part and this makes absolutely no sense to me. After endless testing I was able to get it to reliably render without fail however doing this one change causes it to crash. So below is acceptable code and runs just fine. ComPtr<ID3D11ShaderResourceView> WHY_DO_I_NEED_THIS = ContentLoader::GetTextureResource(cw.state_change_alias[i]).m_texture; context->PSSetShaderResources(0, 1, WHY_DO_I_NEED_THIS.GetAddressOf() ); context->Draw(cw.state_vertex_sizes[i], cw.state_vertex_offsets[i]); Then the below which is the exact same thing only I don't double declare the variable. context->PSSetShaderResources(0, 1, ContentLoader::GetTextureResource(cw.state_change_alias[i]).m_texture.GetAddressOf() ); context->Draw(cw.state_vertex_sizes[i], cw.state_vertex_offsets[i]); Throws this error: Exception thrown at 0x00000FCA in DX_B.exe: 0xC0000005: Access … [Read more...] about Object throws nullptr unless I declare the already made comptr to a secondary comptr before i pass it…..?
HOUSTON (AP) — George H.W. Bush, a patrician New Englander whose presidency soared with the coalition victory over Iraq in Kuwait, but then plummeted in the throes of a weak economy that led voters to turn him out of office after a single term, has died. He was 94.The World War II hero, who also presided during the collapse of the Soviet Union and the final months of the Cold War, died late Friday night, said family spokesman Jim McGrath. His wife of more than 70 years, Barbara Bush, died in April 2018.The son of a senator and father of a president, Bush was the man with the golden resume who rose through the political ranks: from congressman to U.N. ambassador, Republican Party chairman to envoy to China, CIA director to two-term vice president under the hugely popular Ronald Reagan. The 1991 Gulf War stoked his popularity. But Bush would acknowledge that he had trouble articulating "the vision thing," and he was haunted by his decision to break a stern, solemn vow he made to … [Read more...] about Former President George H.W. Bush dies at age 94
More states and countries are considering legalizing or decriminalizing marijuana in some form, and more new businesses rise up to enter the growing market. It’s a present and lucrative enough opportunity that one of the biggest soft drink companies in the world, Coca-Cola, is looking into cannabis-infused drinks. The investor interest and increased cultural prominence makes it ripe for a tycoon game-parody. Enter Devolver Digital-published Weedcraft Inc., a title that takes marijuana business seriously while lampooning capitalism on the whole. “Right now, it’s like the end of Prohibition meets the Gold Rush,” said Scott Alexander, the game’s main writer, who is working with Polish studio Vile Monarch on the game. “The federal illegality combined with the state-by-state legalization has created a financial morass and just a weird, interesting place. And we thought, ‘Well, that’s a tycoon game waiting to happen.’” Weedcraft … [Read more...] about Weedcraft Inc. is a tycoon game for all the future cannabis entrepreneurs
It looks slick, doesn’t it? A polished SWAT squad that knows exactly when to move and which angles to cover. When Door Kickers comes together it’s a fluid dance of flash grenades, muzzle flashes, and dead terrorists. The problem is that you start each mission with two left feet. The short video above is the result of more than two hours of testing and probing, trial and error, and many trips back to the drawing board. Polishing it off was genuinely one of the best feelings I had with a mouse and keyboard in 2017. Quite impressive for a game that came out in 2014. It was the release of a side-scrolling spin-off called Action Squad that brought me back to Door Kickers and, having played a bit when it first released, I wanted to see if I was still any good. The stage was 255th Precinct, a mission with 16 terrorists packed into an overrun police station. I had to clear them all without dying to get three stars and make sure the hostage they were holding kept his … [Read more...] about Why cracking a tough mission in 2014’s Door Kickers is one of the best things I did last year