Forums

Topic: Petit Computer

Posts 4,041 to 4,060 of 9,618

InsertPi

Hairmanban19 wrote:

Very cool update,but the blocks are too big to really make anything cool. Are you gonna make the blocks smaller in future updates?

I can make the player bigger and increase the map size!

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.

X:

damolii

Update on my RPG. So far so good. I've got the save system up and running. Right now I'm making the game much more.. enjoyable.. But now I have to figure out collision with backgrounds. I still haven't fully figured out sprite-on-sprite collision. @Randomous,@Morphtorok,@ramstrong,@peoplelikethem, I was wondering if you could give me the technique to se. Not the code itself,but a technique or something. I don't know

IAmAPerson620 keep up the good work. I like it!!!

[Edited by damolii]

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

ramstrong

From Tutorial thread because that thread is strictly for finished tutorial. I answer questions here from now on.

programmerpro wrote:

@MOVE
SPREAD(SPNUM),X,Y
TX=TCHX:TY=TCHY
DX=TX-X:DY=TY-Y
DR=SQR(DX*DX-DY*DY)
SPOFS SPNUM,TX,TY,DR
SPCHR SPNUM,72
RETURN

This did not work @ramstrong
It said Illegal function call at the SQR part.(Line 28)

Then I suggest that you debug it and fix it because it works for me just fine. The SQR is just the distance formula. All it does is:
1. Get current sprite position SPREAD
2. Get current touch screen coordinates: TCHX, TCHY
3. Find the distance between the 2 points.
4. Move the sprites that distance with interpolation time.
5. (optional) change the sprite to proper image. SPCHR

randomous wrote:

You're working on your Raspberry Pi??? Goodness... why?

Because the browser, Midori, does not show YouTube. Therefore, I'm not subjected to multiple YouTube videos playing simultaneously, draining my whole bandwidth allocation in one hour. Besides, it's fun. I have it connected to the TV and with wireless keyboard, I can just sit back and relax.

Morphtorok wrote:

Look guys! I made a thing using the triangle turning technology (patent pending) @ramstrong helped me with.

Since when triangle turning algo is patentable? The horror!
Believe it or not, Tangram was all that I can think of. I was thinking that maybe I should ask you to do tangram project, and well, there it is!
I see that the triangles aren't filled this time. I don't know if you'll allow overlapping triangles, but if you do, you can use GPAINT with a special color, then set GPAINT to fill in color up to that border color. Then change the border color to normal color. It takes a lot of time to do that, and I can only do a couple dozen polygons per second. Good enough for tangram, not good enough for real-time 3D graphics.

Discostew wrote:

Isn't that equation for getting the hypotenuse of a right-triangle? Shouldn't that be a + instead of a -?

Doh! I wonder why no one else, including me, caught that error for so long! I'll fix it right away!

[Edited by ramstrong]

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

Let's just call a spade, a spade.

InsertPi

Hairmanban19 wrote:

IAmAPerson620 wrote:

Hairmanban19 wrote:

Very cool update,but the blocks are too big to really make anything cool. Are you gonna make the blocks smaller in future updates?

I can make the player bigger and increase the map size!

Please do!

Ok I just increased the player size by approx. 1.25x (biggest I could make him w/o adding layers and such, which would significantly increase lag (like its not already laggy enough)), but still makes a good difference, and quadrupled the map size!

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.

X:

Discostew

ramstrong wrote:

From Tutorial thread because that thread is strictly for finished tutorial. I answer questions here from now on.

programmerpro wrote:

@MOVE
SPREAD(SPNUM),X,Y
TX=TCHX:TY=TCHY
DX=TX-X:DY=TY-Y
DR=SQR(DX*DX-DY*DY)
SPOFS SPNUM,TX,TY,DR
SPCHR SPNUM,72
RETURN

This did not work @ramstrong
It said Illegal function call at the SQR part.(Line 28)

Then I suggest that you debug it and fix it because it works for me just fine. The SQR is just the distance formula. All it does is:
1. Get current sprite position SPREAD
2. Get current touch screen coordinates: TCHX, TCHY
3. Find the distance between the 2 points.
4. Move the sprites that distance with interpolation time.
5. (optional) change the sprite to proper image. SPCHR

Isn't that equation for getting the hypotenuse of a right-triangle? Shouldn't that be a + instead of a -?

[Edited by Discostew]

Discostew

Switch Friend Code: SW-6473-2521-3817

InsertPi

Hairmanban19 wrote:

@IAmAPerson620 i find it pretty fun just making mazes and stuff in Raycraft! What it needs next is map saving.

That is what I intend to add next!

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.

X:

InsertPi

Discostew wrote:

ramstrong wrote:

From Tutorial thread because that thread is strictly for finished tutorial. I answer questions here from now on.

programmerpro wrote:

@MOVE
SPREAD(SPNUM),X,Y
TX=TCHX:TY=TCHY
DX=TX-X:DY=TY-Y
DR=SQR(DX*DX-DY*DY)
SPOFS SPNUM,TX,TY,DR
SPCHR SPNUM,72
RETURN

This did not work @ramstrong
It said Illegal function call at the SQR part.(Line 28)

Then I suggest that you debug it and fix it because it works for me just fine. The SQR is just the distance formula. All it does is:
1. Get current sprite position SPREAD
2. Get current touch screen coordinates: TCHX, TCHY
3. Find the distance between the 2 points.
4. Move the sprites that distance with interpolation time.
5. (optional) change the sprite to proper image. SPCHR

Isn't that equation for getting the hypotenuse of a right-triangle? Shouldn't that be a + instead of a -?

Where do you see a2+b2=c2 or SQR((a+b)2)=c?
EDIT: Oops nvm I see it. Yea the Pythagorean theorem uses a +

[Edited by InsertPi]

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.

X:

ramstrong

IAmAPerson620 wrote:

Where do you see a2+b2=c2 or SQR((a+b)2)=c?
EDIT: Oops nvm I see it. Yea the Pythagorean theorem uses a +

Fixed. I guess this problem is uniquely mine because I never use the PC to program Petit Computer. I always peck it on the DSi/3DS with a stylus. So, I have to copy the program by hand. Apparently, my finger slipped in that case. Oops.

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

Let's just call a spade, a spade.

Fadeintodust

How would I go about having a projectile move from the player, in the direction of a a reticule(That the player moves using the touch screen), but keep going until it goes off screen?

As, if I were to just have the projectile move from the player to TCHX and TCHY as I normally did, it just stops there, but I want to fire offscreen.

Fadeintodust

ramstrong

Fadeintodust wrote:

How would I go about having a projectile move from the player, in the direction of a a reticule(That the player moves using the touch screen), but keep going until it goes off screen?

As, if I were to just have the projectile move from the player to TCHX and TCHY as I normally did, it just stops there, but I want to fire offscreen.

Convert to Polar Coordinate. Get the angle by using ATAN(X,Y), and put in any distance you want. Use x=Rcos@ and y=Rsin@. Not too sure about the angle convention, so you'll need to experiment a bit.

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

Let's just call a spade, a spade.

randomous

@ramstrong Don't you think that's a little overkill? Just calculate the difference in X's and Y's and update the projectile based on that. For instance, if you're at (50,50) and the reticule is at (200, 100), you can update the projectile's x position 200-50=150 per frame, and the y position 100-50=50 per frame. You can adjust the update based on the speed you want it to travel, otherwise the farther the reticule, the faster it travels (plus, at the speed calculated here, you wouldn't even see the bullet, let alone be able to process it well).

[Edited by randomous]

randomous

ramstrong

randomous wrote:

@ramstrong Don't you think that's a little overkill? Just calculate the difference in X's and Y's and update the projectile based on that. For instance, if you're at (50,50) and the reticule is at (200, 100), you can update the projectile's x position 200-50=150 per frame, and the y position 100-50=50 per frame. You can adjust the update based on the speed you want it to travel, otherwise the farther the reticule, the faster it travels (plus, at the speed calculated here, you wouldn't even see the bullet, let alone be able to process it well).

I was concentrating to keep the distance a constant just to avoid the issues you mentioned.
And I was not prepared to explain the mathematical formula necessary to solve that problem, even though it's simple ratio problem.
Considering that trig function does not take that much time, I think polar coordinates is simple enough. Besides, it'll be useful for a whole lot of other things, so it's good to learn it.

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

Let's just call a spade, a spade.

Gimmemorecoinz

I need help desperately from someone knowledgable on importing sprites to petit computer.
I always run into issues like this.
I'll explain the issue.
First off, in the CHR editor the full sprite displays just fine.
So that isn't the issue. Petit computer recognizes the sprite , atleast graphically.

The problem I run into is when in a new program I use
Load"SPU0:Enemy_png"
spset 0, 0, 0, 0, 0, 0, 32, 32
What I get is..
the top part of the sprite ONLY.
The other.. 24 something pixels are missing... or however many it is.
I don't know why this is happening and I can't seem to force petit computer to draw it. thanks.. Image here: http://imgur.com/bTZpqQe
EDIT:
I just realized I had the MkII checked and no sprite checked. I feel dumb now.

[Edited 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

hey everyone.
I updated the wiki page for petit smash bros you should go check it out if you're excited to see any changes.
http://petitcomputer.wikia.com/wiki/Petit_Smash_Bros
As you can see the game's slowly taking a unique shape. Still some bugs. But this is a huge update from 1.1 to 1.2 so MANY changes are being made in one update.

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

InsertPi

WARNING - With the new update coming, the map size has been quadrupled. This causes a lot of lag (about as much as 8x8 textures on high quality with the old update), so PLEASE do not use 16x16 textures on high quality with the new update! It is a death sentence for your DS! o_O

[Edited by InsertPi]

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.

X:

Slayer

Uh oh. I don't want a death sentence for my DS! It did nothing to me! I 'm a bit annoyed because I need a classic controller or classic controller pro to play the Zelda OoT and MM on Wii VC. I'll get it together. But I need a menu to scroll with. Any info anyone?

I have nothing really to say about myself.

Slayer

As in a cursor scrolling up and down from the text that I print. Apocalypse Rising needs one, because I will have options for a main menu. That being:
New Game
Load Game
Exit
I was going to put Multiplayer under development in, but not since real time is impossible. Too bad, that would have been really fun...
And at the rate PTC is going, I don't think it will die for a long time. I refused to believe it will die at all at first, but i thought about it and now I know someday it will. Just not today. Or tomorrow. Or the next day. Or the next day. (Lol)

I have nothing really to say about myself.

Sorry, this topic has been locked.