Forums

Topic: Petit Computer

Posts 1,601 to 1,620 of 9,618

Kinsale

Morphtroid wrote:

Kinsale wrote:

Does anyone know where I can find the QR code for petit farm?

In my site (and other sites too), the link is in my signature,

Thankyou very much. I have been meaning to give it a try for a while.

Who are you running from? (?_?)/
someday there will be a cactus pokemon, that is actually good.
(O vvv O)/ add me if you want to play KI:U, or ACNL, OR Pokemon
I make a lot of typos, so expect many of my posts to be edited

Pixelrobin

bluerobin2 wrote:

does anyone have ptc utilities? If so, can you draw and/or upload your own grps better than on the ds?

I know this is spamming but please answer me!!! Its like everyone just scrolled through it...

Everybody do a chirp. CHIRP.

Discostew

bluerobin2 wrote:

bluerobin2 wrote:

does anyone have ptc utilities? If so, can you draw and/or upload your own grps better than on the ds?

I know this is spamming but please answer me!!! Its like everyone just scrolled through it...

Huh, I thought I had answered that, but I don't see my post. Anyways, using PTCUtilities, it doesn't just allow you to draw GRPs using it, but you can also import image files, and it'll optimize the color palette down to 255 colors (1 color reserved for transparency), so you could basically use whatever drawing program you want.

Discostew

Switch Friend Code: SW-6473-2521-3817

With_Questions

swordx wrote:

It's a bit hard to explain. The best thing you can do is just look at the coding once the game is done. It isn't too complex.

oh, i think i understand your basic concept, at least. i think my main problem is executing the code! i don't think i understand Sprite Collision D: (that's a cry for help towards the forum)

With_Questions

Pixelrobin

Discostew wrote:

bluerobin2 wrote:

bluerobin2 wrote:

does anyone have ptc utilities? If so, can you draw and/or upload your own grps better than on the ds?

I know this is spamming but please answer me!!! Its like everyone just scrolled through it...

Huh, I thought I had answered that, but I don't see my post. Anyways, using PTCUtilities, it doesn't just allow you to draw GRPs using it, but you can also import image files, and it'll optimize the color palette down to 255 colors (1 color reserved for transparency), so you could basically use whatever drawing program you want.

cool thanks

Everybody do a chirp. CHIRP.

swordx

With_Questions wrote:

swordx wrote:

It's a bit hard to explain. The best thing you can do is just look at the coding once the game is done. It isn't too complex.

oh, i think i understand your basic concept, at least. i think my main problem is executing the code! i don't think i understand Sprite Collision D: (that's a cry for help towards the forum)

For a while, I didn't either. Here's an example of it:

IF SPHITSP(0,1)==TRUE THEN GOSUB @DAMAGE

swordx

With_Questions

oh, i think i see. i didnt know SPHITSP was supposed to be used in an IF-THEN statement! so once you GOSUB to @DAMAGE, that's where you make the enemy disappear from damage, right?

With_Questions

swordx

With_Questions wrote:

oh, i think i see. i didnt know SPHITSP was supposed to be used in an IF-THEN statement! so once you GOSUB to @DAMAGE, that's where you make the enemy disappear from damage, right?

It was just an example, but that's about right. I think @DAMAGE means the player gets damaged in my game, because sprite 0 (player) and sprite 1 (enemy) collided.

swordx

With_Questions

swordx wrote:

With_Questions wrote:

oh, i think i see. i didnt know SPHITSP was supposed to be used in an IF-THEN statement! so once you GOSUB to @DAMAGE, that's where you make the enemy disappear from damage, right?

It was just an example, but that's about right. I think @DAMAGE means the player gets damaged in my game, because sprite 0 (player) and sprite 1 (enemy) collided.

i've tried using this example after establishing two sprites on the screen, but i can't seem to make the enemy disappear. i can move around freely, so the only problem is not being able to do anything with collision. when i GOSUB to @DAMAGE, i make the enemy disappear with SPCLR, then return. so, when i collide with the sprite, it should disappear, right? well instead of that, it disappears at the beginning of the program! i'm not sure what else to do now.

With_Questions

Credible

well instead of that, it disappears at the beginning of the program! i'm not sure what else to do now.

That's probably because you have SPCLR in your main loop. Put it somewhere else and have a gosub go to it and return, only if the sprites collide.

Credible

ramstrong

Credible wrote:

well instead of that, it disappears at the beginning of the program! i'm not sure what else to do now.

That's probably because you have SPCLR in your main loop. Put it somewhere else and have a gosub go to it and return, only if the sprites collide.

It's best if you just hide it away, instead of clearing it. Didn't we solve this issue last week?

If you're stuck, try to post the shortest relevant code that still shows the issue. Don't post code snippet since the bug may be somewhere else. Post the shortest working code strictly to show the issue.

[Edited by ramstrong]

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

Let's just call a spade, a spade.

Pixelrobin

Wow! I just found out you can things like this:
IF A==0 THEN IF B==5 THEN... ETC
I'm sure that not many others thought of that..
Anyways, here is my question; how do you use AND, OR, etc in IF...THEN... statments?

Everybody do a chirp. CHIRP.

Eel

Those are called nested comparisons, you could also use AND for the same effect:

IF A==0 AND B==5 THEN Do something.

Of course, if you also want to do something else along with IF B==5 then a better way woud be...

IF A==0 THEN Do Something:GOSUB @CONT

@CONT
IF B==5 THEN dosomethingelse
RETURN

You should remember that you can only have 100 characters in a line of code, and IF in this language is not multi-line so you must do everything on the same line. You can however use GOSUB to create longer IFs.

About OR, it's used in the same way as AND, but the effect is different. It shouldn't be hard to figure out why though.

[Edited by Eel]

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok

Pixelrobin

Morphtroid wrote:

Those are called nested comparisons, you could also use AND for the same effect:

IF A==0 AND B==5 THEN Do something.

Of course, if you also want to do something else along with IF B==5 then a better way woud be...

IF A==0 THEN Do Something:GOSUB @CONT

@CONT
IF B==5 THEN dosomethingelse
RETURN

You should remember that you can only have 100 characters in a line of code, and IF in this language is not multi-line so you must do everything on the same line. You can however use GOSUB to create longer IFs.

About OR, it's used in the same way as AND, but the effect is different. It shouldn't be hard to figure out why though.

Wow thanks! . Another random question though, can you only load the font part of an SPU?

Everybody do a chirp. CHIRP.

petiSnail

bluerobin2 wrote:

Wow! I just found out you can things like this:
IF A==0 THEN IF B==5 THEN... ETC
I'm sure that not many others thought of that..
Anyways, here is my question; how do you use AND, OR, etc in IF...THEN... statments?

Here's another way to do an if-then block statement. It involves only a single jump so it is more efficient (faster) than a gosub if-then:

lets say you want to do this:
IF A==3 OR A > 5 THEN
[block]
...
[/block]

take the opposite of all parts of the condition:
IF A!=3 AND A <=5 THEN GOTO @SKIP

code goes here

@SKIP

Its a little weird, but its faster (use only when speed matters).

petiSnail

Hamjam00

I have a new OS in dev called OaSis! it should be done by the 22nd or even sooner. I have personal input from @bigdog00 and it should be a great os! Also, I am currently designing a new logo for my new company, Zombeesoft. (It wont be MS paint this time lol)

[Edited by Hamjam00]

Python, C/C++, Lua, Ruby rule (java is too complex lol)

X:

ChangeV

ChangeV

Credible

I'm trying to save 2 SCR's to my computer. One is the background, the other is foreground. However, they both appear as foregrounds in PTCU.
I'm saving both of the SCR's to my sd card and then opening the PTC files in PetitComputer Utilites. I prefer making maps on my 3DS, so I don't want to make a map on the computer.
How do I make one SCR a background and the other SCR a foreground?

[Edited by Credible]

Credible

Sorry, this topic has been locked.