Spu7Nix / SPWN-language

A language for Geometry Dash triggers
MIT License
1.06k stars 61 forks source link

Ignore item ID limit #286

Closed Milk-Cool closed 2 years ago

Milk-Cool commented 2 years ago

Error: "This level exceeds the item ID limit! (4096/999)"

How do I get around this? It doesn't seem to be a big issue. I don't want to recompile the whole thing myself just to get around this!

itsmebombie commented 2 years ago

you can only use 999 item ids per level. try reducing the script's item id usage

Milk-Cool commented 2 years ago

you can only use 999 item ids per level. try reducing the script's item id usage

I can't. I need 4096 pickup triggers in my level.

Why do I need to use 999 item IDs anyways? Geometry Dash seems to be able to handle more just fine

kr8gz commented 2 years ago

what are you even trying to do

itsmebombie commented 2 years ago

you can only use 999 item ids per level. try reducing the script's item id usage

I can't. I need 4096 pickup triggers in my level.

Why do I need to use 999 item IDs anyways? Geometry Dash seems to be able to handle more just fine

robtop moment

Milk-Cool commented 2 years ago

what are you even trying to do

use pickup triggers as memory units for an emulator

1 trigger = 1 byte

itsmebombie commented 2 years ago

you know that counters can store more than a byte, right?

Milk-Cool commented 2 years ago

it's just way easier this way

Milk-Cool commented 2 years ago

I mean, if it's the only option here...

Milk-Cool commented 2 years ago

what's the max value?

SpeckyYT commented 2 years ago

2^31-1

itsmebombie commented 2 years ago

the other option is to use way less coutners

itsmebombie commented 2 years ago

what's the max value?

the max safe value is ~2^26

itsmebombie commented 2 years ago

gd takes a huge time to load big numbers

SpeckyYT commented 2 years ago

gd takes a huge time to load big numbers

I tested adding 2^31-1 to a counter, and it took around 15 seconds in 2.1

itsmebombie commented 2 years ago

thats huge time

Milk-Cool commented 2 years ago

what's the max value?

the max safe value is ~2^26

then uhhh ig i can only use 26 bits per trigger, 3 bytes meaning i would need to use 1366 triggers which is still much more than i need

Milk-Cool commented 2 years ago

btw do you know if someone made a chip8 emulator in gd already?

itsmebombie commented 2 years ago

i'd guess bestgamer08 but he's banned on github

itsmebombie commented 2 years ago

he does all sorts of things

Milk-Cool commented 2 years ago

id? if you have it

Milk-Cool commented 2 years ago

also sorry for my terrible english

itsmebombie commented 2 years ago

what's the max value?

the max safe value is ~2^26

then uhhh ig i can only use 26 bits per trigger, 3 bytes meaning i would need to use 1366 triggers which is still much more than i need

you can always reduce the mem size to 3kb

SpeckyYT commented 2 years ago

what's the max value?

what do you mean? in spwn or gd?

in spwn (v0.8) it's around (+-) 2^53 and in gd (2.1) it's 2^31-1

itsmebombie commented 2 years ago

id? if you have it

i'm not sure if he has ever done it but there is a pretty big chance

Milk-Cool commented 2 years ago

what's the max value?

the max safe value is ~2^26

then uhhh ig i can only use 26 bits per trigger, 3 bytes meaning i would need to use 1366 triggers which is still much more than i need

you can always reduce the mem size to 3kb

chip8 memory size is 4kib sadly

itsmebombie commented 2 years ago

what's the max value?

the max safe value is ~2^26

then uhhh ig i can only use 26 bits per trigger, 3 bytes meaning i would need to use 1366 triggers which is still much more than i need

you can always reduce the mem size to 3kb

chip8 memory size is 4kib sadly

you can try using collision blocks for the remaining memory

itsmebombie commented 2 years ago

im not sure how efficient they would be tho

SpeckyYT commented 2 years ago

(btw, join the discord server, so we can discuss more easily 😎)

itsmebombie commented 2 years ago

true

Milk-Cool commented 2 years ago

(btw, join the discord server, so we can discuss more easily sunglasses)

i don't have discord installed rn sorry

itsmebombie commented 2 years ago

https://discord.gg/

SpeckyYT commented 2 years ago

(btw, join the discord server, so we can discuss more easily sunglasses)

i don't have discord installed rn sorry

discord also works on browser 💀 (it was actually primarely made for that)

itsmebombie commented 2 years ago

ikr

Milk-Cool commented 2 years ago

im not sure how efficient they would be tho

1 bit per two blocks

65536 objects just for memory

nah thanks

itsmebombie commented 2 years ago

real

Milk-Cool commented 2 years ago

(btw, join the discord server, so we can discuss more easily sunglasses)

i don't have discord installed rn sorry

discord also works on browser skull (it was actually primarely made for that)

oh yeah right, i just forgor for a moment

itsmebombie commented 2 years ago

i imagine that you could do it with n bits+1

itsmebombie commented 2 years ago

still not efficient but its way better than 65k blocks

Milk-Cool commented 2 years ago

sorry i have to go, see ya in discord ig

Milk_Cool#7881

itsmebombie commented 2 years ago

real

Milk-Cool commented 2 years ago

hopping onto discord

Milk-Cool commented 2 years ago

general

Milk-Cool commented 2 years ago

image

I was able to bypass this by manually editing the source code.

compiler/src/leveldata.rs line 294 const ID_MAX: u16 = 999;