EdD
Wacky Amoebatron
Posts: 34
|
Post by EdD on Oct 9, 2023 15:55:47 GMT
After reading the forum like crazy and spending hours and hours searching for the error, I finally found it. Due to memory constraints, I had to delete 4 or 5 sprites and adapt the code. When saving the project the first few times and then loading it again, either the MPAGD resets, or it loads but completely corrupted. To prevent this from happening, I have to keep sprites from 0 to 17. However, if I try to delete one more, it doesn't matter if it's 17 or 3, everything falls apart. Any ideas on how to delete 2 or 3 sprites that I no longer need? Después de leer como loco el foro, perder horas y horas buscando el error ya di con el. Por cuestiones de memoria he tenido que borrar 4 o 5 sprites y adaptar el código. Al grabar el proyecto las primeras veces, y cargarlo de nuevo o se resetea el MPAGD, o sale pero totalmente corrompido. Para que esto no ocurra tengo que tener sprites del 0 al 17, solo que intente eliminar uno más, da lo mismo que sea el 17 que el 3 todo se hecha a perder. ¿alguna idea de como poder borrar 2 o 3 sprites que me sobran?
|
|
|
Post by flopping on Oct 10, 2023 21:29:11 GMT
Ese es un problema (conocido) del MPAGD, esperemos que se arregle en futuras versiones, aunque es algo aleatorio e impredecible, puedes borrar y a veces no pasa nada malo y otras se te queda todo corrupto. Te recomiendo que hagas una copia y trabajes con la copia, asi tendras el original siempre. Para borrar, empieza siempre por el ultimo sprite y el ultimo frame, es decir si tienes 17 sprites y quieres borrar el 12 y el 16, empieza a borrar primero el 16 y borralo frame a frame, no el sprite de golpe, ves borrando frame a frame desde el ultimo al primero, si el sprite tiene por ejemplo 3 frames, borra primero el frame 2, luego el 1 y despues el 0, asi es posible que te deje borrar sin que se te corrompa el programa, ten la precaucion de grabar si te sale bien, cada vez que borres algo, y haz una copia, para no perder ese avance, es algo tedioso, pero no hay una forma "segura" de borrar sin problemas. Suerte en la empresa. Por cierto, por los graficos que has puesto, parece un juego tipo Sabre Wulf,
|
|
|
Post by ramon on Oct 11, 2023 15:13:20 GMT
The problem is that zxengine cannot count more than 12 sprites since the routine that controls the index uses 8 bits. You have to make changes to the code to be able to handle more sprites. I recommend handling fewer sprites. If you are interested, I can share the ZXEngine.asm that I use, modified for this, and you will recover your original project.
|
|
EdD
Wacky Amoebatron
Posts: 34
|
Post by EdD on Oct 11, 2023 20:54:57 GMT
Ese es un problema (conocido) del MPAGD, esperemos que se arregle en futuras versiones, aunque es algo aleatorio e impredecible, puedes borrar y a veces no pasa nada malo y otras se te queda todo corrupto. Te recomiendo que hagas una copia y trabajes con la copia, asi tendras el original siempre. Para borrar, empieza siempre por el ultimo sprite y el ultimo frame, es decir si tienes 17 sprites y quieres borrar el 12 y el 16, empieza a borrar primero el 16 y borralo frame a frame, no el sprite de golpe, ves borrando frame a frame desde el ultimo al primero, si el sprite tiene por ejemplo 3 frames, borra primero el frame 2, luego el 1 y despues el 0, asi es posible que te deje borrar sin que se te corrompa el programa, ten la precaucion de grabar si te sale bien, cada vez que borres algo, y haz una copia, para no perder ese avance, es algo tedioso, pero no hay una forma "segura" de borrar sin problemas. Suerte en la empresa. Por cierto, por los graficos que has puesto, parece un juego tipo Sabre Wulf, Gracias, cada día de trabajo se ha vuelto un poco sufrimiento, uno no sabe lo que le espera al día siguiente. Ojala Jonathan lo puede arreglar, por que el programa es fantástico. El juego no es tipo sabre (mucho para mí aún), es plataformero más tipo Profanatión. "Thank you, every workday has become a bit of a hardship; one never knows what to expect the next day. Hopefully, Jonathan can fix it because the program is fantastic. The game is not like 'sabre' (still too much for me), it's more of a platformer, more like 'Profanation.' "
|
|
EdD
Wacky Amoebatron
Posts: 34
|
Post by EdD on Oct 11, 2023 20:58:24 GMT
The problem is that zxengine cannot count more than 12 sprites since the routine that controls the index uses 8 bits. You have to make changes to the code to be able to handle more sprites. I recommend handling fewer sprites. If you are interested, I can share the ZXEngine.asm that I use, modified for this, and you will recover your original project. Ante todo gracias ramon, por estar siempre ahí. Aunque he recuperado un trabajo de días atrás, me encantaria que me pasaras el asm para recuperar cositas...y sobre todo por si me vuelve a parar. He pasado de trabajar con alegría a tener un miedo atroz cada día que grabo el proyecto Above all, thank you, Ramon, for always being there. Although I've recovered a job from a few days ago, I would love it if you could pass me the ASM to recover some things... and especially in case it stops again. I've gone from working joyfully to having a tremendous fear every day I record the project
|
|
|
Post by ramon on Oct 11, 2023 21:17:37 GMT
EngineZX.asm (150.82 KB) change this number if you want. NUMSPR equ 19 ; number of sprites.
|
|
EdD
Wacky Amoebatron
Posts: 34
|
Post by EdD on Oct 11, 2023 22:00:51 GMT
View Attachmentchange this number if you want. NUMSPR equ 19 ; number of sprites. 1000 thx
|
|
|
Post by xavisan on Nov 26, 2023 22:01:05 GMT
To use more sprites you must modify the ZXEngine.asm file, but I do not recommend it, since it makes the game unstable in most cases, in addition to causing a lot of slowness, if you want to increase it you can do so by modifying this line by the amount what do you want:
NUMSPR equation 11; number of sprites. (in my case I use a maximum of 11)
|
|
|
Post by ramon on Nov 27, 2023 9:44:52 GMT
Xavisan prueba el engine que compartí seguro que puedes aumentar unos cuantos sprites con un ritmo sostenible. Está probado para 19!
|
|
|
Post by oss003 on Nov 28, 2023 21:04:34 GMT
You don't have to change NUMSPR for defining sprites. Changing NUMSPR is changing the max nr of sprites simultaneously on the screen, not the max definition nr of sprites. The number of frames defines how much memory is used, this is 128 bytes per frame.
Greetings Kees
|
|
|
Post by ramon on Nov 28, 2023 23:00:43 GMT
I understand. Thanks for the information. Expressed this way it is much more correct.
|
|
|
Post by xavisan on Dec 1, 2023 18:26:41 GMT
Xavisan prueba el engine que compartí seguro que puedes aumentar unos cuantos sprites con un ritmo sostenible. Está probado para 19! Muchas gracias Ramon, procedo a descargarlo.
|
|