landgreen / n-gon

2-d physics rogue-lite platformer shooter
https://landgreen.github.io/n-gon/
GNU General Public License v3.0
134 stars 193 forks source link

Using n-gon as a base for a science project #259

Closed AnnonymousNerd87 closed 1 month ago

AnnonymousNerd87 commented 1 month ago

I am doing a science project on nuclear energy and I want to use n-gon as a base for the movement and code, but don't want too much of n-gon's features so it will be easier to present and show what I did. I already set the tech frequency for all the tech to 0, with the exception of a placeholder tech I made, and next I'm going to remove the ability to get guns other than foam, (bc foam is easy to work with and I can change the color and stuff of the particles to fit the project) but am stuck because guns don't use the same frequency system that tech uses. how can I ensure that foam is the only option? I already set the number of visible choices to 1, but I can't figure out how to set the random function to always be 8 for foam.

AnnonymousNerd87 commented 1 month ago

tldr; How can I set foam to be the only possible gun without deleting all the other guns

Masbirb commented 1 month ago

Maybe on start you are given a tech that gives you foam and then set gun pickup frequency to 0

kgurchiek commented 1 month ago

If you don't want to delete the other guns couldn't you just find a seed that gives foam in the first gun powerup?

AnnonymousNerd87 commented 1 month ago

I would like it to be in the code, like maybe setting the random value for gun pickups to always be foam.

On Wed, May 29, 2024 at 11:49 PM Cornbread2100 @.***> wrote:

If you don't want to delete the other guns couldn't you just find a seed that gives foam in the first gun powerup?

— Reply to this email directly, view it on GitHub https://github.com/landgreen/n-gon/issues/259#issuecomment-2138801563, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHEAKNFCUSK3X6RYFIIOTCLZE3DYNAVCNFSM6AAAAABIPTILGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZYHAYDCNJWGM . You are receiving this because you authored the thread.Message ID: @.***>

AnnonymousNerd87 commented 1 month ago

I can't find where it spawns the gun powerup in level initial, I can find where it spawns the heals and research but not the gun. I need to remove the gun and add a tech which gives foam but I can't find where to do this in the code

kgurchiek commented 1 month ago

The gun is spawned in the spawnStartingPowerUps function in powerup.js on line 1459.

AnnonymousNerd87 commented 1 month ago

got it

On Thu, May 30, 2024 at 1:32 PM Cornbread2100 @.***> wrote:

The gun is spawned in the spawnStartingPowerUps function in powerup.js on line 1459.

— Reply to this email directly, view it on GitHub https://github.com/landgreen/n-gon/issues/259#issuecomment-2140817963, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHEAKNCC675W2BU3GMSCBJDZE6EFPAVCNFSM6AAAAABIPTILGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBQHAYTOOJWGM . You are receiving this because you authored the thread.Message ID: @.***>

AnnonymousNerd87 commented 1 month ago

Now I just have to add a tech which gives foam

On Thu, May 30, 2024 at 1:47 PM Felix Koenig @.***> wrote:

got it

On Thu, May 30, 2024 at 1:32 PM Cornbread2100 @.***> wrote:

The gun is spawned in the spawnStartingPowerUps function in powerup.js on line 1459.

— Reply to this email directly, view it on GitHub https://github.com/landgreen/n-gon/issues/259#issuecomment-2140817963, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHEAKNCC675W2BU3GMSCBJDZE6EFPAVCNFSM6AAAAABIPTILGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBQHAYTOOJWGM . You are receiving this because you authored the thread.Message ID: @.***>