akuli / 3d-game-experiment Goto Github PK
View Code? Open in Web Editor NEWMy experiment at creating a 3D game without libraries for doing 3D stuff
License: MIT License
My experiment at creating a 3D game without libraries for doing 3D stuff
License: MIT License
Usually you can abort the game by just running into an enemy.
Sometimes, in a long-running game, it gets stuck at 128 enemies
Keeps slipping next to wall, introduced in #80
Instead of releasing (and tagging) every master branch, maybe run the release build nightly, doing nothing if it hasn't changed
Lines 60 to 68 in 0cd979b
3d-game-experiment/src/guard.c
Lines 31 to 35 in 0cd979b
>>> (0.2+0.2)+0.2+((0.2+0.2)+0.2)
1.2000000000000002
>>> 0.2+0.2+0.2+0.2+0.2+0.2
1.2
Introduced in #80
would make some codes a lot moar readable
#56 introduces names for maps, but no way to change them
3d-game-experiment/src/looptimer.c
Line 19 in 4b1d6e5
1000/60 = 16.666666666666668 Truncating this can make big error
Could be enemy image that appears to be on the ground
Using a wall to line up the players:
Caused by returning a weird value here. The returned value makes sense only if the players are at the same height.
3d-game-experiment/src/ellipsoidbump.c
Lines 245 to 252 in 5a5ea3b
Maybe assets/generated
folder would be good
Would be useful for "Add enemy" button, with enemy image displaying next to it
There are currently 3 sizes of buttons: normal, BUTTON_BIG
and BUTTON_SMALL
. #56 adds BUTTON_TINY
. These should be an enum, not 3 different bitflags that are asserted to be mutually exclusive.
Would be better to have each spawn point be equally likely, and just spawn a lot more enemies if needed
Would be nice to have key binding for delete key that would delete the selected wall or enemy
3d-game-experiment/src/sound.c
Lines 49 to 55 in 55641ff
But I can smash arrow keys really fast so that this gets printed:
src/sound.c:103: playing soon: assets/sounds/pop.wav
src/sound.c:115: Mix_PlayChannel failed: No free channels available
src/sound.c:103: playing soon: assets/sounds/lemonsqueeze.wav
src/sound.c:115: Mix_PlayChannel failed: No free channels available
src/sound.c:103: playing soon: assets/sounds/lemonsqueeze.wav
src/sound.c:103: playing soon: assets/sounds/pop.wav
src/sound.c:115: Mix_PlayChannel failed: No free channels available
src/sound.c:103: playing soon: assets/sounds/pop.wav
src/sound.c:115: Mix_PlayChannel failed: No free channels available
src/sound.c:103: playing soon: assets/sounds/boing.wav
src/sound.c:115: Mix_PlayChannel failed: No free channels available
Would be nice, now that you can edit the enemy locations in map editor
It builds executable but it fails to start. Reason turns out to be:
3d-game-experiment/src/player.c
Line 32 in a979298
Each struct EllipsoidPic
is 27MB (ELLIPSOIDPIC_SIDE
is 150
):
3d-game-experiment/src/ellipsoid.h
Line 31 in a979298
So now we have 1.35GB of static storage, lol. Turns out (thanks #winapi
on libera) that there's essentially a limit of 1GB, and this is just insane and I really should use malloc. Multiple mallocs is better than one malloc, so that the memory areas can be more spread out.
put players on top of each other and wait. Sometimes top player becomes bottom player after a while
Stacked players were introduced in #80
Not great when developing locally, but warnings in ci are too easy to ignore
Would be nice to mouse-drag things from the side into the map, and on the side, also see how many items remain so you're aware of max number of each thing.
Add the following map file to custom_maps/
and look at it in the map chooser. The walls near the two enemies are a bit glitchy.
Name=tiny
OriginalName=Big mess
CopyCount=2
SortKey=91.0000000000
-- -- -- -- -- -- -- --
| |
| |
| |
| | |
| | |
| |p | |
| | | |
| |
| |
-- --
| e |e | |
-- --
|p |
| |
| |
| |
-- -- -- -- -- -- -- --
Introduced in #110
I think map would be better name: "place editor" just seems shitty, but "map editor" is better
Since #56 it displays name of map, but doesn't actually preview the map like the chooser does. I think it should.
does not move upwards when unflattening
Will become more of a problem when you can make your own places, and so there will be more places
To reproduce, stack two players next to a wall and try to make the other player move over the wall.
Related: #84
And player spins many turns during jump
Stuff relies on getting things from glob in alphabetical order. Posix sorts glob results. Does my windows glob implementation?
Currently, a player can jump if its y
speed is exactly zero. That's dumb.
Would be nice to run tests on github actions
Ideally github actions would also build and zip the game for windows users
Sometimes the tip of bottom player doesn't go behind the top player, depending on camera rotation. It is not a feature.
If two players are on top of each other and the top player walks away, it falls to ground quicker than gravity seems to work when jumping
Currently the version on github only has one enemy, that's why this remained unnoticed
Lines 190 to 196 in f7d60e0
checks does nothing lel
at least line_intersect_plane()
[23:35] ThePhilgrim | WHAT THE HELL IS MATHSTUFF !????
...
[23:37] Akuli | it is mostly linear algebra though, maybe it should just be linalg.c and linalg.h
Map editor (#20) doesn't support these, and can't really support: usually neverdie enemies are red, but map editor highlights an enemy as red when you are dragging it. This conflicts.
Instead of neverdie enemies, I think it would be better to allow multiple spawn places for enemies. The probability for an enemy to spawn at a given place would be proportional to how much area it can reach when spawned from that place, so the map should get an even distribution of enemies.
Also, when the game starts, every spawn place should get an enemy, so that you aren't surprised when they spawn from some place that can only reach two squares.
shift+arrow keys should generally be same as drag and drop:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.