Skip to content
Snippets Groups Projects
Commit 8b63bc87 authored by @dion-tsang's avatar @dion-tsang
Browse files

Lesson 04 - Character Design

parent 12c54225
No related branches found
No related tags found
No related merge requests found
Pipeline #497415 passed
# First Glance at Pygame
## Class Overview
**Lesson 3: Basic Game Mechanics**
**Objective**: Learn about game loops and event handling.
**Activities**:
Introduce concepts of game loops and user input.
Code a simple game loop in Pygame or Scratch.
**Interdisciplinary Links**: Mathematics (logic), Computer Science (programming basics).
**第 3 课:基本游戏机制
目标:了解游 ​​ 戏循环和事件处理。
活动:介绍游戏循环和用户输入的概念。
在 Pygame 或 Scratch 中编写一个简单的游戏循环。
跨学科链接:数学(逻辑)、计算机科学(编程基础)。**
## Create a Pygame window
```python
......@@ -63,6 +78,20 @@ Some high-performance games even target higher frame rates, like 120 FPS or more
**Using flip()**: The pygame.display.flip() function updates the display, making all the drawn elements visible at once. Without it, changes to the graphics might not appear on the screen until the next update, which can lead to flickering or incomplete rendering.
**Lesson 4: Designing Game Characters**
**Objective**: Create characters and sprites for the game.
**Activities**:
Discuss character design principles.
Create and animate a character sprite.
**Interdisciplinary Links**: Art (character design, animation).
**第 4 课:设计游戏角色
目标:为游戏创建角色和精灵。
活动:
讨论角色设计原则。
创建并制作角色精灵的动画。
跨学科链接:艺术(角色设计、动画)。**
## A basic running cycle
![alt text](runningDino-ezgif.com-video-to-gif-converter.gif)
......@@ -72,18 +101,3 @@ To achieve a nearly smooth running animation for a character, you typically want
**8 frames** can provide a simple running cycle, showing the character in different positions as they run.
**12 frames** or more will give a more fluid and detailed animation, capturing more nuances in the running motion.
For even smoother animations, you can use 15 to 24 frames, but keep in mind that this requires more artwork and can increase file size. The key is to balance the number of frames with performance and storage considerations in your game.
## Draw frames for animation in [Pixilart](https://www.pixilart.com/)
**Recommended Actions for Running Animation:**
To depict a running character effectively, consider these key actions for your frames:
**Starting Pose:** The character in a neutral position before starting to run.
**First Step:** One leg forward, arms in motion.
Mid-Stride: The character in the middle of a stride, with arms and legs extended.
**Second Step**: The opposite leg forward, with a different arm position.
**Full Stride:** The character fully extended, representing maximum reach.
**Landing Pose:** Character preparing to land with one leg down.
Recovery Pose: The character regaining balance before the next step.
**Repeat Cycle:** Return to the starting pose.
Using these poses will help create a smooth running cycle. You can also use onion skinning features in Pixilart to see the previous frames as you draw, which can help with consistency between frames.
......@@ -55,3 +55,82 @@ _"path_to_your_images"_ should be either an absolute path or a relative path to
**Relative Path**: This is relative to the location of your Python script (e.g., images/picture1.png if the images are in a folder named "images" within the same directory as your script).
Make sure the path correctly points to your image files for the program to load them successfully.
## Principles of Character Design
Silhouette: A strong silhouette makes a character easily recognizable. The shape should convey the character's personality or role.
Proportions: Different proportions (e.g., large head vs. small body) can suggest age or character traits. Exaggeration can enhance expressiveness.
Color Scheme: Use colors that reflect the character's personality. Bright colors can indicate playfulness, while darker tones may suggest mystery or danger.
Facial Expressions: The face should convey emotions clearly. Consider how facial features can change to express happiness, anger, surprise, etc.
Costume Design: Clothing can tell a lot about a character’s background, personality, and role. Consider textures and colors that match the character's traits.
Backstory: A well-defined backstory can influence design choices, giving depth to the character.
Consistency: Ensure that the character maintains consistent features across different poses and animations.
## Designing a Walking/Running Cycle
Key Frames: A typical walking cycle has four key poses:
Contact (one foot touches the ground)
Recoil (the body lowers slightly as the weight shifts)
Passing (one leg moves forward past the standing leg)
High Point (the body rises again)
For running, the key poses are similar but more exaggerated.
Frame Count:
Walking Cycle: Usually 8–12 frames.
Running Cycle: Usually 6–10 frames, as the movement is faster.
In-Betweens: Fill in between the key frames to create smooth transitions.
Motion: Consider how the character’s body moves as a whole. Arms and legs should have a counter-motion (e.g., when the right leg moves forward, the left arm does too).
Designing a Running Character Using Pixilart
Create a New Project:
Open Pixilart and start a new canvas (consider a size like 64x64 pixels for a small character).
Sketch the Character:
Use a pencil tool to sketch the basic shape of your character in a neutral pose.
Focus on silhouette and proportions.
Define Key Frames:
Draw the key frames for the running cycle based on the principles mentioned.
Start with the contact pose, then draw the recoil, passing, and high point poses.
Add Details:
Once you have the key frames, add details like facial features, clothing, and colors.
Ensure that the design is consistent across frames.
Create In-Betweens:
Draw the in-between frames to smooth out the motion.
Focus on making the transitions fluid.
Animate:
Use the animation feature in Pixilart to test your running cycle.
Adjust timing and spacing to ensure the motion feels natural.
Export Your Animation:
Once satisfied with the animation, export it as a GIF or PNG sequence.
[Animating a Walk Cycle in Inkscape Part 1](https://www.spriteland.com/tutorials/animating-a-walk-cycle-in-inkscape-part-1)
## Draw frames for animation in [Pixilart](https://www.pixilart.com/)
**Recommended Actions for Running Animation:**
To depict a running character effectively, consider these key actions for your frames:
**Starting Pose:** The character in a neutral position before starting to run.
**First Step:** One leg forward, arms in motion.
Mid-Stride: The character in the middle of a stride, with arms and legs extended.
**Second Step**: The opposite leg forward, with a different arm position.
**Full Stride:** The character fully extended, representing maximum reach.
**Landing Pose:** Character preparing to land with one leg down.
Recovery Pose: The character regaining balance before the next step.
**Repeat Cycle:** Return to the starting pose.
Using these poses will help create a smooth running cycle. You can also use onion skinning features in Pixilart to see the previous frames as you draw, which can help with consistency between frames.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment