Forums

Topic: Petit Computer

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

Discostew

Found an odd bug in PTC just now involving IF statements and strings used for GOTO commands (and before you say anything, using a string in GOTO is meant to work as it allows some dynamics with the program).

IF A==0 GOTO @NEXTLINE : 'Works
IF A==0 GOTO "@NEXTLINE" : 'Does not work
IF A==0 THEN GOTO "@NEXTLINE" : Works

GOSUB after an IF statement requires the THEN keyword no matter what, so that works as it should, no matter the case afterwards.

Discostew

Switch Friend Code: SW-6473-2521-3817

T-bender

where is that qr share thread???

Progress:
Alarm Clock (PTC) 75% done
Shooter w/o a name yet (PTC) 0,01% done Xd

Discostew

T-bender wrote:

where is that qr share thread???

One link down from this thread......

Discostew

Switch Friend Code: SW-6473-2521-3817

T-bender

Y'know the game petit farm? I made it possible to skip days and add up to 99999 money: [LOAD:"PFARM"] change [IF PDATE$!=DATE$] to [IF PDATE$!="0"], do the same thing somewhere else in the code (so 2x). now if you save the game (go to bed) and reload, a new day will begin with all your stamina back. sometimes it may glitch...
to get 99999 money load or new game; press select in write mode and type in [MONEY=99999] (enter) and CONT (enter). enjoy

edited: sorry, mistyped...

[Edited by T-bender]

Progress:
Alarm Clock (PTC) 75% done
Shooter w/o a name yet (PTC) 0,01% done Xd

T-bender

Moorpheel wrote:

I think I have heard of that game.

Aren't you the creator of it?
Sorry for publishing cheats...
I just wanted to make it easier and more enjoyable. In its current state it takes months to become a rich farmer.

Progress:
Alarm Clock (PTC) 75% done
Shooter w/o a name yet (PTC) 0,01% done Xd

Eel

Haha yeah.

About cheating, I don't mind it. That's kinda the point of petit computer I guess, being able to play the games and play with their code.

I kinda made it hard and slow paced like that because there wouldn't be a reason to go back to it again after the first day if it were too easy.

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok

randomous

@Discostew I think it might be more of an oversight rather than a bug. Maybe when they were designing Petit Computer, they wanted everything to have the "Then" statement (like the original). However, maybe late in the development cycle, they decided to add the "shortcut" method for static GOTOs, but forgot the others. Maybe the interpretation performance hit was too much for such a small case. Errr, but I guess it all depends on their implementation. If they're reading the code character by character and creating a state machine based on the characters, it wouldn't make any sense that the dynamic GOTO wouldn't work. However, if they're creating tokens from groups of characters and then parsing each line based on a grammar, then perhaps they have separate rules for GOTO (label) and GOTO (string), and they just forgot the extra rules for non GOTO (label) statements. You know, maybe they have something like:

line -> IF expr THEN (GOSUB | GOTO) (label | string)
line -> IF expr GOTO label

And they just forgot to add the extra "string" portion to the grammar.

[Edited by randomous]

randomous

SmokedSausage

Hey Guys, Haven't posted in a while...But Yesterday I just released the first official SURVIVE version. You can read the changelog on the page for all of the changes. Anyway as kindof and update on the dev progress here are the things I have added since the release.

Nice, Kinda smooth Day/Night cycle (Thanks Randomous! )
Squirrels and Squirrel AI (Still working with Deer and Bears)
Visual health and hunger meter

Here is the SURVIVE wiki page.
http://www.petitcomputer.wikia.com/wiki/SURVIVE

This project is NOTHING like Pixelli and actually has gotten A TON farther in the Dev process than Pixelli was ever going to be. Anyway, I hope you enjoy SURVIVE!

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

X:

Justlink

@Gimmemorecoinz, i looked the coding of the game engine and was so confused by the various varibles, then i went to the tutorial forums and saw ur tutorials, and they taught me so much. Ty. Plz post more

Do you like videogames? If so, you must know
It's dangerous to go Alone.

Fadeintodust

Are there any tutorials to explain how exactly the group function for SPCOL works?

Fadeintodust

Discostew

Fadeintodust wrote:

Are there any tutorials to explain how exactly the group function for SPCOL works?

They kinda explained it an odd way. In order to take advantage of it, you need to understand "bits". When two sprites have the same bit set, then they are capable of colliding. A value of 255 means anything else that has any one of the bits set from 0 to 7 (8 bits) can collide with it.

Discostew

Switch Friend Code: SW-6473-2521-3817

Fadeintodust

Discostew wrote:

Fadeintodust wrote:

Are there any tutorials to explain how exactly the group function for SPCOL works?

They kinda explained it an odd way. In order to take advantage of it, you need to understand "bits". When two sprites have the same bit set, then they are capable of colliding. A value of 255 means anything else that has any one of the bits set from 0 to 7 (8 bits) can collide with it.

I believe I understand now!
Now if only I could do the opposite of what &B does, I'd be golden.

Fadeintodust

T-bender

Moorpheel wrote:

Haha yeah.

About cheating, I don't mind it. That's kinda the point of petit computer I guess, being able to play the games and play with their code.

I kinda made it hard and slow paced like that because there wouldn't be a reason to go back to it again after the first day if it were too easy.

Good to hear. I want to edit your game and make a quiet real farming simulator. You can help if you want. In real, farming is hard and slow, but in the NDS game Farm Life by Ubisoft you can skip days by heading to bed... I also want to let the player customize their farm, buying more animals, like cows, chickens and cheeps. I also want to make more areas, like a market, a city and more places where you can earn money. I hope It willbe done soon...

[Edited by T-bender]

Progress:
Alarm Clock (PTC) 75% done
Shooter w/o a name yet (PTC) 0,01% done Xd

randomous

@Hansausage Lol don't worry about it; I was just joking on the wiki. I thought it was amusing to watch my own credits system roll by lol.

[Edited by randomous]

randomous

damolii

Hansausage wrote:

damolii wrote:

TexMurphy wrote:

The closest thing I've seen to an RPG is @randomouse 's Village.

I kinda made an RPG (well, it's more of a demo) :/.... http://imgur.com/a/imb55

P.S: @Hansausage Couldn't help but notice I wasn't in credits.. O.O

You're in the credits. The only person I forgot was Randomous, and I am like uber sorry about that.

Oh. I checked before... oh well sorry for not checking fully.

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

Sorry, this topic has been locked.