UG BASIC, le basic micro 8bit miracle ?
+3
Fabf
Matari
drfloyd
7 participants
Page 2 sur 2
Page 2 sur 2 • 1, 2
Re: UG BASIC, le basic micro 8bit miracle ?
et bien... oui ! c'est mieux non que de droite à gauche ou de haut vers le bas genre ?
Re: UG BASIC, le basic micro 8bit miracle ?
Je viens d'essayer UGBASIC, c'est assez etonnant
Mais je n'arrive pas à affichr des images correctement...
Quelqu'un se sert de UGBASIC ?????
Ca accepte les PNG mais il faut les créer avec quel outil ces PNG en 16 couleurs ?
Mais je n'arrive pas à affichr des images correctement...
Quelqu'un se sert de UGBASIC ?????
Ca accepte les PNG mais il faut les créer avec quel outil ces PNG en 16 couleurs ?
_______________________________________________________
Re: UG BASIC, le basic micro 8bit miracle ?
salut drfloyd, tout d'abord, je suis content que vous ayez commencé à utiliser ugBASIC et que cela vous ait surpris!
En ce qui concerne les images, vous devez garder à l'esprit que, pour des raisons d'efficacité, aucun contrôle n'est effectué sur les dimensions et, pour éviter de manipuler les graphiques d'une manière différente de celle souhaitée par l'auteur, aucun traitement tel que le redimensionnement n'est effectué.
Dans le cas de COLECOVISION, les images peuvent être au format JPEG, PNG, TGA, BMP, PSD, GIF, HDR, PIC et PNM with 256x192 pixel. Celles-ci sont "mappées" à l'aide de la palette standard TMS9918, de sorte que les couleurs sont les plus proches les unes des autres. Personnellement je conseille d'utiliser le format PNG car c'est celui qui permet d'avoir le meilleur contrôle sur les images, et pour les créer il suffit d'utiliser le software "Gimp", puis de faire IMAGE > MODE > INDEXE et d'indiquer 16 couleurs pour le l'image soit valide pour ugBASIC.
Faites-moi également savoir si je peux être utile!
En ce qui concerne les images, vous devez garder à l'esprit que, pour des raisons d'efficacité, aucun contrôle n'est effectué sur les dimensions et, pour éviter de manipuler les graphiques d'une manière différente de celle souhaitée par l'auteur, aucun traitement tel que le redimensionnement n'est effectué.
Dans le cas de COLECOVISION, les images peuvent être au format JPEG, PNG, TGA, BMP, PSD, GIF, HDR, PIC et PNM with 256x192 pixel. Celles-ci sont "mappées" à l'aide de la palette standard TMS9918, de sorte que les couleurs sont les plus proches les unes des autres. Personnellement je conseille d'utiliser le format PNG car c'est celui qui permet d'avoir le meilleur contrôle sur les images, et pour les créer il suffit d'utiliser le software "Gimp", puis de faire IMAGE > MODE > INDEXE et d'indiquer 16 couleurs pour le l'image soit valide pour ugBASIC.
Faites-moi également savoir si je peux être utile!
spotlessmind1975- Patient en incubation
- Nombre de messages : 7
Age : 48
Localisation : Roma, Italia
Date d'inscription : 30/10/2022
Re: UG BASIC, le basic micro 8bit miracle ?
drfloyd a écrit:Je viens d'essayer UGBASIC, c'est assez etonnant
Mais je n'arrive pas à affichr des images correctement...
Quelqu'un se sert de UGBASIC ?????
Ca accepte les PNG mais il faut les créer avec quel outil ces PNG en 16 couleurs ?
comme ça je dirais photoshop non ???
Anarwax- Docteur *
- Nombre de messages : 18357
Age : 47
Localisation : Bretagne
Date d'inscription : 06/09/2012
Re: UG BASIC, le basic micro 8bit miracle ?
Hi drfloyd,
I think there is a problem with the syntax, I think the program should be written like this (if I understood correctly):
Using ":=" instead of "=" avoids unnecessary copying, and using "(POSITION)" to do variable type casting, while still supported, it is unecessary from version 1.6 of the compiler .
Actually the "MOB" instructions are one of those things that I started implementing a long time ago -- and never completed, and it only works on the Commodore 64, as stated in the user manual. The reason I didn't continue is that many other developers have shown me that using the NEW IMAGE / PUT IMAGE / GET IMAGE statements is much more powerful and efficient, in order to implement a "software sprite", and the hardware limitation is resolved, if necessary, by the individual programmer on the target platform, as well.
An example of that was published some time ago in the official support group on Facebook. It is an animated character that runs over a static full screen background with the Tour Eiffel. It currently works on Olivetti Prodest PC128 and Amstrad CPC 664, and I am verifying that it also works on other platforms, including COLECOVISION.
ps. sorry, I replied in French because you wrote in French. I can actually write in French thanks to Google Translate, but of course I can't tell if I'm writing anything that makes sense -- so if that's okay with you, I'd speak in English. Let me know.
I think there is a problem with the syntax, I think the program should be written like this (if I understood correctly):
- Code:
dessin := LOAD IMAGE("pac.png")
dessinMob := MOB(dessin)
MOB SHOW dessinMob
MOB RENDER ON VBL
MOB dessinMob AT 50, 100
Using ":=" instead of "=" avoids unnecessary copying, and using "(POSITION)" to do variable type casting, while still supported, it is unecessary from version 1.6 of the compiler .
Actually the "MOB" instructions are one of those things that I started implementing a long time ago -- and never completed, and it only works on the Commodore 64, as stated in the user manual. The reason I didn't continue is that many other developers have shown me that using the NEW IMAGE / PUT IMAGE / GET IMAGE statements is much more powerful and efficient, in order to implement a "software sprite", and the hardware limitation is resolved, if necessary, by the individual programmer on the target platform, as well.
An example of that was published some time ago in the official support group on Facebook. It is an animated character that runs over a static full screen background with the Tour Eiffel. It currently works on Olivetti Prodest PC128 and Amstrad CPC 664, and I am verifying that it also works on other platforms, including COLECOVISION.
ps. sorry, I replied in French because you wrote in French. I can actually write in French thanks to Google Translate, but of course I can't tell if I'm writing anything that makes sense -- so if that's okay with you, I'd speak in English. Let me know.
spotlessmind1975- Patient en incubation
- Nombre de messages : 7
Age : 48
Localisation : Roma, Italia
Date d'inscription : 30/10/2022
Re: UG BASIC, le basic micro 8bit miracle ?
OK :
dessin := LOAD IMAGE("pac.png")
dessinMob := MOB(dessin)
MOB SHOW dessinMob
MOB RENDER ON VBL
MOB dessinMob AT 50, 100
BUT Still not work :
Anyway, I don't need sprites... For my RPG game I only need PUT IMAGE. But I need to put 11x11 tiles (16x16 pixels), on screen. The problem is that it is very slow to display
Here is the test-code
Very slow to display the 121 tiles. Cannot do like that for a game.
Perhaps there is another fastest solution ?
dessin := LOAD IMAGE("pac.png")
dessinMob := MOB(dessin)
MOB SHOW dessinMob
MOB RENDER ON VBL
MOB dessinMob AT 50, 100
BUT Still not work :
Anyway, I don't need sprites... For my RPG game I only need PUT IMAGE. But I need to put 11x11 tiles (16x16 pixels), on screen. The problem is that it is very slow to display
Here is the test-code
- Code:
BITMAP ENABLE (2)
dessin := LOAD IMAGE("pac.png")
FOR i=1 TO 176 STEP 16
FOR j=1 TO 176 STEP 16
PUT IMAGE dessin AT i,j
NEXT
NEXT
Very slow to display the 121 tiles. Cannot do like that for a game.
Perhaps there is another fastest solution ?
_______________________________________________________
Re: UG BASIC, le basic micro 8bit miracle ?
Hi drfloyd,
as I anticipated, I am sorry but MOB does not work on COLECOVISION:
The error you get, however, is of another nature and I don't get it on my personal copy. I guess it depends on the fact that you don't have an updated compiler: could you be kind enough to download the compiler again? Just go to CONFIGURATION > COMPILERS and click on the button to download the compiler for COLECOVISION. Finally, clicking on SAVE confirms the update.
Speed is an optimization problem. It will certainly be the subject of a specific optimization in the coming days. After all we are using the graphic mode, where we want to control every single pixel. If we talk about tiles, perhaps it is appropriate to use TILEMAPs (basically, "character mode") by redefining the characters.
Just a note on the code. It is possible to increase the drawing speed by using BYTE variables instead of WORD ones (which are the default variables). Also, the starting offset of the PUT IMAGE must be a multiple of 8 pixels.
This is my personal version of the same code, if I understood correctly the original code:
Let me know if it improves.
as I anticipated, I am sorry but MOB does not work on COLECOVISION:
The error you get, however, is of another nature and I don't get it on my personal copy. I guess it depends on the fact that you don't have an updated compiler: could you be kind enough to download the compiler again? Just go to CONFIGURATION > COMPILERS and click on the button to download the compiler for COLECOVISION. Finally, clicking on SAVE confirms the update.
Speed is an optimization problem. It will certainly be the subject of a specific optimization in the coming days. After all we are using the graphic mode, where we want to control every single pixel. If we talk about tiles, perhaps it is appropriate to use TILEMAPs (basically, "character mode") by redefining the characters.
Just a note on the code. It is possible to increase the drawing speed by using BYTE variables instead of WORD ones (which are the default variables). Also, the starting offset of the PUT IMAGE must be a multiple of 8 pixels.
This is my personal version of the same code, if I understood correctly the original code:
- Code:
DEFINE DEFAULT TYPE BYTE
BITMAP ENABLE (2)
dessin := LOAD IMAGE("pac.png")
FOR i=0 TO 10
x = 0
FOR j=0 TO 10
PUT IMAGE dessin AT x,y
ADD x, 16
NEXT
ADD y, 16
NEXT
Let me know if it improves.
spotlessmind1975- Patient en incubation
- Nombre de messages : 7
Age : 48
Localisation : Roma, Italia
Date d'inscription : 30/10/2022
Re: UG BASIC, le basic micro 8bit miracle ?
Still very slow.
Not posible for now to use UG basic to develop my game using 121 tiles.
(Perhaps possible with Characters, but boring )
Not posible for now to use UG basic to develop my game using 121 tiles.
(Perhaps possible with Characters, but boring )
_______________________________________________________
Re: UG BASIC, le basic micro 8bit miracle ?
Hi drfloyd, I'm sorry that's boring, but don't lose heart and, above all, don't miss the opportunity to do it. Also because, in any case, I'm already bringing other games to the COLECOVISION and it would be a pity if yours was missing.
spotlessmind1975- Patient en incubation
- Nombre de messages : 7
Age : 48
Localisation : Roma, Italia
Date d'inscription : 30/10/2022
Re: UG BASIC, le basic micro 8bit miracle ?
keep us informed about evolutions of UG basic.
It's a crazy project
But I think it will be a good idea to develop IN PARALLEL a specific basic 100% optimized for one machine. For these machines :
- First for Colecovision (as there is no compil basic on this console, when you see the success of Inty basic on intellivison !)
later for :
- C64
- ATARI 8bit
- Amstrad
- MSX
It's a crazy project
But I think it will be a good idea to develop IN PARALLEL a specific basic 100% optimized for one machine. For these machines :
- First for Colecovision (as there is no compil basic on this console, when you see the success of Inty basic on intellivison !)
later for :
- C64
- ATARI 8bit
- Amstrad
- MSX
_______________________________________________________
Page 2 sur 2 • 1, 2
Sujets similaires
» [BLITZ BASIC] le topic officiel du meilleur basic au monde ?
» [BASIC QB64] le topic officiel du meilleur basic au monde ?
» LES HOMEBREW MICRO... EN BASIC !
» SIMPLE/BASIC : Concevoir un Univers 3D en Basic
» Second BASIC (BEX)
» [BASIC QB64] le topic officiel du meilleur basic au monde ?
» LES HOMEBREW MICRO... EN BASIC !
» SIMPLE/BASIC : Concevoir un Univers 3D en Basic
» Second BASIC (BEX)
Page 2 sur 2
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum