Giter Site home page Giter Site logo

Comments (4)

Cleptomania avatar Cleptomania commented on July 30, 2024

This is probably a bit of a tough one to tackle, and likely requires some changes Arcade side to enable it really. Roughly what we need is to be able to Z-index sprites, and then use a depth buffer during rendering to handle global z-index across spritelists, but Arcade doesn't currently support that. This issue has been discussed a lot on Arcade and there are some ideas floating around, so we will probably just hold off on this until there's a solution available in Arcade(or at least a recommended way to handle it).

The depth buffer solution mentioned above isn't necessarily a silver bullet, as any sprites with an alpha that's not 0.0 or 1.0 will cause issues(AKA partially transparent sprites).

from community-rpg.

einarf avatar einarf commented on July 30, 2024

EDIT: Ignore this comment. I did not fully understand the problem.

from community-rpg.

pushfoo avatar pushfoo commented on July 30, 2024

We could solve this without changing rendering by using assets, map design, and collision logic that prevent drawing the player on the same tile as another foreground sprite (NPCs, buildings, interior furniture, etc). Pokemon Red/Blue/Yellow on the Gameboy use this technique. Tall grass is the only exception I know of.

The problem with this solution is it requires a notion of grid tiles in the game. From what Clepto told me on discord, the game currently only has unpacked sprites at pixel locations. Most classic JRPGs seem to use a grid approach, so adding it would definitely be authentic to the inspiring material. Maybe we could do modulo?

The map design part of this solution would tie into #10, but we can also leave solving this problem until after PyCon. There are more pressing issues for the sprint, some of which I'll be filing today.

from community-rpg.

einarf avatar einarf commented on July 30, 2024

It is that expensive to sort a player + npc spritelist by x and y position every frame? If we're talking about 10-20 sprites it can't be that bad?

from community-rpg.

Related Issues (20)

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.