DSiWare Forum

Topic: Petit Computer

Showing 321 to 340 of 9,299

AuthorMessage
Avatar

neoxid500

321. Posted:

http://d.hatena.ne.jp/eidaht/20120630/1341016869

MARIO PAINT!!! MAKE SONGS FOR YOUR GAMES BY SCANNING THIS QR CODE!! =D sooo using this ^_^

neoxid500

AuthorMessage
Avatar

Moorpheel

322. Posted:

@neoxid500: looks interesting :D I'll scan it.

My cows are shaping up nicely, they won't be very active or interesting to look at but let's say it's part of it's "petitness"...
New blurry images yay :D
Untitled

Moo

Oh look! A Morphloggery.
Oh! eShop Gurus.

3DS Friend Code: 0173-1330-0080 | Nintendo Network ID: Abgarok

AuthorMessage
Avatar

Ispheria

323. Posted:

your invisible cows look amazing lol but in all seriousness, your game looks great so far. i can't wait to play it...you will be sharing the QR code right?

Ispheria

AuthorMessage
Avatar

Moorpheel

324. Posted:

Of course I am!
But I want to finish it before sharing it but, to be honest, I'm a slow worker so it may take some more time.

Cows can be seen, but I decided to toggle them off for the photo, for some odd reason.

Edited on by Moorpheel

Moo

Oh look! A Morphloggery.
Oh! eShop Gurus.

3DS Friend Code: 0173-1330-0080 | Nintendo Network ID: Abgarok

AuthorMessage
Avatar

Peidorrento

325. Posted:

I really want to see the final result of this Farm game! It's looking awesome already!

"A vingança nunca é plena, mata a alma e a envenena" - Seu Madruga
Presidente, CEO, Programador e único empregado da Peidosoft.

AuthorMessage
Avatar

Kemba

326. Posted:

Morph, you should totally make a clone of one of one of these suckers. I don't want to pay 90 bucks for a new one, and my own hasn't worked in ten years. B)

Kemba

AuthorMessage
Avatar

KAHN

327. Posted:

having some trouble moving a sprite manually. earlier in the week, i achieved the checkpoint of manually moving a sprite across the screen, but there are two problems.and i've come to this specific forum for answers! (to answer the problems, please reference the code below)

1.) when i move the sprite, i TAP the right arrow key on my 3DS D-pad, and my sprite is sent whizzing to the middle of the screen. this would be fine, but if i want to make the sprite go across the screen in one move, i want to HOLD the arrow key. if i want to make him move a little bit, i want to TAP it,you know? like in real videogames!
2.) move the sprite, it has to begin somewhere right? and it has to have a destination, correct? so i can move a sprite from it's starting point to it's destination, but i can't move my sprite after i move him across the screen! i want to be able to move wherever i want on the screen! for example, i want to go here, but now i want to go here, instead. understand?

i'm sorry i didn't do a good job explaining my problems, but i did the best i could. i don't expect good answers because of my horrible explaining, either, but everything helps, i suppose. i'm posting the code below. that way it will be easier to understand my descriptions. hopefully you'll understand my problems and post the answer i'm looking for! i want input from everybody! the more answers, the better! plus, other readers might look upon this, and agree with me, looking for answers, and i'm sure they'll find all your help as appreciated and useful as i will! you can copy the code below and re-program it so that when you repost it here, i can observe it! anything goes! all input is GREATLY appreciated! whelp, here's the code:

CLEAR
CLS
PNLTYPE "OFF"
BGMPLAY 9
SPPAGE 0
SPSET 0,64,0,0,0,0
PRINT "MOVE RIGHT WITH -->"
SPOFS 0,10,100
@DERP
IF BTRIG()!=8 THEN GOTO @DERP
SPANIM 0,4,4,12
SPOFS 0,120,100,190
WAIT 220
END

so that's the code, all help is appreciated, have a good day!

KAHN

3DS Friend Code: 1032-1301-2772 | Nintendo Network ID: Milkman12

AuthorMessage
Avatar

Moorpheel

328. Posted:

It seems that you need to make it move in relation to it's position, I'd recommend you to do something like this:

example, to move 16 pixels up...
@UP
SPREAD (0),X,Y <--- Reads SP 0's position and stores the coordinates in the variables X and Y
SPOFS 0,X,Y-16,(here goes the number of frames you want it to take to move from its position to this position, no need to use "wait", after it)
RETURN
You need to make one for each direction

Edited on by Moorpheel

Moo

Oh look! A Morphloggery.
Oh! eShop Gurus.

3DS Friend Code: 0173-1330-0080 | Nintendo Network ID: Abgarok

AuthorMessage
Avatar

heatguts

329. Posted:

i cannot seem to wrap my head around sprites.

also, i seem to be having some problems with the if command.

Edited on by heatguts

So what if there's no Mega Mans in Metroid?
That doesn't mean we can't have metroids in Mega Man.

3DS Friend Code: 4511-1723-4299

AuthorMessage
Avatar

Ispheria

330. Posted:

Morphtroid wrote:

It seems that you need to make it move in relation to it's position, I'd recommend you to do something like this:

example, to move 16 pixels up...
@UP
SPREAD (0),X,Y <--- Reads SP 0's position and stores the coordinates in the variables X and Y
SPOFS 0,X,Y-16,(here goes the number of frames you want it to take to move from its position to this position, no need to use "wait", after it)
RETURN
You need to make one for each direction

how do you do something like this but get it to animate too?
like make it look like the person is walking?

Ispheria

AuthorMessage
Avatar

Ispheria

331. Posted:

CLS
ACLS
VISIBLE 1,0,1,1,1,1
SPPAGE 0
SPSET 1,80,2,0,0,0,16,16
SPHOME 1,-5,-8
SPSET 0,70,2,0,0,0,16,16
X=120
Y=90
POSX=X
POSY=Y
@UPDATE
B=BUTTON()
IF (B AND 32) THEN END
IF (B AND 1) THEN GOSUB @UP
IF (B AND 2) THEN GOSUB @DOWN
IF (B AND 4) THEN GOSUB @LEFT
IF (B AND 8) THEN GOSUB @RIGHT
SPOFS 0,X,Y,1
WAIT 1
IF TCHST==TRUE THEN GOTO @TOUCH
IF TCHST==FALSE THEN GOTO @UPDATE
@TOUCH
IF TCHX<100 THEN GOSUB @LEFT
IF TCHX>140 THEN GOSUB @RIGHT
IF TCHY<70 THEN GOSUB @UP
IF TCHY>110 THEN GOSUB @DOWN
SPOFS 0,X,Y,1
WAIT 1
GOTO @UPDATE

@UP
IF Y<0 THEN Y=0
Y=Y-1
SPCHR 0,78
SPANIM 0,1,15,0
IF TCHY<24 THEN Y=Y-1
SPOFS 0,X,Y,1
RETURN

@DOWN, @ LEFT, @RIGHT ARE PRETTY MUCH THE SAME THING EXCEPT WITH DIFFERENT VARIABLES

thats what my code for making the character move basically looks like atm, and when i move the character, it changes to the right sprite, but it doesn't animate. any ideas?

Ispheria

AuthorMessage
Avatar

heatguts

332. Posted:

maybe you should put another SPANIM in the beginning of update.
to change it back to the original costume.

So what if there's no Mega Mans in Metroid?
That doesn't mean we can't have metroids in Mega Man.

3DS Friend Code: 4511-1723-4299

AuthorMessage
Avatar

ejamer

333. Posted:

Ispheria wrote:

...
thats what my code for making the character move basically looks like atm, and when i move the character, it changes to the right sprite, but it doesn't animate. any ideas?

If you were to post a QR code, I'd try to help. I'm not really wiling to type all that code in to troubleshoot though.
Someone more familiar with sprites might be able to make a recommendation just by looking.

(My guess, and what I would test first, is changing the number of frames in your SPANIM statement from 1 to something bigger. Otherwise it's just cycling through the same sprite all the time instead of actually changing anything... right? Maybe I'm offbase here, which is why I would've preferred to test before commenting.)

Edited on by ejamer

ejamer

AuthorMessage
Avatar

Peidorrento

334. Posted:

Hello there,
I'll be more specific about my DATA problem. If anyone could sheed some light, I'll appreciate.
I want to display a map made of different sprites, say, a 16x16 sprites map using DATA command. Is this possible?
If it is, can someone please give me a sample routine? I can't figure by myself the correct use of DATA and READ :(

"A vingança nunca é plena, mata a alma e a envenena" - Seu Madruga
Presidente, CEO, Programador e único empregado da Peidosoft.

AuthorMessage
Avatar

Moorpheel

335. Posted:

@Peidorrento: yes you can, you just need to store numbers (either identifiers or the CHR numbers) on the DATA structure and read it from a loop.

@Ispheria: That's because you're changing sprites and setting spanims every 1 pixel you move, it's happening so fast that the sprite has no time to change frames!

Moo

Oh look! A Morphloggery.
Oh! eShop Gurus.

3DS Friend Code: 0173-1330-0080 | Nintendo Network ID: Abgarok

AuthorMessage
Avatar

Peidorrento

336. Posted:

@Morphtroid Thanks man, but the question is: how to do that? How to retrive specific DATA? I can't understand how to organise these things...

"A vingança nunca é plena, mata a alma e a envenena" - Seu Madruga
Presidente, CEO, Programador e único empregado da Peidosoft.

AuthorMessage
Avatar

ejamer

337. Posted:

Morphtroid wrote:

@Ispheria: That's because you're changing sprites and setting spanims every 1 pixel you move, it's happening so fast that the sprite has no time to change frames!

This is probably a good point.

@UP
IF Y<0 THEN Y=0
Y=Y-1
IF MYSPRITE!=78 THEN SPCHR 0,78: MYSPRITE=78
IF TCHY<24 THEN Y=Y-1
SPOFS 0,X,Y,1
RETURN

You could change your SPCHR line to check the current sprite being used and only change if necessary. Also, wouldn't it be better to move the SPANIM command out of the movement loop, and just leave your character always marching? Since you are using an infinite loop, I don't know why you feel the need to keep resetting those values (to identical values) every time the loop runs.

(Try moving this line just under your SPSET command maybe?)
SPANIM 0,4,15,0

Edited on by ejamer

ejamer

AuthorMessage
Avatar

ejamer

338. Posted:

Peidorrento wrote:

@Morphtroid Thanks man, but the question is: how to do that? How to retrive specific DATA? I can't understand how to organise these things...

DATA can be anywhere in your program - although I'm guessing they should probably be placed after the END statement.

DATA statements won't have any effect on your code or program unless a READ command is used. When you use a READ command, it returns the first DATA value found in the program, starting to search from the beginning. If you want to start reading from a different location, add an @data_label just before the DATA statements you want to jump to, and then use the RESTORE @data_label command before the READ so that it will start looking for DATA from that location.

Does that help? Use can always look at the manual for details (unofficial online version here: http://petitcomputer.wikispaces.com/ ) about the commands or LOAD "GAME2" and check the source code to see how they used the RESTORE-READ-DATA commands to create a level map in an actual program.

Edited on by ejamer

ejamer

AuthorMessage
Avatar

Peidorrento

339. Posted:

Hey @ejamer, thanks a lot! It always helps. Still, it seems really messy to me how to use all this data which I store. I loaded lots of exemples but I couldn't figure. I realise that it is possible to store different data types (char or numbers), but I don't understand how to use them in an apropriate way.

For exemple, in all my naivety, this code should work
DATA 1, 2, 3
READ a, b, c
so I should get a = 1, b = 2 and c = 3. but it is not the case. I'm really confused :P

I will load this "GAME2" and see if the code is more like "DATA for dummies", which is what I'm looking for :P

EDIT: And thanks for the link!

EDIT2: I'm going to be even more specific: I want to store x and y positions for my sprites and retrive them.

EDIT3: Just checked "GAME2" code. It is exactly what I was looking for. Thanks all!

Edited on by Peidorrento

"A vingança nunca é plena, mata a alma e a envenena" - Seu Madruga
Presidente, CEO, Programador e único empregado da Peidosoft.

AuthorMessage
Avatar

Sprite

340. Posted:

Created Cool Pixel map but Newb to programing so can't program myself. Could anyone do it for me? If anyone doses could you try to keep the graphics the same. When someone responds I will post QR code. PS LOVE Petit Farm

I'm not saying let's kill all the stupid people, I'm just saying let's take off the warning labels, and see what happens. Friend Code: 1075-1228-4183