Forums

Topic: Petit Computer

Posts 701 to 720 of 9,620

ramstrong

Sprite wrote:

DUDE I DON'T KNOW HOW TO POST THE BACKROUND AND I'M NOT TRYING TO MAKE A PETIT FARM THAT WAS AN ANOLOGY TO SHOW I WANTED TO POST A BACKROUND!

I see now why people yell at you. You yell at other people, right? Why can't you show me your work? It's not that hard. You need to show your work. I still don't know what you mean, but how about this?
ACLS
@LOOP
VSYNC 1
BGPUT 0,RND(32),RND(24),RND(1024),0,0,0
GOTO @LOOP

Petit Computer Journal
Old site http://ramstrong.blogspot.com

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

Sprite

Let me be calm. I need to post the thing in SCRED with the little blocks to make big images. I can't show my work because it isn't a program.

I'm not saying let's kill all the stupid people, I'm just saying let's take off the warning labels, and see what happens.
Friend Code: 1075-1228-4183

ramstrong

Sprite wrote:

Let me be calm. I need to post the thing in SCRED with the little blocks to make big images. I can't show my work because it isn't a program.

You can still post DATA. But if you ask what kind of image, I'm afraid I can't help you. The table is on HELP 9. You load and save screen using SCU0 and SCU1. On Help 26. Background manipulation is on HELP 41.

@Linput14
Kids today are so spoiled. Do you not see TBD post that is just before yours?

Petit Computer Journal
Old site http://ramstrong.blogspot.com

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

Sprite

I don't understand. How would I post the data?

I'm not saying let's kill all the stupid people, I'm just saying let's take off the warning labels, and see what happens.
Friend Code: 1075-1228-4183

ramstrong

Look at the image blocks. For each blocks there is a corresponding number (on HELP 9). Put the numbers in DATA block.
DATA 1,4,4,1,32,31 and so on...

Petit Computer Journal
Old site http://ramstrong.blogspot.com

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

Sprite

How would I arrange it. Like from 0,0 back around and then down a row when it finnishes

I'm not saying let's kill all the stupid people, I'm just saying let's take off the warning labels, and see what happens.
Friend Code: 1075-1228-4183

Eel

ramstrong wrote:

Sprite wrote:

Also I tried and it is beyond me. In case you didn't notice I'm a beginner. The background that you make in SCRED is what I'm talking about. How do you get that posted

No, I didn't notice. Beginners don't usually make Petit Farm their first project. Why don't you show me your code to show background, and maybe we can help you. To say "I tried and it didn't work" without any explanatory code, doesn't really show that you tried, and we can't help you.

My first "project" right after learning how to show text on screen was Petit Farm... (It started as a text based pet sim!)

Anyways, if what you want to use a background you create with SCRED on your own program, just load it!

When you create a 2-layer background with SCRED it saves two files: NAME0 and NAME1 (where NAME is the name you give to your background)

In your program just load both:
BGPAGE 0 (0=top screen, 1=bottom screen)
LOAD "SCR0:NAME0"
LOAD "SCR1:NAME1"
(I don't really remember if the correct file type is SCR, check the manual if it fails)

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

Sprite

THANK YOU SOOOOO MUCH BEEN STUCK ON THAT FOR WEEKS!!!

I'm not saying let's kill all the stupid people, I'm just saying let's take off the warning labels, and see what happens.
Friend Code: 1075-1228-4183

Sprite

How do I get it to stay on the screen

I'm not saying let's kill all the stupid people, I'm just saying let's take off the warning labels, and see what happens.
Friend Code: 1075-1228-4183

Eel

I'm not sure if this is what you asked, but there is a command to move the background around... I don't remember which was it but it is found in the "Background" part of the manual.

If the background disappears, then you probably have BGCLS somewhere in your code.

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

Sprite

I didn't but I fixed it. Now all I have to do is get it to move to the next screen like in Petit Farm.

I'm not saying let's kill all the stupid people, I'm just saying let's take off the warning labels, and see what happens.
Friend Code: 1075-1228-4183

ramstrong

Morphtroid wrote:

My first "project" right after learning how to show text on screen was Petit Farm... (It started as a text based pet sim!)
Anyways, if what you want to use a background you create with SCRED on your own program, just load it!
When you create a 2-layer background with SCRED it saves two files: NAME0 and NAME1 (where NAME is the name you give to your background)

In your program just load both:
BGPAGE 0 (0=top screen, 1=bottom screen)
LOAD "SCR0:NAME0"
LOAD "SCR1:NAME1"
(I don't really remember if the correct file type is SCR, check the manual if it fails)

It's SCU, I consulted the manual.
I'm aware that your first project is Petit Farm, then again, you're not a beginner, are you? Besides, it's still unusual. It's not a recommended first program for a beginner.
The background part is BGOFS with interpolation time. Again, it's on Help file #41, as I pointed out. Unless, you're thinking something different. Well, you are God of Petit Computer, after all.

I am having trouble understanding Sprite's trouble. I'm glad you can help.

Petit Computer Journal
Old site http://ramstrong.blogspot.com

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

steriaca

Take it from me...try to do simpler programs first before doing more complex programs. If you do not, you will be confused and bewildered before to long.

Hear are a few hints:

1) For your first program, stick to a non-graphic program, like a simulated coin flip or a simulated bomb (well, I did that one, but it dosen't mean you can't do one yourself).

2) Anything which uses graphics beyond text should always be considered 'advance'. Master basic Basic first. Then intermediate Basic.

3) If your not shure of anything, read the HELP file first. If your still not clear aboutb something, then ask on theas boards.

4) Be prepaired to do the work. Nobody will write the entier program for you. You have to bring the tiny bits of code together yourself, see how thay fit together, make changes, ect, ect, yourself. You bought the app, and said you want to be a programer...nobody said it would be easy.

My Friend Code is 3368-1310-0690.

Spagem

Hey guys, I am running a Petit Computer contest. If you want to enter just click here!

Edited on by Spagem

Spagem

3DS Friend Code: 2406-5638-4729 | My Nintendo: Spagem | Nintendo Network ID: smp1998

portealmario

Ok, my os is buggy due to memory saving and loading. Here is basically what I was doing:

Prg1:
I$="h"
Save "mem:wal"

Prg 2:
Load "mem:wal"
Print i
Wait 60
End

Why wouldn't it print h on the screen?

meng 😐
3ds friend code:1762-2769-7142

ramstrong

i and i$ are 2 different things. Also, I believe saving mem requires mem$
MEM$="HELLO"
SAVE "MEM:TEST1"
MEM$="GOODBYE"
?MEM$
LOAD "MEM:TEST1"
?MEM$

Edited on by ramstrong

Petit Computer Journal
Old site http://ramstrong.blogspot.com

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

portealmario

Ok, so is there any possible way to save various variable to MEM$?

Edited on by portealmario

meng 😐
3ds friend code:1762-2769-7142

Eel

@portealmario: Yeah, just cram all the variables you want on MEM together and find a way to load them again.

For example, what I do in Petit Farm could be seen as doing this:

1- Decide what value to store and transform it to string (store its contents on another $ variable with STR$ (we will use TEMP$ and MONEY for this example))
2- Identify how many digits or characters can that value at max (example: The MONEY variable tops at 99999, that's 5 digits)
3- If the variable TEMP $ has less characters (LEN) than it can have, add enough extra characters for it to meet the quota (If our MONEY variable was, say 230, that's only 3 characters and we need 5, so we add two 0s and it becomes 00230.
4-Save that to MEM$. (MEM$=MEM$+TEMP$)
5- Do the same thing for every other variable.

At the moment of loading, you know where each variable should be stored on the MEM$ variable and get the value with MID$.
(Example: if the first value I stored was the one for MONEY, then MONEY=VAL(MID$(MEM$,0,5)), that means that MONEY will take the numeric value of whatever is stored in the first 5 charaters of MEM$)

There are other methods too.
Written on my phone, sorry if it is confusing.

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

Discostew

portealmario wrote:

Ok, so is there any possible way to save various variable to MEM$?

Here is my idea on the matter. You can combine a bunch of strings together into a single string (convert numbers to strings with STR$), and separate each one in the final string with a character you wouldn't use. Remember, up to 256 characters can be held in a string, including MEM$. For this example, assume "%" is the character you plan to never use in a string (and I mean never). Decide what character you plan to be the separator character in your own code.

MYSTR$=STR$(VAR1)+"%"+STR$(VAR2)
MYSTR$=MYSTR$+"%"+STR$(VAR3)
MEM$=MYSTR$
SAVE "MEM:SAVE"

Then when you want to retrieve the variables, you use INSTR to look for that particular character used to separate the strings in the first place, and grab the sides with LEFT$ and RIGHT$ of the position retrieved by INSTR. You can store the results into an array if you want so you can deal with each one individually afterwards.

DIM MYARR$(100)
LOAD"MEM:SAVE"
CURELEMENT=0
MYSTR$=MEM$
@SPLIT
SPLITPOS=INSTR(MYSTR$,"%")
IF SPLITPOS==-1 GOTO @ENDSPLIT
MYARR$(CURELEMENT)=LEFT$(MYSTR$,SPLITPOS)
MYSTR$=RIGHT$(MYSTR$,LEN(MYSTR$)-SPLITPOS-1)
IF LEN(MYARR$(CURELEMENT))>0 THEN CURELEMENT=CURELEMENT+1
GOTO @SPLIT
@ENDSPLIT

From there, you decide what is meant to be a number and use VAL on those values. The above code hasn't been tested, but the idea is there.

edit
lol, the "code" tag did not like my stuff, putting it all onto one line instead of separating them to different lines.

Edited on by Discostew

Discostew

3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew

Please login or sign up to reply to this topic