Hot answers tagged

7

A lot of Adventure/RPG games handle this in two ways (there may be more I'm not aware of). Use of flags The first one is to set a flag if something happened (usually some bitmask). This is fine if you don't have many things to track. In the room/encounter there may be a check against a flag that alters something. In your example could add a rule: {"text" ...


4

As noted in a comment above, this is about units. If you use the value 9.81 as pixels/s² it's like watching something fall hundreds of meter when the ball shall cross the entire screen. It takes 9 seconds for something to fall 400 meters with v0 = 0, neglecting air resistance. It should be clear why this appears moon-like. It's all a matter of scale. To ...


2

The thing is, in slither.io, the snake isn't following a spline at all. Each segment simply follows the previous segment. So create a head and a bunch of segments. The head is just a special segment with your movement and other logic in it: class SnakeHead:SnakeSegment { List<SnakeSegment> Body = new List<SnakeSegment>(); //keep the ...


2

I don't think "very few" is accurate, but aside from the semantics there it's likely that the highest reason is infrastructure. Outside of PC (Mac and Linux) gaming where peer to peer is fairly easy, most gaming (mobile and console) requires a server-client multiplayer option, and running servers and paying for bandwidth to allow that is not cheap. Indie ...


1

One solution I've seen that elaborates on your approach is to have various attributes with associated scores. Some choices result in modifying the one or more of these scores. The scores in turn may modify the choices available to the player. For instance, early in the story, there may be some option combat encounters. If the player engages in combat, the ...


1

Two ideas: 1) Make Sizes[0] smaller. 2) Try rect(charx-5, chary-5, 10, 10);



Only top voted, non community-wiki answers of a minimum length are eligible