ספרייט
אובייקט משחק המיוצג כתמונה על המסך בקואורדינטות ספציפיות. ספרייטים מאפשרים גם הפעלת אנימציה, אירועים ותנועה.
מופיע בלשונית: ספרייטים
שם הספרייט
ניתן להתייחס אל הספרייט באמצעות שמו לאורך כל המשחק.
מופיע בלשונית: ספרייטים
ערך ה- X של הספרייט
תכונה של הספרייט. המיקום ההתחלתי של הספרייט בציר ה- x.
מופיע בלשונית: ספרייטים
ערך ה- Y של הספרייט
תכונה של הספרייט. המיקום ההתחלתי של הספרייט בציר ה- y.
מופיע בלשונית: ספרייטים
סיבוב
תכונה של הספרייט. שינוי הסיבוב של הספרייט משנה את אופן "ההצבעה" של הספרייט על ידי סיבובו סביב נקודת המרכז שלו.
מופיע בלשונית: ספרייטים
לא ניתן להזזה
תכונה של הספרייט. אפשרות זו חלה כששני ספרייטים מתנגשים. סמנו אפשרות זו כאשר הספרייט לא אמור לזוז במהלך ההתנגשות עם ספרייט אחר. אם הספרייט ניתן להזזה, התנגשות עם ספרייט אחר יכולה לדחוף אותו.
מופיע בלשונית: ספרייטים
מאפשר כוח משיכה
תכונה של הספרייט. מגדיר אם הספרייט מושפע מכוח המשיכה (מסומן) או לא (לא מסומן). האופציה הזו רלוונטית כאשר יש כוח משיכה במשחק. אם למשחק יש כוח משיכה והתכונה הזו מסומנת - כשמריצים את המשחק הספרייט יפול עד שיגיע אל משטח כלשהו (גבולות העולם, לבנים או ספרייט אחר). אם התכונה לא מסומנת, הספרייט לא יזוז כשמריצים את המשחק.
מופיע בלשונית: ספרייטים
התנגשות גבולות עולם
תכונה של הספרייט. מגדיר אם הספרייט מתנגש עם גבולות העולם (מסומן) או אם הוא יכול לנוע מעבר לגבולות (לא מסומן).
מופיע בלשונית: ספרייטים
הצגת הספרייט
תכונה של הספרייט. מציג או מסתיר את הספרייט על מסך המשחק.
מופיע בלשונית: ספרייטים
ווידג׳ט
אובייקט של המשחק שמאפשר להציג מידע ולתקשר עם השחקן.
מופיע בלשונית: וייג׳טים
שם הווידג׳ט
ניתן להתייחס אל הווידג׳ט באמצעות שמו לאורך כל המשחק.
מופיע בלשונית: וייג׳טים
הצגת הווידג׳ט
מציג או מסתיר את הווידג׳ט על מסך המשחק.
מופיע בלשונית: וייג׳טים
צלילים
אובייקט משחק המייצג צליל. ניתן להשמיע את הצליל על ידי שימוש במתודה play() של האובייקט.
מופיע בלשונית: וייג׳טים
שם הצליל
ניתן להתייחס אל הצליל באמצעות שמו לאורך כל המשחק.
מופיע בלשונית: וייג׳טים
משחק (הגדרות)
אובייקט המייצג את המשחק בכללותו. התכונות של אובייקט המשחק כוללות את הרוחב והגובה של עולם המשחק, אחרי איזה ספרייט המצלמת עוקבת, באיזו מערכת פיזיקה להשתמש, וכוח המשיכה בעולם המשחק.
מופיע בלשונית: הגדרות
רוחב העולם
מגדיר את רוחב העולם. החלק הגלוי של עולם הוא 600 על 400.
מופיע בלשונית: הגדרות
גובה העולם
מגדיר את גובה העולם. החלק הגלוי של עולם הוא 600 על 400.
מופיע בלשונית: הגדרות
כוח משיכה
מגדיר את רמת כוח המשיכה במשחק. אפס פירושו שאין כוח משיכה והספרייטים לא נופלים.
מופיע בלשונית: הגדרות
עקוב אחרי
מגדיר אחרי איזה ספרייט לעקוב. זה שימושי אם עולם המשחק גדול מ- 600 על 400. כאשר ספרייט היעד זז חלון המשחק יזוז כדי לעקוב אחרי הספרייט.
מופיע בלשונית: הגדרות
פיזיקה
בבניית משחקים, הפיזיקה מתייחסת למערכת הגורמת לאובייקטים של המשחק להתנהג כמו חפצים בעולם האמיתי. לדוגמה, מערכת הפיזיקה היא זו שעוזרת לספרייט לעצור אם הוא נתקל באובייקט ״מוצק״ כמו לבנה או ספרייט שלא ניתן להזזה. דוגמה נוספת, בחלק מהמשחקים מערכת הפיזיקה כוללת גם כוח משיכה שגורם לחפצים ליפול אוטומטית לכיוון החלק התחתון של המסך אלא אם כן משהו עוצר אותם. בבניית המשחקים של CodeMonkey יש שתי מערכות פיזיקה אפשריות, ARCADE ו- P2. קל יותר להשתמש ב- ARCADE וזו צריכה להיות הבחירה ברוב המשחקים. P2 מאפשר הדמיות יותר מציאותיות ומספק שליטה רבה יותר על המהירות וסיבוב הספרייטים.
מופיע בלשונית: הגדרות
לבנים (Tilemap)
אובייקט משחק המורכב מלבנים מרובעים בודדים. ניתן להשתמש בלבנים כדי "לצייר" את עולם המשחק. הם תופסים מקום ועוצרים מהספרייטים לעבור דרכם.
קואורדינטות x ו- y
לעולם יש רוחב (המיוצג על ידי קואורדינטות בציר ה- x) וגובה (מיוצג על ידי קואורדינטות בציר ה- y). לכל ספרייט בעולם יש קואורדינטות x ו- y המגדירות את מיקומו. הקואורדינטות בפינה השמאלית העליונה של עולם המשחק הן x = 0, y = 0. ככל שזזים ימינה, הערך של x הולך וגדל; ככל שיורדים למטה, הערך של y הולך וגדל. קואורדינטות ה- x וה- y מוצגות בפינה השמאלית העליונה ומשתנות כאשר מזיזים את העכבר.
ווידג׳ט מונה (Counter)
ווידג׳ט מונה (Counter) משמש לספירה וניתן להציג אותו במשחק.
מופיע בלשונית: וייג׳טים
ווידג׳ט טקסט (Text)
ווידג׳ט טקסט (Text) משמש להצגת תוויות או טקסטים על מסך המשחק.
מופיע בלשונית: וייג׳טים
ווידג׳ט שעון עצר (Timer)
ווידג׳ט שעון עצר (Timer) משמש למדידת זמן במשחק. הוא סופר אחורה את השניות עד שמגיע לאפס.
מופיע בלשונית: וייג׳טים
On End
ווידג׳ט שעון (Clock)
ווידג׳ט שעון (Clock) משמש להצגת הזמן שחלף. הוא סופר את השניות שחלפו החל מאפס.
מופיע בלשונית: וייג׳טים
ווידג׳ט הכפתור (Button)
ווידג׳ט כפתור (Button) משמש ליצירת ממשק פשוט במשחק.
מופיע בלשונית: וייג׳טים
On Down
This block is called repeatedly when the user clicks on the button for as long as the mouse button is held down.
מופיע בלשונית: וייג׳טים
button.On Click
This block is called just once when the user clicks on the button, at the time when the mouse button is released.
מופיע בלשונית: וייג׳טים
ווידג׳ט דיאלוג (Dialog)
ווידג׳יט דיאלוג (Dialog) משמש להצגת הודעה לשחקן. ההודעה היא מחרוזת.
מופיע בלשונית: וייג׳טים
On Confirm
This block is called when the user presses the check button on the dialog widget.
מופיע בלשונית: וייג׳טים
On Run
This block exists in each sprite and widget and cannot be deleted. When the player clicks on the Run button (to play the game), the blocks attached to the On Run block are executed.
Step
Makes the sprite try to move. The sprite's movement can be blocked if there are tiles or other sprites in the way. The value defines the number of pixels the sprite will move. Positive values tell the sprite to move to the right, negative values mean move to the left.
מופיע בלשונית: תנועה
Jump
Makes the sprite jump. The sprite will jump to a certain height (based on the gravity of the game).
מופיע בלשונית: תנועה
Get X
Get Y
Set X
Sets the sprite’s x position based on the value in the block. The sprite is placed at the new position.
מופיע בלשונית: תנועה
Set Y
Sets the sprite’s y position based on the value in the block. The sprite is placed at the new position.
מופיע בלשונית: תנועה
Get Rotation
Set Rotation
Rotates the sprite based on the value (given in degrees) in the block. Positive values rotate the sprite clockwise, negative values rotate counterclockwise.
מופיע בלשונית: תנועה
Set Speed
Sets the speed of the sprite. This block changes the speed of the sprite in multiples of its default speed (the default is 1). The block Set Speed doesn't move the sprite itself. Instead it affects how fast or slow the sprite moves when the block Step is called.
מופיע בלשונית: תנועה
Set Allow Gravity
Sets the allow gravity to true. When the block is called, the sprite will be affected by gravity.
מופיע בלשונית: תנועה
Thrust
Applies force that pushes the sprite towards the top of the screen. The number is the amount of force. If the game world includes gravity, this number must be large enough to overcome gravity or the sprite will not move.
מופיע בלשונית: תנועה
Rotate Left
Rotates the sprite to the left. The number is the speed with which the sprite starts rotating. The sprite slows down automatically so it will not spin forever.
מופיע בלשונית: תנועה
Rotate Right
Rotates the sprite to the right. The number is the speed with which the sprite starts rotating. The sprite slows down automatically so it will not spin forever.
מופיע בלשונית: תנועה
Get Velocity X
Get Velocity Y
On Key
The block is called each time a keyboard key is pressed. If the key that was pressed matches the character in this block, something can happen. You can choose the value in the dropdown. This block can be used to control elements of the game using the keyboard.
מופיע בלשונית: אירועים
On Collide
The block is called each time two sprites collides: the sprite where the block resides and the sprite chosen in the dropdown.
מופיע בלשונית: אירועים
On Collide With World Bounds
The block is called each time the sprite collides with one of the world bounds. When physics is ARCADE, Choose the edge of the world bounds from the dropdown so that something will happen in the collision event. If the physics system is P2 there is no way to tell which edge the collision was.
מופיע בלשונית: אירועים
On Swipe
The block is called each time the user swipes on their touch screen. If the the direction of the swipe matches the character in this block, something can happen. You can choose the value in the dropdown. This block can be used to control elements of the game by swiping the screen.
מופיע בלשונית: אירועים
On Click
On Game Tap
The block is called whenever the user clicks anywhere in the game world. There should be just one On Game Tap block in the game.
מופיע בלשונית: אירועים
On Collide With Tilemap
On Update
The block is called every time the game screen redraws, usually 30 to 60 times per second. The On Update block can be used to control the sprite's behavior.
מופיע בלשונית: אירועים
Show
Hide
Hides the sprite or the widget. Unlike the Destroy block, the object is not removed from the game world and can be made to reappear again by calling the Show block.
מופיע בלשונית: תצוגה
Destroy
Enable
Disable
Disable the sprite by removing it from the game. Unlike a hidden sprite (using the Hide block), other sprites will not be able to collide with a disabled sprite. Unlike a destroyed sprite (using the Destroy block), a disabled sprite can be brought back to the game by using the Enable block.
מופיע בלשונית: תצוגה
Get Scale
Set Scale
Sets the scale of the sprite. This block changes the scale of the sprite in multiples of its default size.
מופיע בלשונית: תצוגה
Set counter
Set text
A block of the Text and Dialog widgets. Sets the text to display in these widgets.
מופיע בלשונית: וייג׳טים
Set timer
Start clock
Get value
Get seconds
A block of the Clock widget. Returns the number of seconds that have passed since the clock started running.
מופיע בלשונית: וייג׳טים
Play Sound
Reset Game
Pause Game
Unpause Game
Get Game Time
Shows the time elapsed in milliseconds (thousandths of a second).
מופיע בלשונית: Game and Sounds
Set Background To
לולאה (loop)
Repeat
if
פקודות if משמשות לקבלת החלטות. אם התנאי הוא אמת (true, yes), אז הקוד בתוך פקודת ה- if מבוצע.
מופיע בלשונית: בקרה
If Else
If Else blocks are used for decision making.If the condition is true (yes), then the code inside the if block is executed. If the condition in the if block is false (no), then the code inside the else block is executed.
מופיע בלשונית: בקרה
not
הופך את התנאי: not true (yes) = false (no) (לא אמת = שקר); not false (no) = true (yes) (לא שקר = אמת).
מופיע בלשונית: Logic and Data
and
מחזיר אמת (true, yes) כאשר שני התנאים הינם אמת ושקר (false, no) אחרת.
מופיע בלשונית: Logic and Data
or
מחזיר אמת (true, yes) כאשר לפחות אחד מהתנאים הינו אמת ושקר (false, no) אחרת.
מופיע בלשונית: Logic and Data
Comparison ==
Compares the values on both of its sides. The result is true (yes) when both values are exactly the same and false (no) otherwise.
מופיע בלשונית: Logic and Data
Comparison >
Compares the values on both of its sides. The result is true (yes) when the value on its left is greater than the value on its right. Change the dropdown in the = block to >.
מופיע בלשונית: Logic and Data
Comparison <
Compares the values on both of its sides. The result is true (yes) when the value on its left is less than the value on its right. Change the dropdown in the = block to <.
מופיע בלשונית: Logic and Data
Random
Returns a random number in between the range of the minimum and maximum numbers provided. Each call to this block can return a different number.
מופיע בלשונית: Logic and Data
Create variable
Creates a variable. A variable stores a value that can be used and changed.
מופיע בלשונית: Variables
set variable to
change variable by
Increases or decreases the value of the variable by the number specified in the block.
מופיע בלשונית: Variables
פונקציה
פונקציה נותנת שם לסט הוראות. לפונקציה יכולות להיות כמה פרמטרים הדרושים, כל אחד מהם מופרד באמצעות פסיק. לאחר הגדרת הפונקציה ניתן להשתמש בה פעמים רבות בקוד.
מופיע בלשונית: Object's Functions
Function with return value
AI מודל
ניתן להתייחס למודלים כעל תוכניות שלומדות מנתונים. הלמידה נעשית בתהליך האימון. המודלים מנתחים נתונים ומבצעים תחזיות על סמך זה. כאשר אנו מאמנים את המודל, אנו מסווגים ומתייגים את הנתונים. יש לנו שני מודלים: מודל זיהוי תמונה ומודל זיהוי פוזה. מודל זיהוי תמונה מוצא דפוסים בתמונות המוקלטות. מודל זיהוי פוזה שומר את המרחקים בין נקודות מפתח.
מופיע בלשונית: AI
Webcam widget
The webcam widget is used with the AI model. After training a model, use the webcam when running the game to invoke the various classes defined in the model.
מופיע בלשונית: וייג׳טים
On Prediction
This block is called constantly and checks for the relevant class. When the prediction of the class is more than 95%, it will execute the blocks inside it.
מופיע בלשונית: AI
Predict