Skip to main content
htmlcoderexe's user avatar
htmlcoderexe's user avatar
htmlcoderexe's user avatar
htmlcoderexe
  • Member for 11 years, 9 months
  • Last seen this week
comment
How to protect video game demonstration equipment
I am afraid for some people such a sticker might be encouraging rather than deterring...
comment
Value of describing game mechanics in a data file instead of hardcoding?
That's kinda where I am at now - I used to have hardcoded values for everything, but now I moved onto data files (used to have my own binary format but moved to JSON). Abilities, for example, work more or less as OP described - they include a list of things that happen, and the actual code defines each of those things (such as "deal magic damage based on weapon/magic stat/constant" or "revocer X HP over X seconds"). That includes even the visual/sound effects like "throw a fireball particle towards target". To tweak a specific ability all I need is to tweak the data. To add new effects - code.
awarded
comment
What is the point of a "rebirth" mechanic in a game?
At least one MMORPG I have played calls this "reawakening", but I think "rebirth" is also thrown in some of the texts, not sure though.
comment
How do i make the terrain texture less repeating?
I halfway remember a method that involves drawing the same texture, but enlarged, as a kind of an overlay, preferably a couple of this at different frequencies, but I cannot for the life of me remember what it was called
comment
Avoid player getting stuck with underpowered character
@Kevin the user experience, mostly, even with all kinds of ad blocking enabled.
comment
Loading…
comment
Removing duplicates/ignoring them from a 2 dimensional Array
this looks like a general programming question rather than specifically a game development one
comment
How do I get the consistent time it would take for two points to reach each other in circular motion?
@DMGregory good point, it does look like too much of a jump to be that, and it seems to be very consistently 0.075 every time +/- what is probably the actual round error (or a small range within which it is nice and continuous?) so the question is where this specific value emerges from
Loading…
Loading…
comment
How to calculate player damage in a game
@BlueRaja-DannyPflughoeft funnily enough the comments on that one say the opposite of the consensus here - design stats first and then work the math to make them work
comment
Correct overloads for SpriteBatch.Draw to flip sprite horizontally
What is the overload you have used that did work, without the horisontal flipping?
comment
Confirming whether a user has drawn a character correctly
I believe the old Harry Potter PC games used some kind of a mask and then checked coverage.
comment
How to implement texture slicing
Can you please provide the exact output of debug,log for source slices and maybe also destination slices? Maybe add a breakpoint right after the log statement so the program pauses instead of spamming the log 60 times per second or whatever the framerate is. I strongly suspect that the code you provided wants the bottom/right paddings as relative and not absolute values - I tried to "run" the function in my head with your suggested input and it did give the garbage values. As an example, you might want to have left/right as 32 and top/bottom as 16 in your source slices.
comment
How to implement texture slicing
Not an answer (I cannot make the time right now!), but I solve a similar problem with a dedicated struct for a 9slice. It takes outer dimensions and margins and turns them into 16 points, which are then used by the renderer to create the 9 quads (rects in your case) to actually draw. github.com/htmlcoderexe/3DGame/blob/… The code that uses this data structure is in RenderFrame inside GFXUtility in the same folder, you can follow it from there.
comment
Rectangle collision not working!
If you disable the code that moves the rectangle after collision - do the debug lines show correct sides?
comment
Can't figure out math for converting negative indices of my voxels and chunks to positives
Huh, another great reason to keep chunk sizes at power of two sizes...
comment
Can't figure out math for converting negative indices of my voxels and chunks to positives
This definitely looks a lot simpler, I will be definitely going over this once I am back to my projects!
1
2 3 4 5
7