Forums

Topic: Petit Computer

Posts 2,161 to 2,180 of 9,620

Pixelrobin

We are doing a group project. It is called Coral maze. It's essentialy a random maze generator. I know how to program with petit computer. It is my turn in the development of coral maze. What the heck is an irc channel? To be honest, I do not like how you just joined and you're acting like you know everything. I don't want to fight, but I dout you can speed things up. This is not a live chat room. This thread is for asking questions and talking about current projects. To put all that aside, Want to be friends on the 3ds? My 3ds name is mike, and my fc is down there↓.

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

Pixelrobin

ah yes, And please do not bump.

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

randomous

I've been working on an Animal-Crossing-esque game called Village. It's not exactly Animal Crossing in that it focuses more on external things rather than furniture and such, but it's similar enough. It'll be really simple, but I hope you'll enjoy it. You can get the incomplete version here: http://goo.gl/I1YWT

Yes, you need all 20 qr codes in order for it to work. So far, all you can do is walk around, pick up flowers and replant them, and pick weeds. You can also generate a new town whenever you like, and set your name and your town name. Nothing's final yet, but all the infrastructure is there which will let me add items whenever I like. Thanks to @ramstrong for his wonderful page on storing large data structures in graphs instead of mem. Here's his page explaining how to do it: http://ramstrong.blogspot.com/2012/11/petit-computer-journal-... In fact, if you want to see what your town looks like when stored in a graph, just load up "GRP:VILDATA" and you can see how it's stored. Oh, and the loading screen IS a real loading screen. It takes a while to read all those pixels from the graph.

Untitled

I'm still trying to figure out how I want the inventory system to work. If you do happen to try it out, let me know how you think inventory should be managed. Right now, you press "X" to go into your bag, then press "A" to select an item. The item is now green. If you press "X" again, you'll exit the bag. Then you press "A" to use the item. It's gross, and it would be cool if anyone had ideas on how it should be managed.

Oh yeah, "START" saves your game. It's the only way to properly quit, otherwise your town will revert back to the way it was when you loaded it. Hold "L" and use the direction keys to look in a direction without moving (not that it's necessary yet).

Edited on by randomous

randomous

Gimmemorecoinz

bluerobin2 wrote:

We are doing a group project. It is called Coral maze. It's essentialy a random maze generator. I know how to program with petit computer. It is my turn in the development of coral maze. What the heck is an irc channel? To be honest, I do not like how you just joined and you're acting like you know everything. I don't want to fight, but I dout you can speed things up. This is not a live chat room. This thread is for asking questions and talking about current projects. To put all that aside, Want to be friends on the 3ds? My 3ds name is mike, and my fc is down there↓.

Sorry I don't mean to sound like a know it all. I've been programming for years in other languages that's why I'm the way I am. XD I just wanna connect with other people who are as passionate about making games as me and I figured this forum is a good place to start since alot of people seem really nice here. and I like nice people
My friend code is 3969-4327-6055 and I'd like to be friends I already registered you. Thank you for offering I love messing with swapnote
and checking what others are doing with their 3DS's.

Got any rare stationary? ^^;
Oh yeah I forgot to mention I'm Rain on there.

Edited on by Gimmemorecoinz

Got a project? PM ME on here!
Youtube: lostkitty64x
Want help with coding? PM ME! PM ME PM ME!! XD
FC: WIll post later.
Systems I own: ds lite, 3DS, PC/gaming, steam platform. I play alot of games. Just ask ! Minecraft anyone? :D

MrSirr

Gimmemorecoinz wrote:

Gimmemorecoinz wrote:

MrSirr wrote:

I'm trying to print my own sprite on the screen. HELP?
I know that LOAD "SPU0:MAN",FALSE loads it but i dont know how to print it.
I also know that SPSET prints sprites but how do I use that with custom sprites?
Also how do I use SPANIM to make it move?

I don't know how to do it per say but I can learn and help you in just a few minutes.
Hop on my irc channel it's darkmyst irc and the channel is #PetitComputer

Btw it seems that to use the spanim thing you need to have more than one frame for the sprite you're trying to use.
In other words.. the built in sprites contained within petit computer are there. I don't know how to use custom sprites yet.
But try this:
I found this on another forum:

SPANIM 0, 2, 10, 0
this displays one of the graphics available for you. You may need to play with the #'s a bit.

That's the command to begin animation. To set up a sprite use SPSET (Control number , character sprite number, pallet number, invert h, inverted v, [width, height], priority)

In other words to draw sprite #13 you might do:

SPSET 0,13,0,0,0,1,16,16

To add a second sprite you would do

SPSET 1,13,0,0,0,1,16,16

To position a sprite use SPOFS (control number, x,y)

SPFOS 0,50,50

would put your first sprite at coords 50,50

If you wanna animate your sprite you can use SPANIM (control number, # of frames, time between frames, loop (0=loop, 1=no loop)

SPSET 0,100,0,0,0,1,16,16
SPOFS 0,50,50
SPANIM 0,4,20,0

Will produce a little animated wizard at coords 50,50.

I modified the above code so that I could move the wizard around.
BTW for future reference if you're trying to use button and you want an update more than once per frame you have to use button() not button(1) or whatever.

I TOLD YOU I KNOW ABOUT THAT STUFF

MrSirr

MrSirr

Anonymous_Ninja wrote:

@MrSirr when you load sprites they just take the place of the old ones. SPSET generates the sprite in the top left corner, you use SPOFS to move the sprite. SPANIM makes the sprite picture switch between the ones in front of it on the page (if you have one with its left leg foward, and one with its right leg foward, you can make it switch between them to make it look like its walking, for example). if you have any specific questions about sprites feal free to ask.

1. Thanks, I appreciate it.
2. What do you mean it takes the place? So how would I print a sprite saved over the first sprite? Oh and could you post an example of how to make sprites move(not SPANIM, SPOFS) plz? You're the best, once again, I appreciate it.

MrSirr

HawkeyeWii

Has anyone ever programmed Doom with this before? That would be too awesome!!

Friend Code 3DS FC 1547-5273-7750

Twitter:

MrSirr

Ok so I figured out how to print MY sprite but the bottom half of it is two pink and red squares for some reason? help?

MrSirr

Gimmemorecoinz

MrSirr wrote:

Ok so I figured out how to print MY sprite but the bottom half of it is two pink and red squares for some reason? help?

Maybe you have the size wrong. I dunno lol

Got a project? PM ME on here!
Youtube: lostkitty64x
Want help with coding? PM ME! PM ME PM ME!! XD
FC: WIll post later.
Systems I own: ds lite, 3DS, PC/gaming, steam platform. I play alot of games. Just ask ! Minecraft anyone? :D

randomous

MrSirr wrote:

Ok so I figured out how to print MY sprite but the bottom half of it is two pink and red squares for some reason? help?

When you make a sprite, you use the command "SPSET". Using SPSET, you can also set a size for your sprite. For instance, if you made a sprite in the top left corner that takes up the default size (4 of those squares in CHRED), you can do SPSET 0, 0, 0, 0, 0, 1. The first 0 is the identification for the sprite: think of it as its social security number or something. The second 0 is the actual character to pull from the sprite sheet, in this case it is the top left corner sprite. The third 0 is the color pallete, which determines the color scheme of the sprite. This COULD make your sprite the wrong color if you set it to a different value than the one you used in CHRED (which is default 0 anyway, so you're probably fine). The fourth and fifth 0 are horizontal and vertical rotation, which is simply flipping your sprite either left to right (like a mirror) or up and down (like a funhouse mirror). That last 1 is the precedence, which tells the sprite how many things are in front of it (basically). The 1 means that only the console is front of the sprite. This will make a sprite that is 16X16 pixels since we did not specify the width and height, however if you made your sprite smaller, like 8X8 (a single square in CHRED), you'd need to specify the size like this: SPSET 0, 0, 0, 0, 0, 1, 8, 8. All I did was add the width and height to the end of SPSET and you're all set!

Edited on by randomous

randomous

Nitras

Gimmemorecoinz wrote:

Nitras wrote:

I'm working on some sort of Zelda-like game. It's coming along nicely, but could probably be made more streamlined. I'll post it when I get it to a level I'm comfortable with sharing.

ORKAYYY I'll be SHURE TO KEEP A LUKE OOT

Thank you for your words of encouragement.

Nitras

Gimmemorecoinz

Concerning petit computer I made this using the graphic editor in petit computer. Just to show my drawing ability and where I'm at. I can even do better than this. I think it might be fun to help others with graphics for their projects if they want character art. I'm willing to help draw just give me a description and i'll do a draft.

http://imgur.com/9HhIMQ0,yoFvFNP

Got a project? PM ME on here!
Youtube: lostkitty64x
Want help with coding? PM ME! PM ME PM ME!! XD
FC: WIll post later.
Systems I own: ds lite, 3DS, PC/gaming, steam platform. I play alot of games. Just ask ! Minecraft anyone? :D

Gimmemorecoinz

Nitras wrote:

Gimmemorecoinz wrote:

Nitras wrote:

I'm working on some sort of Zelda-like game. It's coming along nicely, but could probably be made more streamlined. I'll post it when I get it to a level I'm comfortable with sharing.

ORKAYYY I'll be SHURE TO KEEP A LUKE OOT

Thank you for your words of encouragement.

You're welcome I can't wait to see what you've got so far!

Got a project? PM ME on here!
Youtube: lostkitty64x
Want help with coding? PM ME! PM ME PM ME!! XD
FC: WIll post later.
Systems I own: ds lite, 3DS, PC/gaming, steam platform. I play alot of games. Just ask ! Minecraft anyone? :D

swordx

lol I'm still working on finding time to upload the QR codes for Dungeon Adventure #1. I haven't been working on #2 lately, but I'll get to it soon...

swordx

MrSirr

randomouscrap98 wrote:

MrSirr wrote:

Ok so I figured out how to print MY sprite but the bottom half of it is two pink and red squares for some reason? help?

When you make a sprite, you use the command "SPSET". Using SPSET, you can also set a size for your sprite. For instance, if you made a sprite in the top left corner that takes up the default size (4 of those squares in CHRED), you can do SPSET 0, 0, 0, 0, 0, 1. The first 0 is the identification for the sprite: think of it as its social security number or something. The second 0 is the actual character to pull from the sprite sheet, in this case it is the top left corner sprite. The third 0 is the color pallete, which determines the color scheme of the sprite. This COULD make your sprite the wrong color if you set it to a different value than the one you used in CHRED (which is default 0 anyway, so you're probably fine). The fourth and fifth 0 are horizontal and vertical rotation, which is simply flipping your sprite either left to right (like a mirror) or up and down (like a funhouse mirror). That last 1 is the precedence, which tells the sprite how many things are in front of it (basically). The 1 means that only the console is front of the sprite. This will make a sprite that is 16X16 pixels since we did not specify the width and height, however if you made your sprite smaller, like 8X8 (a single square in CHRED), you'd need to specify the size like this: SPSET 0, 0, 0, 0, 0, 1, 8, 8. All I did was add the width and height to the end of SPSET and you're all set!

NVM just figured it out it was in BG not characters, lol anyways I got a car and a man(crappy stickman lol) to show up, now can anyone help me get the man to move, hit X to enter the car, and then move the car, and press X to make him get out of the car.

MrSirr

randomous

@MrSirr Well, that one is a little more tricky, and you can do it one of several ways. Let's do it the "easier to write" way this time:

At the very least, you'll need a loop. This is usually what a game loop with movement looks like:

@GAMELOOP
'DO STUFF
VSYNC 1
GOTO @GAMELOOP

You can make the "GOTO" conditional, but for now let's just make it always jump. The VSYNC 1 tells the game to make sure the loop is complete within 1/60th of a second. This is better than trying to let the game run as fast as it can, as it'll stutter and probably not look so great. What we really care about is the "DO SOMETHING" comment.

First thing's first: There are two functions that let you see the button presses. BUTTON() will return a code representing the buttons pressed every single time it is called. This is different than BTRIG(), which will only return the buttons pressed once per press, even if it is held down. So if you're holding down the "up" arrow, BUTTON will return the code for "up" every single time the loop executes, but BTRIG() will only return it as soon as you press it, then it will return 0 until you release "up" and then press it again. Anyway, you'll probably want to use BUTTON(). You can see how to extract button codes here: https://www.nintendolife.com/forums/dsiware/petit_computer?sta...

Once you've got the button code extraction down, now all you have to do is make it move. We'll do it the simple way and test for the direction and increment/decrement accordingly

SPSET 0,0,0,0,0,1
@GAMELOOP
B=BUTTON()
IF B AND 1 THEN Y=Y-1
IF B AND 2 THEN Y=Y+1
IF B AND 4 THEN X=X-1
IF B AND 8 THEN X=X+1
SPOFS 0, X, Y
VSYNC 1
GOTO @GAMELOOP

Oh and @ramstrong there's a much easier way to make something continue moving than the code on pg 104 (unless you did it that way on purpose, in which case never mind): Replace B=BUTTON() in the above loop with

BT=BUTTON()
IF BT THEN B=BT

And that's all!

Edited on by randomous

randomous

Nitras

Gimmemorecoinz wrote:

Ok and with that I'm going to try to make legend of zelda link to the past for petit computer. How? I have no idea. But I have enough coding skill. I saw some other forum posts about people wanting to do it and with the way the sprites are it seems legit and possible. Maybe I could miniaturrize some of the dungeons. I'm starting to see developing natively in petit isn't so bad.

It would be awesome if you could get that to work.

Nitras

boot

ok, any one who's asking, the game will be about you becoming a trainer. it then shows the world a year later. prof. oak asks you if you want to go to tournaments and battle other trainers. from there the game starts. the story might change a little. who's all helping?

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

3DS Friend Code: 0791-4881-1672

Discostew

While I may not be very talkative here, I can try to answer questions about different PTC programming topics that are within my means. Just don't expect a simple answer, if at all, to a question that is complex or requires a lot of knowledge of other programming aspects. Even questions about my MM2 PTC project are welcome, but the same restriction I mentioned applies to it. Don't expect immediate answers, but be patient.

Discostew

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

Justlink

hey, i want to help with pokemon game

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

Please login or sign up to reply to this topic