Forums

Topic: Petit Computer

Posts 9,221 to 9,240 of 9,620

InsertPi

Of course, we all still have to remember that this stuff has not yet been confirmed. It is likely, but not 100%.

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:

Discostew

Just saying. The more I think about local variables and functions, the more I think PTC3D needs them. When you've got almost 1million lines of code to work with, you're also going to have a lot of variables too, so having just global variables just isn't going to cut it, because every time the interpreter parses a line, it checks to see if it found commands,and if not, then it'll check through all the global variables until it hits a match or doesn't, to which if it doesn't, then makes a new one and puts it at the end of the line. This is why variables are so slow in PTC. With local variables, it can then separate those ones from the global variables, reducing both in size and time to scan them. Because local variables only have a scope within the function they are in, if a function calls another function, the previous local variables become out-of scope, thus reducing even further scanning of local variables. It is a major speed-up in variable look-up.

Edited on by Discostew

Discostew

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

TexMurphy

I hope they change the way we load people's programs. The more lines of code the more qr codes to scan. Maybe they can run programs from an SD card?

TexMurphy

Discostew

Can someone check something for me? Try out this line of code and report back here. For some reason on my 3DS, the first noise note is extremely short, but the rest are not.

BGMPLAY ":3@151CDEFGAB<C"

Discostew

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

damolii

@Discostew IT might be other channels interfering, or does it do that when you play it by itself? It works fine on my side...

I don't have a 3DS so what do I put here? -Damolii

randomous

@Discostew I've noticed that it does that too. Whenever I put the "noise" sound at the beginning of a song, it sometimes gets cut off. It did the same thing in the Super Mario Bros 2 theme that I made. I don't know what the problem is, but I've definitely noticed it.

Edit: Oops, I remember why now (or at least, why it happened to me). The keyboard "chunk" sound uses enough "noise" that it cuts out the first note, and it's long enough such that it overlaps with it. If you run the program with the start button, it doesn't do that.

Edited on by randomous

randomous

LeviCelJir

Since you can't package COLs, How do I make a COL in a program without CHRED or anything?

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

Discostew

@randomous Ok, that was the problem. I was executing that line of code right from the console, so I could only use the "enter" key to execute it, which made that keyboard sound. When I put it into the actual code area and threw a WAIT 60 line above it, it played just fine.

Kinda odd though because unless I'm mistaken, there are 2 noise channels, not just one, so maybe that keyboard sound is using both?

Discostew

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

Pixelrobin

I hope PTC 3D will offer alpha transparency....

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

Discostew

@Bluerobin2 They better, and more. I imagine they are going to be using the 3D hardware for most of the rendering instead of legacy 2D hardware. Technically, PTC could have done this and many other stuff which didn't require much to activate. Why they chose not to include them, I don't know.

An example is mosaicing, which is the effect of pixelation to big blocks and back. All that's required to set that up is the designated targets like backgrounds, sprites, etc, and then how much of the effect should be applied. It is not separate for each thing though. They all share it.

Discostew

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

bigdog00

TexMurphy wrote:

I hope they change the way we load people's programs. The more lines of code the more qr codes to scan. Maybe they can run programs from an SD card?

Don't take this the wrong way, but think about the exploits and s*** that could be done due to them allowing people to launch from the SD card. I would bet money that I or someone else would find a way into the system within weeks.

I like petit computer! Asphault 3d is awesome!

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

Discostew

bigdog00 wrote:

TexMurphy wrote:

I hope they change the way we load people's programs. The more lines of code the more qr codes to scan. Maybe they can run programs from an SD card?

Don't take this the wrong way, but think about the exploits and s*** that could be done due to them allowing people to launch from the SD card. I would bet money that I or someone else would find a way into the system within weeks.

They're going to have to supply some method other than QR codes. Those codes hold so little data. MM2PTC is almost 300KB of code + 2.5 GRPs (at 49KB each), so my program now (which is still not finished) is about 423KB, equivalent to about about 175 QR codes. We're currently working with a limit of just under 10k lines of code. The 3DS version will have 100x times that.

PTC3D is going to have to be on the SD card anyways just like any other downloaded 3DS app, so its data will be as well. I imagine that the program itself will reserve a set amount of space on the card that holds all code and assets in encrypted form, and the only way to get your code/assets into it is by an import feature within PTC3D, so you have to import them in before anything can be used.

Discostew

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

TexMurphy

bigdog00 wrote:

TexMurphy wrote:

I hope they change the way we load people's programs. The more lines of code the more qr codes to scan. Maybe they can run programs from an SD card?

Don't take this the wrong way, but think about the exploits and s*** that could be done due to them allowing people to launch from the SD card. I would bet money that I or someone else would find a way into the system within weeks.

I agree with you. Thats why I don't use my ds to go on the web (other than its way too slow). There is no virus software I know to fix anything that happens to my ds system. But, on the other hand, I can't stand scanning qr codes in varying degrees of clarity. Maybe they can upload it to the cloud and downloaded like DSIware? Free Then again they might discontinue that service too on May 20, 2014.

Edited on by TexMurphy

TexMurphy

Discostew

I really wonder what programming extras SmileBoom is going to have with PTC3D. We got rumors of functions and local variables, but in the grand scheme of things, if they feel people are going to be using just under 1 million lines of code, I would assume they're going to have numerous other additions that weren't available in PTC to ease up the overall programming experience. I have a couple I'd personally like to see added.


TYPES. Currently, there are just 2 types in PTC. Numerical and string. Numerical is always float, leading to some extra code to be used when you just want an integer (aka a whole number). Most other BASIC languages have integers and floats as separate types, and I think it would be beneficial if PTC3D had them separate too. Integers are processed far quicker than floats and are used heavily with bitwise operations. Plus, when doing something like dividing two integers, the result truncates the decimal, so you won't have to resort to extra code like FLOOR on those types. One other thing with types is that the programmer can make their own types. Variables inside a variable in a manner of speaking. Think of it like sprites having 8 slots for values using SPSETV and SPGETV, except you call this internal variable by name following a period that follows the variable type. also like regular arrays, you can have an array of the type you make.

TYPE MYTYPE
VAR1 AS STRING
VAR2 AS INTEGER
END TYPE

DIM MYVAR as MYTYPE

MYVAR.VAR1 = "A"
MYVAR.VAR2 = 10

PRINT MYVAR.VAR1 * MYVAR.VAR2

(would print AAAAAAAAAA)


More C/C++ operators. Currently, the only one PTC has is "!=", which represents most Basic languages "not equal to", or "<>". There are plenty more, such as "++" and "--", which increment/decrement a number. Then there's also "+=", "-=", "*=", "/=", etc. Then there are bit shifts like ">>" and "<<" (I won't give examples of those)

A=1
A++ (would make A equal to 2, like if the code was A=A+1)
A-- (would make A, after being 2, back to 1, like if the code was A=A-1)
A+=2 (would make A, after being 1, become 3, like if the code was A=A+2)
A-=2 (would make A, after being 3, become 1, like if the code was A=A-2)
A*=3 (would make A, after being 1, become 3, like if the code was A=A*3)
etc etc etc

Discostew

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

Pixelrobin

@Discostew they should also make the "==" optional why not just If x=x2 then...? I also agree with you on +=,-=,etc especially if you have long variable names. But then again, this is BASIC, not C so I honestly doubt they'll add user types.

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

Traulight

What are arrays and what are they used for? And also, what are some commands for arrays or related to arrays?

Traulight

Discostew

@Bluerobin2 Honestly, I prefer "==" for comparing data, plus it can be used outside of IF statements, like so...

A = B + (C == 3)

It assigns A to the value of B, plus 1 if C is equal to 3. Honestly, I would find it confusing if someone programmed that same line of code with using "=" in the place of "==" like so..

A = B + (C = 3)

...because then it would look like they're assigning C to equal 3, and then using that to add to B then assigning to A, rather than just adding 1 if C does equal 3. As much as it is a BASIC language, they've incorporated some C aspects, so it may confuse people if they began mixing up those contexts. As for user types, Basic languages have been using those for a long time. As it is right now, PTC examines the labels before it is ever executed, so they could do the same with those as they'd probably do with functions.

Discostew

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

Pixelrobin

@Discostew oh... ok

@Traulight an array is a type of variable that stores multiple "things" in it. They are used a lot for map and level data. I wish I could explain more, but im on a 3ds. There are plenty of good tutorials online.

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

Slayer

And of course I just HAD to release a game that is in alpha. I can't learn this language. Tutorials don't help, I can't ask questions anymore, I may very well just leave and just play games that people make. I don't understand any of this, every time I look at my own GAME I don't know what to do. I also have no idea if anyone will even see this.

Edited on by Slayer

I have nothing really to say about myself.

Lego-Meister

@Slayer We are here to help. Go ahead and ask anything you want about petit computer.

Some programmers pride themselves on how many more lines of code they can write. I pride myself on how many less.

3DS Friend Code: 3652-1447-0455 | Nintendo Network ID: Legos-Meister

Please login or sign up to reply to this topic