5,019 reputation
11332
bio website
location Germany
age 20
visits member for 2 years, 2 months
seen 5 hours ago

C++ Programmer, Game-Designer and Pixel-Artist.


Nov
9
comment Techniques to prevent non-official clients in network gaming?
+1 The only effective way against cheating is designing the game in a way that cheating isn't effective in the first place.
Nov
9
comment Should I be worrying about limiting the number of textures in my game?
@ktodisco Context. The OP specially asked for "small" textures.
Nov
9
comment Should I be worrying about limiting the number of textures in my game?
@Donutz No, I meant switching between textures. Drawing two rectangles with the same texture is much faster than drawing two rectangles with different textures. It's all done on the GPU, no texture data is loaded from the GPU to the CPU (unless you explicitly ask for it). The CPU is doing nothing but sending orders/data to the GPU, from which the GPU then builds the picture and sends it to the monitor.
Nov
9
answered Should I be worrying about limiting the number of textures in my game?
Nov
5
comment How can I store spell & items using a std::vector implementation?
You'll need a Item class in either way. A array of items would be Item items[INVENTORY_SIZE]; A std::vector of items would be std::vector<Item> items; A std::vector is just a array which size can be changed dynamically.
Nov
3
comment How to choose cell to put entity in in an uniform grid used for broad phase collision detection?
Oh sorry, of course both were meant to be 0.25, though either way you have to decide yourself how often you'll need to update the grid. That what I meant with etc., check all the surrounding tiles, I just didn't write all of them down.
Nov
3
revised How to choose cell to put entity in in an uniform grid used for broad phase collision detection?
added 1 characters in body
Nov
3
revised How to choose cell to put entity in in an uniform grid used for broad phase collision detection?
added 93 characters in body
Nov
3
comment Monster's AI in an Action-RPG
"Fuzzy logic" is the only good logic for AI, the more complex the game the more so. AI's don't need to precise or too knowledgeable, they just need to be fun to fight, and no math in this world will make a AI fun.
Nov
3
answered How to choose cell to put entity in in an uniform grid used for broad phase collision detection?
Oct
31
comment In a Tower defense game, how to do buffs/debuffs
You are seriously underestimating the amount of memory you have avaiable. The amount of units in TD's are nothing. Say you have 1000 units on the field at the same time and each unit is 64 byte (which is quite generous) then you have a total of 62 kilobyte! Even when you target 64 MB that's less than 0.1% of the complete memory.
Oct
31
comment Actor and Sprite, who should own these properties?
As example, In my library the sprite is calling "RenderEngine::GetTransformedRect(x, y, width, height);" GetTransformedRect calls getTransformedRect in the currently active instance of the RenderEngine and returns the given rectangle with all those transformations applied. These Transformations are set by the actors or the scene itself, not by the Sprites. There are other classes which uses this GetTransformedRect-method amongst others my Font class.
Oct
31
comment Actor and Sprite, who should own these properties?
@GerardoMarset Well you need to implement the feature "somewhere", that's what I meant with adapt. Where you implement it really depends on how your engine looks like. For example if all you'll ever need is your sprite class you can implement it there. But if you need more control about the rendering you should implement a class for the Renderer.
Oct
29
comment Actor and Sprite, who should own these properties?
It's more flexible because I can apply those transformations to any Drawable class not just Sprites.
Oct
29
comment Actor and Sprite, who should own these properties?
Well, either you adapt the sprite class to what you need or you make a global Renderer class and you adapt that. In my personal project I use the Renderer approach as it's more flexible.
Oct
28
answered Actor and Sprite, who should own these properties?
Oct
27
comment Lerping to a center point while in motion
Don't use the absolute time, instead use delta time and add to the previous result.
Oct
25
comment How can I acheive a smooth 2D lighting effect?
Well that's more tricky. You'll need to ray-cast to get shadows. Teraria uses big blocks for their terrain so thats no problem there. You could use imprecise ray-casting but that would look no better than terraria and might fit even less if you haven't block graphics. For a advanced and good looking technique there is this article: gamedev.net/page/resources/_/technical/…
Oct
25
answered How can I acheive a smooth 2D lighting effect?
Oct
24
answered Calculating velocity needed to hit target in parabolic arc