Join us on Discord!
You can help CodeWalrus stay online by donating here.

CE Textlib/Basic Drawing

Started by Dudeman313, March 11, 2016, 11:34:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dudeman313

#60
What about 3 rows, but with only one row of small blocks at the top, maybe 1 pixel larger? As long as the top is still slanted, the resolution doesn't matter to me.

EDIT: Sorry if I'm starting to sound naggy. I just don't have the time to try to get CEmu to work so that I can try it myself.
  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


Dream of Omnimaga

That would be better I think, speed-wise. Would the plain-colored part be light green or middle green? Or would it be a different color such as brown or black?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Dudeman313

Quote from: DJ Omnimaga on April 05, 2016, 10:27:02 PM
That would be better I think, speed-wise. Would the plain-colored part be light green or middle green? Or would it be a different color such as brown or black?
What do you mean by plain-coloured area?
I'm not sure I understand, but here's my plan: Blue sky, dark green top of the hills, and medium green hills.
  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


Dream of Omnimaga

#63
Oh I mean the part below the row of grass. Kinda like this mockup (I don't know if that's possible with CE Textlib but I wouldn't be surprised if it was)



I made those because I was bored and wanted to see what a zombie-themed game like Ghouls N Ghost would look like. Everything except the grass/snow/lava/water and the top of the sky is made of 3 rectangles each and enemies or the characters would probably move in a way that prevents gradient overlapping.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Dudeman313

That's really cool. It might run really slow for a zombie game, though, because the whole point of those is to survive a swarm.
  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


Dream of Omnimaga

It depends. If it's just a clone of Ghouls N Ghosts, then there is a limited amount of enemies at once on the screen and no swarm would be involved.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Dudeman313

Oh. I've never played Ghouls N Ghosts. It sounds cool.
Actually, most of the games I've played I didn't know existed until they had calculator ports.  :-|
  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


Dream of Omnimaga

Well, another thing is that even if you played console games, it would totally be understandable if you didn't know that particular game, because it came out in 1988 (1991 for the SNES). Also it's extremely hard.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Dudeman313

Really? Like, die-on-1st-level hard, or outright difficult?
  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


Dream of Omnimaga

Both. Getting past the first mini-boss is next to impossible.

Also a name idea for a calc clone could be Ghouls 'N Goblins. :P
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Dudeman313

That doesn't sound like something I'd try. I'd give up. :trollface:

Sounds good to me. ;)
  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


Dream of Omnimaga

#71
By the way, my idea for this game is that the floor and the sky gradient (or the ceiling, if any) would be pre-rendered before the level starts. Map data would be used for collision detection, but when drawing platforms and blocks, the game would only draw every 2 or 3 object from the data and each object (such as the pillars in the mockups above) would be made of just 3 rectangles of any size (I don't know how it would be specified, but they would be allowed to be wider to make up for the "drawing every 2 or 3 object thing". Enemies would also be made out of 3 blocks, but they would be separate from the map data and be allowed to move around.

THat might actually allow scrolling to be possible without too much speed loss because no tilemapping would be involved. Otherwise I could always just have no scrolling and pre-render everything fast.


Another idea I had for a CE Textlib game would be something like First Fantasy II but where the graphics are so simple that all wall tiles can be drawn with just 2-3 blocks each and perhaps go as far as allowing scrolling.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Dudeman313

  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


Dream of Omnimaga

#73
So I finally maxed out CE Textlib rectangle  limits it seems. Here they are:

-CE Textlib will accept lists up to 255 elements each. Since a rectangle takes 6 of them, this means you can chain 42 rectangles in 1 Asm(prgmTEXTLIB) command.

-There are 16 different colors, all of which except one are the same as TI-BASIC. The extra color is teal and is color #25 (the last one). Any ID other than 10-25 will show black.

-Height can be multiples of 4 pixels.

-Width can be multiples of 4 pixels, but it's also possible to have a width of 1 pixel by setting it to 128.

-Vertical offset starts at the 2nd row of pixels and can be multiples of 4 pixels. To make things much easier, it's recommended to start with an offset of 780 or something else that starts drawing there.

-Horizontal offset starts at the 3rd column of pixels and can be multiples of 4 pixels, but in order to align the rectangles vertically you need to wrap around often enough and then subtract 13 from the vertical offset, which might make drawing at the top of the screen more difficult. Funky results will happen if using CE Textlib values that are not from 1 to 255. Here's an example of coordinates and rectangle placements:
EDIT: It seems that you can also start at 12 instead of 780 with no problem, which saves space, but you need to be careful with negative numbers

-The smallest and fastest way to fill the entire screen with one color is {33,780,1,12,27,color:Asm(prgmTEXTLIB.

-The first row of pixels and the two leftmost pixels right below cannot be used by CE Textlib. So a small line of gray pixels will remain visible.

-Sometimes, drawing a rectangle that goes outside the bottom of the screen will cause it to be 1 pixel shorter in width.

There are some tricks to get around rectangle height limitations: It's possible to emulate any other height multiple by drawing a second rectangle under it with an offset high enough to wrap around the screen, which will move the rectangle 1, 2 or 3 pixels below (although often with an horizontal offset). This is how I got the sky gradient effects in Wal-Rush CE's newest title screen.

Also, since those tricks circumvents CE Textlib limitations, this means you have to translate the pixel offsets and dimensions into what CE Textlib will accept. I might try to create a table at some point to explain in more details.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Dudeman313

Behold: DJ's revolution of the month! :D
  • Calculators owned: TI-84 PCE
  • Consoles, mobile devices and vintage computers owned: Android O Phone
Does this qualify as a signature? 
The answer is "Sure."


Powered by EzPortal