Forums

Topic: Petit Computer

Posts 9,141 to 9,160 of 9,620

Discostew

Doing some testing, I'm starting to see that using 2 GOTOs is faster than GOSUB/RETURN for jumping to one place and then back. I honestly find this weird, but then after thinking about it. 2 GOTOs means it checks a list of labels twice while GOSUB/RETURN increments the stack, writes the location, checks the list of labels once, reads the location on the stack and decrements it. Sounds like a lot more work, but just imagining having 100s of labels, I'd imagine GOTO may in the end be slower for larger programs. The length of the labels would also affect this I think. I'd have to do some major testing instead of the smaller kinds I have been doing.

Discostew

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

Traulight

What is a sprite's control number for?

Traulight

Gimmemorecoinz

Traulight wrote:

What is a sprite's control number for?

You can only refer to a sprite by it's control number. Its literally the only way to tell one sprite apart from another in your code..
if you used SPSET 5 ... for example... then tried to use SPOFS 1 ... (parameters here)
You would be MOVING sprite number 1, and not sprite number 5.
Those numbers are the programmers only means of knowing what sprite they are trying to do something to/with.
I hope that isn't too cryptic.

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

Pixelrobin

Has anyone ever ported any game and watch games? I kinda want to port some of them into one big program...

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

randomous

@Discostew That's pretty interesting, but like you said, it makes sense. It's basically comparing 2N against N + C, where N is the number of labels and C is the (presumably) constant time required to do the extra stuff for GOSUB. The constant time is probably large, so for a relatively few amount of labels, the 2N will be smaller. However, 2N grows faster than N + C, so (as you've already described), using 2 GOTO's will probably become slower than a regular GOSUB as your program uses more and more labels.

randomous

bigdog00

@levicjr, IT HAS BEEN OVER 3 WEEKS AND I HAVE BEEN DYING TO PLAY THE NEW RAYSPACE!!!!!!!!!!!!! When will it be released? Also, I won't be getting my new PC until next weekend (this coming weekend).

I like petit computer! Asphault 3d is awesome!

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

LeviCelJir

bigdog00 wrote:

@levicjr, IT HAS BEEN OVER 3 WEEKS AND I HAVE BEEN DYING TO PLAY THE NEW RAYSPACE!!!!!!!!!!!!! When will it be released? Also, I won't be getting my new PC until next weekend (this coming weekend).

It's really been that long? Wow its not done yet but it's coming.... slowly

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

bigdog00

LeviCelJir wrote:

bigdog00 wrote:

@levicjr, IT HAS BEEN OVER 3 WEEKS AND I HAVE BEEN DYING TO PLAY THE NEW RAYSPACE!!!!!!!!!!!!! When will it be released? Also, I won't be getting my new PC until next weekend (this coming weekend).

It's really been that long? Wow its not done yet but it's coming.... slowly


Could I have it how it is as of now please?

I like petit computer! Asphault 3d is awesome!

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

LeviCelJir

bigdog00 wrote:

LeviCelJir wrote:

bigdog00 wrote:

@levicjr, IT HAS BEEN OVER 3 WEEKS AND I HAVE BEEN DYING TO PLAY THE NEW RAYSPACE!!!!!!!!!!!!! When will it be released? Also, I won't be getting my new PC until next weekend (this coming weekend).

It's really been that long? Wow its not done yet but it's coming.... slowly


Could I have it how it is as of now please?

um sorry but sadly no...

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

bigdog00

LeviCelJir wrote:

bigdog00 wrote:

LeviCelJir wrote:

bigdog00 wrote:

@levicjr, IT HAS BEEN OVER 3 WEEKS AND I HAVE BEEN DYING TO PLAY THE NEW RAYSPACE!!!!!!!!!!!!! When will it be released? Also, I won't be getting my new PC until next weekend (this coming weekend).

It's really been that long? Wow its not done yet but it's coming.... slowly


Could I have it how it is as of now please?

um sorry but sadly no...

Dang. Just the campaign or just the multiplayer?

I like petit computer! Asphault 3d is awesome!

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

LeviCelJir

Is there anyway to make FOR go faster?
I'm trying to have something be read fast but it causes soooo muchhhh lagggg
here is the code
FOR I=0 TO 191
FOR J=0 TO 191
IF MAP(I,J)==41 THEN MAP(I,J)=1
IF MAP(I,J)==37 THEN MAP(I,J)=41
NEXT
NEXT
It's not always going btw its a one time thing at a certain time in the program

Edited on by LeviCelJir

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

bigdog00

or can you tell me the code for the MP or something @leviciljir? Please? I've been dying to play it!!!

I like petit computer! Asphault 3d is awesome!

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

Slayer

I stumbled upon a happy accident while working on Apocalypse Rising. I removed a SPOFS that caused an error and when you shot the zombie on the screen it would respawn and the game would carry on, which is close to what I want it to do. That was interesting.

Edited on by Slayer

I have nothing really to say about myself.

Discostew

@LeviCelJir Unfortunately, reading 36k+ elements is not going to be fast. You'd probably get some speed out of it if you made your array a 1D array rather than a 2D (reducing FOR loops to 1, and rather than using 2 variables to get data from your array, you'd only use one), but then you'd have to change everything else that uses the array in its 2D form.

Discostew

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

Traulight

So, I've been testing different methods of movement coding for my game. I tried making it so on the first loop it loads all the sprites and stuff and will keep going back to the loop until you press, lets say, the left button on the D-pad, then it goes to a new loop that does the same thing but places the sprite/sprites one or two pixels to the left if you pressed the left button so it looks like you are moving. That method requires way too much patience and time and isn't necessary. Does anyone have any explanation short or long on a good method of movement? I know it's asking a lot but I might as well ask, cause I'm really new to this.

Edited on by Traulight

Traulight

Pixelrobin

oh thanks @Hairmanban19! Havn't seen you here in a whil hi .

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

Hairmanban19

@Bluerobin2 sorry, hi, I've been testing a lot of commands and stuff for my game. Everything seems to be going fine with it. I'm learning how to make music for it and I've done a few of the sprites for it so far... How's Battlewoods coming along? Oh, and good job on Flappy Bird PTC edition .

Edited on by Hairmanban19

...

3DS Friend Code: 3136-7615-5907

InsertPi

I just received great news for the object-oriented programmers:

Petit Computer 3D/Puchikon 3 will bring with it user-defined functions and encapsuling (local variables)!

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

Does this mean the petit computer for 3ds can have gyroscope control?
http://imgur.com/G9ScXSC

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

Please login or sign up to reply to this topic