I don't know what to do with Petit Computer anymore. I wish i could make better games than text games,i just have no idea how,and i don't what to ask because i've never programmed a language before. So i have no idea what to ask to help me figure out how to make non text games.
Start making sprite games. Read help file on sprites, take a look at my witch game, and see if you can do any of the challenges!
I don't know what to do with Petit Computer anymore. I wish i could make better games than text games,i just have no idea how,and i don't what to ask because i've never programmed a language before. So i have no idea what to ask to help me figure out how to make non text games.
What I did, was set myself a goal to make a character walk, using SPSET, SPOFS, and SPANIM.
Ah, too much delay. I was playing Phantom Hourglass for a bit, I might download Dragon Quest and/or Final Fantasy. I prefer Final Fantasy, but everyone loves Dragon Quest IX and IV. I will get to SPANIM stuff now, how exactly do I load a CUSTOM sprite? Not one of those default ones-custom.
I think it depends on where you saved it, usually something like LOAD "SPU0:FILENAME" or LOAD "SPU1:FILENAME"
I don't know what to do with Petit Computer anymore. I wish i could make better games than text games,i just have no idea how,and i don't what to ask because i've never programmed a language before. So i have no idea what to ask to help me figure out how to make non text games.
Start making sprite games. Read help file on sprites, take a look at my witch game, and see if you can do any of the challenges!
Thats what i want to do but i have no idea how! Here are the commands i know how to use:PRINT,CLS,GOTO,WAIT,BGMPLAY,BGMSTOP,INPUT,and BEEP.
Ah, too much delay. I was playing Phantom Hourglass for a bit, I might download Dragon Quest and/or Final Fantasy. I prefer Final Fantasy, but everyone loves Dragon Quest IX and IV. I will get to SPANIM stuff now, how exactly do I load a CUSTOM sprite? Not one of those default ones-custom.
I think it depends on where you saved it, usually something like LOAD "SPU0:FILENAME" or LOAD "SPU1:FILENAME"
EDIT: sorry for the double posts guys :c
Okay, thanks. And double posts don't matter, at least not much. I do it at times. Anyway, noxuss are you making a game? You should, you have enough knowledge about SmileBASIC.
I don't know what to do with Petit Computer anymore. I wish i could make better games than text games,i just have no idea how,and i don't what to ask because i've never programmed a language before. So i have no idea what to ask to help me figure out how to make non text games.
Start making sprite games. Read help file on sprites, take a look at my witch game, and see if you can do any of the challenges!
Thats what i want to do but i have no idea how! Here are the commands i know how to use:PRINT,CLS,GOTO,WAIT,BGMPLAY,BGMSTOP,INPUT,and BEEP.
For SPSET all you have to do is put six numbers, of location, and the sprite itself. But the sprite itself means loading the default sprites for Petit Computer, note that.
Example:
SPSET 0,6,0,0,0,0
Try this, and you will see a sprite appear on-screen. This is only how to set a sprite. Others can explain better, and you are free to mess with the numbers to get a better understanding of this.
EDIT: You might see a sprite onscreen, but to learn this language well, check out this link: http://www.snailfacia.net/PTCguide/index.html#BTRIG
Aah! Custom sprites are difficult... I tried this:
LOCATE 1,12
LOAD "SPU0:MAGES1"
Just to see which direction 1 and 2 I put because I didn't remember, I used a Mage sprite I prepared, and when I put this in edit, and ran the program, it just put a load of space in between RUN and OK. I didn't even see the sprite!
Once more, GG Petit Computer...
Anyone have help with this?
Better. Now, @Bluerobin2, when I run the program after successfully loading the sprite apparently, says SPOFS is an illegal function call.
You're probably using SPOFS before the SPRITE has actually been loaded in the game (or has been deleted). Thanks, but I don't have enough knowledge, I need to understand arrays and data then I might try .
Better. Now, @Bluerobin2, when I run the program after successfully loading the sprite apparently, says SPOFS is an illegal function call.
You're probably using SPOFS before the SPRITE has actually been loaded in the game (or has been deleted). Thanks, but I don't have enough knowledge, I need to understand arrays and data then I might try .
I'm using this:
LOAD"SPU0:MAGES1"
SPOFS 0,5,16,3
So I'm using SPOFS after the actual sprite is loaded.
I don't know how to use data, idk about arrays, and you see me making two games at once and succeeding.
In progress, though.
Better. Now, @Bluerobin2, when I run the program after successfully loading the sprite apparently, says SPOFS is an illegal function call.
You're probably using SPOFS before the SPRITE has actually been loaded in the game (or has been deleted). Thanks, but I don't have enough knowledge, I need to understand arrays and data then I might try .
I'm using this:
LOAD"SPU0:MAGES1"
SPOFS 0,5,16,3
So I'm using SPOFS after the actual sprite is loaded.
I don't know how to use data, idk about arrays, and you see me making two games at once and succeeding.
In progress, though.
Ohhh I see what's wrong. When you load the sprite, it loads the whole sprite sheet.
For instance, the default character number for the boy is 64.
Say you edited the chred and changed the boy into, say, a frog. Whatever you saved the chred as (in this case, I'll call it ANIMALS) it would be loaded as
LOAD "SPU0:ANIMALS"
SPSET 0,64,0,0,0,0
^ The load command doesn't load an individual sprite, but all of the edited sprites as a whole, if that clears anything up.
Puts a dot on the screen. NOTE: Brackets mean that that part of the command is optional
GLINE X START,Y START,X END,Y END[,COLOUR]
Makes a line
GCIRCLE X,Y,RADIUS[,COLOUR]
Makes a circle
GBOX X TOP-LEFT,Y TOP-LEFT,X BOTTOM-RIGHT,Y BOTTOM-RIGHT[,COLOUR]
Makes a box
GSPOIT X,Y
Gets colour from a set point on the screen
Some more commands:
IF <condition> THEN <what to do> [ELSE <what to do>]
Will execute a command if something is how you like it
Syntax:
== means "equals" (Can use for variables and strings)
!= means "not equals" (Can use for variables and strings)
> means "greater than" (only variables)
< means "less than" (only variables)
>= means "greater than or equal to" (only variables)
<= means "less than or equal to" (only variables)
Example:
INPUT VAR
IF VAR<0 THEN PRINT "The number is negative" ELSE PRINT"The number is positive"
or...
INPUT STRING$
IF STRING$=="Hi" THEN GOTO @HI (For gotos, ou don't have to put GOTO. You can just put [...THEN @HI...])
MID$(STRING,POSITION IN STRING,NUMBER OF CHARACTERS INSPECTED)
Used to inspect a string. Example:
STRING$="Test string"
LETTERS$=MID$(STRING$,1,2)
PRINT LETTERS$
The output would be "es". It inspects 2 characters past point 1 in the string.
REMEMBER: First place in the string is actually 0. Second is 1, and so on
LEN(STRING$)
Gets the length of a string
STR$(VARIABLE)
Gets the string value of a variable
VAL(STRING$)
Gets the numeric value of a string
Ask if you wish for more
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.
Anyone have a tutorial for making walls/collision? I made a SCR, which has trees and stuff on the outside, and I was wondering how to stop the player from going through the trees.
@Hairmanban19 for the heck of it, I'll post some more just 'cause.
LINPUT [printed text;]String/Variable
Same as INPUT, it just doesn't put the "?"
Here's a slightly harder but very useful command:
FOR (variable)=(number) TO (number) [STEP (number)]
Commands here
NEXT
Makes a loop. It adds one (or the step value) to the variable each time it loops until the variable has met it's set max. I'll make an example:
FOR I=0 TO 10
PRINT I
NEXT
This will loop 10 times. Each time it loops (from the FOR to the NEXT), it adds 1 to I until it reaches 10. The output is:
0
1
2...
If I want to make it go up by 2 each time, then I do this:
FOR I=0 TO 10 STEP 2
PRINT I
NEXT
The output will be:
0
2
4...
I would post more, but it's getting late for me.
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.
Thats what i want to do but i have no idea how! Here are the commands i know how to use:PRINT,CLS,GOTO,WAIT,BGMPLAY,BGMSTOP,INPUT,and BEEP.
'BOY ANIMATION - AUTOMATIC
SPSET 2,64,0,0,0,0,16,16:'Sets Boy Sprite
SPANIM 2,4,15:'Make it walk (animate)
SPOFS 2,0,0:'MOVE TO 0,0 (in 0 frames)
SPOFS 2,172,0,660:'MOVE TO 172,0 IN 660 FRAMES
Did you go over through the Tutorial thread? There's plenty of sprite tutorials there!
Forums
Topic: Petit Computer
Posts 4,881 to 4,900 of 9,620
Please login or sign up to reply to this topic