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

[Minecraft] [HP Prime] MinePrime - Minecraft on a Hp Prime!

Started by alexgt, April 20, 2015, 12:22:42 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

alexgt

Hello this is a 2D Minecraft game for the HP Prime. It is now in version 4.0 and has moved on to Applications. version 1.0 was a program and was mostly me experimenting with HP-PPL, 2.0 included block breaking and placing but was scrapped after technical problems and replaced with 3.0, 3.0 was just a menu system I developed so I am not even sure it is worthy of a version in itself, 4.0 is just as far along a 3.0 except it is moving along much quicker.

So that is the history of MinePrime but practice makes perfect so May the Fourth be with you :P

More technical outline of how world data will be stored and loaded and also collision:
[spoiler]
Collision / Block durability:
what I do here is I use a GROB that is the same size as the world dimensions. If the pixel at your coordinates is black then it is free to move through, if it is anything else and you will not be able to go through it. And its color value is the block durability.

Storing worlds and world data:
This is where I really need Apps. With AFilesB() you can return and store individual bytes directly into the App files. So I can use this as a super compact and small list that makes up the world, they will then be formed into a matrix that will be used to store data while the game is executing. Then when the user quits it turns the matrix into a list and stores it into the App. If this is a acceptable way to do it it would be nice to have some feedback, especially from @timwessman.

Drawing the world/ terrain:
For this I am going to use a method I used in the last versions quite allot. I will make a GROB which will be one block larger on all sides, this will allow for smooth scrolling and also decrease lag if you are not moving much.

Player Movement:
This will be where 4.0 really shines, it will have movement like Zampy's Quest (for those that don't remember, it let you move one pixel at a time) not that it is super cool but it is something the other versions lacked. But unlike Zampy's Quest it will have impeccable collision because it uses pixels. Why Pixels are so great at collision is because they will only position at the integral part of the number (ex: PIXON_P(1.9999,1.9999,#FFFFFF) and PIXON_P(1,1,#FFFFFF) both make the pixel at (1,1) white).

I hope this wan't so confusing but I explained it all the best I could :)
[/spoiler]

Block list: OUTDATED!!!
[spoiler]
blocks

Times all block ID's after 1-10 by 10 (so block 2(dirt) would be 20 and block 3(grass) would be 30 this gives me room to add block durability ;))
1-9 - Break animations
10-Stone
20-Dirt
30-Grass
40-Cobblestone
50-Bedrock
60-Oak Leaves
70-Tall Grass
80-Bricks
90-Refined Stone
100-Oak Planks
110-Mossy Cobblestone
120-Gold
130-Iron
140-Coal
150-Diamond
160-RedStone
170-Glass
180-Monster Spawner
190-Torch
200-Lapiz lazuli ore
210-Lapiz lazuli Block
220-Iron Block
230-Gold Block
240-Diamond Block
250-Emerald Block
260-Sand
270-Sandstone
280-Netherbrick
290-White Wool
300-Black wool
310-Dark gray wool
320-red wool
330-Pink wool
340-Green wool
350-Lime green wool
360-Brown wool
370-yellow wool
380-blue wool
390-light blue wool
400-magenta wool
410-Purple wool
420-Cyan wool
430-orange wool
440-light gray wool
450-Obsidian
460-enchanting table
470-dragon egg
480-command block
490-jungle leaves
500-cactus
510-spruce leaves
520-foot of bed
530-head of bed
540-Iron bars
550-ladder
560-bottom door
570-top door
580-mossy stone brick
590-cracked stone brick
600-spruce log
610-birch log
620-pumpkin
630-jack o'lantern
[/spoiler]


Current list of blocks (Will be updated upon additons) OUTDATED!!!
[spoiler]
NAME - ID - MODIFIER / DAMAGE (Blank if none, once mining is added all blocks will have a damage count)
AIR - 0
BEDROCK - 1
DIRT - 2
GRASS - 3
[/spoiler]

Thanks for the support and helpful comments :)
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

CKH4

Very cool, I'm looking forward to updates.
  • Calculators owned: TI-83+, TI-84+


alexgt

  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

#3
Awesome to see this game on the Prime. The calc has a lot of power so hopefully it should help. :D

EDIT Bigger screenshot:



Do you plan to add textures, by the way?
  • 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

Snektron

  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

I reuploaded the screenshot (see previous post). For some reasons it was playing 10 times slower >.<
  • 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

Snektron

Yeah i noticed that, it looked a bit weird
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Duke "Tape" Eiyeron

It's a good start you have there. Will you do a smooth scrolling or will you keep the block/block scrolling?
  • Calculators owned: A lot.

alexgt

Quote from: DJ Omnimaga on April 20, 2015, 12:44:04 AM
Do you plan to add textures, by the way?
Yes, I am starting to do that as we speak thanks for the help with the sprites :) (I will be using the actual textures from the Minecraft itself to be more like it!)

Quote from: Duke "Tape" Eiyeron on April 20, 2015, 04:36:36 PM
It's a good start you have there. Will you do a smooth scrolling or will you keep the block/block scrolling?
Thank you for the smooth scrolling suggestion I will implement that right away since it will be quite easy!

Thanks for the help :)
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

If I was you, I would try to avoid reusing copyrighted graphics in your game. Maybe use custom ones I posted before or tiles that looks a bit like Minecraft but are a bit different, like Crafti for the Nspire did. Although Minecraft isn't owned by Notch anymore (he was very copyright-not(C when it came to re-using his graphics, we don't know what is Microsoft's stance about it.
  • 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

alexgt

#10
Yeah I am sad about Microsoft buying Minecraft and you are right but I want the looks to be the same :(.

If you convert this image into a ICON format:
[spoiler][/spoiler]
I an take the sprites from there so we could use any 1.7.2 texture pack and convert it to throw it in the ICON Hex I take my sprites from and do it that way.
I could have the default pack as a custom (un-copyrighted) one and you could change it if you wanted!

EDIT: For that gif did you use cam studio @DJ Omnimaga ?
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

CKH4

Is there any chance of truly random generation? Like random for each layer rather than just the bottom layer.
  • Calculators owned: TI-83+, TI-84+


Snektron

truly random doesn't exist (on computers (yet))
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


CKH4

Not what I meant but sort of. I meant for each layer to generate its own random height.
  • Calculators owned: TI-83+, TI-84+


alexgt

Yup I can do that by changing two values :) - I put on list...

Also what I said before about the texture pack might not work out because I made a program that had that image and displayed it and it was over 350 KB in size so unless that is OK it might get a little large.
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Powered by EzPortal