Reply to thread
GBAtemp.net - The Independent Video Game Community
Search
Search titles only
By:
Search titles only
By:
Reply to thread
GBAtemp.net - The Independent Video Game Community
Home
Log in
Terms & Rules
Donate
Forums
New posts
Search forums
Groups
Public Events
New
New posts
New resources
New blog entries
New profile posts
New blog entry comments
New threadmarks
Latest activity
Cheats
Cheat Codes Add and Request group
The Legend of Zelda: Tears of the Kingdom cheat codes
Pokémon Legends: Arceus cheat codes
Xenoblade Chronicles 3 cheat codes
Fire Emblem Engage cheat codes
Request a cheat...
Tutorials
Nintendo Switch tutorials
Nintendo 3DS tutorials
Nintendo Wii U tutorials
Reviews
Overview
Official reviews
User reviews
Downloads
Latest reviews
Search resources
Blogs
New entries
New comments
Blog list
Search blogs
Chat
Top chatters
Search
Search titles only
By:
Search titles only
By:
Log in
Register
New posts
Search forums
Log in
Register
Home
Forums
PC, Console & Handheld Discussions
Nintendo DS
Petit Computer Thread
Menu
Install the app
Install
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Snailface" data-source="post: 4340881" data-attributes="member: 262855"><p>That was a very good first effort!</p><p></p><p>As you've asked, i've included some tips that may be of some benefit to you in the future.</p><p></p><p>little tips:</p><p>1. To add more periods to the "Loading" all you have to do is use a ; in between print commands to avoid having to redraw the whole thing.</p><p>2. Always use vsync 1 at the end of a loop if you are drawing stuff or checking button presses as in your case.</p><p>3. Only 1 Btrig() per loop is needed. Just assign it to a variable once per loop. Extra function calls will slow things down in more complex programs.</p><p></p><p>I've also condensed the separate 'beep' functions into a single function using some math trickery. That's not really necessary, just showing you a trick. Whenever you see repetition in a program, there's almost always a way to simplify it. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite48" alt=":)" title="smile :)" loading="lazy" data-shortname=":)" /></p><p>(on second thought I should have stored the button values into an array to avoid using pow() in the main loop, oh well <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite14" alt=":P" title="tongue :P" loading="lazy" data-shortname=":P" />)</p><p></p><p>Here's the source if you want to see the changes I've made. Once again, that was a really good first effort, much better than mine. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite48" alt=":)" title="smile :)" loading="lazy" data-shortname=":)" /></p><p><img src="http://gbatemp.net/uploads/gallery/album_65/gallery_262855_65_6139.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p></blockquote><p></p>
[QUOTE="Snailface, post: 4340881, member: 262855"] That was a very good first effort! As you've asked, i've included some tips that may be of some benefit to you in the future. little tips: 1. To add more periods to the "Loading" all you have to do is use a ; in between print commands to avoid having to redraw the whole thing. 2. Always use vsync 1 at the end of a loop if you are drawing stuff or checking button presses as in your case. 3. Only 1 Btrig() per loop is needed. Just assign it to a variable once per loop. Extra function calls will slow things down in more complex programs. I've also condensed the separate 'beep' functions into a single function using some math trickery. That's not really necessary, just showing you a trick. Whenever you see repetition in a program, there's almost always a way to simplify it. :) (on second thought I should have stored the button values into an array to avoid using pow() in the main loop, oh well :P) Here's the source if you want to see the changes I've made. Once again, that was a really good first effort, much better than mine. :) [img]http://gbatemp.net/uploads/gallery/album_65/gallery_262855_65_6139.png[/img] [/QUOTE]
Insert quotes…
Verification
Post reply
Home
Forums
PC, Console & Handheld Discussions
Nintendo DS
Petit Computer Thread
General chit-chat
Help
Users
Settings
Notifications
Miscellaneous
Inverse message direction
Display editor on top
Enable maximized mode
Display images as links
Hide bot messages
Hide statuses
Hide chatter list
Show messages from ignored users
Temporarily disable chat
Receive mention alerts
Sound notifications
Normal messages
Private messages
Whisper messages
Mention messages
Bot messages
Desktop notifications
Normal messages
Private messages
Whisper messages
Mention messages
Bot messages
Options
Options
View top chatters
No one is chatting at the moment.
@
SylverReZ
:
https://www.youtube.com/watch?v=5TRV2pcVcng
+1
Today at 5:26 AM
@
Psionic Roshambo
:
@SylverReZ
, that one was funny lol
+1
Today at 5:27 AM
@
ZeroT21
:
oh my, all this monologging
+1
Today at 5:32 AM
@
K3Nv2
:
https://m.imdb.com/title/tt32379128/
Pirates!
Today at 5:44 AM
@
K3Nv2
:
I wonder if they ever announced the rg35sp winner or just keeping it quiet now
Today at 5:55 AM
@
K3Nv2
:
Guess Amazon is ditching Alexa for Rufus lol
Today at 6:09 AM
@
BigOnYa
:
There was no winner, we are all losers
Today at 6:42 AM
@
BigOnYa
:
Jk, I think mods won it and they are gonna share it, two weeks each till xmas, then do another raffle for it.
Today at 6:47 AM
@
K3Nv2
:
I like how Anbernics us store is just $20 in shipping
Today at 6:49 AM
@
BigOnYa
:
Is that alot? You'd think shipping from China be cheaper, but alot longer wait
Today at 6:52 AM
@
BigOnYa
:
You want one now, don't you
Today at 7:18 AM
@
DinohScene
:
I'd like another 8 TB HDD yes thank you very much
+4
Today at 7:23 AM
@
SylverReZ
:
@DinohScene
, That would infact complete his HDD collection.
Today at 8:13 AM
@
SylverReZ
:
https://www.youtube.com/watch?v=ty62YzGryU4
Today at 8:14 AM
@
K3Nv2
:
https://youtube.com/shorts/JBIuVUQNT7I?si=99nG75iU6tbXwcmI
+1
Today at 8:26 AM
@
SylverReZ
:
@K3Nv2
, Lol
Today at 8:31 AM
@
K3Nv2
:
Found a bag of unpopped pop corn expired March 23 eating it anyway
+1
Today at 8:42 AM
@
K3Nv2
:
https://www.etonline.com/daniel-rad...-reboot-series-offers-advice-exclusive-227504
Twitters about to go on a mob spree
Today at 9:37 AM
@
SylverReZ
:
https://www.youtube.com/watch?v=W4eqTkD6JQw
Today at 10:49 AM
@
Psionic Roshambo
:
https://youtu.be/nRspgWaF_K0?si=SKZ48aRDQyB7vpRH
Today at 12:35 PM
@
Psionic Roshambo
:
https://youtu.be/_W1AH1kw6XY?si=POs44W8xfz_K-Q8K
Today at 2:08 PM
@
Psionic Roshambo
:
https://www.youtube.com/watch?v=mAk6McnZ2nU
57 minutes ago
@
cearp
:
good morning
+1
48 minutes ago
@
Psionic Roshambo
:
Good morning!!!
47 minutes ago
@
Psionic Roshambo
:
Ughhhh so hard to find, "Marmalade Boy" lol my girlfriend wants this weird movie.... I wonder if I can buy it on Amazon
43 minutes ago
Submit
@
Psionic Roshambo
:
Ughhhh so hard to find, "Marmalade Boy" lol my girlfriend wants this weird movie.... I wonder if...
43 minutes ago
Chat
0