Forums

Topic: Petit Computer

Posts 9,181 to 9,200 of 9,618

Discostew

@InsertPi I assume by their mentioning of local variables, the functions will have parameters to keep that in line.

@LeviCelJir Imagine PTC's functions, except they are functions you make yourself.

Discostew

Switch Friend Code: SW-6473-2521-3817

LeviCelJir

Discostew wrote:

InsertPi I assume by their mentioning of local variables, the functions will have parameters to keep that in line.

@LeviCelJir Imagine PTC's functions, except they are functions you make yourself.

er....

[Edited by LeviCelJir]

Hi I'm Levi and I like Bloopys :^)

Eel

Example:

You want to make a program where you need to display context sensitive messages on the touch screen.

In the current Petit Computer you would need to start a cycle to delete the text currently on the screen because you don't want to delete all the text on the screen, only part of it, and then write your new text. This would probably need it's own variables that you can't use anywhere else in the program because they could cause errors.

With these custom functions Disco talks about you can make a "mini program" within the program and you can call it at any time to do it for you, only requiring you to give it the string of text and other information it would require. The variables would be exclusive to that mini program and you could reuse the names somewhere else without having to worry about it.

So

X=4:Y=6:TEXT$="Message lol hi":GOSUB @PRINTMESSAGE

Becomes

(Function used to call) PRINTMESSAGE 4,6,"Message lol hi"

It's a bad example, but it's all I could think of, sorry.

[Edited by Eel]

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok

LeviCelJir

Hm couldn't you just do
LOCATE 4,6:?"Message lol hi"

Hi I'm Levi and I like Bloopys :^)

Eel

LeviCelJir wrote:

Hm couldn't you just do
LOCATE 4,6:?"Message lol hi"

I said touch screen! Also, what if the message that you want to display is larger than one line, and there was text there before. It's not as simple as just writing on top of it.

Also, I need to complicate things for the example to work.

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok

LeviCelJir

Moorpheel wrote:

LeviCelJir wrote:

Hm couldn't you just do
LOCATE 4,6:?"Message lol hi"

I said touch screen! Also, what if the message that you want to display is larger than one line, and there was text there before. It's not as simple as just writing on top of it.

Also, I need to complicate things for the example to work.

So I can fit a command into a very long line by making it smaller? That would seriously help me right now lol

Hi I'm Levi and I like Bloopys :^)

bigdog00

So... Is it possible to write a more real first person shooter in PTC 3D?

I like petit computer! Asphault 3d is awesome!

X:

LeviCelJir

bigdog00 wrote:

So... Is it possible to write a more real first person shooter in PTC 3D?

It's still PTC... with more pixels and faster speeds so probably not

Hi I'm Levi and I like Bloopys :^)

bigdog00

LeviCelJir wrote:

bigdog00 wrote:

So... Is it possible to write a more real first person shooter in PTC 3D?

It's still PTC... with more pixels and faster speeds so probably not

I like petit computer! Asphault 3d is awesome!

X:

Discostew

bigdog00 wrote:

So... Is it possible to write a more real first person shooter in PTC 3D?

If reports are to be believed, then probably not as they said no polygons. I assume you could still use drawing functions and it being faster would help, but even something like Doom may still be out of reach.

Discostew

Switch Friend Code: SW-6473-2521-3817

SmokedSausage

Haha, I see what Brian did. he changed my block from infinite to one day. Wow. He lied to you and all of us random. Can you delete the block?

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

X:

Discostew

@SmokedSausage If that is the only way to remove a permanent block, then do not assume it was done as a means of provoking you and just wait it out.

Discostew

Switch Friend Code: SW-6473-2521-3817

SmokedSausage

No, it's the fact that brian blocked me because he didn't like what I was saying to him. I was saying that he can't make decisions for the wiki all for himself and that he was being greedy, selfish, and ignorant, and stubborn. He lied to random, he has broken several rules, he can't block anyone without approval anyway. Something needs to be done
Sorry for saying everything on here even though it is not on topic, it's my only line of getting ahold of @randomous

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

X:

HappyHappyist

i just want to say that before downloading this, i knew nothing about programming, or how games were made. this app opened my eyes. the very first time i made the app say, "Hello World," i felt so attracted to this, and i had to learn more. i spent months playing with this, learning code for the first time, understanding the programmer logic, and i had FUN WITH NUMBERS (and now i have a reason to use math)! i made sprites, animations, player-controlled animations, etc etc. Now, i've moved on to more complicated languages, namely C++. but i will never forget the fun this app gave me, even if i can't remember any of the commands. i think anyone who wants to get into programming should download this.

i am part of a social group interested in uniting the world by painting it blue.
Blue blue.

InsertPi

@HappyHappyist I used to program in Visual Basic. Gave up on it. After a few years, I found this. It really inspired me to get back into programming. Now I am a decent programmer in C#, very fluent in Petit Computer, and a few other lesser-known languages. Agreed 100% with you.

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.

X:

Slayer

InsertPi wrote:

@HappyHappyist I used to program in Visual Basic. Gave up on it. After a few years, I found this. It really inspired me to get back into programming. Now I am a decent programmer in C#, very fluent in Petit Computer, and a few other lesser-known languages. Agreed 100% with you.

When I was very young, I was introduced to Visual Basic. And I was using the computer a lot programming in it. I made a football scoreboard by myself and I stand proud by that program today. I even have it on my hard drive on this very computer, but it was programmed on the computer sitting at my feet right now as I use my gaming PC that is weakened, struck by a terrible hardware problem with the liquid cooling system tube that brought it to its metaphorical knees.
Conclusion: I used to use VB all the TIME before I abandoned it and found other languages that were interesting. I just can't seem to learn PTC that well...

[Edited by Slayer]

I have nothing really to say about myself.

HappyHappyist

i'd like to add on that this community has been extremely helpful. in my time here, this one forum answered each question very thoroughly and politely. without such threads, learning PTC is nearly impossible, so thanks for the help guys, you're part of the solution.

i am part of a social group interested in uniting the world by painting it blue.
Blue blue.

Sorry, this topic has been locked.