These forums move really slowly sometimes. x.x I can't wait to start testing certain things to do with GRP files because I plan to use them in order to save data in my projects not just save data though. Theres plenty of uses.
One such use will be storing pallette data or something. :3
If I can create a nice format for storing very specific data that'd be cool.
Hmm for instance if I used an extra 3 bytes ontop of another two bytes.
i can decrompess those into two seperate variables or three or four seperate variables even.
then perform data testing on them, and convert those four variables I stored into a very long number
then I can step through the values in that number as if the data was compressed.
Got a project? PM ME on here!
Youtube: lostkitty64x
Want help with coding? PM ME! PM ME PM ME!! XD
FC: WIll post later.
Systems I own: ds lite, 3DS, PC/gaming, steam platform. I play alot of games. Just ask ! Minecraft anyone? :D
Hey everyone I'm making a call of duty game I'm almost done but I haven't made guns yet well just one if anyone is good with sprites help me here's my Gmail [email protected]
Oh hi @PetitProfessor. Was that you who wanted me to help you or something like that. If so, sorry I didn't reply yet. Please explain what you had in mind more clearly.
All that GRP talk made me want to update my old-ish "Petitpetcraft" game engine to use a grp file instead of a heck-long string to load the map.... It worked!
Quite surprisingly, the transition was fast and clean. The code is actually shorter now, how nice.
@Morphtorok Hey, are you trying to compete with my game?! Lol just kidding, what's Petitpetcraft again? Was it that game with the inventory and the skeleton that was kind of minecrafty?
Alright, these are my functions for dealing with GRP data
GIDX=0:'Variable that indexes to the GRP like a pointer, and increments after each read/write
GN=0:'Variable that holds the number to be written, or is read from the GRP
G=0:'Variable that holds the length of the string to be written or read
GS$:'Variable that holds the string to be written, or is read from the GRP
' Reading
@GRP_RBYTE
GN=GSPOIT(GIDX%256,GIDX/256):GIDX=GIDX+1:RETURN @GRP_RSHRT
GN=GSPOIT(GIDX%256,GIDX/256)+GSPOIT((GIDX+1)%256,(GIDX+1)/256)*256:GIDX=GIDX+2:RETURN @GRP_RSINT
GN=GSPOIT(GIDX%256,GIDX/256)+GSPOIT((GIDX+1)%256,(GIDX+1)/256)*256
GN=GN+GSPOIT((GIDX+2)%256,(GIDX+2)/256)*65536:GIDX=GIDX+3:RETURN @GRP_RSTR
GS$="":G=G-1:GS$=CHR$(GSPOIT(GIDX%256,GIDX/256)):FOR GI=1 TO G
GS$=GS$+CHR$(GSPOIT((GIDX+GI)%256,(GIDX+GI)/256)):NEXT:GIDX=GIDX+GI:G=0:RETURN
When writing a number, you fill the variable GN, then call one of the three "write number" functions, either WBYTE, WSHRT, or WSINT. Since the values that can be written can only be from 0 to 255 inclusive, any dealing with negative numbers must be manually handled. When reading a number, call one of the three "read number" functions, and then read from the GN variable.
When writing a string, it is best that you grab the length of the string first, write that value with WBYTE functions, store the string into GS$, then call WSTR. When reading a string, read the length first with RBYTE, set GN to the value in G, then call RSTR and grab the string from GS$. If your string is always going to be a fixed length, you can avoid having to read/write the length, and just deal with calling the read/write string function (when reading, set G to the length to be read), but be careful that you know the exact length, as setting G to anything other than the correct length will result in the pointer not incrementing the correct amount, and all data afterwards will be read as corrupted.
Each time you read/write, the "pointer" variable GIDX increments by however many bytes the functions dealt with, so you can do a bunch of read/write functions sequentially without having to deal with the pointer variable. But, altering it can allow you to get to places where you need data, like, if you need to go back to the beginning, just set GIDX to 0. Other than to reset, I consider altering this variable a tool for only the experts, because altering the pointer can result in bad data. But, for those that understand how it works, it can be very advantageous, like splitting the GRP into data sections, and having a reference to the beginning of each section at the beginning of the GRP, so you can read that reference, and set GIDX to that number to automatically point to that data.
@Morphtorok Hey, are you trying to compete with my game?! Lol just kidding, what's Petitpetcraft again? Was it that game with the inventory and the skeleton that was kind of minecrafty?
Lol don't worry.
Yeah that one, people called it that way not me lol.
Now that I use a grp file I can make better starting maps, it's kinda cool. I just need to draw stuff around instead of making complex stuff, the place looks more like an animal crossing-kind forest now, with grass patches with trees and dirt roads instead of just randomly placed blocks of grass and dirt.
3d is not automatic in petit computer - you have to make it manually (raycast it). That itself is very hard to do. I don't discourage trying 3d (it can be fun), but I also don't suggest people who only do text stuff to try. I don't think that Call of Duty is impossible, as long as it's made like Olion or Halo on PTC, but if he says it's like the real game, I wouldn't believe him. @PetitProfessor if you really are making this, then you need to know that the weapons you listed are way to complex in shape to be raycasted. Sorry.
If Facebook, Myspace, Twitter, Instagram, and Snapchat were all destroyed, 90% of teens would go insane. If you're one of the 10% that would be laughing at them, copy & paste this into your signature and hope it happens.
im kenny and it would be really cool if someone could make a horror game possibly similar to clock tower. using petit computer. im not saying it has to be an exact replica of clock tower. it can just be relevant if you know what i mean. honestly, i probably wouldnt be able to because im kinda new to ptcom. but i am still learning about it and how to use it. but anyways, it would be super cool if someone could start a project like that thanks. (sorry for the sorta long comment)
im kenny and it would be really cool if someone could make a horror game possibly similar to clock tower. using petit computer. im not saying it has to be an exact replica of clock tower. it can just be relevant if you know what i mean. honestly, i probably wouldnt be able to because im kinda new to ptcom. but i am still learning about it and how to use it. but anyways, it would be super cool if someone could start a project like that thanks. (sorry for the sorta long comment)
-KennyBob
I was hoping that someday someone would make a Witch's House clone. I might consider doing it myself, but I'm busy with my big project. Sorry!
If Facebook, Myspace, Twitter, Instagram, and Snapchat were all destroyed, 90% of teens would go insane. If you're one of the 10% that would be laughing at them, copy & paste this into your signature and hope it happens.
Hey everyone I'm making a call of duty game I'm almost done but I haven't made guns yet well just one if anyone is good with sprites help me here's my Gmail [email protected]
Uggg I hate COD...at least it won't be real COD...Now I'm happy PTC is limited.
I don't know who posted th GRP thng, but thank youuuuuuu!!!!!! When I get back into programming this week, I'll use that for saves! So simple and easy!
I am seriously making this game give me your Gmail account I will send you some pictures and a video and maybe the qr codes for the demo
If you are serious about it, then begin the ground work for your game and demonstrate it to us before you ask people to contribute. You don't have to have elaborate detail. You could make billboard squares for the weapons for all we care, but having the ground work for adding those in should be first priority before asking people to spend time on something that, quite frankly, looks to be impossible on PTC.
Discostew
3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew
Forums
Topic: Petit Computer
Posts 4,081 to 4,100 of 9,620
Please login or sign up to reply to this topic