top of page
PD-Logo-Day.png

Week 0 – CS50 Scratch Project: Rostam’s Quest

  • Writer: Parsa Dev
    Parsa Dev
  • 3 hours ago
  • 3 min read

For Week 0 of CS50, I designed and developed a Scratch game inspired by the Shahnameh and the narrative atmosphere of the Prince of Persia game series. The project draws specifically from the tragic story of Rostam and Sohrab, blending Persian epic literature with interactive gameplay. The player controls Rostam as he moves through a maze in search of Sohrab. Along the way, he must avoid Esfandiar, who acts as an enemy guard, while collecting symbolic clues inspired by Rostam’s bracelet. Each collected clue increases the player’s health, reinforcing the idea of identity and strength. The game concludes either with a vibrant turquoise victory backdrop representing renewal and hope, or with a dramatic red defeat screen featuring Ferdowsi and his timeless words.


The story of Rostam and Sohrab remains one of the most powerful episodes in Persian literature. It tells of a father and son who unknowingly face one another in battle, leading to a tragic realisation too late to undo. Ferdowsi captured both suffering and cultural revival in his verse:


سی سال رنج بردم در این سال سی

عجم زنده کردم بدین پارسی


“I endured much suffering during these thirty years;

I revived the Persians with this Persian language.”


From a technical perspective, the game incorporates core Scratch programming principles. I used multiple sprites, custom variables to manage health and coordinate tracking, keyboard-controlled motion, collision detection with conditionals, continuous updates through loops, broadcast messages to control win and lose states, and customised backdrops to create emotional transitions. The health system begins at 100, increases when collecting clues, and decreases upon contact with the enemy. Movement is structured around coordinate variables for precision and clarity. The project demonstrates abstraction, event handling, and structured logic in a creative yet disciplined manner.


This project also reflects a broader cultural perspective. The message “Make Iran Great Again” symbolises renewal, dignity, and cultural pride. Through revisiting classical literature and integrating it with modern digital creativity, I aimed to highlight how heritage and innovation can coexist. The revival of identity through language, art, and technology remains as relevant today as it was in Ferdowsi’s time.


هفته صفر – پروژه Scratch: جستجوی رستم


در هفته صفر دوره CS50، یک بازی در محیط Scratch طراحی و پیاده‌سازی کردم که الهام گرفته از شاهنامه و فضای روایی بازی «Prince of Persia» است. این پروژه به طور ویژه از داستان تراژیک رستم و سهراب الهام گرفته و تلاش می‌کند ادبیات حماسی ایرانی را با تجربه‌ای تعاملی ترکیب کند. در این بازی، بازیکن رستم را کنترل می‌کند تا درون یک هزارتو حرکت کرده و سهراب را بیابد. در مسیر، باید از اسفندیار به عنوان نگهبان دشمن دوری کند و نشانه‌هایی را جمع‌آوری نماید که الهام گرفته از بازوبند رستم هستند. با هر نشانه، میزان سلامتی افزایش می‌یابد. پایان بازی یا با تصویری فیروزه‌ای و پرانرژی که نماد نوسازی و امید است همراه می‌شود، یا با صحنه‌ای سرخ‌رنگ و جدی که تصویر فردوسی و سخن او را نشان می‌دهد.


داستان رستم و سهراب از تأثیرگذارترین بخش‌های شاهنامه است؛ روایت پدر و پسری که بی‌آنکه یکدیگر را بشناسند در میدان نبرد روبه‌رو می‌شوند و حقیقت تلخ در واپسین لحظه آشکار می‌گردد. فردوسی این رنج و احیای فرهنگی را چنین بیان می‌کند:


سی سال رنج بردم در این سال سی

عجم زنده کردم بدین پارسی


“I endured much suffering during these thirty years;

I revived the Persians with this Persian language.”


از نظر فنی، این بازی شامل استفاده از چندین Sprite، متغیرهای سفارشی برای مدیریت سلامتی و مختصات حرکتی، کنترل حرکت با صفحه‌کلید، تشخیص برخورد با استفاده از شرط‌ها، حلقه‌های تکرار برای به‌روزرسانی مداوم، پیام‌های Broadcast برای مدیریت وضعیت برد و باخت، و طراحی پس‌زمینه‌های اختصاصی است. سیستم سلامتی از عدد ۱۰۰ آغاز می‌شود، با جمع‌آوری نشانه‌ها افزایش می‌یابد و در برخورد با دشمن کاهش پیدا می‌کند. ساختار کدنویسی بر اساس اصول انتزاع، مدیریت رویداد و نظم منطقی طراحی شده است.


این پروژه همچنین بازتابی از نگاه فرهنگی گسترده‌تری است. پیام «Make Iran Great Again» نماد نوسازی، عزت و افتخار فرهنگی است. بازگشت به ادبیات کلاسیک و پیوند آن با خلاقیت دیجیتال نشان می‌دهد که میراث فرهنگی و نوآوری می‌توانند در کنار یکدیگر معنا پیدا کنند؛ همان‌گونه که فردوسی با زبان فارسی هویت را زنده نگاه داشت، امروز نیز می‌توان با فناوری آن را ادامه داد.

Recent Posts

See All

Comments


Commenting on this post isn't available anymore. Contact the site owner for more info.
bottom of page