DSiWare Forum

Topic: Petit Computer

Showing 7,941 to 7,960 of 9,530

AuthorMessage
Avatar

Bluerobin2

7,941. Posted:

TAINT_Zzyex wrote:

SPSET and changing digit 4 (i think) to one works also. The 1 tells the program to reverse the sprite.

However SPSET takes more memory because its deleting then re-writing the sprite.

SPCHR is like SPSET, but it doesn't delete the current data first. And yes, you could set the flip and pallet characteristics as well with SPCHR.

Everybody do a chirp. CHIRP.

Blog: bluerobin2.blogspot.com
Backloggery: backloggery.com/bluerobin2

3DS Friend Code: 3007-9228-5126

AuthorMessage
Avatar

TAINT_Zzyex

7,942. Posted:

Bluerobin2 wrote:

TAINT_Zzyex wrote:

SPSET and changing digit 4 (i think) to one works also. The 1 tells the program to reverse the sprite.

However SPSET takes more memory because its deleting then re-writing the sprite.

SPCHR is like SPSET, but it doesn't delete the current data first. And yes, you could set the flip and pallet characteristics as well with SPCHR.

I never realy thought about sprites much when theres so much other ways to make games.

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

Twitter: MetricCat

AuthorMessage
Avatar

ramstrong

7,943. Posted:

0Games wrote:

Well, I'll be as fine as to work on Apocalypse Rising. I do need animation which I will handle, but the direction baffled me. How do I do the up, down, and left animations for walking?

I posted the answer to this in the Tutorial thread a short while ago, actually. Feel free to check it out.

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

AuthorMessage
Avatar

randomous

7,944. Posted:

Wow, this is... well, extremely surprising. In my number recognition program, the written numbers are stored as a series of straight lines. In order to cut down on processing, I reduce the number of lines to a low value, such as 20 (usually you have around 40-80 lines in a number). Just to mess around, I decided to lower that number to 4. Somehow, numbers can still be recognized with near 100% accuracy when they've been reduced to just 4 lines. I'm really surprised by this... honestly, I figured that even 10 lines was too low to accurately represent the digits, but 4? Goodness... now I know what my teacher meant about "feature selection" producing surprisingly accurate results with very few features (the features in this case are lines).

Edited on by randomous

randomous

AuthorMessage
Avatar

ramstrong

7,945. Posted:

Hey guys, just a real quick demo on how to do multi-thread using Petit Computer. This one is easy because each thread runs separately, so there's no conflict possible. Let me know if you have any questions. Thanks.

'MULTI TIMER BY HARRY HARDJONO
'A MULTI-THREAD DEMO

CLS:CLEAR
DIM N(20)
DIM M(20)
DIM C(20)
DIM L(20)
DIM A(20)
DIM T$(20)

@TMRDATA
DATA 0,99,"MAXTIMER"
DATA 1,1,"QUICK TIMER"
DATA 2,2,"SLOW TIMER"
DATA 3,3,"EGG TIMER"
DATA 4,4,"SNOOZER"
DATA -1,-1,"DONE"

@INIT
CLS
LOCATE 0,22:?"A START ","B PAUSE ","X RESET"
P=1:RESTORE @TMRDATA
FOR I=0 TO 19
A[I]=FALSE
IF P THEN READ N[I]:'TIMER NUMBER
IF P THEN READ M[I]:M[I]=M[I]*3600:'TIMER MINUTES
IF P THEN READ T$[I]:'TIMER LABEL
IF N[I]<0 THEN P=0:TC=I-1
NEXT
CS=0:'CURSOR
TH=0:'THREAD

@LOOP
'PROCESS INPUT
VSYNC 1:B=BTRIG()
IF (B AND 1) THEN CS=CS-1:IF CS<0 THEN CS=TC
IF (B AND 2) THEN CS=CS+1:IF CS>TC THEN CS=0
IF (B AND 16) THEN A[CS]=TRUE
IF (B AND 32) THEN A[CS]=FALSE
IF (B AND 64) THEN GOSUB @TRESET

'PROCESS THREAD
TH=TH+1:IF TH>TC THEN TH=0
IF A[TH]==FALSE GOTO @SHOW
IF MAINCNTL>L[TH] THEN C[TH]=C[TH]+(MAINCNTL-L[TH])
IF C[TH]>M[TH] THEN GOSUB @ALARM

@SHOW
IF C[TH]==M[TH] THEN COLOR 13 ELSE COLOR 0
TM=FLOOR((M[TH]-C[TH])/3600)
TS=FLOOR(((M[TH]-C[TH])%3600)/60)
TM$=RIGHT$(("00"+STR$(TM)),2)
TS$=RIGHT$(("00"+STR$(TS)),2)
LOCATE 0,TH:?" "*31
IF CS==TH THEN LOCATE 0,TH:?">";
LOCATE 3,TH:?N[TH];
LOCATE 6,TH:TM$;":";TS$,T$[I]
L[TH]=MAINCNTL
GOTO @LOOP

@TRESET
A[CS]=FALSE
C[CS]=0
BGMSTOP
RETURN

@ALARM
BGMPLAY 6
A[TH]=FALSE
C[TH]=M[TH]
RETURN

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

AuthorMessage
Avatar

cigsthecat

7,946. Posted:

Hey guys- I'm just getting started learning arrays and I am following a nice tutorial by Gimmiemorecoinz in the tutorial thread. In it you make an array and fill it with items from a grocery list. This is the entirety of my code:

INDEX=5

DIM LIST$(INDEX)

LIST$(0)="MILK"
LIST$(1)="BREAD"
LIST$(2)="EGGS"
LIST$(3)="OREGANO"
LIST$(4)="GARLIC POWDER"

PRINT "MY GROCERY LIST"

FOR T=0 TO 4

PRINT LIST$(T)

NEXT T

When I run this I get a "Duplicate definition" error on line 4, which is the "DIM LIST$(INDEX)" line. What's wrong with this code? I had this error in another little bit of test code I tried as well.

cigsthecat

AuthorMessage
Avatar

iprice

7,947. Posted:

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.

AuthorMessage
Avatar

cigsthecat

7,948. Posted:

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

cigsthecat

AuthorMessage
Avatar

GraphicGenius

7,949. Posted:

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

AuthorMessage
Avatar

Discostew

7,950. Posted:

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.

"What fun is there in making sense?"
Lazer Light Studios - Home of the MM2 PTC project

Pokemon 3DS Friend Safari - Ice - Spheal, Sneasel, Lapras

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

AuthorMessage
Avatar

InsertPi

7,951. Posted:

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: @PhilLovesPi

AuthorMessage
Avatar

ramstrong

7,952. Posted:

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

AuthorMessage
Avatar

bro12

7,953. Posted:

heres a calculator I made:
http://petitcomputer.wikia.com/wiki/Category:Applications?fil...

bro12

AuthorMessage
Avatar

Lego-Meister

7,954. Posted:

@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

AuthorMessage
AvatarAdmin

theblackdragon

7,955. Posted:

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: theblackdragon

AuthorMessage
Avatar

Slayer

7,956. Posted:

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

"Hello sir, may I take your order?"
"Yes, I'll have a cheeseburger and fries..."
"I AM the cheeseburger and fries!"
Things you need to know about me:
I hate Texas.

AuthorMessage
Avatar

twinArmageddons

7,957. Posted:

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

AuthorMessage
Avatar

TAINT_Zzyex

7,958. Posted:

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: MetricCat

AuthorMessage
Avatar

LeviCelJir

7,959. Posted:

Yay The fight is gone :D

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 :^)

AuthorMessage
Avatar

BrianXP7

7,960. Posted:

twinArmageddons wrote:

tbd is here to save the day again

Whew. Okay...

BrianXP7

Twitter: BrianXP7