Forums

Topic: Petit Computer

Posts 2,041 to 2,060 of 9,620

swordx

hairmanban19 wrote:

swordx wrote:

I just tried (and failed) to upload the QR codes. Just so you know, there are 50 QR codes for the program itself. I don't know about the other files. I'll try again next weekend. Sorry...

No,another week of waiting!

I'll (try) to upload a video that will have the QR codes at the end. However, I just found out that my family may be going out of town EVERY SINGLE WEEKEND for a while, so I'm not even sure if this weekend will work! I feel so bad for getting your hopes up...

swordx

IAmSpike

downloads random story generator
POOLA AND POOLINA ARE GOOD FRIENDS

POOLA AND POOLINA HIGH-FIVED EACH OTHER

AND THEN POOLINA FELL INTO A POOP

Previously Philip.

The most paranoid person on the net!

3DS Friend Code: 0559-7022-5853

Pixelrobin

How can I check only a certain part of a variable?

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

Pixelrobin

Philip wrote:

downloads random story generator
POOLA AND POOLINA ARE GOOD FRIENDS

POOLA AND POOLINA HIGH-FIVED EACH OTHER

AND THEN POOLINA FELL INTO A POOP

HAHA! I might actually extend that! Thanks!

Edited on by Pixelrobin

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

randomous

bluerobin2 wrote:

How can I check only a certain part of a variable?

What do you mean "only a certain part"? If you're talking about strings, you can use MID$, LEFT$, and RIGHT$. For instance:

LEFT$("Bananas", 3)

Would give you "Ban", or the first 3 letters from the left. Likewise:

RIGHT$("Bananas", 3)

Would give you "nas", or the last 3 letters (first 3 from the right). Finally:

MID$("Bananas", 2, 4)

Would give you "nana", or 4 characters starting at position 2 (which is the third character).

If you're using arrays (by utilizing the DIM command), you can access an element (which is basically its own variable) of the array by simply putting the element number in parenthesis or square brackets afterwards. For instance:

DIM MONKEYS(10)
MONKEYS(0)=499

The (0) after MONKEYS tells the program to look at the first element of MONKEYS, which can now hold 10 variable values thanks to the DIM command. You could access any of these elements using the numbers 0 through 9.

If you're using a numeric variable, you could use the variable for multiple purposes by utilizing only a fraction of the bits. This is how button reading works: each button sets a specific bit, which allows you to see multiple button presses at the same time. If you're trying to detect multiple button presses, you can see if a particular button was pressed like this:

B=BUTTON()
IF B AND 1 THEN PRINT "Up"
IF B AND 2 THEN PRINT "Down"
IF B AND 4 THEN PRINT "Left"
IF B AND 8 THEN PRINT "Right"

The buttons are numbered with powers of 2, in the order of Up, Down, Left, Right, A, B, X, Y, L, R, and Start.

Edited on by randomous

randomous

Pixelrobin

I meant a variable, but I guess I could turn one into a string...

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

randomous

bluerobin2 wrote:

I meant a variable, but I guess I could turn one into a string...

Are you trying to look at a specific decimal, like the tens/hundreds/thousands place? If so, you can divide the number by the place you want, then mod it by ten. For instance, if I want just the digit in the thousands place:

DOGS=47865
THPLACE=FLOOR(DOGS/1000)%10.

THPLACE will now be seven! The floor is necessary for integer division.

randomous

IAmSpike

randomouscrap98 wrote:

DOGS=47865

too many dogs

Previously Philip.

The most paranoid person on the net!

3DS Friend Code: 0559-7022-5853

Pixelrobin

randomouscrap98 wrote:

Are you trying to look at a specific decimal, like the tens/hundreds/thousands place? If so, you can divide the number by the place you want, then mod it by ten. For instance, if I want just the digit in the thousands place:

DOGS=47865
THPLACE=FLOOR(DOGS/1000)%10.

THPLACE will now be seven! The floor is necessary for integer division.

Thanks! Also, what is the difference from PRINT "O" and CHR$(Whatever)

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

Pixelrobin

@randomouscrap Thank you very much. @Ramstrong, Your maze generator is amazing! I will make it into a game. (Not my contest entry though. It would devastate one of my enemies ai if the maze was generated a certain way).

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

Pixelrobin

@Ramstrong, I made your maze engine into a simple maze game! Qrs coming soon.

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

Justlink

ErnisDy wrote:

A stupid question:
Is this app out in Europe or not?

i dont think it is yet

Do you like videogames? If so, you must know
It's dangerous to go Alone.

randomous

Philip wrote:

too many dogs

Lol but dogs are awesome!

bluerobin2 wrote:

Thanks! Also, what is the difference from PRINT "O" and CHR$(Whatever)

Well, I'm sure you know what print does. CHR$ on the other hand is rather special in that it converts a number code into a character. For instance, if you look at the manual, there is a table which contains all of the characters in a nice box. If you number the characters starting with the top left corner, you'll find their character code. For instance, "A" has the code 65, so

PRINT CHR$(65)

Would print A. Note that CHR$ only works on single character codes (which go from 0-255), so giving it something like 300 wouldn't make sense. The opposite of CHR$ is ASC, which takes a single character and returns the code value. For instance:

PRINT ASC("A")

Would print 65. To see that they are indeed opposite, you can do something like this:

PRINT CHR$(ASC("A"))

Which will just print A.

randomous

ramstrong

bluerobin2 wrote:

@Ramstrong, I made your maze engine into a simple maze game! Qrs coming soon.

That's great! I made the engine, you made the game. Now, if only Morphtroid will make the graphics, I think we have an entry to submit to the competition. Also if Discostew want to put in music, that would be nice. I know we can submit more than one, but I don't know about adhoc team. Still doesn't hurt to try, though.

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

Pixelrobin

More Qrs! You probably would have to zoom in to read some of them.

Disco
A simple Disco program I created. Use in the dark. Warning: Contains extreme flashing images.
Untitled

Number keyboard aka Number Word
This is a shot at a custom keyboard. It turned into a number keyboard. Maybe someone could turn it into a calculator?
Untitled

Maze Game
@Ramstrong here it is! You decide who does what next . We really could enter this as a team effort.
Untitled

Temple Raid
This is my contest entry. I really like it. Tell me what you think!
Untitled
Untitled
Untitled

Hope you all enjoy!

Edited on by Pixelrobin

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

Eel

I'll make sure to scan and try these since that I'm using petit computer right now... But first...
I made some changes to Puzzle over night, now you can change the amount of pieces of the puzzle:

Feeling like playing something ridiculously easy?
Untitled

How about something that will take hours to complete and nobody will ever play seriously?
Untitled

I'm thinking of adding the option to change the sound pieces make too. It shouldn't take long to do that.

Edit: Temple Raid is pretty good! That green monster makes things pretty tense.
Maybe adding an option to play another level when you finish/die would be nice? Sending the player to the title screen after completing a level feels a little odd.

Edited on by Eel

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

Pixelrobin

@Morphtroid thanks! Also I wanted to remind everyone the point of the game: Get as many treasure chests as you can within one minute and get to the door.

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

ramstrong

@bluerobin2
That's great! I added
'PRESS ANY BUTTON TO CONTINUE
@ANYKEY
IF BUTTON(0) THEN RETURN
GOTO @ANYKEY

LINE 177 CHANGED TO LOCATE 5,11;?"PRESS ANY BUTTON TO CONTINUE
GOSUB @ANYKEY

"PLAY AGAIN" should go directly to maze generator, instead of START SCREEN.
Moved COLOR 0 from @START to @INIT. Changed GOTO @START to GOTO @INIT

Replaced WAIT 10 with VSYNC 10 and moved it to just before BT=BUTTON()

Car should keep moving in the same direction without dpad being pushed, so I changed the @LOOP to something like this:

@LOOP
BEEP:COLOR13:LOCATE X,Y:?MAN$;
VSYNC 10
BT=BUTTON()
LOCATE X,Y:?" ";
IF BT==1 THEN MAND$="U"
IF BT==2 THEN MAND$="D"
IF BT==4 THEN MAND$="L"
IF BT==8 THEN MAND$="R"
MCIDX=INSTR(CIDX$,MAND$)
MAN$=MID$("UDLR",MCIDX,1):' THOSE ARE CARS/MAN$
MC=CHKCHR(X+XDIR(MCIDX),Y+YDIR(MCIDX))
IF MC==234 GOTO @YW
IF MC==151 GOTO @LOOP
X=X+XDIR(MCIDX):Y=Y+YDIR(MCIDX)
GOTO @LOOP

And I remove all code until @YW.

HTH. If you can figure out using SPRITE for smooth movement, then that'll be great, too. Good job on making a game out of my maze maker!

EDIT
On second thought, I figured BEEP should be only when the car is moving, so I moved BEEP to BEEP2 to just after position update, and GOTO @LOOP. BEEP 2 because the default BEEP sound is too harsh. You can change it to whatever you like, though.

And bottom screen is blank, so you may want to use it for status update, and just keep the maze on top screen, instead of erasing the playfield.

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

ramstrong

Morphtroid wrote:

I'll make sure to scan and try these since that I'm using petit computer right now... But first...
I made some changes to Puzzle over night, now you can change the amount of pieces of the puzzle:

Those look terrific. I love it!

Since you only have one minute, I suggest that you keep a few pre-scrambled puzzle states, if you haven't done so. So, you can solve the puzzles immediately without having to wait for the computer to scramble it.

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

Please login or sign up to reply to this topic