Forums

Topic: Petit Computer

Posts 7,201 to 7,220 of 9,620

InsertPi

@Leviceljir one = is fr assigning a value. Two = (==) is for comparing.
IF APPLE==1 THEN @EAT

If Facebook, Myspace, Twitter, Instagram, and Snapchat were all destroyed, 90% of teens would go insane. If you're one of the 10% that would be laughing at them, copy & paste this into your signature and hope it happens.

3DS Friend Code: 2148-9259-0831 | Nintendo Network ID: IAmAPerson620 | Twitter:

Gimmemorecoinz

Too much drama and competition needlessly. Let's all get together and have fun and make good games together and have fun! that's what programming is meant to be! (Er unless you're in the game industry) I don't really have a place to say this but this constant trying to 1-up eachother is annoying. But atleast now I know what you're all experienced in.

Got a project? PM ME on here!
Youtube: lostkitty64x
Want help with coding? PM ME! PM ME PM ME!! XD
FC: WIll post later.
Systems I own: ds lite, 3DS, PC/gaming, steam platform. I play alot of games. Just ask ! Minecraft anyone? :D

boot

Gimmemorecoinz wrote:

Too much drama and competition needlessly. Let's all get together and have fun and make good games together and have fun! that's what programming is meant to be! (Er unless you're in the game industry) I don't really have a place to say this but this constant trying to 1-up eachother is annoying. But atleast now I know what you're all experienced in.

I agree

Just your average talking boot. FC: 0791-4881-1672 for Smash and Pokemon.

3DS Friend Code: 0791-4881-1672

theblackdragon

Hey guys (and i'm looking at you, @TAINT_Zzyex, @0Games) — our community rules not only ask that users here speak English, but also that users here not insult or flame one another. The next time i get a report in my inbox where someone is calling the other person horrible things in Portuguese or any other language, up to and including English, they will be banned, end of story. There has been far too much drama in here lately with the off-topic crap, and to have this starting up after we'd finally gotten that taken care of absolutely blows my mind. Please start being respectful toward one another.

BEST THREAD EVER
future of NL >:3
[16:43] James: I should learn these site rules more clearly
[16:44] LztheBlehBird: James doesn't know the rules? For shame!!!

3DS Friend Code: 3136-6802-7042 | Nintendo Network ID: gentlemen_cat | Twitter:

Malltog

Malltog wrote:

Hello. Got ANOTHER question!
I'm making a simple game so as to learn sprites.

I've got this: (skipping past initialization, yes I do CLEAR)

I wrote:

@LOOP
SPREAD(CUR), X, Y
SPREAD(1),WX,WY
IF MAINCNTL%90==0 THEN GOSUB @WITCH
IF SPHIT(0,1) GOTO @END
IF SPHIT(2,1) GOTO @END
IF SPHIT(3,1) GOTO @END
IF BUTTON() AND 1 THEN GOSUB @UP
IF BUTTON() AND 2 THEN GOSUB @DOWN
IF BUTTON() AND 4 THEN GOSUB @LEFT
IF BUTTON() AND 8 THEN GOSUB @RIGHT
IF BUTTON()==0 THEN SPANIM 0,1,0 : AN = TRUE
IF BUTTON()==0 THEN SPANIM 2,1,0
IF BUTTON()==0 THEN SPANIM 3,1,0
IF BUTTON() AND 16 THEN CUR=(CUR+1)%3
IF CUR>0 THEN CUR=CUR+1
GOTO @LOOP

@UP
SPCHR CUR,76
IF AN THEN SPANIM CUR,4,20 : AN = FALSE
SPOFS CUR,X,Y-2,2
RETURN

@DOWN
SPCHR CUR,68
IF AN THEN SPANIM CUR,4,20 : AN = FALSE
SPOFS CUR,X,Y+2,2
RETURN

@LEFT
SPCHR CUR,72
IF AN THEN SPANIM CUR,4,20 : AN = FALSE
SPOFS CUR,X-2,Y,2
RETURN

@RIGHT
SPCHR CUR,64
IF AN THEN SPANIM CUR,4,20 : AN = FALSE
SPOFS CUR,X+2,Y,2
RETURN

(snipped, the witch stuff doesn't touch CUR)

Does anyone know how CUR can get set to 4?

Please? Anybody?

EDIT
Also, might I suggest that if a PRG file is meant to be APPENDed and used as a library its name should start with an underscore _?
And have all their routines prefixed with their name?
Example: I am making Petit Window Manager (PRG:_PWM) which is a simplistic graphical manager for PTC. When you start it you GOSUB @PWM_INIT.

ANOTHER EDIT
And is it possible to put text on the screen with graphical coordinates?

Edited on by Malltog

Malltog

Nintendo Network ID: Malltog

Slayer

Gimmemorecoinz wrote:

Too much drama and competition needlessly. Let's all get together and have fun and make good games together and have fun!

Your needless positive talk is simply incorrect if you match it with me. I joined both Nintendo Life and GameFAQs to gain experience now, and as a result later I will have an exceeding skill. Yes, I'm one of the younger ages in here. If you try to guess my age I'll report your posts that attempt to find out.
(What TAINT said was pure offense. Mine was a saying, I don't know why it's a swear because it means nothing.)

Edited on by Slayer

I have nothing really to say about myself.

Pixelrobin

I agree with TBD. It seems you three (And some others) have been off-topic for the last weeks.

REMEMBER, THIS THREAD IS ABOUT PETIT COMPUTER. YOUR BEHAVIOR SHOULD BE RATHER EMBARRASING. PLEASE STOP IT RIGHT NOW. I'm sorry for using Caps. I said this twice already and was ignored... ...twice. Whats it take to just stop offending one another and staying on topic guys? This thread is on Petit Computer in case you didn't notice.

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

ejamer

Malltog wrote:

Does anyone know how CUR can get set to 4?

CUR only changes in a couple places: let's look at just those lines to see what happens.

IF BUTTON() AND 16 THEN CUR=(CUR+1)%3
IF CUR>0 THEN CUR=CUR+1

This happens every time your loop runs, and they key is how you have two different IF conditions for changing the value.

  • The first statement will use modulus to make sure that CUR is always in the range {0, 1, 2}... but that code is only run if the currently pressed button matches your AND 16 condition.
  • The second statement will increment CUR any time that the value is greater than 0. It doesn't care if any buttons are held down

So let's assume that the first time you run the loop, CUR is 0. As long as you don't press buttons, it will remain 0. Once your button condition matches, it will change to a value of either 0, 1, or 2 depending on how many times the loop runs. But if the number is ever greater than 0 (which it can be) while no buttons are being pressed, then CUR will just increase by 1 to any number (4 or higher).

Does that answer your question?

ejamer

Nintendo Network ID: ejamer

InsertPi

@Malltog to set text using graphical coords, use GPUTCHR.

If Facebook, Myspace, Twitter, Instagram, and Snapchat were all destroyed, 90% of teens would go insane. If you're one of the 10% that would be laughing at them, copy & paste this into your signature and hope it happens.

3DS Friend Code: 2148-9259-0831 | Nintendo Network ID: IAmAPerson620 | Twitter:

TheGreatBurrito

Hello Nintendo Life,

I am new and here to tell you that I am making a game.

Peace
~TheGreatBurrito

Edit: To be specific I am making a Trivia game.

Anyone who wants to help email me at [email protected]

Edited on by TheGreatBurrito

I DUCKING HATE AUTO-CORRECT

Malltog

@ejamer Aha, thank you.
I'd change that to IF CUR>0 AND CUR<4 THEN CUR=CUR+1.
@IAmAPerson I tried that, and it just said Invalid function call. Could you give an example?

Malltog

Nintendo Network ID: Malltog

Gimmemorecoinz

randomous wrote:

This is a little hard to read, but the picture of the creator holding a 3DS with syntax highlighted code is pretty awesome: http://www.4gamer.net/games/234/G023465/20130926046/

(Petit Computer 3D hype)

Google translate... and omg...
Heres the translated features of petit computer 3DS including also ten times faster execution time:
Editable 999999 line
Support for extended slide pad
Color coding of the word can
Can be folded area of ​​the program
Editing of multiple sources (up to four) can
Standard feature of a painting feature
(Such as UNDO function and multi-line copy) strengthening of editing functions
Input device support microphone, camera, sensors, etc.
Server management of user work
Link DETUNE application with (music software)

not to mention it looks like we'll get to use the stereoscopic screen (layers!) I'm not sure how many layers.. but this seems PROMISING with REAL 3DS features.

Edited on by Gimmemorecoinz

Got a project? PM ME on here!
Youtube: lostkitty64x
Want help with coding? PM ME! PM ME PM ME!! XD
FC: WIll post later.
Systems I own: ds lite, 3DS, PC/gaming, steam platform. I play alot of games. Just ask ! Minecraft anyone? :D

TAINT_Zzyex

i have a glich in ultima heres the code.
if a$=='t' then goto @talk
@talk
if button()==1 then goto @talkn
etc
etc
etc
@talkn
print'talk-north goto @nxtalk
@talks
print'talk-south
goto @nxtalk
etc
etc
@nxtalk
this displays-
talk-north
talk-south
talk-east
talk-west
hello...
wut

Edited on by theblackdragon

"Did somebody say Aincrad?"
"No, go back to your own game!"
"awwww"
"And make out with Asuna."
"Aww-I mean YAY"

Twitter:

InsertPi

GPUTCHR is one of the harder commands to learn.

GPUTCHR x coord,y coord,"type",number,palette number,scale

X and Y coords are as you'd guess. Type means the kind of CHR. Text is BGF. Palette number is, well, the colour palette number. Scale is how big the text is. 1 is normal. Number is the ID of a character. Use

ASC("character")

To get the ID, or use a FOR loop with MID$. I'm gonna print text using white text at normal scale.

TEXT$="Hello, World"
FOR I=0 TO LEN(TEXT$)-1
GPUTCHR I+10,0,"BGF",ASC(MID$(TEXT$,I,1)),0,1
NEXT

ASC gets the numerical value of a character. LEN gets the length of a string.

Edited on by InsertPi

If Facebook, Myspace, Twitter, Instagram, and Snapchat were all destroyed, 90% of teens would go insane. If you're one of the 10% that would be laughing at them, copy & paste this into your signature and hope it happens.

3DS Friend Code: 2148-9259-0831 | Nintendo Network ID: IAmAPerson620 | Twitter:

SmokedSausage

Gimmemorecoinz wrote:

randomous wrote:

This is a little hard to read, but the picture of the creator holding a 3DS with syntax highlighted code is pretty awesome: http://www.4gamer.net/games/234/G023465/20130926046/

(Petit Computer 3D hype)

Google translate... and omg...
Heres the translated features of petit computer 3DS including also ten times faster execution time:
Editable 999999 line
Support for extended slide pad
Color coding of the word can
Can be folded area of ​​the program
Editing of multiple sources (up to four) can
Standard feature of a painting feature
(Such as UNDO function and multi-line copy) strengthening of editing functions
Input device support microphone, camera, sensors, etc.
Server management of user work
Link DETUNE application with (music software)

not to mention it looks like we'll get to use the stereoscopic screen (layers!) I'm not sure how many layers.. but this seems PROMISING with REAL 3DS features.

This is 10 times more hype worthy of either Grand theft auto 5 or Call of duty. What do they mean by server management though? Could this mean Local or Online multiplayer with custom set up servers? Hopefully it could be ALOT more 3D friendly. Imagine what we could do with Minecraft 3DS or a similar raycasting engine

#PTC3DHYPE!

Hi, I'm SmokedSausage and i like meemoos :^)

Twitter:

Malltog

Thank you. Is there any way to put a quote " in a string?

Malltog

Nintendo Network ID: Malltog

Discostew

@TAINT_Zzyex You're going to have to forgo editing your code like using "etc", because giving us snippets doesn't give us the entire picture. The problem can very well be in a section you edited out.

Discostew

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

Pixelrobin

I still want polygonal support. Like really badly. They can have some sort of sketchup-style editor. MM23D would be Epik!

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

TexMurphy

0Games wrote:

Ok, I give up, people. How do I program some shooting with a bullet? My memorization of how to do that totally slipped and I can't remember how anymore. Zombie AI can wait for now, help me.

@0Games Try this for shooting bullet(s).
Untitled

TexMurphy

Slayer

TexMurphy wrote:

0Games wrote:

Ok, I give up, people. How do I program some shooting with a bullet? My memorization of how to do that totally slipped and I can't remember how anymore. Zombie AI can wait for now, help me.

@0Games Try this for shooting bullet(s).
Untitled

THANK YOU.

I have nothing really to say about myself.

Please login or sign up to reply to this topic