DSiWare Forum

Topic: Petit Computer

Showing 501 to 520 of 9,306

AuthorMessage
Avatar

ramstrong

501. Posted:

@GrabSomeEyes
Umm, no. DATA is completely unrelated to Subroutines. Also, there is no local variables/return value either.

I don't know if this is an improvement, but here is my "fixed" Money Display Routine. Warning: It's advanced programming. Well, as advanced as BASIC programming can be. ;)

MONEY DISPLAY

DIM K[6]
S$=" ":M=1000

INPUT "TRILLION,BILLION,MILLION,THOUSAND,DOLLAR,CENT",K[5],K[4],K[3],K[2],K[1],K[0]

P=0:?">";:FOR I=5 TO 1 STEP -1
IF P THEN ?",";RIGHT$(STR$(M+K[I]),3); ELSE IF K[I] THEN ?RIGHT$(S$+"$"+STR$(K[I]),3); ELSE ?S$;
P=P+K[I]:NEXT:?".";RIGHT$(STR$(M+K[0]),2)

It is
1. Extensible (as many K[] as you like!)
2. Includes CENTS
3. Moving dollar sign
4. FITS IN ONE LINE!!!

Good luck integrating it into your program. :D You may need to split it into two lines as I did some compressing to fit it into one line. You need to check 3 different values, so I suggest to split between P==0 and P!=0.

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

AuthorMessage
Avatar

ramstrong

502. Posted:

Regarding Touchscreen keyboard: What can be the problem? Here is my Touch Screen (Rectangle) Keyboard detection routine.

TOUCH SCREEN KEYBOARD
@TOUCH
MX=256:MY=192:'MAXX,MAXY
SX=8:SY=6:'SPANX,SPANY
WX=FLOOR(MX/SX):WY=FLOOR(MY/SY):'WIDTHX,WIDTHY
TX=TCHX:TY=TCHY
FOR I=1 TO TCHST
IF TX<MX AND TY<MY THEN KX=FLOOR(TX/WX):KY=FLOOR(TY/WY)
VSYNC 1:GFILL 0,0,MX,MY,0:GFILL KX*WX,KY*WY,(KX+1)*WX,(KY+1)*WY,8
LOCATE 0,0:?"KX=";KX;" KY=";KY;" "
NEXT
GOTO @TOUCH

You will use the values KX and KY to determine the "keys" of the keyboard.

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

AuthorMessage
Avatar

Moorpheel

503. Posted:

Actually, sprites can have up to 8 (I think) local variables. They're pretty useful.

Moo

Oh look! A Morphloggery.
Oh! eShop Gurus.

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

AuthorMessage
Avatar

GrabSomeEyes

504. Posted:

ramstrong wrote:

@GrabSomeEyes
Umm, no. DATA is completely unrelated to Subroutines. Also, there is no local variables/return value either.

I said I could be completely wrong, and I assumed so.
Just a beginner's guess.

Edited on by GrabSomeEyes

Eos OS: http://conlogxl.forumotion.com/t12-eos-os-v10
3DS FC: 3695-0514-5044

AuthorMessage
Avatar

ramstrong

505. Posted:

@Morphtroid
Oh, that's right. I haven't been dealing with sprites much. Still going through graphics and Trigs, but sprites does have variables attached to them. That's not subroutine local variables, though. It's not like they're stack-based. Closer to "Structures" than local variables.

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

AuthorMessage
Avatar

koopatroopaX

506. Posted:

@swordx
i know i tried to tell my friends to stick with a even more easy task, like atari game before trying anything like that, but they said it was either this or super mario world. i don't know that much about programming none with smile basic, but i help out where ican, especially when it comes to mml tracks and sprites/BG pics. i will tell you when they finally get going on the project because now they want to make some weird fps. sigh, what can you do. anyway, if i could figure out the basic elements of how to load and save sprites mml tracks, background images and maps, i could be a lot greater help unil i finsh reading all these tutorials for smile basic, i you want, you could work on the making a fully functional world 1-1, just to prove it would work, and i will post as many things as possible that you will need on here, in terms of sprites and backgrounds. bbut still this is your choice. if you want to continue on something lse instead of this, that's fine. but remember that I will be waiting when your done your dungeon project. btw can't load the files all i can do is read the text, then it says it can't load the files. still sound interesting just from the text.

koopatroopaX

AuthorMessage
Avatar

triotip

507. Posted:

Ok i have d-pad movement working any one now how i:
1, stop the sprite from going off screen
2. make movement icy
3. make it so i tap the screen to shoot another sprite upwards

triotip

AuthorMessage
Avatar

Moorpheel

508. Posted:

To have your character from going offscreen you need to keep it's X between 0 and 256 and it's Y between 0 and 192. Use ifs to check its X & Y before it starts moving.
I don't really know of a way to make icy movement, sorry.
To have your game do something when you tap the screen you need to check the TCHTIME variable, if it is = to 1, then the player tapped the screen.

Moo

Oh look! A Morphloggery.
Oh! eShop Gurus.

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

AuthorMessage
Avatar

swordx

509. Posted:

koopatroopaX wrote:

@swordx
i know i tried to tell my friends to stick with a even more easy task, like atari game before trying anything like that, but they said it was either this or super mario world. i don't know that much about programming none with smile basic, but i help out where ican, especially when it comes to mml tracks and sprites/BG pics. i will tell you when they finally get going on the project because now they want to make some weird fps. sigh, what can you do. anyway, if i could figure out the basic elements of how to load and save sprites mml tracks, background images and maps, i could be a lot greater help unil i finsh reading all these tutorials for smile basic, i you want, you could work on the making a fully functional world 1-1, just to prove it would work, and i will post as many things as possible that you will need on here, in terms of sprites and backgrounds. bbut still this is your choice. if you want to continue on something lse instead of this, that's fine. but remember that I will be waiting when your done your dungeon project. btw can't load the files all i can do is read the text, then it says it can't load the files. still sound interesting just from the text.

About the loading the game, I already stated a page or two back that you need to press start when it says it can't load the Tragen thingy.

swordx

AuthorMessage
Avatar

mega

510. Posted:

I just got this game. :-/ I do use eclispe programming for apps, but this is hard to understand. Does anyone know of a place I can learn how to use Petit Computer? :(

3DS FC: 2406 - 5638 - 4729
Wii U/NNID: smp1998
XBL: KAME3999

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

AuthorMessage
Avatar

GrabSomeEyes

511. Posted:

mega wrote:

I just got this game. :-/ I do use eclispe programming for apps, but this is hard to understand. Does anyone know of a place I can learn how to use Petit Computer? :(

Why are you saying this so boldly?
Anyway, Gamefaqs has a lot of good tutorials, the community here is extremely helpful and you can learn a lot just reading the conversations we have, and the in-game help menu should do you well.
It has a steep learning curve, but it's well worth it.

Edit: Unrelated, but, it'd be cool to see a binary translator or something on Petit Computer.
Just saying.

Edited on by GrabSomeEyes

Eos OS: http://conlogxl.forumotion.com/t12-eos-os-v10
3DS FC: 3695-0514-5044

AuthorMessage
Avatar

koopatroopaX

512. Posted:

does anyone know if it is possible to create an emulator program on petit computer, say for N64, or is that only possible on more advanced languages like C+

koopatroopaX

AuthorMessage
Avatar

swordx

513. Posted:

koopatroopaX wrote:

does anyone know if it is possible to create an emulator program on petit computer, say for N64, or is that only possible on more advanced languages like C+

A NES or SNES emulator might work, but I doubt a N64 emulator would.

swordx

AuthorMessage
Avatar

Cocobanana

514. Posted:

Im trying to make a pokemon tcg game, just like the GBC one.

I just bought this a week ago, and im in love:)

Cocobanana

AuthorMessage
Avatar

Moorpheel

515. Posted:

swordx wrote:

koopatroopaX wrote:

does anyone know if it is possible to create an emulator program on petit computer, say for N64, or is that only possible on more advanced languages like C+

A NES or SNES emulator might work, but I doubt a N64 emulator would.

Since you can't add external files to Petit Computer, creating an emulator of any kind is impossible. And it would be against the law anyways.
You can, however, try and replicate any kind of 2D (or basic pseudo-3D) game if you want. It's not like you can sell them anyway, so nothing stops you from doing and sharing these.

Moo

Oh look! A Morphloggery.
Oh! eShop Gurus.

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

AuthorMessage
Avatar

ramstrong

516. Posted:

Morphtroid wrote:

Since you can't add external files to Petit Computer, creating an emulator of any kind is impossible. And it would be against the law anyways.
You can, however, try and replicate any kind of 2D (or basic pseudo-3D) game if you want. It's not like you can sell them anyway, so nothing stops you from doing and sharing these.

You can write a converter. Convert it to DATA statements. Build QR Codes out of it. Then scan and APPEND to the emulator code. I doubt it will run fast enough, though.

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

AuthorMessage
Avatar

Cocobanana

517. Posted:

Can someone help?

I made a game but it says:
Subscript out of range (1, PRINT)
Ok

How do i fix this?

Cocobanana

AuthorMessage
Avatar

swordx

518. Posted:

Morphtroid wrote:

swordx wrote:

koopatroopaX wrote:

does anyone know if it is possible to create an emulator program on petit computer, say for N64, or is that only possible on more advanced languages like C+

A NES or SNES emulator might work, but I doubt a N64 emulator would.

Since you can't add external files to Petit Computer, creating an emulator of any kind is impossible. And it would be against the law anyways.
You can, however, try and replicate any kind of 2D (or basic pseudo-3D) game if you want. It's not like you can sell them anyway, so nothing stops you from doing and sharing these.

Yeah, that's what I meant. I didn't mean you could make a virtual NES/SNES. I meant you could recreate NES/SNES games.

Version 0.2 of Dungeon Adventure will be released tomorrow! If you want hints as to what will be in the final game, you'll just have to look into the programming. I think there will be some interesting hints.

swordx

AuthorMessage
Avatar

Tingle

519. Posted:

Now that I have conquered the use of clicking buttons and having stuff happen, I now need to learn how to have a CHR move around the screen. How do I make a sprite move across the screen with the control pad?

Tingle

AuthorMessage
Avatar

Luigiisthebest

520. Posted:

Hey guys! ive been on this forum for a while now and I just made my profile! I cant wait to share games with you!

Luigiisthebest