DSiWare Forum

Topic: Petit Computer

Showing 361 to 380 of 9,568

AuthorMessage
Avatar

KAHN

361. Posted:

@Moskyj
in order for GCIRCLE to operate, you must type: GCIRCLE x coordinate, y coordinate, radius,color
here's an example that i brewed:
GCIRCLE 130,130,6,3
remember, the manual that comes with Petit Computer is always available, even while you're creating a program! just go six pages down in the manual to reach the "graphic" catagory (GCIRCLE is part of this catagory). go to "graphic screen" and you'll find the limitations for GCIRCLE.
.
.
.
if you don't know BASIC at all, then learning any version of it will help you understand. i recommend you visit the website below to help. it's different, but as previously stated, it still helps. i recommend you start on chapter 3. the earlier chapters aren't important (to you). reading this will help you know what you're doing. i read this, and it really helps.
here's the site:
http://fjkraan.home.xs4all.nl/comp/zx80/om/

KAHN

3DS Friend Code: 1032-1301-2772 | Nintendo Network ID: Milkman12

AuthorMessage
Avatar

Noob_The_Third

362. Posted:

How do you save something that you made?

Edited on by Noob_The_Third

8 Bit Forward

AuthorMessage
Avatar

KAHN

363. Posted:

Alien_Mosky wrote:

How do you save something that you made?

SAVE"program name here"

KAHN

3DS Friend Code: 1032-1301-2772 | Nintendo Network ID: Milkman12

AuthorMessage
Avatar

Noob_The_Third

364. Posted:

Whenever I go to something I made it says OK and ends.

Edited on by Noob_The_Third

8 Bit Forward

AuthorMessage
Avatar

KAHN

365. Posted:

Alien_Mosky wrote:

Whenever I go to something I made it says OK and ends.

i ran into that problem too. i came up with a solution. all you need to do is use an INPUT command at the end, or loop it.

KAHN

3DS Friend Code: 1032-1301-2772 | Nintendo Network ID: Milkman12

AuthorMessage
Avatar

KAHN

366. Posted:

(question is open to all)
i still can't get SPREAD() to work XD i'm sorry. i don't think i can understand the explanations.what i REALLY need is an example! i ask the forum if you genius' can post like a simple program using SPREAD(). DrKarl did something like this with GOSUB on this forum, and i COMPLETELY understood. i'm sure that as soon as i see a simple program using SPREAD() then i'll understand. i learn by seeing :) all help appreciated.

KAHN

3DS Friend Code: 1032-1301-2772 | Nintendo Network ID: Milkman12

AuthorMessage
Avatar

Noob_The_Third

367. Posted:

0LD_SK0OL_PUNK wrote:

Alien_Mosky wrote:

Whenever I go to something I made it says OK and ends.

[/div]

i ran into that problem too. i came up with a solution. all you need to do is use an INPUT command at the end, or loop it.

So I should write INPUT right before I write SAVE"..."? Thanks. I'll try.

8 Bit Forward

AuthorMessage
Avatar

KAHN

368. Posted:

Alien_Mosky wrote:

0LD_SK0OL_PUNK wrote:

Alien_Mosky wrote:

Whenever I go to something I made it says OK and ends.

[/div]

[/div]

i ran into that problem too. i came up with a solution. all you need to do is use an INPUT command at the end, or loop it.

[/div]

So I should write INPUT right before I write SAVE"..."? Thanks. I'll try.

it's a little more complicated than that. here, i'll post one of my simple programs WITHOUT the INPUT command at the end.

PRINT "HELLO USER! DO YOU LIKE ME?"

Normally, if i ran that program by itself like how you're trying to do, it would just say OK and end. here's the program with an INPUT command at the end:

@LOOP
PRINT "HELLO USER! DO YOU LIKE ME?"
INPUT A$
IF A$=="YES" THEN GOTO @LOOP
IF A$=="NO" THEN END

The computer asked if you like it, and if you typed in "YES" then it would go to @loop. if you said "NO" then the program would end. this is usually how i end my simple programs, so that everything on the screen always shows up long enough for me to read it, undestand? it's sort of a combination of the loop command AND the input command.

KAHN

3DS Friend Code: 1032-1301-2772 | Nintendo Network ID: Milkman12

AuthorMessage
Avatar

Peidorrento

369. Posted:

0LD_SK0OL_PUNK wrote:

Alien_Mosky wrote:

0LD_SK0OL_PUNK wrote:

Alien_Mosky wrote:

Whenever I go to something I made it says OK and ends.

[/div]

i ran into that problem too. i came up with a solution. all you need to do is use an INPUT command at the end, or loop it.

[/div]

[/div]

So I should write INPUT right before I write SAVE"..."? Thanks. I'll try.

[/div]

it's a little more complicated than that. here, i'll post one of my simple programs WITHOUT the INPUT command at the end.

PRINT "HELLO USER! DO YOU LIKE ME?"

Normally, if i ran that program by itself like how you're trying to do, it would just say OK and end. here's the program with an INPUT command at the end:

@LOOP
PRINT "HELLO USER! DO YOU LIKE ME?"
INPUT A$
IF A$=="YES" THEN GOTO @LOOP
IF A$=="NO" THEN END

The computer asked if you like it, and if you typed in "YES" then it would go to @loop. if you said "NO" then the program would end. this is usually how i end my simple programs, so that everything on the screen always shows up long enough for me to read it, undestand? it's sort of a combination of the loop command AND the input command.

You forgot to mention that, in this case, if you respond anything different from "yes" actually, it will end the program.

"A vingança nunca é plena, mata a alma e a envenena" - Seu Madruga
Presidente, CEO, Programador e único empregado da Peidosoft.

AuthorMessage
Avatar

JOSePh4

370. Posted:

What is the coding for making an object or a letter move up down left and right using the dpad, im learning coding on console screen so can someone please help, i dont need a sprite yet, ill use "o" or something. what im talking about is character movement like legend of zelda or pokemon.

JOSePh4

AuthorMessage
Avatar

JOSePh4

371. Posted:

never mind i figured it out, and ive got a space ship desighn from the keyboard symbols, i know how to generate random objects but how can i make collisions that end the game? collisions with the random objects/ asteroids, and a timer to see how long you can survive against randomly generated asteroids?

JOSePh4

AuthorMessage
Avatar

zfwman

372. Posted:

Since I am not good at basic I made a really simple code can someone check and debug it for me? It is supposed to ask Kaboom? And if the user says yes it reboots if the user says no it asks kaboom? Again
Here is the code:
001:INPUT "KABOOM:" U$
002:IF U$ = "Y" THEN GOTO 3 ELSE GOTO 4
003:REBOOT
004:GOTO 1

Nom, it yummy

AuthorMessage
Avatar

ejamer

373. Posted:

0LD_SK0OL_PUNK wrote:

(question is open to all)
i still can't get SPREAD() to work XD i'm sorry. i don't think i can understand the explanations.what i REALLY need is an example! i ask the forum if you genius' can post like a simple program using SPREAD(). DrKarl did something like this with GOSUB on this forum, and i COMPLETELY understood. i'm sure that as soon as i see a simple program using SPREAD() then i'll understand. i learn by seeing :) all help appreciated.

I think the best easy example I've seen is in the source code for Sample 9, included with the game.
A very simplified version of the relevant code is provided below. You would need to fill in the SpriteCount, ChrNum, and PalNum values yourself.

' Create sprites with SPSET
' Put them in the upper right corner using SPOFS
' Make sure sprite is visible using VSYNC
' Start moving the sprite to a destintation on the left side of screen using SPOFS
FOR SpriteID=0 TO SpriteCount-1
SPSET SpriteID,ChrNum,PalNum,0,0,2
SPOFS SpriteID,128,8
VSYNC 1
SPOFS SpriteID,240,8+(I*16),300
NEXT

' Use SPREAD to discover and print out information about sprite
' Note that only X and Y position is actually used in this example
@PrintSpriteLocation
FOR SpriteID=0 TO SpriteCount-1
SPREAD(SpriteID),GetX,GetY,GetAngle,GetScale,GetChar
PRINT "The current (X,Y) coordinates of sprite number ";SpriteID;" are: (";GetX;", ";GetY;")"
NEXT
GOTO @PrintSpriteLocation

The sample program using SCCHK to check the status of each sprite, and stops the printing loop when the SPCHK value for all sprites is 0. I'm trying to cut out all of the fat here though.

ejamer

Nintendo Network ID: ejamer

AuthorMessage
Avatar

JOSePh4

374. Posted:

Ok all I need is this, I need to know how to get a sprite loaded, and how to create solid objects and doorways that lead to rooms. If any one can please contribute some code to me that would be greatly appreciated. As I've scrapped my previous project.

JOSePh4

AuthorMessage
Avatar

Peidorrento

375. Posted:

JOSePh4 wrote:

Ok all I need is this, I need to know how to get a sprite loaded, and how to create solid objects and doorways that lead to rooms. If any one can please contribute some code to me that would be greatly appreciated. As I've scrapped my previous project.

My engine is almost finished. If you want it, Ill post the QR code as soon as it is done.

"A vingança nunca é plena, mata a alma e a envenena" - Seu Madruga
Presidente, CEO, Programador e único empregado da Peidosoft.

AuthorMessage
Avatar

Shadow1364

376. Posted:

Hey, I'm new in the forums, but this caught my eye as I've been thinking of getting Petit Computer. I love all forms of programming and have high hopes for this, and I can't wait to see how all of your games turn out from it! ^-^

FC: 1934-1622-0902

AuthorMessage
Avatar

petitprogrammer

377. Posted:

can anyone tell me how to make walls that block my sprite?

petitprogrammer

AuthorMessage
Avatar

Morpheel

378. Posted:

@PetitProgrammer: There was a post about that some pages ago, I'd recommend you to check it out.

Cows are ready, now I just need to create the animal shop and do a menu or something. School started so things may be slower.

Oops, no username pun.

Oh look! A Morphloggery.
Oh! eShop Gurus.

3DS Friend Code: 0173-1330-0080 | Nintendo Network ID: Abgarok

AuthorMessage
Avatar

petitprogrammer

379. Posted:

morphtroid you game looks awsome I can't wait to try it and thanks for the help. Also can you tell me how to post QRcodes to share a programs I make (for future reference)?

Edited on by petitprogrammer

petitprogrammer

AuthorMessage
Avatar

petitprogrammer

380. Posted:

3DS FC:0731-5254-2002 please add me

Edited on by petitprogrammer

petitprogrammer