The shoutbox is currently out of service. Join us on Discord instead.
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 2 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: ShowHide

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 :)


Block list: OUTDATED!!!
Spoiler: ShowHide

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



Current list of blocks (Will be updated upon additons) OUTDATED!!!
Spoiler: ShowHide

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


Thanks for the support and helpful comments :)

CKH4

Very cool, I'm looking forward to updates.


alexgt


DJ Omnimaga

April 20, 2015, 12:44:04 am #3 Last Edit: April 20, 2015, 03:42:13 pm by DJ Omnimaga
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?

Snektron

Legends say if you spam more than DJ Omnimaga, you will become a walrus...


DJ Omnimaga

I reuploaded the screenshot (see previous post). For some reasons it was playing 10 times slower >.<

Snektron

Yeah i noticed that, it looked a bit weird
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?

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 :)

DJ 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.

alexgt

April 20, 2015, 08:50:08 pm #10 Last Edit: April 20, 2015, 08:52:30 pm by alexgt
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: ShowHide

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 ?

CKH4

Is there any chance of truly random generation? Like random for each layer rather than just the bottom layer.


Snektron

truly random doesn't exist (on computers (yet))
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.


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.

Powered by EzPortal