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 1 Guest are viewing this topic.

Dream of Omnimaga

  • 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

Quote from: Unicorn on May 17, 2015, 11:47:23 PM
Quote from: DJ Omnimaga on May 17, 2015, 10:20:58 PM
EDIT: I just realized this topic has the ID 404 O.O

That doesn't seem good.
Lol

Quote from: DJ Omnimaga on May 17, 2015, 10:20:58 PM
Oh you need to put it in a zip file if I remember correctly. Unless you mean HP Museum?

EDIT: I just realized this topic has the ID 404 O.O


EDIT: By the way have you ever thought about using 8x8 tiles and 160x120 instead? That would give you more room even with limitations. In any case I hope this project continues no matter what.
The textures look horrible when I scaled them down and also imagine trying yo break blocks that are that small O.O I don't even want to think about it.
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

Oh I meant so that you can scale the game up afterward. It would still show 20x15 blocks at a time on the screen.

Anyway I think the best solution for now would be to generate the map in real-time, so that only what's supposed to be in the screen gets generated when warping or stuff, and when you walk around it generates the row of map and scroll the current GROB around. Kinda like how tilemappers are done in Axe Parser. This would definitively make scrolling slower, though. Otherwise you can split the map across multiple GROB's but then that's not really reliable.
  • 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

I will see what I can do. But... I think I am going to pause development on this as of now but will still be trying to solve the problem, and that might mean starting from scratch. Even if I do start over I will keep the old versions incase a fix comes out. As of now I will finish Nagoji 4x3 as it is 95% done (screen shot will come once I get a keyboard for my Desktop because the laptop I am using can't record anything :( ). But mostly I will work on S.I.F.S.

Even though dev is paused MinePrime will prevail do not worry :P

Help with solving this problem is very much appreciated :)
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

#154
Ok cool to hear. I definitively hope that you won't give up on this. I would still be willing to play even if for example smooth scrolling had to be scrapped or if you had to revert to more blocky graphics (maybe a custom tileset could be used?).

On top of that I was about to make a sub-forum for this project when placing blocks was gonna be implemented or a while before, depending of free time :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

alexgt

Awesome :). But what is more awesome is that MinePrime works now YAY YAY YAY! I was really worried but I just ran it and it worked perfectly. Maybe Optimus (that is what I named my calc... Optimus Prime hehe... get it) just needed to get used to the new firmware?! YAY!!!
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

#156
Question: Are you sure that you didn't do anything else that could have caused the error? Because I just upgraded my calc to see if all my games ran fine and your game ran somewhat OK (the map was off by hundred pixels). I wasn't too sure so I just tried making a 1800x1800 GROB in another program and it worked perfectly.

Also it's possible that your calc was in need of a reset. I noticed that when I run games with many graphics then attempt running another with large GROBs, then some graphics won't display. Rebooting the calc fixes it.

EDIT: After a reboot, the first time I ran MinePrime the loading bar appeared on the title screen without me pressing anything then the map had some white squares O.O. The second time I ran the game it worked fine.
  • 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

Really it worked for me now. And a 1800x1800 GROB is double the size of the ones I use so idk what is wrong. Like you said you might need a reset?

I will get block breaking working 100% then in a couple of weeks when school is over I will start with placing because I will have to make an inventory, optimize the texture image to be smaller, and all that fun stuff :)
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Dream of Omnimaga

Good luck :D, and yeah I noticed that the less complex textures are, the smaller the images. I was surprised that my Walrii invasion thing was about 19 KB in size (from what I remember). GROB version was like 500 KB IIRC.
  • 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

Whats a GROB btw? i see it a lot with prime things but don't really know what it is :P. Some kind of image?
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


bb010g

GRaphics OBject. Basically an expandable memory buffer that holds bunches of pixels. Or colored points on a 2D plane, but those are weird and hard to manually control.
  • Calculators owned: HP 50g, Prime, 28S, 35S, Casio Prizm, dead Nspire CX CAS

timwessman

Quote from: Cumred_Snektron on May 18, 2015, 06:03:39 AM
Whats a GROB btw?

It's been the HP parlance for GRaphic OBject since 1989 or so.


As for the problem for which I was summoned - there are a couple of questions to ask here.

Are you really meaning to create a 1600x800 <unit> sized GROB?

If so, are you remembering that the <unit> size comes from the Cartesian grid of the current application? So if the function app is running and the user has zoomed in by 2x on the graph, your GROB size just doubled which would already cause your memory to run out. My recommendation would be to always use the _P options to specify an exact size else you are left at the mercy of what the user has done to the Cartesian grid. If you really want to use the cartesian grid, you'd better make certain you set the values to the desired setting by using the Xmin/Xmax/Ymin/Ymax. However, those only exists for about half of the apps that have graphing. Better to just pick your correct pixel size.

Are you cleaning up after the exit of the game? By this, I'd recommend clearing out your large graphics by setting them to 0 or 1 pixel in size. Else that memory will stay in use until the user either resets, or stores something else in there.

With the new firmware, I'd recommend switching to an application. That will give you access to permanent variables that aren't lost on editing, as well as files and an icon for your program. My recommendation would be:

1. Save a copy of the Quad Explorer app (this will be very tiny).
2. Make your START routine be to launch the game, as well as the Plot, Symb and Num routines.
3. In the code itself, get rid of all the uses of ICON. On the PC, you will see that the applications are now folders of the form "<name>.hpappdir". Put all your graphic assets into that directory as png files (.png on the name is not necessary for use/loading - we check the header to determine type) and they will be sent along with it when sending from the connkit.
4. Give a 38x38pix item a name of "icon.png". That will be what is used for your application icon.
5. When you want to load your png files, use G2:=AFiles("filename") or similar. I'd avoid using the AFiles(1) as that file order could change! It depends on what the underlying file system does with the files in how it lists them. Then once you have G2, you can use that to create your larger GROB. Going directly from the png decode to the blit will definitely increase load time.
6. If you have data you want to save, AFiles("name"):=G1 will store it out. You might even be able to store the PNG as built to disk. Not certain of that though due to the large sizes that appear to be involved.
7. If you have data you want saved (scores, map info, etc), do a AVars("name"):=<list_or_whatever>. Note that the primary difference between using AFiles or AVars is that AVars will allow you to use the object directly as a variable (tying MyVar for example) while AFiles will not. You have to load to a variable from AFiles before use. AVars will consume RAM when the app is loaded. AFiles will not until they are recalled to a variable.

8. To distribute your new application, just package the "name.hpappdir" in a zip file! People just need to drop that zip on the calc in the connkit and it will send the application. No messing with pasting of source. This is the strucutre we like to use for distributing HP developed apps for teacher use for example:

<ZIP>
  |-- appname.hpappdir
  |    |-- stuff
  |-- readme.txt
  |--help.pdf
  \--last file

Provided your stuff is not an hp object type (.txt, .pdf, etc) it will not be sent. Anything in the hpappdir WILL be sent as a file, but it will not recursively add things (aka, no nesting of directories in there).

A post over on the HP museum saying the calcuator was out of memory or something if you feel that was the case and have nothing else to discuss about it.
TW

Although I work for the HP calculator group, the comments and opinions I post here are my own.

Unicorn

Wooooo!

Thats great that its working again!
  • 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

Quote from: Cumred_Snektron on May 18, 2015, 06:03:39 AM
Whats a GROB btw? i see it a lot with prime things but don't really know what it is :P. Some kind of image?
To sum it up, think of it as L1, L3 and L6 in Axe Parser. They are fixed memory areas to put temporary graphics in, but unlike Axe, GROBs can be set to any size rather than just 768 bytes.
Quote from: timwessman on May 18, 2015, 02:47:03 PMAre you cleaning up after the exit of the game? By this, I'd recommend clearing out your large graphics by setting them to 0 or 1 pixel in size. Else that memory will stay in use until the user either resets, or stores something else in there.

With the new firmware, I'd recommend switching to an application. That will give you access to permanent variables that aren't lost on editing, as well as files and an icon for your program. My recommendation would be:

1. Save a copy of the Quad Explorer app (this will be very tiny).
2. Make your START routine be to launch the game, as well as the Plot, Symb and Num routines.
3. In the code itself, get rid of all the uses of ICON. On the PC, you will see that the applications are now folders of the form "<name>.hpappdir". Put all your graphic assets into that directory as png files (.png on the name is not necessary for use/loading - we check the header to determine type) and they will be sent along with it when sending from the connkit.
4. Give a 38x38pix item a name of "icon.png". That will be what is used for your application icon.
5. When you want to load your png files, use G2:=AFiles("filename") or similar. I'd avoid using the AFiles(1) as that file order could change! It depends on what the underlying file system does with the files in how it lists them. Then once you have G2, you can use that to create your larger GROB. Going directly from the png decode to the blit will definitely increase load time.
6. If you have data you want to save, AFiles("name"):=G1 will store it out. You might even be able to store the PNG as built to disk. Not certain of that though due to the large sizes that appear to be involved.
7. If you have data you want saved (scores, map info, etc), do a AVars("name"):=<list_or_whatever>. Note that the primary difference between using AFiles or AVars is that AVars will allow you to use the object directly as a variable (tying MyVar for example) while AFiles will not. You have to load to a variable from AFiles before use. AVars will consume RAM when the app is loaded. AFiles will not until they are recalled to a variable.

8. To distribute your new application, just package the "name.hpappdir" in a zip file! People just need to drop that zip on the calc in the connkit and it will send the application. No messing with pasting of source. This is the strucutre we like to use for distributing HP developed apps for teacher use for example:

<ZIP>
  |-- appname.hpappdir
  |    |-- stuff
  |-- readme.txt
  |--help.pdf
  \--last file

Provided your stuff is not an hp object type (.txt, .pdf, etc) it will not be sent. Anything in the hpappdir WILL be sent as a file, but it will not recursively add things (aka, no nesting of directories in there).

A post over on the HP museum saying the calcuator was out of memory or something if you feel that was the case and have nothing else to discuss about it.
Ooh that is nifty. I didn't know we could now have applications with custom icons and files this way. I will definitively have to keep this in mind when I make larger games.  Just a question, though: Are application icons and files compressed like PNGs? Because the other HP Prime format seemed extremely large and I would rather have my programs not be 400 KB large again like in 2013.


Also I didn't know that on program exit the GROB content was not cleared automatically. That might explain why some games behaved strangely after running several other ones.
  • 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

Yeah, that i cool that there is a icon you can make. I bet the conectivity pogram compresses them.
  • 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 ??? ??? ??? ??? ???



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

Powered by EzPortal