Giter VIP home page Giter VIP logo

Comments (3)

totologic avatar totologic commented on June 16, 2024

For sprites, setting the height parameter to 0 in SCB3 for the lead sprite do the job. Do you know if we have a better choice ?

from ngdevkit.

dciabrin avatar dciabrin commented on June 16, 2024

If we consider the 02-sprite example, how could I remove properly a sprite from screen ? Same question for removing a single tile belonging to a sprite ?

I don't know if there's a single best answer to your question, setting the height looks like a fairly fast way to do that. I was thinking of moving the offset of the sprite off-screen, but it seems an equally fast option.

At the beginning of the program, you use the value 255 as the rank of a transparent tile in BIOS ROM to clear the tiles of the fix map. Does it mean my 255th tile in c-ROM is compulsorily overwriten by this transparent tile ?

No that's a arbitrary choice on my side, because the c-ROM in the original BIOS has an empty tile at that offset. So if you use an original ROM in place of ngdevkit's nullbios, you would reuse that tile (and have a nice eyecatcher intro at boot time for free :))

Using an empty tile to "clear" sprites or tiles should work but it looks like a waste of ressources for me. Maybe my point of view is wrong ?

Yes, definitely a waste of CPU cycles.

from ngdevkit.

dciabrin avatar dciabrin commented on June 16, 2024

For sprites, setting the height parameter to 0 in SCB3 for the lead sprite do the job. Do you know if we have a better choice ?

Obviously it's been a while since you opened the issue and you already have a full game running... but for the sake of the discussion I'm going to add two pointers to the neogeodev wiki here before closing that issue:

  1. the hello world tutorial from the wiki does exactely what you said: it cleans the sprite's hight for all sprites. So that seems a fairly quick way to achieve clean up.

  2. There's BIOS function LSP_1st dedicated to that purpose. It's doing a more thorough clean up, as explained in the wiki.

Kudos to the folks at neogeodev for their invaluable information.

from ngdevkit.

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.