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
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!
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.
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.
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.
@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.
@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.
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
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)
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.
@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.
@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?
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
@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.
Discostew
3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew
@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?
You know what guys, screw the wiki entry for now. The deadline is too close. I'm going back to Small_Math. Once I complete it, I will port it to graphing calculators (CASIO color ones first since I have one). I'm also editing my blog, which has some embarrassing typos in it. I will try to post daily on it, as well as progress on PTC Community since mist of it is hidden. BTW, you guys should really check out ramstrong's Blog. It has really good Petit Computer posts.
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.
Also, what else would you like to know? You said more, not just drawing.
I actually meant GRPED. Like how do you use it and put it in your program?
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
@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?
I was thinking, if you use SPHOME to put one end of the line on where the "origin" of the sprite is, you won't have to change SPCOL everytime for different angles. It's always be on one end, and you can use SPCOLVEC to extend from that box. Using SPHOME like this would also allow you to rotate the line too in the direction you want it to be, with the back-end on the sprite origin.
Discostew
3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew
I can do anything for anyone! Except for now. The Million Second Quiz is coming on.
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
That post not in Tutorial thread, no way people are going to find it. How about reposting it to Tutorial thread?
@bluerobin2
Thanks for the endorsement. The link in my signature is specific to Petit Computer Tutorial, so you don't have to deal with Raspberry Pi or cooking posts. I still need to update the QR codes, though. They're on the old blogspot site at ramstrong, if you're looking for them.
@programmerpro
I did a Paint program blogpost when I was learning graphics. I suggest you check it out! It's the paint program I used to draw the Goldfish for Coral Maze, FYI.
Forums
Topic: Petit Computer
Posts 6,541 to 6,560 of 9,620
Please login or sign up to reply to this topic