Forums

Topic: Petit Computer

Posts 4,201 to 4,220 of 9,620

Fadeintodust

I have a few questions...

First off, how could use petit computer to binaries of number?

Next, while browsing through various games and their codes, I happen to come across this:
FOR B=(H==0) to 0
What is this for, and how does it work?

Lastly. How can I prevent the player from moving when the L button is held? The way I have it currently set up, is the game will goto a label whenever L is held, and return to the beginning of the main loop rather than return from a sub routine, so that it can still check things like enemy states, without going to the usual button subroutine.

Fadeintodust

ramstrong

Fadeintodust wrote:

I have a few questions...

First off, how could use petit computer to binaries of number?

Next, while browsing through various games and their codes, I happen to come across this:
FOR B=(H==0) to 0
What is this for, and how does it work?

Lastly. How can I prevent the player from moving when the L button is held? The way I have it currently set up, is the game will goto a label whenever L is held, and return to the beginning of the main loop rather than return from a sub routine, so that it can still check things like enemy states, without going to the usual button subroutine.

Use &B and &H
(H==0) will return 1 if true 0 if false, so depending on value of H you will have either of these:
FOR B=0 TO 0
FOR B=1 TO 0
Ask the author if you want to know why such construct is used. I do have an explanation on my BlogSpot. Look for Petit Computer Journal: LOOPS

In you MOVE subroutine, return immediately without doing anything if L button is held down. Use BUTTON(0) to check.

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

Fadeintodust

ramstrong wrote:

Use &B and &H
(H==0) will return 1 if true 0 if false, so depending on value of H you will have either of these:
FOR B=0 TO 0
FOR B=1 TO 0
Ask the author if you want to know why such construct is used. I do have an explanation on my BlogSpot. Look for Petit Computer Journal: LOOPS

In you MOVE subroutine, return immediately without doing anything if L button is held down. Use BUTTON(0) to check.

How would I do that? All &B seems to do is do the opposite of what I want, tell me what a binary string would look like as an integer or whatever.

I would love to ask them, however, I believe the author is japanese. And I don't know how to find them anyways.
All I know is that, that this was used in the game HIGECOIN.

I see, but, I forgot to mention holding L is also supposed to go to an aiming subroutine? Would that affect anything?

Fadeintodust

damolii

Morphtorok wrote:

Is it like Final Fantasy?

Not really. The background scrolling will be a bit like it, but the "monsters" will be placed in town or very close, like Pokemon. That's the part that I am having trouble. I need to detect collision between sprite and background. I'm trying to think of the most uncomplicated way though.....

I don't have a 3DS so what do I put here? -Damolii

ramstrong

Fadeintodust wrote:

ramstrong wrote:

Use &B and &H
(H==0) will return 1 if true 0 if false, so depending on value of H you will have either of these:
FOR B=0 TO 0
FOR B=1 TO 0
Ask the author if you want to know why such construct is used. I do have an explanation on my BlogSpot. Look for Petit Computer Journal: LOOPS

In you MOVE subroutine, return immediately without doing anything if L button is held down. Use BUTTON(0) to check.

How would I do that? All &B seems to do is do the opposite of what I want, tell me what a binary string would look like as an integer or whatever.

I would love to ask them, however, I believe the author is japanese. And I don't know how to find them anyways.
All I know is that, that this was used in the game HIGECOIN.

I see, but, I forgot to mention holding L is also supposed to go to an aiming subroutine? Would that affect anything?

Opposite of &B would be from number to binary. I have a sample of it on Petit Computer Journal #3 Buttons

Well, just read the LOOPS PTC Journal, then. It tells you all about loops, including early termination

You forgot? Well, that's your fault. So, instead of returning immediately, just have it go to aiming subroutine, then. As to whether or not it affects anything, that is highly dependent on how you write your code. You need to try it and see for yourself. Really, that's all I can tell you. Try it and see for yourself. Do your homework.

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

Eel

damolii wrote:

Morphtorok wrote:

Is it like Final Fantasy?

Not really. The background scrolling will be a bit like it, but the "monsters" will be placed in town or very close, like Pokemon. That's the part that I am having trouble. I need to detect collision between sprite and background. I'm trying to think of the most uncomplicated way though.....

Asked because the user said he would make a game similar to FF.

Just check the background tile your character is about to step on with (forgot the name of the instruction) before it touches it and act like they collided. It's easier if your character is restricted to move in a grid and if you don't use many palettes. If you have a data structure or the layout of the backgrounds is stored in a graphic file, it's easier since you only need to refer to that instead of checking the background itself.

Edited on by Eel

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

GraphicGenius

@IamAperson620 could you go into further explanation about graphics? I could give you some pointers about sprites too.

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

damolii

Morphtorok wrote:

damolii wrote:

Morphtorok wrote:

Is it like Final Fantasy?

Not really. The background scrolling will be a bit like it, but the "monsters" will be placed in town or very close, like Pokemon. That's the part that I am having trouble. I need to detect collision between sprite and background. I'm trying to think of the most uncomplicated way though.....

Asked because the user said he would make a game similar to FF.

Just check the background tile your character is about to step on with (forgot the name of the instruction) before it touches it and act like they collided. It's easier if your character is restricted to move in a grid and if you don't use many palettes. If you have a data structure or the layout of the backgrounds is stored in a graphic file, it's easier since you only need to refer to that instead of checking the background itself.

Could you explain grid restrictions please?? thank you, Morphtorok.

I don't have a 3DS so what do I put here? -Damolii

GraphicGenius

I would like to make a program with someone. I don't know how to create qr codes but I can post something if your having trouble.

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

InsertPi

slayer wrote:

@IAmAPerson do you actually PLAY Minecraft?

All the time! Why do you ask?

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:

PetitProfessor

Hey almost everybody said I was trolling I am seriously making call of duty is in 3d in 2d I did not meant 3d 3d so would someone help with my game I need good guns already told you guys what I need here's my Gmail [email protected]

PetitProfessor

PetitProfessor

I will post qr codes on wiki I posted qr codes for my dancing dan game I think almost everybody knows about that game

PetitProfessor

InsertPi

programmerpro wrote:

@IamAperson620 could you go into further explanation about graphics? I could give you some pointers about sprites too.

Of course! Here are some more commands:
GCLS clears graphics
GCOLOR sets drawing color
GPAGE (0 or 1) selects top or bottom screen to draw on
GPSET X,Y[,color] makes a dot
GLINE X start,Y start,X end,Y end[,color] makes a line
GCIRCLE X,Y,Radius[,color] makes a circle
GBOX X start,Y start,X end,Y end[,color] makes a box
VARIABLE=GSPOIT(X,Y) gets color ID from a color on a spot on the screen
You can use GPSET and GSPOIT to use GRP save files.

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

programmerpro wrote:

I would like to make a program with someone. I don't know how to create qr codes but I can post something if your having trouble.

How to make QR codes

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:

SmokedSausage

It's decided. i've already almost got the movement down but working on the world map is going to be a pain. If this does'nt work out like i hope i may do a port of the Japanese FF3 into english to petit computer. Ps: @Morphtorok Nice name Petit Fantasy....

Hi, I'm SmokedSausage and i like meemoos :^)

Twitter:

Eel

damolii wrote:

Morphtorok wrote:

damolii wrote:

Morphtorok wrote:

Is it like Final Fantasy?

Not really. The background scrolling will be a bit like it, but the "monsters" will be placed in town or very close, like Pokemon. That's the part that I am having trouble. I need to detect collision between sprite and background. I'm trying to think of the most uncomplicated way though.....

Asked because the user said he would make a game similar to FF.

Just check the background tile your character is about to step on with (forgot the name of the instruction) before it touches it and act like they collided. It's easier if your character is restricted to move in a grid and if you don't use many palettes. If you have a data structure or the layout of the backgrounds is stored in a graphic file, it's easier since you only need to refer to that instead of checking the background itself.

Could you explain grid restrictions please?? thank you, Morphtorok.

Oh well, you may notice in several RPGs and other top-down games that the character moves only by "squares", one at a time. You can see it in my game Petit Farm too.

These squares are the "grid" I talk of. When the farmer in petit farm moves in a direction, a subroutine starts and goes somewhat like this:

>is the character aligned to the closest 16*16 square?
>>no
>>>force it to snap into the closest square!
>>>return. Or continue. Idk.
>>yes
>>>what's the next square about?
>>>>a wall!
>>>>>stop right there. Return.
>>>>a free space!
>>>>>move, smoothly, to the next square.
>>>>>return!

Restricting character movement to a grid is very useful. It makes it easier to manage your character's interactions with the background... But others dislike it!

I personally always use it for top-down games.

Edited on by Eel

Bloop.

<My slightly less dead youtube channel>

SMM2 Maker ID: 69R-F81-NLG

My Nintendo: Abgarok | Nintendo Network ID: Abgarok

PetitProfessor

The guns for my call of duty game just make a gun in the middle and I will do the animation so who is gonna help me

PetitProfessor

Gimmemorecoinz

damolii wrote:

Morphtorok wrote:

damolii wrote:

Morphtorok wrote:

Is it like Final Fantasy?

Not really. The background scrolling will be a bit like it, but the "monsters" will be placed in town or very close, like Pokemon. That's the part that I am having trouble. I need to detect collision between sprite and background. I'm trying to think of the most uncomplicated way though.....

Asked because the user said he would make a game similar to FF.

Just check the background tile your character is about to step on with (forgot the name of the instruction) before it touches it and act like they collided. It's easier if your character is restricted to move in a grid and if you don't use many palettes. If you have a data structure or the layout of the backgrounds is stored in a graphic file, it's easier since you only need to refer to that instead of checking the background itself.

Could you explain grid restrictions please?? thank you, Morphtorok.

See my post about tile engines and tile based movement either a few pages back or right on this page!!
Why don't people read other people's solutions to issues?

It's on this page https://www.nintendolife.com/forums/dsiware/petit_computer?sta...

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

Gimmemorecoinz

PetitProfessor wrote:

The guns for my call of duty game just make a gun in the middle and I will do the animation so who is gonna help me

No one understands your project. I'm sorry.

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

Who here is in the live chat on the wiki right now? :3 I AM! Come talk with me :3

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

Please login or sign up to reply to this topic