Programamos un Runner en ensamblador Z80 ( Amstrad CPC )

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ก.ค. 2024
  • Partiendo de una base de sencillo motor ECS en ensamblador Z80, programamos los primeros pasos de un videojuego estilo runner para Amstrad CPC. Vemos cosas que hacer paso a paso para tener las mecánicas del juego funcionando y vamos resolviendo dudas sobre la marcha.
    Configuración de desarrollo utilizada:
    - Linux Manjaro 5.14.2-1 x86_64
    - CPCtelera 1.5 dev (16/09/2021)
    - GCC 11.1.0
    - Bash 5.1.8
    Clase especial para las asignaturas Videojuegos 1 y Razonamiento Automático de la Universidad de Alicante, Grados en Ingeniería en Informática e Ingeniería Multimedia.
    Asset Licenses
    Videojuego: The Abduction of Oscar Z / Dreamin'Bits (2020)
    URL: bit.ly/AbductionOscarZ
    Producción y Código por Tulo (@tulinmola)
    Arte e Historia por Alberto Hache (@Alberto_H9)
    Música y SFX por Gryzor87 (@Gryzor87)
    Usado con permiso de Dreamin'Bits (dreaminbits.com/)

ความคิดเห็น • 15

  • @oscarmendezcastellano8611
    @oscarmendezcastellano8611 2 ปีที่แล้ว +6

    Profesor Retroman, lo explicas todo con una naturalidad tan pasmosa, y no se si te das cuenta de la complejidad de lo que explicas. Eres Amo.

  • @jcamargo2005
    @jcamargo2005 ปีที่แล้ว +3

    Sensacional... Gracias por ese 'masterclass', trabajo de abilidad y artesania

  • @raulgarfer
    @raulgarfer 2 ปีที่แล้ว +4

    Explicas las cosas como si fuesen fáciles. Excelente clase, como siempre. Gracias

  • @JAVIPATXITG
    @JAVIPATXITG 2 ปีที่แล้ว +1

    Si hasta un cazurro como yo te entiende es que lo haces extraordinariamente bien. Me encanta...Genial!

  • @danielanguita8735
    @danielanguita8735 2 ปีที่แล้ว +1

    Genio.👏

  • @nonito5421
    @nonito5421 2 ปีที่แล้ว +1

    Madre de dios

  • @gregskuza7166
    @gregskuza7166 2 ปีที่แล้ว +1

    Great video, I wish it was in English…

  • @iqanansoft
    @iqanansoft 2 ปีที่แล้ว +1

    Hola "profesor retroman", sabe si existe algún IDE actual ,que mediante algun plugin se puedan codificar proyectos en BASIC 1.0, ( no ensamblador) sin necesidad de ejecutar un emulador.

    • @ProfesorRetroman
      @ProfesorRetroman  2 ปีที่แล้ว

      No, no conozco ningún IDE donde puedas hacer eso, pero tampoco entiendo muy bien para qué podrías querer eso. En los videos de la serie Amstrad GameDev Challenge enseñamos cómo utilizar editores modernos para escribir código BASIC cómodamente y ejecutarlo mediante un comando que lo introduce automáticamente en un DSK, lanza el emulador y lo ejecuta. BASIC 1.0 entiendo que es para programar para Amstrad y no se me ocurre por que querrías ejecutarlo fuera de un Amstrad. Veo útil usar editores modernos para programar cómodo (como hacemos en Amstrad GameDev Challenge) y luego probarlo en el emulador, ya que ese es el destino que uno quiere: el Amstrad. Si lo quieres para otra cosa, eso ya sería una cuestión personal.

  • @jolletxavier7036
    @jolletxavier7036 2 ปีที่แล้ว +1

    Hello, even if I can understand almost everything when I see the code, I don't speak spanish... So first thanks for the video, it is really clear and highlights some of the most issues on programming for the amstrad.
    I have a question and I don't know if you answered it in the video: where do the man_* functions come from (@31:11)? They seem really intersting but they are not inside the CPCTelera Github. Do you plan to publish them someday?

    • @ProfesorRetroman
      @ProfesorRetroman  2 ปีที่แล้ว

      Thank you for your kind words, Jollet. I try to always code in English to serve the purpose of being useful to a wider audience, even when my lessons are in Spanish because I teach in Spain. Nice to see that, despite being far from ideal, it is somewhat useful :).
      The man_* functions are from a software "component" called "Manager" created for this example. They are not CPCtelera's functions. I have previous lessons from this and previous courses explaining the Entity-Component-System architecture. In this architecture, we create "Managers" whose purpose is to manage creation, storage, access and destruction of "Objects". In this case, you are seeing man_entity_* functions, which belong to our "Entity Manager", whose purpose is to manage game entities.
      You can find further explanations on this architecture and some partial implementations in my lessons from 2019/20 and in my series called "GameEngine ECS". You can find this content easily if you visit the playlists in my channel.
      With respect to releasing the source code, I'm affraid I won't. This content is designed for learning purposes. Following my personal experience and knowledge, as well as many published works on the matter, I don't share educational code as this has a negative effect on education. Even if students have to copy the code from my videos, this simple act produces much more learning than having the original code from the start. Sorry about that :).

    • @jolletxavier7036
      @jolletxavier7036 2 ปีที่แล้ว +1

      @@ProfesorRetroman Thanks for answering me, I will have a look at the Game Engine ECS serie and ask more questions there. I can understand your teacher point of view...
      Or you can do something different: a github with only declaration of the needed methods and macros (input / outputs / overall of the function) and ask people to provide an implementation on new branches that you can review with your students.
      I can beta test if you wish ;)

  • @josegarciaperez6003
    @josegarciaperez6003 2 ปีที่แล้ว +1

    Alrededor de 3:19:00.
    Igual es una "burrada", pero se me ocurre que "key is pressed, execute action" se podría haber implementado también así:
    ld l, 2(iy)
    ld h, 3(iy)
    ld (#automodificable+1), hl
    automodificable:
    call #0000 ; esto NO será cero cuando esté funcionando
    jr loop_keys
    Ya, ya, si fuese en ROM no funcionaría... pero no es el caso ;-)
    Se ahorraría el ld hl, #loop_keys y el push hl, aunque imagino que ld (NN), hl tardará bastante :-(

    • @ProfesorRetroman
      @ProfesorRetroman  2 ปีที่แล้ว

      No es ninguna burrada, al contrario. Es otra forma posible de hacer las cosas, que también hemos comentado en otros vídeos anteriores. Haces muy bien en comentarla y así también la recordamos y revisamos ☺️.
      Para casi todo, existen muchísimas soluciones. La gracia está en entenderlas y ser capaz de diseñarlas. Sabiendo hacer eso, ante un problema cualquiera,seremos capaces de elegir entre nuestras soluciones conocidas o incluso diseñar una nueva según sea necesario. A veces querremos más eficiencia temporal, otras más espacial, otras preferiremos usar la pila y otras variables estáticas. Todo tiene ventajas e inconvenientes. Lo que propones es muy eficiente temporalmente y tiene como desventajas no funcionar en ROM y no ser reentrante. Siempre que esas desventajas no sean un problema, es una magnífica solución para elegir :)
      Gracias por tomarte el tiempo de analizar y participar ☺️

    • @josegarciaperez6003
      @josegarciaperez6003 2 ปีที่แล้ว +1

      @@ProfesorRetroman Siempre gracias a ti. Me encantan tus vídeo, y del tiempo que paso viéndolos lo único que me preocupa es cuando se terminan :-) Gracias de nuevo.