GAMOPAT
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.

UG BASIC, le basic micro 8bit miracle ?

+3
Fabf
Matari
drfloyd
7 participants

Page 2 sur 2 Précédent  1, 2

Aller en bas

UG BASIC, le basic micro 8bit miracle ? - Page 2 Empty Re: UG BASIC, le basic micro 8bit miracle ?

Message par rendomizer Ven 11 Nov 2022 - 13:09

et bien... oui ! c'est mieux non que de droite à gauche ou de haut vers le bas genre ?

rendomizer
Patient contaminé

Nombre de messages : 265
Date d'inscription : 19/04/2015

https://sergiomaxcomputervg5000.blogspot.com/

Revenir en haut Aller en bas

UG BASIC, le basic micro 8bit miracle ? - Page 2 Empty Re: UG BASIC, le basic micro 8bit miracle ?

Message par drfloyd Ven 9 Déc 2022 - 22:09

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 ?

_______________________________________________________
UG BASIC, le basic micro 8bit miracle ? - Page 2 Giphy10





drfloyd
drfloyd
DOYEN ET PROFESSEUR FOU DE L'HOPITAL

Masculin Nombre de messages : 181764
Age : 54
Localisation : Dpt 62
Date d'inscription : 05/12/2004

http://www.gamopat.com

Revenir en haut Aller en bas

UG BASIC, le basic micro 8bit miracle ? - Page 2 Empty Re: UG BASIC, le basic micro 8bit miracle ?

Message par spotlessmind1975 Sam 10 Déc 2022 - 8:39

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!
spotlessmind1975
spotlessmind1975
Patient en incubation

Masculin Nombre de messages : 7
Age : 48
Localisation : Roma, Italia
Date d'inscription : 30/10/2022

Revenir en haut Aller en bas

UG BASIC, le basic micro 8bit miracle ? - Page 2 Empty Re: UG BASIC, le basic micro 8bit miracle ?

Message par Anarwax Sam 10 Déc 2022 - 8:46

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
Anarwax
Docteur *
Docteur *

Masculin Nombre de messages : 18357
Age : 47
Localisation : Bretagne
Date d'inscription : 06/09/2012

Revenir en haut Aller en bas

UG BASIC, le basic micro 8bit miracle ? - Page 2 Empty Re: UG BASIC, le basic micro 8bit miracle ?

Message par drfloyd Sam 10 Déc 2022 - 8:53

I speak french or english ?

Ok j'ai réalisé un dessin pac.png que je peux afficher avec PUT IMAGE dessin AT 0,0

NO PROBLEMO, it works.

BUT avec MOB j'ai toujours un message d'erreur :

UG BASIC, le basic micro 8bit miracle ? - Page 2 Captu114

??

_______________________________________________________
UG BASIC, le basic micro 8bit miracle ? - Page 2 Giphy10





drfloyd
drfloyd
DOYEN ET PROFESSEUR FOU DE L'HOPITAL

Masculin Nombre de messages : 181764
Age : 54
Localisation : Dpt 62
Date d'inscription : 05/12/2004

http://www.gamopat.com

Revenir en haut Aller en bas

UG BASIC, le basic micro 8bit miracle ? - Page 2 Empty Re: UG BASIC, le basic micro 8bit miracle ?

Message par spotlessmind1975 Sam 10 Déc 2022 - 9:21

Hi drfloyd, 

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
spotlessmind1975
Patient en incubation

Masculin Nombre de messages : 7
Age : 48
Localisation : Roma, Italia
Date d'inscription : 30/10/2022

Revenir en haut Aller en bas

UG BASIC, le basic micro 8bit miracle ? - Page 2 Empty Re: UG BASIC, le basic micro 8bit miracle ?

Message par drfloyd Sam 10 Déc 2022 - 10:35

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 :

UG BASIC, le basic micro 8bit miracle ? - Page 2 Captu115

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 ?

_______________________________________________________
UG BASIC, le basic micro 8bit miracle ? - Page 2 Giphy10





drfloyd
drfloyd
DOYEN ET PROFESSEUR FOU DE L'HOPITAL

Masculin Nombre de messages : 181764
Age : 54
Localisation : Dpt 62
Date d'inscription : 05/12/2004

http://www.gamopat.com

Revenir en haut Aller en bas

UG BASIC, le basic micro 8bit miracle ? - Page 2 Empty Re: UG BASIC, le basic micro 8bit miracle ?

Message par spotlessmind1975 Dim 11 Déc 2022 - 1:47

Hi drfloyd, 

as I anticipated, I am sorry but MOB does not work on COLECOVISION:
UG BASIC, le basic micro 8bit miracle ? - Page 2 WPXo8IgWZX2WAAAAABJRU5ErkJggg==

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
spotlessmind1975
Patient en incubation

Masculin Nombre de messages : 7
Age : 48
Localisation : Roma, Italia
Date d'inscription : 30/10/2022

Revenir en haut Aller en bas

UG BASIC, le basic micro 8bit miracle ? - Page 2 Empty Re: UG BASIC, le basic micro 8bit miracle ?

Message par drfloyd Dim 11 Déc 2022 - 9:44

Still very slow.
Not posible for now to use UG basic to develop my game using 121 tiles.

(Perhaps possible with Characters, but boring  Mr. Green)

_______________________________________________________
UG BASIC, le basic micro 8bit miracle ? - Page 2 Giphy10





drfloyd
drfloyd
DOYEN ET PROFESSEUR FOU DE L'HOPITAL

Masculin Nombre de messages : 181764
Age : 54
Localisation : Dpt 62
Date d'inscription : 05/12/2004

http://www.gamopat.com

Revenir en haut Aller en bas

UG BASIC, le basic micro 8bit miracle ? - Page 2 Empty Re: UG BASIC, le basic micro 8bit miracle ?

Message par spotlessmind1975 Dim 11 Déc 2022 - 12:20

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
spotlessmind1975
Patient en incubation

Masculin Nombre de messages : 7
Age : 48
Localisation : Roma, Italia
Date d'inscription : 30/10/2022

Revenir en haut Aller en bas

UG BASIC, le basic micro 8bit miracle ? - Page 2 Empty Re: UG BASIC, le basic micro 8bit miracle ?

Message par drfloyd Mer 14 Déc 2022 - 7:33

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

_______________________________________________________
UG BASIC, le basic micro 8bit miracle ? - Page 2 Giphy10





drfloyd
drfloyd
DOYEN ET PROFESSEUR FOU DE L'HOPITAL

Masculin Nombre de messages : 181764
Age : 54
Localisation : Dpt 62
Date d'inscription : 05/12/2004

http://www.gamopat.com

Revenir en haut Aller en bas

Page 2 sur 2 Précédent  1, 2

Revenir en haut

- Sujets similaires

 
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum