|
Post by Enzo on Jan 12, 2021 23:33:52 GMT
Intent is to create a new file format that can be copy and pasted from a character set numerically 0-255, basically I'd like to add end game content to my rpg engine game that can be copy and pasted and applied to the memory as a new file, without having the user download the image or needing to download the file, I will also include classification info for the item, this too might have a format type, and have each new file a version save be loaded by the game engine on start if fileexists(
I think I could use the alphabet and add a 0 to the end of the color not needing the specific color just realm, because I want the game to have; mostly single items, even if they are just recolors, and dealing with the extra place would be time consuming on 700+ sprites with 2x recolors = 1500 .bmps appox 200MB, average 64x64 pixel, the base system will allow for recolors to be done quickly to a 3 part 1-25 set or non white and black colors.
cundo let me on to a similar type of category rpg engine that can be 'modded' for more quests, ect.; this is my rendition, I'd like to be able to load a image from a alphabet library that was copy and pasted into a console, then save as a new file format. This way I could also included a dev option for the game and people could upload their own art, quests, items, ect. from a online website such as forums. Seems more reliable then an online update(r)
Even in more depth I could encrypt a key to provide options like luck and speed that you would gain codes of ingame to add to items that would be added to the classification info, basically people would 'power up' their own swords, wands, ect. and because the luck and speed keys and encrypted it would be hard coded that they could only be used once per sprite per code/key.
string$="030 020 010" 'color of pixel
print parse$(string$)
output
parse$ = "C B A"
or do you think taking the raw .bmp file data and just alter it (for sake of simplicity add class info as a header) and re-saving in a file format? How big a of number could a 64x64 image amount get, as compared to a maybe 70 line string, much bigger then JB can handle string$ wise either?
|
|
|
Post by Rod on Jan 13, 2021 14:47:00 GMT
Not really understanding just yet. But, reducing the colors to 256 colors will make an enormous saving. So too storing a few color pallets and a single bmp header. They can all be combined to create the .bmp when needed.
A single bmp header is 54 bytes, a pallet 256x3=768 bytes and the pixel info 4096 bytes = 4918 bytes. a 24bit image is 12342 bytes.
So you have a large file with all the pixel info, you select out a 64x64 chunk and add the header and pallet info to create a .bmp which gets loaded as a sprite. So each 64x64 chunk is limited to 256 colors but not the next chunk or whole image.
But I may be off down the wrong track.
|
|
|
Post by Enzo on Jan 13, 2021 22:39:03 GMT
I'd like to copy and paste from forums or a website text only,
"AAA|AAA" "AAA|AAA" 'without | char
And get a 4x4 black square
Theoretically "ZZZ|ZZZ" Would give an output of "270270270|270270270" (again no | character and 270270270 is not a valid color), nearly half the character count, not counting bytes, no bmp ever needed or created besides the original which would be converted to the format ect., will be compiled into sprite at runtime start loading process,
A simple pagefile txt file with appended data for each entry (update) that will be updated during runtime when console is brought up and "[001]item 'adding tags for classification AAAAAA AAAAAA" is copy and pasted. A new sprite containing 2x2 black square will be added to RAM mem. While AA... will be added to prefetch page.file
Only copy and pasting for ease of use on users that play because downloading a file and moving the file or finding to update is a pain, while when they read about the update a simple copy paste into a console will add everything and be saved in the correct location to just one file, that to me doesn't show the need to have multiple files and all this fancy updating, even online updaters can fail and not work while if the webpage loads the game can be updated and played.
Tags can be used for file reading parsing with "[" starting the parse [id]item [id]quest,questname,acivatexy,ect. , essentially all game data can come from online and the complied engine be blank
|
|
|
Post by Rod on Jan 14, 2021 14:13:50 GMT
Web pages can contain lots of hidden characters and don’t allow every character. So you are likely to get some corruption?
|
|
|
Post by Enzo on Jan 14, 2021 15:27:40 GMT
Web pages can contain lots of hidden characters and don’t allow every character. So you are likely to get some corruption? Hmm maybe a forums would be needed, proboards seems to allow for JB code to be copy and pasted, and I see it's free. (I know you didn't suggest) You've got me, I'll give proboards a try when I reach that stage. Thanks for the information, although the only characters used will be the alphabet and " , " I could drop the brackets []
|
|
|
Post by tsh73 on Jan 14, 2021 18:15:28 GMT
|
|
|
Post by Enzo on Jan 14, 2021 19:05:32 GMT
Ah yes same method, compressed to 33% I'm thinking, For repeat characters, lowercase alphabet:numerical value of repeat; for further compression, this works with rpg items because the image read is white for a bunch of squares and then the black square that outlines the item, then the color of the item, back to the outline and back to the transparent color white
Substitute, a single character for black and white, as opposed to;
then further compressed version a color pallet with common 54 colors used 1 A-Za-z 27, would store a 64x64 image in a string manageable size?
No different then formatting ASCII art just using a method to store bmp pixel data to a key 10 20 30 40 50 60 10 123456879123456789123456789123456789123456789123456789123456789 123456879123456789123456789123456789123456789132456789123456789 123456879123456879123456789123456789123456789123456789123456789 123456879123456789123456789123456789123456789123456789123456789 60 123456879123456789123456789123456789123456789123456789123456789 123456879123456879123456789123456789123456789123456789123456789
70x70 data amount
First line could read w70 w32bg6bw32 'where w indicates 70 white pixels, b indicates a single pixel, g = color green
|
|
|
Post by Enzo on Jan 18, 2021 9:33:51 GMT
Maybe im going about this all wrong, if I was to take all 700 sprites to a 64x64 grid tileset, would be approx 165kb .png file
A simple key could be created to hide the games images and be loaded and alter to the key at loading screen; to produce my sprites, does JB/LB still have .png support?
|
|
|
Post by Rod on Jan 18, 2021 10:09:18 GMT
Liberty BASIC can load .png files via API. Since .png is a lossless image format it is good for sprite storage. However you are only getting a small file because your images have little detail. If you add image detail the file size will quickly expand. If you just want 64x64 single colored squares you could just draw them. A few lines of code could create many types of colored square.
When I create a 1728x1728 .png image with graphic detail I am getting a 1.6Gb file size. So how much graphic detail is in your 700 sprites?
One trick is to enlarge the image. You can keep the image 1/4 size and double it to fill some squares. The other trick is to build the sprites from component images. So one green background could have various small component images added.
But in this fibre broadband age do you really need to worry about file size / file transfer?
If we could see a few of the sprites you are trying to "compress" we might give better advice.
|
|
|
Post by tsh73 on Jan 18, 2021 13:04:32 GMT
JB file archive has program to save JPG and PNG to BMP format I wonder if JPG compressed sprites would be any good? What about saving color part as jpg and mask patr as png, then convert to BMP and stitch together to get BMP sprites?
|
|
|
Post by Rod on Jan 18, 2021 18:22:17 GMT
.jpg I have found to be of little use since it corrupts all your carefully drawn pixels. It also spoils the mask. The mask is something yet to be discussed if we are talking actual sprites.
|
|
|
Post by Enzo on Jan 18, 2021 19:50:31 GMT
My png was a screenshot of my computer 1080p not sure the difference in our images, sprites can be found here (some) "Always Missing Untitled Project" - youtube search I agree jpeg is tempting but the loss, on some OS reconfigs everytime it's open, I bascially didnt want to just "give away" all my sprites in a pack of files because I'd like people to be able to play the game discovering things, Level of detail is barely 5-6 colors at max I am trying to produce something commerially, modern games like 'Amoung Us' have millions of players with very simple graphics, even the game my game was orignially modeled after (Classic pre2004 runescape) was a large company before they became multi million dollar company, which the game had a strong following up until it's recent final end, I have been trying to produce a game of similar type and catogery, and would be even happy with a following of 50 active players, but lets be honest the internet has all of mankind accessing, A game like this I think could be hosted on free, Google servers, github, a new veison of wiki groups, and alike download hosting websites that are found by the thousand with a Google Search. I'd like to make the Game Program file to be as small as possible including attached images, sprites might be complied at run time everytime, i.e. the mask and RAM load. I don't mind a long boot sequence for the program. The game as it stands doesn't have much to do due to the lack of more than a couple NPCs. To help JB/ LB I was going to keep the script engine blank no attached files or internal data variable values, and have this file format to allow people to add to the game if they wanted instead of creating their own, I'd like to make an engine finished in JB /LB like cundo let me know of, a mod to another pixel game that allows for almost complete moddding tiles, npcs, objects, ect. It seems popular and LB JB would benefit from the activity.
|
|
|
Post by Enzo on Jan 18, 2021 21:51:50 GMT
1.6GB? Error prephaps? Just saved a 4k jpeg from Google saved to png in GIMP and it was put to 7.4MB, some 3,000x3,000 photograph image of the clouds, maybe you took a photo from a 25MP camera and resaved to png?
See "Always Missing Untitled Project" Youtube for image quality its mostly 50% white squares and an outline in black and the main couple colors nothing heavily shaded.
|
|
|
Post by Enzo on Mar 29, 2021 20:32:50 GMT
Rich Text Files can hold bmp data? Simply altering and resaving will encrypt data. Thoughts? Also, on how easily the data can be edited transferred to ram parsed and displayed?
|
|