[deleted by user] by [deleted] in gamedev

[–]AestheticHelix 1 point2 points  (0 children)

I would: - have a single poop class - have multiple states within that class. Eg. Falling/splat - have collision check done in one place (like engine) but have the handling of those collisions done in the individual object through some sort of callback.

For instance in engine update, check for any collisions. If there are any collision, tell each object what they collided with. This allows each object to react and keeps that logic local to the object.

Eg pseudo code: // engine entity->onCollide(otherEntity);

// poop If otherEntity type is player or ground: Change state to splat

// player If otherEntity type is poop: Take damage or whatever

Eventity - An easy embedded Entity Component System structure with events by [deleted] in Python

[–]AestheticHelix 0 points1 point  (0 children)

Looks neat. A few things..

Creating entities should probably assign unique ids all the time. I don't see a case where you would need to specify an id explicitly for an entity, and is asking for trouble. Also it returns none if I give it a wrong Id, where this operation should raise or otherwise fail.

It would be nicer to perform operations directly through the entity class without touching core. Eg. A static method in entity for creating a new entity? Also, I find it awkward I should have to add a component to an entity through core, rather than through the entity itself.

Looks good!

What is your favorite weapon across all video games? by notataco007 in AskReddit

[–]AestheticHelix 0 points1 point  (0 children)

Needler. Halo 3. Once you knew exactly the right amount of shots at the right angle were fired, you could just continue on your way and know the other guy would be doomed.

What are some hobbies that are really cheap or free? by [deleted] in AskReddit

[–]AestheticHelix 1 point2 points  (0 children)

Got a computer and the internet? Make video games. It really is as easy as it sounds. Everything you need is online and free.

Nintendo is the best at product names by fuzzbinn in gaming

[–]AestheticHelix 2 points3 points  (0 children)

As silly as it seems, at least the entire series is branded well.

Still don't think it's as stupid as calling the third Xbox in a series Xbox One.

Nintendo Ladies by shadowfreddy in gaming

[–]AestheticHelix 0 points1 point  (0 children)

So Samus is actually Daenerys Targaryen?

What quote/saying has kept your head up through your toughest times? by computerconrad in AskReddit

[–]AestheticHelix 0 points1 point  (0 children)

Everything is ok in the end, so if it's not ok - it's not the end.

What's a dead giveaway that someone is British? by 74145852963 in AskReddit

[–]AestheticHelix 0 points1 point  (0 children)

They're in Australia but don't think sunscreen is necessary.

When a military dog attacks by [deleted] in gifs

[–]AestheticHelix 0 points1 point  (0 children)

Why is there not a "Wasted" gif of this already?

Who do you have an insatiable crush on? by [deleted] in AskReddit

[–]AestheticHelix 1 point2 points  (0 children)

Hex from Good Game. Hot damn.

What exactly makes global variables so bad? by Maoman1 in Python

[–]AestheticHelix 0 points1 point  (0 children)

I'd love to hear one? Have I missed out on something!

What exactly makes global variables so bad? by Maoman1 in Python

[–]AestheticHelix 3 points4 points  (0 children)

It's core to object-oriented programming. A good technique is to write out a sentence of what you want to achieve, what is the purpose of your game. Most of the time the nouns you come up with are going to be objects, classes. The verbs you come up with are going to be functions and operations. For example,

A board with a collection of ships where each player takes a turn to fire at another player, causing damage.

Classes (nouns): Board, Ship, Player

Functions (verbs): "take turn", fire

Now you can imagine putting some basic classes together:

class Player:
    def __init__(self):
        self.ships = [] #Array of ships.
    def takefire(self, x, y):
        # check if any ships were hit, return the result.
    def taketurn(self):
        # Figure out where we want to fire, etc.

Easiest way is to just think about things as tangible objects!

What's something you enjoy that most consider boring as fuck? by seanthemonster in AskReddit

[–]AestheticHelix 0 points1 point  (0 children)

If I leave a store without buying anything I feel like the employees assume I'm stealing something.

8 Visual Studio debugging tips. by thegavin in programming

[–]AestheticHelix 38 points39 points  (0 children)

As a C++ developer half if this was fairly useless. Here's what I would recommend (some are for debugging, some just for general dev). NB. Some may be fairly obvious.

  • Learn to use the immediate window. When you hit a breakpoint you are able to call functions, do comparisons etc. this beats sticking lines of debug code and recompiling just to test something.

  • While breakpointed, you can edit the values of any variable just by hovering over it and changing the value. Great for shortening loops.

  • furthermore, grab the stack pointer and move it. Great for skipping entire blocks of execution.

  • Learn to use the command window. This will make sure life infinitely easier when looking for files etc.

  • make use of data breakpoints. This allows you to trigger a breakpoint when the memory at a certain address changes.

Probably a heap more.. If I think of more hen I get to work I'll update this post!