DSiWare Forum

Topic: Petit Computer

Showing 2,621 to 2,640 of 9,299

AuthorMessage
Avatar

boot

2,621. Posted:

You could let us try it...please?

Just your average talking boot. The Boot that can program.

AuthorMessage
Avatar

bigdog00

2,622. Posted:

You do practically nothing... you sit there, wait for a paratrooper to fall, and you shoot him down. If you really want it, someone can improve on it, but someone else will have to do the qr codes. I will upload it later this summer.

I like petit computer! Asphault 3d is awesome!

3DS Friend Code: 0473-8697-6288 | Twitter: bigdogdt

AuthorMessage
Avatar

MrSirr

2,623. Posted:

I need help with making a highscore system, how do you make it to where your score is at zero, and keeps going up? I tried and ended up with it going like this instead:
1
2
3
4
lol so REALLY confused. help please.

MrSirr

AuthorMessage
Avatar

Bluerobin2

2,624. Posted:

@Mrsirr
@START
SCORE=0
@LOOP
LOCATE 0,0:PRINT (SCORE) 'this will print it in the same location every time
SCORE = SCORE+1 'adds 1 to score
VSYNC 60 'vsync is like wait
'--other code stuffs--
IF --insert gameover stuff here-- THEN GOTO @DIE
GOTO @LOOP
@DIE
SAVESCORE=SCORE
SCORE=0
GOTO @START

saving is another part. If you want, I can help with that as well...

Houston, We have a Syntax Error.

Blog: bluerobin2.blogspot.com
Backloggery: backloggery.com/bluerobin2

3DS Friend Code: 3007-9228-5126

AuthorMessage
Avatar

mystman12

2,625. Posted:

@randomouscrap98 That works great, thanks!

Future Pinball Table Development Blog Currently working on: Joe's Ultimate Bus Ride
I'm trying to share as many Wario Ware D.I.Y. microgames as possible, before WiFi is taken down. Share your microgames in this thread.

3DS Friend Code: 0259-0292-5888 | Nintendo Network ID: mystman12 | Twitter: mystman12

AuthorMessage
Avatar

randomous

2,626. Posted:

@mystman12 I'm glad it worked!

randomous

AuthorMessage
Avatar

MrSirr

2,627. Posted:

Bluerobin2 wrote:

@Mrsirr
@START
SCORE=0
@LOOP
LOCATE 0,0:PRINT (SCORE) 'this will print it in the same location every time
SCORE = SCORE+1 'adds 1 to score
VSYNC 60 'vsync is like wait
'--other code stuffs--
IF --insert gameover stuff here-- THEN GOTO @DIE
GOTO @LOOP
@DIE
SAVESCORE=SCORE
SCORE=0
GOTO @START

saving is another part. If you want, I can help with that as well...

OF COURSE locate command! didnt think of that! Thx man!

MrSirr

AuthorMessage
Avatar

MrSirr

2,628. Posted:

alright now it wont let me do anything else since its in a loop. How do I fix that? How do I make it do other stuff BESIDES THE FRIGGIN LOOP, UGH.

MrSirr

AuthorMessage
Avatar

bigdog00

2,629. Posted:

if your done with the loop, use the "goto @(whatever)" to do something else

I like petit computer! Asphault 3d is awesome!

3DS Friend Code: 0473-8697-6288 | Twitter: bigdogdt

AuthorMessage
Avatar

Zennyboiz

2,630. Posted:

Trying to get into programming and came across this a few days ago. Finally got the money to get it, but I'm currently on the fence about it.

Zennyboiz

Twitter: agamernamedzen

AuthorMessage
Avatar

Bluerobin2

2,631. Posted:

@ZennyBoiz GET IT. YOU WILL NOT REGRET YOUR CHOICE.

Houston, We have a Syntax Error.

Blog: bluerobin2.blogspot.com
Backloggery: backloggery.com/bluerobin2

3DS Friend Code: 3007-9228-5126

AuthorMessage
Avatar

MrSirr

2,632. Posted:

bigdog00 wrote:

if your done with the loop, use the "goto @(whatever)" to do something else

Im never done until u die, its one of those survival games. So it constantly goes up...now what?

MrSirr

AuthorMessage
Avatar

Bluerobin2

2,633. Posted:

@Mrsirr that was just an example. Just use LOCATE and put it wherever. If you have a main game loop, then put that code there (Without the @LOOP stuffs)

Houston, We have a Syntax Error.

Blog: bluerobin2.blogspot.com
Backloggery: backloggery.com/bluerobin2

3DS Friend Code: 3007-9228-5126

AuthorMessage
Avatar

Zennyboiz

2,634. Posted:

Bluerobin2 wrote:

@ZennyBoiz GET IT. YOU WILL NOT REGRET YOUR CHOICE.

Alright, I will definitely go get it once I'm at home and get cracking at it.

Zennyboiz

Twitter: agamernamedzen

AuthorMessage
Avatar

ramstrong

2,635. Posted:

Discostew wrote:

@Gimmemorecoinz

My mistake. I was thinking of INSTR, which was already explained. I was on a 10hr drive, so I wasn't all there.

Wow. 10HR drive. Doesn't sound like a relaxing vacation. I'm a driver so I regularly do 12+ hour drive. It can get tiring sometimes.
BTW, did you analyzed the picture format? I'm thinking that it would be a good way to transfer data from Nintendo DSi to PC. I'm thinking it's raw 8 bit format 256x192. Is that right? Does the image has header files and does it use a compression at all? RLE maybe?

randomouscrap98 wrote:

@mystman12 I think you've got a little bit of weirdness going on with the logic behind RESTORE and such. Here's how it works:

You put a bunch of data in a DATA section somewhere, like you did in your program. Then you give it a title.

Excellent explanation, randomous! Do you mind reposting this in tutorial thread?

Bluerobin2 wrote:

is there a specific reason that the icon chejing variable has parenthesis? I dislike the fact that smileboom seemed to just rush through that feature. :/

Edit: I mean iconchk()

It's the difference between command and function. Function returns value. Iconchk() returns a number, right? That's why it's a function, and uses parenthesis.

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

AuthorMessage
Avatar

mystman12

2,636. Posted:

Is there an easier way to use BGPUT with 2x2 background tiles? In my data, I have to code the tiles like this:

32,33
64,65

That is just for one tile, and it's a little annoying having to figure out all the right numbers for each tile. I was wondering if there was an easier way to place a tile, like just by putting 32 in.

Future Pinball Table Development Blog Currently working on: Joe's Ultimate Bus Ride
I'm trying to share as many Wario Ware D.I.Y. microgames as possible, before WiFi is taken down. Share your microgames in this thread.

3DS Friend Code: 0259-0292-5888 | Nintendo Network ID: mystman12 | Twitter: mystman12

AuthorMessage
Avatar

Discostew

2,637. Posted:

ramstrong wrote:

Discostew wrote:

@Gimmemorecoinz

My mistake. I was thinking of INSTR, which was already explained. I was on a 10hr drive, so I wasn't all there.

Wow. 10HR drive. Doesn't sound like a relaxing vacation. I'm a driver so I regularly do 12+ hour drive. It can get tiring sometimes.
BTW, did you analyzed the picture format? I'm thinking that it would be a good way to transfer data from Nintendo DSi to PC. I'm thinking it's raw 8 bit format 256x192. Is that right? Does the image has header files and does it use a compression at all? RLE maybe?

GRP PTC files are made up of a 48 byte header and a 49152 byte data section (which is the 256x192 bitmap). The header is as follows....

4 bytes - "PX01"
4 bytes - Data section size (for GRPs, it is a constant 49152)
4 bytes - PTC file type (always 2)
8 bytes - string - internal name of the GRP as read by Petit Computer
16 bytes - MD5 hash string (based on Data section)
12 bytes - "PETC0100RGRP"

GRP PTC files, excluding the typical 48-byte PTC header, are 256x192 pixels in 8-bit format with no compression, but the way they are stored is not what you think. It doesn't store them in rows of 256 pixels each from left to right as you would expect a bitmap to be stored. Instead, it's a bit closer to how CHR data is stored. The entire image is broken up into 8x8 pixel blocks, but it doesn't end there. There are then 8x8 blocks from left-to-right, top-to-bottom, making up a 64x64 section. Then, the entire image is made up of these sections in a 4x3 manner (to make 256x192 pixels).

The following is in C code, which I use when compiling my game assets into GRP files. I write the data sequentially into "readStream", which is an array of 49152 bytes (256x192), and then read from readStream to "outStream" (same size array) in the manner the GRP format is designated.

for (int j = 0; j < 3; j++)
for (int i = 0; i < 4; i++)
for (int y = 0; y < 8; y++)
for (int x = 0; x < 8; x++)
for (int yy = 0; yy < 8; yy++)
for (int xx = 0; xx < 8; xx++)
outStream[(j * 16384) + (i * 4096) + (y * 512) + (x * 64) + (yy * 8) + xx] = readStream[(j * 16384) + (i * 64) + (y * 2048) + (x * 8) + (yy * 256) + xx];

Edited on by Discostew

"What fun is there in making sense?"
Lazer Light Studios - Home of the MM2 PTC project

Pokemon 3DS Friend Safari - Ice - Spheal, Sneasel, Lapras

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

AuthorMessage
Avatar

ramstrong

2,638. Posted:

Discostew wrote:

GRP PTC files, excluding the typical 48-byte PTC header, are 256x192 pixels in 8-bit format with no compression, but the way they are stored is not what you think. It doesn't store them in rows of 256 pixels each from left to right as you would expect a bitmap to be stored. Instead, it's a bit closer to how CHR data is stored. The entire image is broken up into 8x8 pixel blocks, but it doesn't end there. There are then 8x8 blocks from left-to-right, top-to-bottom, making up a 64x64 section. Then, the entire image is made up of these sections in a 4x3 manner (to make 256x192 pixels).

Perfect! Thanks for the info. I'm not aware of being able send GRP files directly. I assume then you're using PTC Utilities to convert graphics to QR code.

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

Discostew

2,639. Posted:

ramstrong wrote:

Discostew wrote:

GRP PTC files, excluding the typical 48-byte PTC header, are 256x192 pixels in 8-bit format with no compression, but the way they are stored is not what you think. It doesn't store them in rows of 256 pixels each from left to right as you would expect a bitmap to be stored. Instead, it's a bit closer to how CHR data is stored. The entire image is broken up into 8x8 pixel blocks, but it doesn't end there. There are then 8x8 blocks from left-to-right, top-to-bottom, making up a 64x64 section. Then, the entire image is made up of these sections in a 4x3 manner (to make 256x192 pixels).

Perfect! Thanks for the info. I'm not aware of being able send GRP files directly. I assume then you're using PTC Utilities to convert graphics to QR code.

Pretty much, unless I find a faster way to generate the QR codes for both GRPs and PRGs. A PRG has the same header with minor changes, with the Data section holding the code in a non-compressed format. At least with that, it isn't sectioning the data like GRPs do, to my knowledge.

"What fun is there in making sense?"
Lazer Light Studios - Home of the MM2 PTC project

Pokemon 3DS Friend Safari - Ice - Spheal, Sneasel, Lapras

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

AuthorMessage
Avatar

_dbdbd

2,640. Posted:

I was having issues just like yours also. though there is always the chance were still talking about two different things . I was writing something and I drew up a 64x64 sprite ,saved it SPU0:. had to figure out what number it really put it at . any way it was 0 . got it to work . then i drew up some 32x32 sprites and tried putting them on the same page as the 64x64 one.did the same silly formating thing . I could call I up but it would show up mixed up . I tried everything , keeping the two on the same page , but it would only ever mix em up. well I got to looking and if you look at the pages spu0 0-8 or what ever, i realized they all had the same size sprites. per page or least looked like it . So I got an idea.I kept my 64x64 sprite where it was at; SPU0:SPONGE. saved . opened the editor load it again. went to the SPU page with the 32x32 ,SPU5, drew my sprites saved it as SPU5:VEGIES.
exited. in my program i loaded both the SPU pages just like they were typed in above. it worked . but wait . i turned of my ds . then tried it again and it was displaying the original boy sprite. Long story short. I seperate the sprite sizes and even though when i saved I saved it as the SPU5, I found out that in my program it had to be loaded as SPU1 . I had four vegies drawn in there, locations turned out to be 64,65,66,67. I think it only worked the first time when it was called SPU5 cuz i had originally loaded the CHRED from the cmd prmt then loaded the program with the sprites, with no CLEAR or ACLS so it must have still been in memory.

_dbdbd