Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Shell 

Occasionally Useful Batch Concepts

This tutorial will cover:
  • FOR
  • Pointers
  • Arrays
  • Multi-Threading

I will try my best to answer any question and comment. If there are any mistakes in this post, please let me know.

FOR (Click to View)







Pointers (Click to View)







Arrays (Click to View)







Multi-Threading (Click to View)

Found this in my drafts somewhere, and so I decided to just finish it up and post it. Enjoy
Well done, Qwerty. I'm going to experiment with that multi-threading
(Aug 5, 2015 01:56 PM)ɩᴄᴀʀᴜȿ ᴌוᴠᴇѕ™ Wrote:  Well done, Qwerty. I'm going to experiment with that multi-threading

Yeah, same. That looks pretty interesting... thanks bro 🤝

Arrays aren't bad either. Very cool.
thank you this is very useful ^_^
(Aug 6, 2015 08:24 AM)xxv2012 Wrote:  thank you this is very useful ^_^

Thank you for your top-quality response.
(Aug 9, 2015 10:45 AM)WOLGA Wrote:  Thank you for your top-quality response.

Sometimes I wish I could rate comments. I'd give you +3 just for that haha. Also, can you explain your multi-threading? I've played with it but I ended up fork bombing myself lol
(Aug 9, 2015 07:45 PM)ɩᴄᴀʀᴜȿ ᴌוᴠᴇѕ™ Wrote:  Sometimes I wish I could rate comments. I'd give you +3 just for that haha. Also, can you explain your multi-threading? I've played with it but I ended up fork bombing myself lol

Of course! I don't blame you at all for having trouble understanding, I explained it poorly (if at all), and will have to update it soon.

Remember that 'game' (https://hackforums.net/showthread.php?tid=4885997) a while ago, where the 'enemy' would move, even if you do not press a key? Multi-threading was crucial then. This is because usually, the enemy will not move unless you move.

What the multi-threading did was essentially let 2 pieces of code run, with what I like to call the 'displayer' and the 'input source'.

The input source would run, and then all it would do is wait for a keypress, and then update a file. Nothing fancy there.

The displayer had two roles. For every few sub-seconds that passed, it would check if the file was updated, and then update the display/screen with the new movements. And then, regardless of whether the file was updated or not, it would move the enemy.

As White Light demonstrated, this technique could also be applied to chat rooms.

Of course, non-blocking inputs are not the only function of multithreading. It can be used to pseudo-parallel process code, as White Light used in his quicksort, which is now unfortunately expired 😭.

Did I explain it well?👍
Well done on this tutorial, others will find this very useful.
(Aug 10, 2015 05:42 PM)WOLGA Wrote:  Of course! I don't blame you at all for having trouble understanding, I explained it poorly (if at all), and will have to update it soon.

Remember that 'game' (https://hackforums.net/showthread.php?tid=4885997) a while ago, where the 'enemy' would move, even if you do not press a key? Multi-threading was crucial then. This is because usually, the enemy will not move unless you move.

What the multi-threading did was essentially let 2 pieces of code run, with what I like to call the 'displayer' and the 'input source'.

The input source would run, and then all it would do is wait for a keypress, and then update a file. Nothing fancy there.

The displayer had two roles. For every few sub-seconds that passed, it would check if the file was updated, and then update the display/screen with the new movements. And then, regardless of whether the file was updated or not, it would move the enemy.

As White Light demonstrated, this technique could also be applied to chat rooms.

Of course, non-blocking inputs are not the only function of multithreading. It can be used to pseudo-parallel process code, as White Light used in his quicksort, which is now unfortunately expired 😭.

Did I explain it well?👍

I'm curious what kind of games could be made with it. And yes you did lol


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by Robert RougeSep 24, 2026 10:02 AM 4 213 Sep 24, 2026 10:02 AM
Last Post: Anonynuk
[Shell] by fisica638Oct 30, 2019 11:05 AM 1 534 Oct 30, 2019 11:05 AM
Last Post: Hackoo
[Java] by preetiagarwalMay 22, 2019 06:15 AM 2 165 May 22, 2019 06:15 AM
Last Post: Nachfolger