Forums

Topic: Petit Computer

Posts 5,241 to 5,260 of 9,620

InsertPi

Morphtorok wrote:

Wait, RND returns only integers?

I have been living a lie

LOL

@BonChoi your work pleases the Person... I will work on adding multiple block IDs and blocks. Btw I fixed the music. It plays now.

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:

607jf

@BonChoi Looks good! Keep on Keepin on. good luck with the project!

Chao!, Nintendo, Need For Speed, Minecraft And More! 3Ds FC-4742-5514-6521.

BonChoi

@607jf Thanks . Thank you, @IAmAPerson for allowing me to work on this AWESOME project.

Programmer for Minecraft DS!

Press B!

ramstrong

boot wrote:

Ugh, if only PTCom had SWITCH CASE statements...

It does. In the form of ON..GOTO, and ON..GOSUB.

Furthermore, you can get creative and use an expression such as GOTO "string" where string can be computed to just about any label. I think. It's been a long time since I use that form.

LOL @Morphtorok.
Me, too. I didn't realize graphics can take more than 14 QRs.
Random numbers usually works off Linear Congruent theory. That's modulus arithmetic. Not to say the system can't convert it to float, but that's rare.

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

randomous

If you need floating random numbers, why not generate them in the range you want times the precision you want, then divide later by that precision? For instance, if you want to generate numbers between 0 and 500, and you want a precision of two decimal places, just generate numbers between 0 and 50000, then divide by 100.

...Or is that how you already do it? Sorry for stating the obvious lol.

Edit: You know, I really need to take more advantage of being able to use strings in GOTOs, and I always forget about ON...GOSUB.

Edited on by randomous

randomous

Discostew

There are some times where I have a LOT of cases (mainly involving enemy AI in my project), and while I can use ON ... GOTO/GOSUB, I have to separate them into multiple lines because there is so many and they all can't fit on one line. Instead, I went the route of making a string array that held the label names, and using an index variable, it became a simple line like...

GOTO/GOSUB MYLABEL$(index)

Granted it takes a little longer to process than a single ON ... GOTO/GOSUB, but it is faster than 2+ lines of that.

Discostew

3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew

randomous

@Discostew I can't see it taking much longer than a long ON...GOTO/GOSUB statement, considering that parsing seems to have a huge impact.

Oh yeah, I finally got around to trying your Megaman 2 demo! Wow, it's really fantastic! How did you get the water to animate? It's a BG, isn't it...? Sorry, I didn't get a chance to look through the code.

randomous

ramstrong

Discostew wrote:

There are some times where I have a LOT of cases (mainly involving enemy AI in my project), and while I can use ON ... GOTO/GOSUB, I have to separate them into multiple lines because there is so many and they all can't fit on one line. Instead, I went the route of making a string array that held the label names, and using an index variable, it became a simple line like...

GOTO/GOSUB MYLABEL$(index)

Granted it takes a little longer to process than a single ON ... GOTO/GOSUB, but it is faster than 2+ lines of that.

I have to try that in my next Paint program!

@randomous
I'd divide by 4096, if I want float.

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

Let's just call a spade, a spade.

3DS Friend Code: 1091-7596-4855

Slayer

swordx wrote:

slayer wrote:

twinArmageddons wrote:

slayer wrote:

I know I need a custom sprite in there but I don't know if I should use SPSET or SPOFS. That's all that stands in the way of...
More code!
XD

SPSET makes the sprite and SPOFS moves the sprite

Right, making SPSET the proper choice. Now I will need the set number of the red-haired sprite, I know which color sheet but I need to use it in SPSET.

Use the manual for questions like this. Seriously...

Except for if the manual is on an undercharged and lost tablet with Windows 8.
I'll redownload it, then look through it.

I have nothing really to say about myself.

Discostew

randomous wrote:

@Discostew I can't see it taking much longer than a long ON...GOTO/GOSUB statement, considering that parsing seems to have a huge impact.

Oh yeah, I finally got around to trying your Megaman 2 demo! Wow, it's really fantastic! How did you get the water to animate? It's a BG, isn't it...? Sorry, I didn't get a chance to look through the code.

Color palette animation. I'm changing the colors instead of the tiles on the BGs, or the graphics in the CHR sheets.

Discostew

3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew

Slayer

Okay, I MIGHT have messed with it too much on the Properties menu and now I can't open it properly even if I redownload it...
I'll try it on another PC.

I have nothing really to say about myself.

swordx

The manual is in Petit Computer...

swordx

InsertPi

Ok. I have changed the Raycraft at the title screen to Minecraft DS. It looks good. I will work on a panorama background for the menu.

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

Discostew wrote:

randomous wrote:

@Discostew I can't see it taking much longer than a long ON...GOTO/GOSUB statement, considering that parsing seems to have a huge impact.

Oh yeah, I finally got around to trying your Megaman 2 demo! Wow, it's really fantastic! How did you get the water to animate? It's a BG, isn't it...? Sorry, I didn't get a chance to look through the code.

Color palette animation. I'm changing the colors instead of the tiles on the BGs, or the graphics in the CHR sheets.

I would've never thought of that. That is really clever!

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:

Slayer

I tried this and apparently I couldn't load the correct sprite needed:
LOAD "SPU1:WMR1"
'I have codenames for the sprites designated by letters and numbers, only I know what they mean
SPSET 0,64,0,0,0,0
This is the error I get:
Cannot locate file
That or it was that it couldn't load...
Either way, I used the sprite color I wanted... Why didn't it load?

I have nothing really to say about myself.

InsertPi

@BonChoi I added ~20 more splash text phrases, and put them in a data string, so we don't have a ton of IF commands. I'm also gonna edit a couple of the textures so that they look more like the actual block. But I appreciate all your work!
@randomous the splash now includes "randomouscrap!"
@Morphtorok the splash now includes "Morphtorok!"
@anyone does anyone wanna make more music? I will add credits including anyone who has ever contributed to MCDS. @randomous how to you do the smooth credits? I looked at your code but couldn't make it out...

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:

BonChoi

IAmAPerson wrote:

Ok. I have changed the Raycraft at the title screen to Minecraft DS. It looks good. I will work on a panorama background for the menu.

Are you working on Beta 1.0 Release or 1.5?

IAmAPerson wrote:

@BonChoi I added ~20 more splash text phrases, and put them in a data string, so we don't have a ton of IF commands. I'm also gonna edit a couple of the textures so that they look more like the actual block. But I appreciate all your work!
@randomous the splash now includes "randomouscrap!"
@Morphtorok the splash now includes "Morphtorok!"
@anyone does anyone wanna make more music? I will add credits including anyone who has ever contributed to MCDS. @randomous how to you do the smooth credits? I looked at your code but couldn't make it out...

Don't be afraid to change the "BonChoi Rocks" Splash XD
I couldn't do "IAmAPerson Rocks!" Because it wouldn't fit the screen.

Also, please post that DATA to GRP porter.

Edited on by BonChoi

Programmer for Minecraft DS!

Press B!

InsertPi

BonChoi wrote:

IAmAPerson wrote:

Ok. I have changed the Raycraft at the title screen to Minecraft DS. It looks good. I will work on a panorama background for the menu.

Are you working on Beta 1.0 Release or 1.5?

IAmAPerson wrote:

@BonChoi I added ~20 more splash text phrases, and put them in a data string, so we don't have a ton of IF commands. I'm also gonna edit a couple of the textures so that they look more like the actual block. But I appreciate all your work!
@randomous the splash now includes "randomouscrap!"
@Morphtorok the splash now includes "Morphtorok!"
@anyone does anyone wanna make more music? I will add credits including anyone who has ever contributed to MCDS. @randomous how to you do the smooth credits? I looked at your code but couldn't make it out...

Don't be afraid to change the "BonChoi Rocks" Splash XD
I couldn't do "IAmAPerson Rocks!" Because it wouldn't fit the screen.

Also, please post that DATA to GRP porter.

Ok. I'll try to post it tonight or tomorrow. I'm at a church event right now. And also, I'm working on the release 1.0

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:

randomous

@IAmAPerson Thank you! I'm sure there's a better way to do the smooth scrolling credits, but here's what I did:

I started out by printing the credits to the screen with GPUTCHR instead of the usual PNLSTR you'd normally use. In order to get it to scroll, I stored all the lines of credits as a separate string in an array of strings. Then, I would print out each line based on an offset that was continuously increased to pull the credits upwards. I would only print the lines that were currently visible. The problem with that was that trying to print out all those characters to the screen using GPUTCHR took quite a long time. That's probably where the code gets confusing: instead of printing out all the characters, I only print out the line of credits that's on the very bottom, then use GCOPY to copy the entire screen and pull it up one pixel. This way, I only have to print one line of text instead of 18, and GCOPY is a quick function.

If you need a more in-depth explanation, I can try to extract the function and make a sample "credits" program.

randomous

Please login or sign up to reply to this topic