Forums

Topic: Petit Computer

Posts 7,641 to 7,660 of 9,620

twinArmageddons

noxuss wrote:

Can someone tell me why this happens. The player has 150 dollars and they buy an item that costs 150, and now the money is displayed as 050. I used a floor commands to round it up, since you earn money by decimals, so the 050 means 0.5. anyone to make this simply say 0? It really bugs me.

once again, we're going to need to see some code so we know what you're doing wrong

get in loser we're going titan hunting

3DS Friend Code: 2879-0639-8952 | Nintendo Network ID: merp_aottg

noxuss

twinArmageddons wrote:

noxuss wrote:

Can someone tell me why this happens. The player has 150 dollars and they buy an item that costs 150, and now the money is displayed as 050. I used a floor commands to round it up, since you earn money by decimals, so the 050 means 0.5. anyone to make this simply say 0? It really bugs me.

once again, we're going to need to see some code so we know what you're doing wrong

Scroll up a few, those are the QRs. but once you download go to line 64 and add
:ITEM0=0
to the end of it.

noxuss

InsertPi

Physics will be in Minecraft DS Beta 1.7! What's left until I release? Tweaks to saving, tweaks to options, and fix Texture Pack system.

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:

ramstrong

noxuss wrote:

Sadly I figured that. I found out a few ways to do timers, but they all need vsync. is there anyway to use VSYNC and still let the player tap as fast as they want?

What kind of game are you making anyway? The timer in Tutorial thread doesn't work? Those don't need VSYNC.

Petit Computer Journal
Old site http://ramstrong.blogspot.com

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

noxuss

ramstrong wrote:

noxuss wrote:

Sadly I figured that. I found out a few ways to do timers, but they all need vsync. is there anyway to use VSYNC and still let the player tap as fast as they want?

What kind of game are you making anyway? The timer in Tutorial thread doesn't work? Those don't need VSYNC.

It's alright, I got the timers sorted out. Have you ever played Cookie Clicker on iOS? The game is where you simply tap the cookie, and you buy upgrades to earn cookies faster.

noxuss

LeviCelJir

IAmAPerson wrote:

Physics will be in Minecraft DS Beta 1.7! What's left until I release? Tweaks to saving, tweaks to options, and fix Texture Pack system.

That's good. Hopefully I don't dream about Minecraft DS tonight... or maybe I want to... Idk

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

ramstrong

noxuss wrote:

It's alright, I got the timers sorted out. Have you ever played Cookie Clicker on iOS? The game is where you simply tap the cookie, and you buy upgrades to earn cookies faster.

No I haven't. I only play on Nintendo 3DS now.

You have to be careful. If you don't use VSYNC, button presses are registered multiple times. So you may have to use BUTTON(2) and BUTTON(3) to get it right.

Petit Computer Journal
Old site http://ramstrong.blogspot.com

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

Discostew

noxuss wrote:

Can someone tell me why this happens. The player has 150 dollars and they buy an item that costs 150, and now the money is displayed as 050. I used a floor commands to round it up, since you earn money by decimals, so the 050 means 0.5. anyone to make this simply say 0? It really bugs me.

Assuming this is console/panel printing, it is printing "0" just fine. What you need to compensate for is the fact that it is only printing 1 digit vs the 3 that it had before which are being left from the previous print. So, you need to compensate for that with writing blank space in the spots trailing after what you wrote. If you know the max number of digits you're going to have for this value, then you can do something like what I have below. (Let's say MONEY is what holds the value, and you can have up to 99999 dollars, so that's a max of 5 digits)

PRINT STR$(MONEY)+" "*(5-LEN(STR$(MONEY)))

Basically, it converts MONEY to a string, gets the length of characters/digits, then does the calculation of 5-x, where x is the length, and then multiplies that result to the " " (space) character, so if MONEY had 1 digit, then it would print the space character 4 times in a row.

Discostew

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

Pixelrobin

@Discostew in laymens terms, add some spaces to the end of the score count so the existing numbers are cleared .

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

boot

BLOG POST: I deiced to make a game about this: There is a blackout in the whole area of New York. You are in your home with your family. Every thing is fine, untill you hear loud screams. The city is going insane without technology. You have to esape, and protect your family, while protecting your self. Do you guys like this idea? I came up with this from watching a cartoon about a black out lol

UPDATE: the engine is mostly done. you can take out a flashlight and shine. you can take out a phone. both have batterys that can run out and you can collect more batterys. The phone tells you secrets. you can also pause.

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

3DS Friend Code: 0791-4881-1672

noxuss

Discostew wrote:

noxuss wrote:

Can someone tell me why this happens. The player has 150 dollars and they buy an item that costs 150, and now the money is displayed as 050. I used a floor commands to round it up, since you earn money by decimals, so the 050 means 0.5. anyone to make this simply say 0? It really bugs me.

Assuming this is console/panel printing, it is printing "0" just fine. What you need to compensate for is the fact that it is only printing 1 digit vs the 3 that it had before which are being left from the previous print. So, you need to compensate for that with writing blank space in the spots trailing after what you wrote. If you know the max number of digits you're going to have for this value, then you can do something like what I have below. (Let's say MONEY is what holds the value, and you can have up to 99999 dollars, so that's a max of 5 digits)

PRINT STR$(MONEY)+" "*(5-LEN(STR$(MONEY)))

Basically, it converts MONEY to a string, gets the length of characters/digits, then does the calculation of 5-x, where x is the length, and then multiplies that result to the " " (space) character, so if MONEY had 1 digit, then it would print the space character 4 times in a row.

okay thanks, I had a workaround before, but I think I might try this. Do you know the highest number that petitcomputer can run?

noxuss

InsertPi

@noxuss PTC's highest number is a bit over 570,000

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:

InsertPi

@JLMan oops. I was off. Yep. That's the limit.

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:

noxuss

IAmAPerson wrote:

@JLMan oops. I was off. Yep. That's the limit.

No other way around it? or to make it appear bigger?

EDIT: there was a way around it. For those people who would want to know, I added a currency called "Super dollars" and if you get 100000 regular dollars, it is equivalent to 1 super dollar. max amount is 1000000 super dollars, which is 1 000 000 000 000 regular dollars, if I am correct.

Edited on by noxuss

noxuss

noxuss

JLMan wrote:

@BothOfYou I'd like to see a "super calculator" with the ones place variable, tens place varable, and so forth with remade calculations (such as addition, substraction, multiplacition and division) with the max number/limit being in the billions place. Maybe I'll work on that... Yep. I'm working on that.

Can't wait to see this

noxuss

InsertPi

Look guys! I caught a wild slime!
Untitled

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:

boot

IAmAPerson wrote:

Look guys! I caught a wild slime!
Untitled

amazing (: can u please release today before school starts tomorrow?

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

3DS Friend Code: 0791-4881-1672

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:

Slayer

I'm getting this right away.
I'm going to wait until @Hansausage puts up the updated Apocalypse Rising program to work on Apocalypse Rising. I am working on animated movement and I need the updated movement engine so I'm not set back when it comes.

Edited on by Slayer

I have nothing really to say about myself.

InsertPi

@Leviceljir time to change that sig

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:

Please login or sign up to reply to this topic