Can someone explain the DATA command? I don't mean arrays I mean graphics. EXPLAIN IT don't just say a certain game has it.
I can explain. DATA is used to store a lot of data in one place. It's similar to what an array does, but it's easier to use. First off, you have to identify the DATA under a label. We'll use @DATA. Next, you put the data like this:
Storing numbers in DATA works the same, just use a numerical array and don't put " around the numbers. Storing music in DATA is a totally different story. I'll tell you later...
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.
Can someone explain the DATA command? I don't mean arrays I mean graphics. EXPLAIN IT don't just say a certain game has it.
I think the manual explains this.
The manual isn't helpful at all to me.
You can store graphics in DATA commands.... By using arrays. And stuff like that.
Can you still explain the numbers?
Well, when you think about it... Graphics are like... Just big strings of colored dots that make a picture.
Each color has a number, that's what you store in the data arrays.
@IAmAPerson Thank you! I'm sure there's a better way to do the smooth scrolling credits, but here's what I did:
I started out by printing the credits to the screen with GPUTCHR instead of the usual PNLSTR you'd normally use. In order to get it to scroll, I stored all the lines of credits as a separate string in an array of strings. Then, I would print out each line based on an offset that was continuously increased to pull the credits upwards. I would only print the lines that were currently visible. The problem with that was that trying to print out all those characters to the screen using GPUTCHR took quite a long time. That's probably where the code gets confusing: instead of printing out all the characters, I only print out the line of credits that's on the very bottom, then use GCOPY to copy the entire screen and pull it up one pixel. This way, I only have to print one line of text instead of 18, and GCOPY is a quick function.
If you need a more in-depth explanation, I can try to extract the function and make a sample "credits" program.
Please make a sample program. I don't know how to use GPUTCHR and I can't get GCOPY to work...
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.
Err mah gerd Dungeon Adventure has wayyyyyyy too many variablessssss. This is taking foreverrrr to find them all.
I've found it's easiest to either make a physical list of variables, or arrays.
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.
Err mah gerd Dungeon Adventure has wayyyyyyy too many variablessssss. This is taking foreverrrr to find them all.
I've found it's easiest to either make a physical list of variables, or arrays.
I don't think he'll be doing that. It makes it too easy, there'll be nothing to complain about. He wants to go through development hell so he can tell everybody about how miserable his programming experience is. Apparently, he's hoping to get sympathy so people won't be too upset when the program is buggy. Right?
I tried this and apparently I couldn't load the correct sprite needed:
LOAD "SPU1:WMR1"
This is the error I get:
Cannot locate file
That or it was that it couldn't load...
Either way, I used the sprite color I wanted... Why didn't it load?
You need to be specific on the error message. Maybe you missed it, but there are many reasons that would cause a load to fail, and the error message tells you which of the case is relevant. I suggest that you read the error message carefully, and figure out what it means. Anyway, what does sprite color has anything to do with locating a file?
Can someone explain the DATA command? I don't mean arrays I mean graphics. EXPLAIN IT don't just say a certain game has it.
DATA? There's some info on the tutorial thread.
Arrays? Tutorial thread has some info on that, too.
Graphics? I don't know if there's a good tutorial on that one. I did a blogspot on it on my Petit Computer Journal. Also, I know somebody recently did a good explanation of it. (Please repost to Tutorial thread)
You know, most standard questions are answered in Tutorial thread. Maybe we should ask to make it sticky.
And clean up the useless chatters out of it.
@randomous ok I've got the credits working with my own stuff in it in the upcoming version of MCDS. Special credit to you. Is it normal for the wet hands song+emotional credits to make me tear up a bit? Or am I just weird...
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.
Err mah gerd Dungeon Adventure has wayyyyyyy too many variablessssss. This is taking foreverrrr to find them all.
I've found it's easiest to either make a physical list of variables, or arrays.
I don't think he'll be doing that. It makes it too easy, there'll be nothing to complain about. He wants to go through development hell so he can tell everybody about how miserable his programming experience is. Apparently, he's hoping to get sympathy so people won't be too upset when the program is buggy. Right?
I tried this and apparently I couldn't load the correct sprite needed:
LOAD "SPU1:WMR1"
This is the error I get:
Cannot locate file
That or it was that it couldn't load...
Either way, I used the sprite color I wanted... Why didn't it load?
You need to be specific on the error message. Maybe you missed it, but there are many reasons that would cause a load to fail, and the error message tells you which of the case is relevant. I suggest that you read the error message carefully, and figure out what it means. Anyway, what does sprite color has anything to do with locating a file?
lols I don't need a new excuse for bugs; I already have one! It's called being lazyyyyy, not "development hell". lols Also, please explain to me how I am to save DATA in GRP files. Oh, and I find variables to be much better. You can do more using less space most of the time (although definitely NOT all).
And a simple question, but why would I program if it was miserable? Granted, it can be a monotonous bore at times, but it is, overall, a rather enjoyable experience.
So...in other, less fitting words, leave me alone! Pretends to sob
Also, please explain to me how I am to save DATA in GRP files.
Petit Computer Journal #12 : Packing, Saving, and Loading Data
The following quote has been edited for clarity
why would I program if it was miserable? it be monotonous bore at times, but it is a rather enjoyable experience.
Ah, yes, I see. You're the kind of masochistic person who likes to bang his head on the wall and pulls out hair. Got your message loud and clear!
EDIT: Masochist = person who enjoys being miserable.
Does anyone know if there's a way to prevent RND being totally random every time it's run? Have I missed that PTC has a SEED/RNDSEED) type function?
An example would be a game where 20 coins are placed randomly on each level, but each time the level is played the coins should be in the same place. In other languages I'd use a seed value to ensure that the random coins were generated in the same way each time. PTC will place the coins randomly every time.
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.
Forums
Topic: Petit Computer
Posts 5,281 to 5,300 of 9,618
Sorry, this topic has been locked.