Well, I gotta hunt that wolf and be done with it. (MMZ2)
Petit Computer time. I understand basic variable stuff now, as in text, I just need to know the point of it.
So I have a program that resets the entire graphic screen every loop. It has to do that. But, its a bit "Flasy" when you overload it. Is there a smoother way of doing this (Possibly with GCOPY).
BTW, i Mispel things all the tim. But yuo cane stil read this. No ned to be gramer cops.
Also if you don't mind... What are the stickers about? I can figure out the obvious ones (characters, dsiware icon, petit developer, etc) but some are kinda unknown to me!
here is sticker translation
each section is divided with ~~~~~~~~~~
~~~~~~~~~~
Good for nothing in your life! SmileBoom funny sticker
~~~~~~~~~~
puchicon mkII
PETITCOMPUTER
MARK2
~~~~~~~~~~
SmileBoom
Petit
Developer
~~~~~~~~~~
hakase
(Professor Jones)
~~~~~~~~~~
wanpaku-kun
(Johnny)
~~~~~~~~~~
intelli-kun
(Nigel)
~~~~~~~~~~
kanzaki
(Billy)
~~~~~~~~~~
detective uncovers!
Smile boom
Survey report
~~~~~~~~~~
John Brister's
those days,
8 bit machine and
~~~~~~~~~~
by Anonymous/unspecified large number of people
internal affairs exposure diary
~~~~~~~~~~
SmileBoom
The announcement
~~~~~~~~~~
Sugiura's
(wai-) I don't know much in detail
~from Shuffle replay list~
~~~~~~~~~~
Lord Frederick's
Applause radio
800 MHz
Hey, I was wondering if anybody has a good solution (or an opinion on my solution) to this problem I'm having. I have an array which will store the position, velocity, and acceleration of each object on the screen. However, sometimes an item needs to be removed from it, and sometimes an item will be added. It would be lovely if I had a linked list... but sadly I do not. In Village, I got around this by just making a static array with a special field for "spawned", and I'd just iterate over the whole array and skip the ones that weren't spawned. This works fine when you don't have too much stuff in the array, but this time, the objects are going to be coming and going at an alarming rate, and there could be quite a lot of them. Thus, searching through the entire array to find an open spot isn't going to work... so I need another solution.
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?
Edit: Dang, I thought I could do this with binary... but there's no "log base 2" function (which I could have used to find the last 0 or 1 bit in a number), and doing "log(A)/log(base)" doesn't give exact results.
@Bluerobin2 I could store the data in the sprite itself, sure. But that doesn't solve the problem of finding the first available slot... now I have to find the first available sprite.
Can you not iterate through the array elements with a simple FOR/NEXT loop and if there's a space use the SWAP command with the next available array element? That way when you add a new element, just add it to the bottom of the stack.
@iprice But that's even slower than just filling in the first available slot... remember, I'm trying to come up with a solution such that no matter how big the array is, it takes the same amount of time to find an empty slot.
After testing INSTR/SUBSTR, I've concluded that it's more than fast enough to do whatever I need. Here's an example: it took 13 frames to find an empty slot in a simulation 100 times, and only 1 for INSTR/SUBSTR with the same simulation (100 times). With a different simulation, linear insertion find&insert took 300 frames.... INSTR/SUBSTR took 3. I think it wins lol.
@iprice But it's such a messy solution. I'm still looking for another way, if anybody's got one.
Another approach you can take is to keep track of the total number of sprites, which I'll call N, and only use sprite slots 0 to N-1. Then, whenever you remove a sprite, let's say from slot M, you can move sprite N-1 to slot M and decrease N by 1.
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.
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.
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)
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"
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.
Forums
Topic: Petit Computer
Posts 6,521 to 6,540 of 9,620
Please login or sign up to reply to this topic