If have login problems remove cookies and clear browser cache.



Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ether lession #0: Introduction and pseudocodes
08-29-2021, 07:56 AM (This post was last modified: 09-07-2021 12:48 AM by JoseskVolpe.)
Post: #1
Ether lession #0: Introduction and pseudocodes
Introduction
¡Welcome to your first programming logics lession!
Get ready for a lot of pain, headache and to get spanked by a lot of f****ing compiling errors or some... dangerous memory manipulation mistakes you will probably make
¡LOL look at your faces reading that! *laughing out loud and acute as a fox* LOL
Chill, i'm just kidding... Partly... Yeah, that's not a lie you'll crack your heads sometimes, but you'll get used to it.

Anyway, let's begin. You'll need Alchemy OS to do the next lessions, if you haven't, don't lost your time install it already
Download Alchemy OS: http://dedomil.net/forum/showthread.php?tid=5865
Alternative download (JAD): http://alchemy-os.sourceforge.net/get.php?type=jad
Alternative download URL 2 (Choose a version): https://sourceforge.net/projects/alchemy-os/files/

Talking to your phone

Developing a game involves a lot programming. You have to pass instructions to the machine to make anything on your game. You'll basically "talk" to your phone.
You'll say "phone, i need you to load this sprite and show it on the screen". But instead, you'll say it on a language it can interpret
A computer (any computer, including mobile phones) needs to be told in a very literal way exactly what it have to do, step by step. That's why you need to know programming logics.

Programming logics is awesome because after learnning how to communicate to a machine, how they interprete codes, you'll be able to learn ANY programming language without much difficulty
That's why FOR OUR LUCKY Alchemy OS exists, and i've choosen Ether language for that

¡Pseudocode! Example

Before beggining the next true first lession, when you'll finally crack your head, we'll begin with something that does not involves any coding at all

Let's do a setp-by-step procedure for something randomly.
In front of you, there's a desk. On the desk, there's a phone to the left and a unplugged charger to the right. Above the desk, there's a wall socket.
There's no battery in the phone. ¿How do you charge it step-by-step?

  1. Lift right arm
  2. Move right hand front
  3. Close right finger 1, 2, 3, 4, 5 //Hold charger
  4. Move right hand up
  5. Move right hand left
  6. Move right hand front //Insert charger on wall socket
  7. Open right finger 1, 2, 3, 4, 5 //Release charger
  8. Move right hand back
  9. Rotate right hand x_angle 90º
  10. Close right finger 3, 4, 5
  11. Move right hand down
  12. Close right finger 1, 2 //Hold charger's plug
  13. Lift left arm
  14. Move left hand front
  15. Close left finger 1, 2, 3, 4, 5 //Hold phone
  16. Move right hand left
  17. Rotate right hand y_angle -90º
  18. Move right hand left //Insert charger's plug into phone's USB
  19. Open right finger 1,2,3,4,5 //Release plug
  20. Open left finger 1,2,3,4,5 //Release phone

Yup. That's what a machine needs to receive to do something like that
¿Dumb, right?
Now imagine you could face some problems: The robot's hand could not move enough to reach the wall socket, and release the charger in the air, for example. Or it could just push the phone outside of the table and break it. Etc etc etc
To be sure everything is going fine, we make some tests in our code. We call that "Debug". We can ask the machine to communicate with us. "Hey phone, tell me if you could load this sprite and why". We'll see it on our very first code pretty soon

¡Now, let's begin the activity!

Activity

I'll let you be less way literal than the example to facilitate for you. But be as literal as possible
Choose any of these and write a step-by-step procedure to:
  • How to tie a shoelace
  • How to open a door
  • How to write a big "A"
  • How to turn on a phone that is on a desk in front of you
  • How to undress yourself (¿Because why not? x3 hehehehhe)
  • Free.... Imagine a situation and write a procedure for that

[size=xx-small]Signature[/size]
[URL=https://www.exophase.com/user/JoseskVolpe/][IMG]https://card.exophase.com/2/0/45687.png?1612237163[/IMG][/URL]

[align=justify][size=x-small][b]OwO ¿¿¿What is this??? *wags tail*
Take my beret plz 7w7 ~[/b][/size][/align]
Find all posts by this user
Quote this message in a reply
08-29-2021, 09:35 AM
Post: #2
RE: Ether lession #0: Introduction
1. lift right hand
2.move right hand front
3.lower @ bisecting angle 90¤// holding the lock
4.close the finger 1.2.3.4.5
5.turn the right hand bisecting angle 60¤(30¤) //opening the lock
6.release the finger 1.2.3.4.5



bam the door is opened.

how i want to net my enemies here in this forum.....***** the haters
Visit this user's website Find all posts by this user
Quote this message in a reply
08-29-2021, 09:45 AM (This post was last modified: 08-29-2021 09:46 AM by JoseskVolpe.)
Post: #3
RE: Ether lession #0: Introduction
¡Perfect, you passed! x3
I would just define to close and open right finger in step 4 and 6. I would give you compile error if i were demanding more. But as i'm not demading much to facilite, i'll pass that

[size=xx-small]Signature[/size]
[URL=https://www.exophase.com/user/JoseskVolpe/][IMG]https://card.exophase.com/2/0/45687.png?1612237163[/IMG][/URL]

[align=justify][size=x-small][b]OwO ¿¿¿What is this??? *wags tail*
Take my beret plz 7w7 ~[/b][/size][/align]
Find all posts by this user
Quote this message in a reply
08-29-2021, 09:53 AM
Post: #4
RE: Ether lession #0: Introduction
(08-29-2021 09:45 AM)JoseskVolpe Wrote:  ¡Perfect, you passed! x3
I would just define to close and open right finger in step 4 and 6. I would give you compile error if i were demanding more. But as i'm not demading much to facilite, i'll pass that

I am trying all my best to learn fast

how i want to net my enemies here in this forum.....***** the haters
Visit this user's website Find all posts by this user
Quote this message in a reply
08-30-2021, 03:16 PM
Post: #5
RE: Ether lession #0: Introduction
Nice Lesson!

btw, Write more tuts so that everyone can program!!!
Visit this user's website Find all posts by this user
Quote this message in a reply
08-30-2021, 03:35 PM
Post: #6
RE: Ether lession #0: Introduction
How to write a "A"

1)First draw a line like this "/"
2)than draw a dash beside it "-"
3)and than draw a line like this "\" //beside the dash and make sure that the lines are joined together and the dash is in between them
.
.
.
.
.
.

that how it is done?
Find all posts by this user
Quote this message in a reply
08-30-2021, 07:43 PM (This post was last modified: 08-30-2021 10:22 PM by JoseskVolpe.)
Post: #7
RE: Ether lession #0: Introduction
(08-30-2021 03:35 PM)star cash Wrote:  How to write a "A"

1)First draw a line like this "/"
2)than draw a dash beside it "-"
3)and than draw a line like this "\" //beside the dash and make sure that the lines are joined together and the dash is in between them

that how it is done?

That could be interpret as function
But there's no function that defines "draw a line" or "draw a dash"... You neither determined the position for them
I give you
Quote:Compilation error: No such function "draw a line" in step 1
Suggestion: Write, in your pseucode, where to lower pen, scribe (move pen) and where to lift pen. You don't need to create functions for that, but you can.
Fix your pseudocode

(08-30-2021 04:02 PM)CodeWithAadi Wrote:  How to undress yourself!..

1) First look what are you wearing, i.e. shirt or t-shirt.
2) if dress === t-shirt then give machine a command to remove as t-shirt and vice versa for shirt.
3) to remove a shirt just open the buttons and remove them from your shoulder, similarly it can be done for t-shirt, jeans, pant, underwears.
4) yay!, now you are undressed.

Please admit me if I am wrong anywhere!! LOL

lol cool x3

You didn't defined 'dress' variable, and the machine can't interpret sentences like "give machine a command to remove as t-shirt and vice versa for shirt.". You have to give these commands to the machines
You also didn't told the machine how to remove their t-shirt, pants and underwear...
I give your:
Quote:Compilation error: No such variable 'dress' in step 2'
Remember that the compiler stops at the first error and don't show the next ones

Suggestion: Tell the machine to save the results to the variable 'dress' on step 1. And give commands to the machine to remove the rest of the clothes. The machine can't understand that code...
you can do something like:

Quote:1 if dress=="t-shirt"
2 hold t-shirt
3 lift t-shirt
4 release t-shirt
5 end if

[size=xx-small]Signature[/size]
[URL=https://www.exophase.com/user/JoseskVolpe/][IMG]https://card.exophase.com/2/0/45687.png?1612237163[/IMG][/URL]

[align=justify][size=x-small][b]OwO ¿¿¿What is this??? *wags tail*
Take my beret plz 7w7 ~[/b][/size][/align]
Find all posts by this user
Quote this message in a reply
08-31-2021, 10:19 AM
Post: #8
RE: Ether lession #0: Introduction
(08-31-2021 09:27 AM)CodeWithAadi Wrote:  How to undress yourself!..

1) First look what are you wearing, i.e. shirt or t-shirt.
2) if dress === t-shirt then give machine a command to remove as t-shirt and vice versa for shirt.
3) to remove a shirt just open the buttons and remove them from your shoulder, similarly it can be done for t-shirt, jeans, pant, underwears.
4) yay!, now you are undressed.

Please admit me if I am wrong anywhere!! LOL

It looks like you are teaching a noob bro...
Check it its not look like a command

how i want to net my enemies here in this forum.....***** the haters
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)