DSiWare Forum

Topic: Petit Computer

Showing 6,541 to 6,560 of 9,530

AuthorMessage
Avatar

calc84maniac

6,541. Posted:

randomous wrote:

@calc84maniac Pfft, of course! Goodness, it's always the simple solutions that work the best, isn't it? Thank you.

Yeah, the real trick is that you don't care about what order things are in. If order mattered, it would be a bit more complicated.

calc84maniac

AuthorMessage
Avatar

InsertPi

6,542. Posted:

Minecraft DS Beta 1.5.5 will have a fully working inventory! You'll even be able to control what blocks go where in your hotbar! For example, if I wanted TNT in slot 1 on my hotbar, and sand on slot 2, we can now do that! I'll add render distance and the release it! Also, if you have bedrock hacked onto your map, unless you want it to stay, I suggest you move it, cause bedrock is now unbreakable (and unobtainable, but it's easy to hack into your inventory)

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

LeviCelJir

6,543. Posted:

IAmAPerson wrote:

Minecraft DS Beta 1.5.5 will have a fully working inventory! You'll even be able to control what blocks go where in your hotbar! For example, if I wanted TNT in slot 1 on my hotbar, and sand on slot 2, we can now do that! I'll add render distance and the release it! Also, if you have bedrock hacked onto your map, unless you want it to stay, I suggest you move it, cause bedrock is now unbreakable (and unobtainable, but it's easy to hack into your inventory)

Can't we just MCDSedit it out ;)

Hi I'm Levi and I like Bloopys :^)

AuthorMessage
Avatar

TAINT_Zzyex

6,544. Posted:

http://petitcomputer.wikia.com/wiki/RPG_Sprites FINAL edition of my rpg sprites. more will come i guess. these are all that i will have in my first game. (ize got movement in) when i have a battle system i will post

"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

randomous

6,545. Posted:

Hey, what happens to SPHITNO when the our sprite hits multiple sprites? Is there a way to get each sprite that our sprite is colliding with?

Edited on by randomous

randomous

AuthorMessage
Avatar

calc84maniac

6,546. Posted:

randomous wrote:

Hey, what happens to SPHITNO when the our sprite hits multiple sprites? Is there a way to get each sprite that our sprite is colliding with?

Yeah, SPHIT takes an optional second argument which is the initial ID of the other sprites to check collision with. So to detect multiple collisions, put SPHITNO+1 in that second argument to search after the first detected collision.

calc84maniac

AuthorMessage
Avatar

randomous

6,547. Posted:

@calc84maniac Ahh, so SPHITNO returns the sprite with the lowest ID that is currently colliding with ours... Thank you very much!

randomous

AuthorMessage
Avatar

damolii

6,548. Posted:

TAINT_Zzyex wrote:

http://petitcomputer.wikia.com/wiki/RPG_Sprites FINAL edition of my rpg sprites. more will come i guess. these are all that i will have in my first game. (ize got movement in) when i have a battle system i will post

You could just try and use mine.......

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

AuthorMessage
Avatar

InsertPi

6,549. Posted:

I'm working on some techniques for render distance. I'm getting some the somewhat work. I thought I had hit the gold when it didn't show any blocks after 16 blocks, but after playing around with it a bit, it was the glitchiest thing I've ever made, and that's an understatement. Have you ever seen boogie blocks? That was what I had going on. It was a dance fest with the blocks! :D

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

6,550. Posted:

randomous wrote:

The solution I came up with was to use a string to represent which slots were currently open and which were not. It would start out as a string filled with 0's or something. I could then use INSTR to get the first occurrence of a 0, and that position would be the first free position in the array of velocities/etc. I'd then set it to 1. This sort of solves the "linear search" problem, as I've replaced an interpreted linear search with a "native" one.

I know there's a better way to this... but I just can't think of it. Do you guys have any suggestions?

I don't see a better way than that. You can fake linked list with array. You can compress the list while scanning. But for searching list with lots of item manipulations, hashing is the best solution, and for as long as you can search quickly with string, just do it with string. That's what I'd do with C language, anyway. If I were you, I'd probably do the compression thing during idle loop. It's just so easy and simple that way. Assuming the item coming and going isn't so heavy, you probably can get away with just scanning/compressing a few items at a time. It won't be worse than present situation, in any case.

I see calc84maniac has a simple good solution. It does mess up the order. I take it, ordering doesn't matter then? Then I must be misunderstanding your problem. Are you keeping the list for processing "active sprites"? If so, you may want to delete several items at once. If that situation occurs often, then idle compressing would work better. Just set it up as background process during idle loop, so you don't have to worry about it in the main.

calc84maniac wrote:

randomous wrote:

Hey, what happens to SPHITNO when the our sprite hits multiple sprites? Is there a way to get each sprite that our sprite is colliding with?

Yeah, SPHIT takes an optional second argument which is the initial ID of the other sprites to check collision with. So to detect multiple collisions, put SPHITNO+1 in that second argument to search after the first detected collision.

I use SPCOL to separate collisions. But that second argument is useful than just first detecting collision. When you group a certain sprites, say enemies at sprite 50-80, then you can simply do SPHIT(player,50) to check enemy collision directly. You still need to check for range, so if the sprite control number is greater than 80, then you're colliding with something else.

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

randomous

6,551. Posted:

@ramstrong If I'm using the data that the sprite can hold, then the order wouldn't matter, because I just need to go through the sprites and update positions and such.

randomous

AuthorMessage
Avatar

ramstrong

6,552. Posted:

randomous wrote:

@ramstrong If I'm using the data that the sprite can hold, then the order wouldn't matter, because I just need to go through the sprites and update positions and such.

It depends on how you structure your program. I like to keep the ordering because it helps with groupings, or hierarchical processing.

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

GraphicGenius

6,553. Posted:

Sorry I haven't been on the forums lately @Pootrick2 I blame Minecraft (Not saying it's a bad game!) taking up all my time.
Anyways, What should I work on? And @IAmAPerson

HOW DO YOU DO GRAPHICS?!?!

I really need to know the answers to both of these questions to work on the game.

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

InsertPi

6,554. Posted:

programmerpro wrote:

IAmAPerson HOW DO YOU DO GRAPHICS?!?!

Not too hard. First, we have to set up our screen so that we can draw.

ACLS:CLEAR

This you should already know. If not, ACLS clears ALL the screens of EVERYTHING (except sprites. for that, do SPCLR) and CLEAR clears all the variables

GPAGE 0

This says to draw on the top screen. 1 is bottom screen. 2 and 3 are invisible; those might not seem important, but it's essential to stuff like Minecraft DS

GCOLOR 15

Sets the drawing colour to white. 0 is transparent. Different numbers make different colours.
Now we're ready to draw. (NOTE: The [ ] means that it is not a required field)

GPSET X coord,Y coord[,colour]

Makes a dot at a specific point on the screen

GLINE X start,Y start,X end,Y end[,colour]

Makes a line on the screen

GBOX Top-left X,Top-left Y,Bottom-right X,Bottom-right Y[,colour]

Makes a box on the screen

GCIRCLE X coord,Y coord,radius[,colour]

Makes a circle on the screen

GCLS

Clears JUST the graphics

GFILL Top-left X,Top-left Y,Bottom-right X,Bottom-right Y[,colour]

Makes a section of the screen a specific colour

These are the basics! If you wish for some more, just 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: @PhilLovesPi

AuthorMessage
Avatar

Discostew

6,555. Posted:

randomous wrote:

Hey, what happens to SPHITNO when the our sprite hits multiple sprites? Is there a way to get each sprite that our sprite is colliding with?

Someone had asked about sprite collision some pages back, and I explained it, including code for handling collision of multiple sprites with one.

http://www.nintendolife.com/forums/dsiware/petit_computer?sta...

"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

randomous

6,556. Posted:

@Discostew Thanks! @calc84maniac already explained it, but at least now I've got two people backing the same method lol.

It would be nice if the sprite hitbox would follow the angle of SPANGLE. The shots are lines, and I had wanted to make the hitbox a line... but it keeps its orientation when using SPANGLE. Oh well.

randomous

AuthorMessage
Avatar

Slayer

6,557. Posted:

randomous wrote:

@Discostew Thanks! @calc84maniac already explained it, but at least now I've got two people backing the same method lol.

It would be nice if the sprite hitbox would follow the angle of SPANGLE. The shots are lines, and I had wanted to make the hitbox a line... but it keeps its orientation when using SPANGLE. Oh well.

Oh, say does that star-SPANGLEd banner yet wave
O'er the land of the free and the home of the brave?

"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

GraphicGenius

6,558. Posted:

IAmAPerson wrote:

If you wish for more, just ask!

I would like to know more, like how you can do stuff like drawing.

Bluerobin2 wrote:

you should really check out ramstrong's blog

He's right. I made a really complicated game in less than 9 posts!

Edited on by GraphicGenius

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

6,559. Posted:

randomous wrote:

@Discostew Thanks! @calc84maniac already explained it, but at least now I've got two people backing the same method lol.

It would be nice if the sprite hitbox would follow the angle of SPANGLE. The shots are lines, and I had wanted to make the hitbox a line... but it keeps its orientation when using SPANGLE. Oh well.

What about making a small collision box on one end of the line, and then using SPCOLVEC to extend that box over to the opposite end of the line? The manual says +-16 for both X/Y, but you could check if it'll go beyond that.

"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

randomous

6,560. Posted:

@Discostew Of course, the voice of reason lol. Thank you, I'll try it. Oh, but if it's a line that's angled, I'd need to set the collision box to the right place on one of the edges, wouldn't I?

randomous