RandyGaul / player2d

Educational demo implementing a swept 2D character controller
89 stars 10 forks source link

Fix undefined reference when using make #1

Closed svercl closed 5 years ago

svercl commented 5 years ago

This fixes compilation on GNU/Linux.

RandyGaul commented 5 years ago

Thanks!

RandyGaul commented 5 years ago

By the way it’s all in a good state to play with now. I still need to add feature for sloped tiles and falling off edges. Also going to use some free art packs to try and brighten the world and character. Depending on time I might also add in some features like wall grabbing. Let me know if you had any comments!

svercl commented 5 years ago

This is coming along quite nicely! I keep checking back on it, and I see you keep adding more. Is there anything else I could help with?

RandyGaul commented 5 years ago

If you want to add something, please do! This is a demo I'm writing for a presentation I'm giving this Friday at a local university. So it is just a toy, and I am adding in pretty much whatever I feel like :)

Right now I'm hooking up some animations for the hero. There is run/idle/jump. Then I will implement sloped tiles.

hero

Here's my personal TODO list:

Once these are finished, I will be pretty much done!

What kind of things would you like to add? I am not sure what you would be interested in. So here are some random ideas you might like:

In general I'm open to ideas, and would be happy to merge in any pull request (as long as it doesn't bring in giant dependencies) :)

svercl commented 5 years ago

I just have a couple questions.

Also, I am working on crates, but I'm not very good with physics in general. You can find my current progress here.

RandyGaul commented 5 years ago

1) I will likely finish up a few polish items on the demo, like put in some music, jump sound effect. Other than this, the only plans I have right now are to try and get it running on the browser. I want to create a webpage to demonstrate all the cute_headers by showcasing all the different examples in the browser. That is why I had made an attempt to compile this project with emscripten. 2) I don't think the presentation will be streamed, but it might be recorded. If it is not recorded, that's not a big deal since I will release the slides with all my notes on them.

I'll take a look at your crates progress and post some feedback.

Edit: Tonight I need to implement sloped tiles, and use the editor to finish the map. I might also put in music + jump sound fx if I have time.

RandyGaul commented 5 years ago

Great crate progress! I can't run the code here but can take a look when I get home. I'm very excited to have crates for the demo! I will share my thoughts on how I think the best strategy for implementing crates would look like:

    for each iteration from 0 to N
        for each crate
            for each collision
                gently push crate away from the other shape
    record each crate position in crate.old_pos

    for each iteration from 0 to N
        for each crate
            for each collision
                push crate away from the other shape

    for each crate
        v_delta = crate.pos - create.old_crate_pos
        create.vel = v_delta

If you have other questions please ask! You are already very close to implementing some good crate pushing, and there would not need to be a lot more code to get it working. It is just a matter of picking good algorithms, and a little bit of fine-tuning :)

svercl commented 5 years ago

Okay, I think I am starting to understand this a little more. I just pushed some changes. It's essentially the same code from player2d.h. I still have to do the collision between two or more crates. EDIT: Just thought I'd add that it's not quite perfect yet.

RandyGaul commented 5 years ago

Cool! If you want feedback make a PR, I'll merge it in, and take a look.