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

Jumping/Parkour [TI 84+ CE] [C]

Started by Unicorn, April 21, 2016, 05:12:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Unicorn

So far I haven't implemented a maping engine (if that what you mean) and I'm thinking about doing that soon.
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

c4ooo

A tilemapper is a type of game engine were the world is divided into square "tiles" laid on a grid. Most platformer games use this method.
For excample, in mario, the world is made from different tiles like Brick, stone, air, powerup block, ect:

Dream of Omnimaga

What @c4ooo said, and for platformer games it's generally the best solution for collision detection and world manipulation. Of course if all you display are plain color platforms that are flat rectangles then you might not need tilemapping, but it's generally recommended.

Something you can do if you have 1 platform per column is just single-dimensional map data, where each element is the height of the platform in each column. Then pits are basically the platform being so high/low that it's off the screen and not displayed at all. And you stop falling if your position at a specific column is just one block higher than the platform.
  • 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

Unicorn

I know what tilemapping is, but I havent been able to use it yet. The tilemaps don't desifnate how the character moves, correct?
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Dream of Omnimaga

Nope they don't. At least in most cases, that is. Moving characters are separate and often refered to as sprites.

It would be worth it to learn tilemapping, though, when you get a chance. You could start with an easy language like TI-BASIC with homescreen numbers displayed from a list. Feel free to make a separate topic if you need help on tilemapping, though.
  • 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

MateoConLechuga

It's a good thing the C libraries have a powerful tile mapping engine that is pretty much customizable in every way. You can easily get tiles, set tiles, draw transparent and replacing tilemaps, and much more. Of course, no one has yet to use these features. ;)

Dream of Omnimaga

Mateo do those libs work in 1, 2, 4 and 8 bits mode too? And what tile sizes are allowed?
  • 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

Unicorn

Progress on this is halted, but I'm working on a small side-project, wich I may drop screenies about in irc.

Question, @MateoConLechuga Could I use the tilemapping engine for floodit, you think?
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

MateoConLechuga

I wouldn't recommend it; since that means each square would be a sprite, which would use up memory. It's a lot easier to just draw rectangles :)

Dream of Omnimaga

Yeah I agree with Mateo. Sprites/tilemaps are mainly suitable if your game uses detailed graphics or if it's the smallest way to draw your graphics in file size.
  • 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

MateoConLechuga

#25
Luckily in C you can have 1D arrays (a lot like lists in basic), 2D arrays, (again, like matrices in basic), and as many XD arrays you can wrap your head around. A good 4D array is just something fun to play around with too :P Anyway, I would recommend just using a 2D array that can be created dynamically, that way you can have any board size, then just implement different functions; one to draw the board, another function to initialize the board, another to flood the board with a given color, and so on. Sorry, this topic got off track, but hopefully that helps :)

Quote from: DJ Omnimaga on May 01, 2016, 05:37:38 PM
Mateo do those libs work in 1, 2, 4 and 8 bits mode too? And what tile sizes are allowed?
Whoops, almost missed this. There's really no point to supporting anything other than 8bpp, and any graphics program that does otherwise is going to be slower than if it just used 8bpp in the first place. Lower bpp modes are mainly just for more memory if it is required. As for the allowed tile sizes, they can be powers of 2; width and height do not have to be the same however. This is just mainly again for speed reasons.

Unicorn

Thanks for the tips, Mateo! I see now, I had forgotten about sprites for the tilemapper... Oh, and are there any tutorials/topics on how to use convopng? Just to make things easier before I ask to mny questions ;)
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Dream of Omnimaga

Mateo oh I thought that 1 2 and 4 bpp modes were faster due to using a smaller part of the screen.
  • 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

MateoConLechuga

#28
Sure; the amount of wait states added because of a higher bpp mode is noticeable, but it simply is a lot faster to draw directly to the screen rather than shifting bits in order to display in the correct location. Anything graphics intensive should be in 8bpp mode, unless someone is using tricks to double pixels or something (Which isn't applicable in this case) :P

Quote from: Unicorn on May 04, 2016, 06:55:59 AM
Thanks for the tips, Mateo! I see now, I had forgotten about sprites for the tilemapper... Oh, and are there any tutorials/topics on how to use convopng? Just to make things easier before I ask to mny questions ;)

The release page has everything you need:
https://github.com/MateoConLechuga/ConvPNG/releases

Just put the convpng.ini file in the same directory as your images, open a command window in the same directory (usually this is src/gfx), and then type 'convpng'. Then all the graphics are included automatically.

Powered by EzPortal