Author Topic: xLIB 84C Edition  (Read 50931 times)

0 Members and 1 Guest are viewing this topic.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: xLIB 84C Edition
« Reply #90 on: July 24, 2013, 12:30:55 pm »
Wow, those polygons look great!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: xLIB 84C Edition
« Reply #91 on: July 24, 2013, 01:01:53 pm »
By the way tr1p1ea, a good trick to make smoother screenshots would be to slow down your programs to about 30 times their original speed, take a capture then speed it back up to the original speed in VirtualDub. Just make sure that the screenshot speed remains as accurate as the calc, though. This is what I do with Nspire screenshots when I want quality, because I can't get more than 7 FPS on this computer for such animated screen captures, but luckily the Nspire emulator supports slowdowns.

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: xLIB 84C Edition
« Reply #92 on: July 24, 2013, 05:56:38 pm »
Well its a small 3D test, but like i said there is no culling or sorting so different coloured faces wouldnt work correctly. That said different colours are the same speed.

It draws a frame, then swaps GRAM buffers and erases the old frame (it draws over the old polygons in white as opposed to clearing the entire screen).

Im sure there will be loads of example programs since the way this version of xLIB works is fairly different.

Good tip with the screenshot btw!
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: xLIB 84C Edition
« Reply #93 on: July 24, 2013, 06:13:36 pm »
Ah I see now. Thanks for the info. :)

As for the screenshots just make sure to link to them, though, if you make any like that, else they will be like 8 MB large :P

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: xLIB 84C Edition
« Reply #94 on: July 24, 2013, 06:53:55 pm »
Well i can convert it to a better frame-rate but decimate the frames to reduce the file size too. Its difficult to make screenshots when you are switching between the left/right of the screen.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: xLIB 84C Edition
« Reply #95 on: July 24, 2013, 06:58:21 pm »
Yeah true. By the way how do you make them now? Do you manually edit them frame by frame? Because that must be long! O.O

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: xLIB 84C Edition
« Reply #96 on: July 24, 2013, 07:17:31 pm »
For small screenies i just remove every second frame, but thats what makes it jumpy. Still it does make me happy that maybe i might have a chance of porting my 3D engine over to the 84C.

I will hopefully have time to knock over some of the remaining features so that users can properly test sprites/tilemaps.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: xLIB 84C Edition
« Reply #97 on: July 24, 2013, 07:31:12 pm »
Oh I see now. I guess that works then. And yeah a port of the 3D engine would be nice. Please don't go too overboard on 3D features, though, because many inexperienced programmers and new community members will go nuts when seeing screenshots of more advanced projects then all start trying making 3D games, even though they have zero experience in 3D and that BASIC is slow. Even in Axe we have yet to see proper 3D games (non-raycasting/mode 7 I mean)

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: xLIB 84C Edition
« Reply #98 on: July 24, 2013, 07:39:42 pm »
I dont think that ill include any 3D routines in xLIB since it can get quite complicated. I will have the shape drawing available however. It will be recommended that people stick to sprites and tilemaps.

That reminds me, i need to implement a text routine!
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: xLIB 84C Edition
« Reply #99 on: July 24, 2013, 08:05:02 pm »
I guess you could just write a BASIC+xLIB program that showcases the polygons and your 3D routine, to show its potential. Can we chain polygons like with sprites?

As for text, you could always just re-use the sprite routine but via a different syntax (assuming, for example, that text is made of 8x8 sprites containing 7x7 chars), eg:

real(666,X,Y,Stringoftext,<NumOfCharPerRow,TxtColor,BgColor,DoYouWantToSwitchGRAM>

1) Anything after Stringoftext would be optional and if BgColor isn't specified it would be transparent by default.
2) X and Y could be any number from 0 to 159 and 0 to 119 respectively, not just multiples of 8. This would allow people to do special effects with text such as scrolling, shadows or bold text.
3) Idk if chars per row would be hard to implement, but it could be handy for people with RPG boxes. Anything you display outside the current GRAM area would be clipped.
4) For the font, if you go with 7x7 this allows a max of 20x15 chars at once in the screen.

Then comes the problem of displaying variable content via such text routine. Some people might want to show HP/MP, so what you could do is:

1) If user displays a real var instead of text or str var, just display that number instead as you would do with the BASIC Text command
2) If user displays ONE element from a list, do the same as in BASIC
3) If user displays ONE element from a matrix, do the same as in BASIC
3) If user tries to display anything else (such as an entire matrix or even a pic), trigger the ERR:DATA TYPE msg or do nothing.

Else, if it's too complicated, you could always only show content from the Ans var, nothing else.


« Last Edit: July 24, 2013, 08:12:48 pm by DJ Omnimaga »

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: xLIB 84C Edition
« Reply #100 on: July 24, 2013, 10:12:28 pm »
It might be more useful to display text from Ans given the way the backend of the parser works. Plus this would allow you to build strings from various sources if need-be.

Im thinking for a start that the text will always have a transparent background (and you can draw a filled rectangle behind it if needed). You will be able to write text at any position on screen.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: xLIB 84C Edition
« Reply #101 on: July 24, 2013, 10:37:03 pm »
Yeah I guess that could work too. Also good idea about the background lol. Actually I guess this makes sense since most people will display text over a window or the map anyway, so on a window he already has a background setup anyway.

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: xLIB 84C Edition
« Reply #102 on: July 24, 2013, 10:49:46 pm »
Thanks for all the great ideas DJ!
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: xLIB 84C Edition
« Reply #103 on: July 25, 2013, 11:08:30 pm »
Hopefully this works (posting from my phone). Anyways, my idea was to be able to draw text vertically and to also be able to treat a string like a 2D array and given a height and width argument, extract a row or column (with clipping). This would be useful for text based tilemaps, but this is just an idea. This would probably be a better idea applied to drawing a single row or column of a tilemap. I hope this makes sense!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: xLIB 84C Edition
« Reply #104 on: July 25, 2013, 11:30:17 pm »
Drawing text vertically would make it hard to display actual sentences, though. O.O

Imagine if your text is:
"HELLO WORLD!
 HOW ARE YOU?"

Then your string would need to look like this XD:

Prgm:NAME
:"HHEOLWL OA RWEO RYLODU!?"
:Real(666,X,Y,12,2