Forums

Topic: Petit Computer

Posts 7,921 to 7,940 of 9,621

iprice

You need to clear the memory in PTC before using DIM again (basically, after running a program in PTC all variables are still held in memory so if you've already used DIM (when last run) it knows and throws an error.

Use CLEAR (IIRC) at the start of the program.

I code, therefore I am.

cigsthecat

Aha! That makes sense, thank you. I suppose using CLEAR every time right before DIM is the way to go.

cigsthecat

GraphicGenius

iprice wrote:

You need to clear the memory in PTC before using DIM again (basically, after running a program in PTC all variables are still held in memory so if you've already used DIM (when last run) it knows and throws an error.

Use CLEAR (IIRC) at the start of the program.

Wow! I was just gonna ask about that but now I understand it!

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. Wait was that just a joke?

3DS Friend Code: 1478-3545-5136 | Nintendo Network ID: GreatGamer123

Discostew

cigsthecat wrote:

Aha! That makes sense, thank you. I suppose using CLEAR every time right before DIM is the way to go.

CLEAR does as it says, clears the memory, which means all variables and arrays will be erased/reset. I usually put it near the start of my program so I know I'm starting with fresh memory to work with.

Discostew

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

InsertPi

Minecraft DS Beta 1.8!!!
NOTE: Your old worlds will not work, and the changes are too complex for a conversion.

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

cigsthecat wrote:

Aha! That makes sense, thank you. I suppose using CLEAR every time right before DIM is the way to go.

Well, I guess now you know why I did CLS:CLEAR on my program. Those two do different things.

Edited on by theblackdragon

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

Lego-Meister

@bro12 I can't get all qr codes. I recommend using Petit Computer QR Stitcher and making a PTC Wiki page.

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

theblackdragon

Guys (and this goes to everyone, mind you) — I do understand how frustrating it can be to have a user ask a question you've already answered someplace, but please, if you don't have it in you to direct a user to where they can find their answer in a civil manner, just let it lie and allow someone else to do it for you. (@ramstrong, you'll notice I've edited the reply that sparked this whole mess into something much less offensive. Please keep it in mind the next time you're tempted to bite someone's head off.)

As for the argument itself (this goes to @0Games at the moment, but again, it does apply to all of you), if ever any of you feel you've been personally attacked by another user for whatever reason, please use the Report button (located handily above every post made on our forums, it's an onmouseover thing if you don't see them right off the bat) to notify the moderation team and don't bother with any knock-down drag-out fights in-thread — it just gives us a bigger mess to wade through. We'll be happy to figure out what's going on and get everyone squared away so that the thread may continue on as smoothly as possible.

Thanks in advance, guys!

Edited on by theblackdragon

BEST THREAD EVER
future of NL >:3
[16:43] James: I should learn these site rules more clearly
[16:44] LztheBlehBird: James doesn't know the rules? For shame!!!
[16:44] Vintage: We have rules?
[16:44] Reala: don't expose the staff to sunlight, don't get them wet and don't feed them after midnight

3DS Friend Code: 3136-6802-7042 | Nintendo Network ID: gentlemen_cat | Twitter:

Slayer

theblackdragon wrote:

If ever any of you feel you've been personally attacked by another user for whatever reason, please use the Report button Thanks in advance, guys!

TOTALLY forgot about that thing. Thank you, theblackdragon.
Now, I'm going to attend to a health system that will work good. @Hansausage, if you mind, could you post what you have on Apocalypse Rising? Finish whatever you have in progress on it first, though- it would really help because you said you finished the zombies if my memory doesn't fail me, and I need those for a solid health system.

Edited on by Slayer

I have nothing really to say about myself.

twinArmageddons

tbd is here to save the day again

get in loser we're going titan hunting

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

TAINT_Zzyex

Thank you TBD! Now, has anyone tried the new btc update?
If so/If not
how can i fix the shop?
I haz:
cls
if coin=100 then hp=100 else print "not enough coin
if coin=100-100
wait 120
goto @shop
It goes to else even with 100 coins AND it minuses money without healing.

"Did somebody say Aincrad?"
"No, go back to your own game!"
"awwww"
"And make out with Asuna."
"Aww-I mean YAY"

Twitter:

LeviCelJir

Yay The fight is gone

Anyway I don't know why @IAmAPerson but you seem like you are trying to get rid of my 1.5 map (Joking) But you will never defeat LeviLand! Yes Everyone's favorite 1.5 map is up and running 1.8! Hehehe Person... thinking 1.8 will be the end of my Favorite World...

Anyway I found a mega game-breaking bug in 1.8... some blocks like wood planks, stone, and TNT are unbreakable. Its kinda annoying. I thought building with bedrock is hard but now... WITH WOOD??? Its so sad...

Lastly Person I was wrong. The terrain generator can make some cool worlds! Even with just the grass circles.

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

InsertPi

@Leviceljir can you give more details on the bug? I'm not having any problems with it. It may be a problem with the map conversion.

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:

LeviCelJir

@IAmAPerson
I thought it might be a map coversion bug too but I tried it in a fresh world and it still wasn't working... I don't know what its doing it for... I'll go try some stuff and tell you my results.

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

LeviCelJir

@IAmAPerson
Ohhh after a experiment or two I found out the problem. Certain blocks won't break using the "break block" button on the bottom screen but will work with L button. Which is a mega problem for me because my L button has trouble working...

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

InsertPi

@LeviCelJir ahhhhhhhhh I know what's going on. I done goofed when I was changing that 400 lines of code. I'll release a Beta 1.8.1 bug fix that fixes a few other bugs in a couple days. I can tell you how to fix it yourself though. On lines 458 and 459. Change

IF BSTAT AND TDS AND MAP(I,J)AND...
IF BSTAT AND !TDS AND MAP(I,J)AND...

to

IF BSTAT AND TDS AND MAP(I,J)>0AND...
IF BSTAT AND !TDS AND MAP(I,J)>0AND...

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:

LeviCelJir

@IAmAPerson
Yay! I can play my 1.5 map in 1.8 without bedrock wood! and bedrock TNT.

By the way... I can tell I'm gonna be a great 2.0 tester :3 I found an annoying bug on the first day!

P.S. Converting my map was easy. You made it out like it was the hardest thing in the world. You were like "Oh yeah Levi Converting maps isn't easy anymore. It will be hard. I recommend just giving up your world. Well... Have fun!"

...It...Was...So...Easy...

Edited on by LeviCelJir

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

ramstrong

Thanks TBD. Sorry for the trouble. I don't suppose you can make the Tutorial thread "sticky", do you? It would be helpful, so we don't have to point to it every so often.

TexMurphy wrote:

@ramstrong
I typed in both of your walking programs. In your character walking tutorial, change SPCHAR to SPCHR under @ANIM. Can you write a tutorial where the character stops moving when the Dpad is released? Thanks
What we need are templates for platform games, rpgs, fighting games, and side scrollers.

You know, you don't have to ask me about it. Lots of other qualified people can answer that question for you. If you look at the latest Tutorial entry, you'll see an extra mode for "STOP". So, you'll need to add that in if you want to stop.

Actually, that's a simplification of the process. A more sophisticated version would be to determine the walking speed. So, stopping is simply zero speed. An easy way to do it would be to reset the speed every time you ask for direction.

B=BUTTON(0)
SPEED=0:'INSERT THIS HERE
IF B AND 1 THEN D$="U":SPEED=20
IF B AND 2 THEN D$="D":SPEED=20
IF B AND 4 THEN D$="L":SPEED=20
IF B AND 8 THEN D$="R":SPEED=20

And on @ANIM, you want to set the speed accordingly. Something like this:

@ANIM
SPCHR 2,A
SPANIM 2,4,SPEED/4
SPOFS 2,SX*16,SY*16,SPEED

You need to be careful and go through the program logic, and make sure SX,SY are unchanged when the speed is zero, but I'm sure you'll be able to do that no problem. Once you've done that, you may want to adjust SX,SY values according to SPEED variable. Right now it's based on 16x16 grid. You can change that to SX*SPEED*RATIO, instead. (This is just an example, you don't type that in exactly and expect it to work.)

Another way to look at it would be a simplification of the whole process. Think of turn based game. Do you want to go UP, DOWN, LEFT, RIGHT, SHOOT, or do STOP? And simply build a table to reflect that. That's what I did on my last entry, and it's so easy, I built the whole program all at once.

Currently, the program assumes that if you don't give any input, you want to keep going where you're going. In other words, the last directional command. However, it can be changed so that the default would be, if you don't give any input, the default command would be STOP.

HTH.

Speaking of templates, I'll be doing a few sprite games templates (similar to WITCH, but encompassing more game types). Then I'll be doing something like a dungeon level editor (256x192 in size). So, that's something to look for ... in the (very far) future.

Edited on by ramstrong

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

Top

Please login or sign up to reply to this topic