[HN Gopher] Show HN: My platforming game written in C 89 ___________________________________________________________________ Show HN: My platforming game written in C 89 Author : zamfofex Score : 17 points Date : 2023-07-07 21:30 UTC (1 hours ago) (HTM) web link (zamfofex.neocities.org) (TXT) w3m dump (zamfofex.neocities.org) | suprjami wrote: | Can we have a few screenshots? | krapp wrote: | Please change your jump controls. Having the same keys for | walking also jump when double-pressed makes twitchy platforming | really difficult (especially given how loose the friction seems | to be) and not in a good way. | | Typically I've seen the spacebar, up button or W used for this. | In terms of mechanics It's just adding y (or -y, whichever is up) | to the player's velocity vector after a ground check. | | Otherwise, good job. | zamfofex wrote: | I have been working on this game somewhat sparsely for the past | three years or so. However, it is still in a very early stage, | and there is a lot of work to do. | | One of my friends encouraged me to post about it here, since he | felt people might find interesting how I don't use any libraries | for it. | | The game can be played on a browser by virtue of WebAssembly. | There are native ports using either MiniFB or SDL2, but you have | to build those yourself. | | I decided to write the game in C because I feel like it is a | simple language that a lot of people can understand well enough, | and I didn't think I needed anything more involved or | complicated. | | Over time, the game's code became complicated, and I decided to | use advanced features such as coroutines and higher order | procedures, besides general overly engineered abstractions. | | But then, over time I grew to feel like a lot of those | abstractions didn't really add anything to it, and just made it | more complicated (and oftentimes more buggy) than it really | needed to be, so a few weeks ago, I made a significant | refactoring to it to remove all of those abstractions without | removing almost any features from the game. | | Milestones are released effectively whenever I get the game's | code to a decently presentable state. Sometimes, this means there | are a lot of changes and big refactorings, but sometimes it means | there are only a few small changes. | | The game uses a simple 2D model system to generate images for the | character's animations dynamically during initialisation. (The | source code can be browsed using a web browser on its page.) | | The character can be controlled using the arrow keys or "WASD" | ("A" and "D") (double-tap a direction to jump). | Minor49er wrote: | While the scrolling and animation is smooth, why not have a | dedicated jump button? With the current controls, the character | would jump when I was just trying to walk around normally. It's | also really difficult to gauge how much of a runway is needed | to make the jumps with double tapping | virtue3 wrote: | I find this incredibly challenging to play with the current | control scheme. Either up or space would be nice to jump | with. Heck even if a single mouse click was jump it would be | easier. | | Having to time holding down left and then double taping it is | an exercise in frustration. | | Other than that it looks interesting, I enjoyed the moving | platforms. | moretrashplz wrote: | [dead] | pengaru wrote: | There is something very wrong with the controls for jumping, as | others have pointed out. | disqard wrote: | The character sometimes passes (horizontally and vertically) | through walls/ceilings, and I can't seem to control when this | behavior occurs. | | Is there a special game mechanic in this platformer? ___________________________________________________________________ (page generated 2023-07-07 23:00 UTC)