A New Game Written in D

Kenny Shields mail at kennyshields.net
Wed May 18 18:46:11 UTC 2022


On Wednesday, 18 May 2022 at 17:15:44 UTC, Vladimir Panteleev 
wrote:

> Cool game! I got to stage 19. I had no problems with the Linux 
> port, except the occasional crash when generating maps that was 
> already mentioned.

Thanks for playing! Also I think you beat my current phase 
record! Glad to hear that your
experience was good excluding the map crash issue (still looking 
into that).

> - You can make collision less frustrating by making the player 
> slide along the edge of the obstacle partially in the direction 
> they're facing. The easiest way to do this is that, when a 
> collision happens, instead of preventing movement in the 
> player's direction, you allow it to happen, but then as long as 
> the player and the obstacle intersects, the obstacle pushes the 
> player out, away from its center. Doing this in the same frame 
> will make it seem like the player is sliding along the side of 
> the obstacle.

Yes I agree, I think this would be the proper approach to 
handling collision. I actually made an attempt to implement this 
method a while back but never finished it. I think I'll re-visit 
this now to see if it can replace the current implementation.

> - This game could be almost categorized as a twin-stick 
> shooter, though it's not quite so due to only being able to 
> move forward in the direction you're aiming. I'm not sure what 
> this constraint adds but it does seem very unusual.

I've had a lot of feedback about the movement being strange and 
it definitely is compared to traditional movement schemes, though 
I think it works well enough for how simplistic the game is. I 
may look into changing it in the future but I have a feeling that 
the movement will feel less strange if the collision is reworked 
as you suggested previously.

> - I didn't try all combinations of craftables, but there is 
> almost no reason to build a regular turret instead of the tesla 
> coil. The tesla coil has a higher DPS/$, never misses, and does 
> not have friendly fire.

Admittadley I didn't put much thought into some of the craftables 
and how it melds with the gameplay, a lot of it was basically me 
getting an idea and thinking "Oh that would be cool" and then 
throwing it in. Turrets were the original defensive craftable 
that I had added, and once coils came along they definitely fell 
by the wayside. I'll be revisiting these at some point to see 
what can be done.

> - Oddly, sprinting energy does not recover when standing still 
> but holding Shift.

Good catch, I'll add a fix for that.

> - "Game seed" seems to affect only the generation of the map 
> layout, but not of pickups or your initial position; perhaps 
> calling it "map seed" would be more accurate.

Originally it was actually called "Map Seed" and was really only 
used for the map. I recently changed it to "Game Seed" because 
I'm actually passing the engine's generator 
(MersenneTwisterEngine instance that actually takes the seed) to 
all of the "chance" based areas of the game logic, things like 
enemy type when spawning, crate types and what not, so it 
definitely should be influencing things beyond the map 
generation. I wonder if maybe the generator isn't properly being 
reseeded when creating a new game after a previous game? 
Regardless I take a look to see what the deal is.

> - Choosing to play on a larger map seems to be strictly 
> disadvantageous, as pickups are more rare due to being more 
> spread out.

For sure, there unfortunately isn't really anything in the logic 
to adjust for gameplay on larger maps. Honestly I really only put 
different map sizes in there to add some variance in what the 
player was able to choose from, but I'm starting to wonder if a 
better approach would be to meet in the middle with a "medium" 
size map and just design the gameplay around that.



More information about the Digitalmars-d-announce mailing list