Giter VIP home page Giter VIP logo

3d-game-experiment's People

Watchers

 avatar  avatar  avatar

3d-game-experiment's Issues

too many tags

Instead of releasing (and tagging) every master branch, maybe run the release build nightly, doing nothing if it hasn't changed

comment defines variable named c but never uses it

Suppose that the ellipsoid and wall intersect at some point p. Let c be
the corner of the wall that is most far away from the ellipsoid. Let
diam(w) denote the distance between opposite corners of a wall. Then
|center(w) - center(el)|
= |center(w) - p + p - center(el)| (because -p+p = zero vector)
<= |center(w) - p| + |p - center(el)| (by triangle inequality)
<= diam(w)/2 + |p - center(el)| (because p is in wall)
<= diam(w)/2 + max(xzradius, yradius) (because p is in ellipsoid)

subtle float bug

It's fine to compare floats with '==' here because:
- x and z coords are integer+0.5f (or something very unlikely to
collide for guards dropped by players)
- y coord is SPACING_BASIC + SPACING_BASIC + ... + SPACING_BASIC,
some number of times

>>> (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

players move weirdly when vertically lined up

Using a wall to line up the players:

weirdishitti-2021-07-25_12.58.57.mp4

Caused by returning a weird value here. The returned value makes sense only if the players are at the same height.

float ellipsoid_bump_amount(const struct Ellipsoid *el1, const struct Ellipsoid *el2)
{
Vec3 diff = vec3_sub(el1->center, el2->center);
float difflen = hypotf(diff.x, diff.z); // ignore diff.y
if (difflen < 1e-5f) {
// centers very near each other
return el1->xzradius + el2->xzradius;
}

button size messiness

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.

sound channels

/*
Make sure that we can play all the needed sounds at the same time, even
when smashing buttons. With 20 channels, I could barely smash buttons fast
enough to run out of channels, but I couldn't do that with 25 channels. The
default seems to be 16 channels.
*/
Mix_AllocateChannels(32);

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

windows build broken

It builds executable but it fails to start. Reason turns out to be:

static struct EllipsoidPic epics[50];

Each struct EllipsoidPic is 27MB (ELLIPSOIDPIC_SIDE is 150):

uint32_t cubepixels[2][ELLIPSOIDPIC_SIDE][ELLIPSOIDPIC_SIDE][ELLIPSOIDPIC_SIDE];

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.

2x3 places

off

  • Too big and camera too low
  • Not centered

Affects map editor and map chooser

map editor drag and drop rewrite

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.

slight flickering in walls

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

map vs place

I think map would be better name: "place editor" just seems shitty, but "map editor" is better

windows glob sorting

Stuff relies on getting things from glob in alphabetical order. Posix sorts glob results. Does my windows glob implementation?

gh actions setup

Would be nice to run tests on github actions

Ideally github actions would also build and zip the game for windows users

stacked players: drawing order

Sometimes the tip of bottom player doesn't go behind the top player, depending on camera rotation. It is not a feature.

weird codes in wall.c

if (fabsf(wc->top1.x - wc->top2.x) < 1e-5f) {
// would get issues in linear_map()
*ymin = 0;
*ymax = 0;
}
*ymin = (int) linear_map(wc->top1.x, wc->top2.x, wc->top1.y, wc->top2.y, x);
*ymax = (int) linear_map(wc->bot1.x, wc->bot2.x, wc->bot1.y, wc->bot2.y, x);

checks does nothing lel

mathstuff file name

[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

neverdie enemies

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.

map editor key bindings

shift+arrow keys should generally be same as drag and drop:

  • Move players
  • Move ellipsoids
  • Move walls
  • Resize the place

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.