Making a Game with Java with No Experience
Summary
TLDRيحكي النص عن مغامرة博主 في تعلم لغة برمجة جافا وتطبيقها في إنشاء لعبة رول العبيدي (RPG) من الصفر. بدأ من تجربته المبكرة مع الكتابة البرمجية وفشله في ذلك، وتطور إلى المحاولة النهائية لبناء لعبة جافا باستخدام IDE مثل Eclipse. يتضمن النص تعليمات لبناء برمجة بسيطة، واستخدام جافا لإنشاء إطارات ورسم مخططات، ودمج الصوت والرسومات. وأظهر ال博主atisfaction بلغة جافا وتشجيع المشاهدة على سلسلة الدروس لتعلمها.
Takeaways
- 😀 Java هي لغة برمجة جذابة وملهمة، تم إنشاؤها لتكون قابلة لإعادة التشغيل في أي نظام تشغيل.
- 🕹️ الألعاب الشهيرة مثل RuneScape وMinecraft تم إنشاؤها باستخدام Java.
- 📚 في سن الستة عشرة، حاولت تعلم Java من كتاب يسمى 'برمجة ألعاب الفيديو لشرير الخبيث' لكن فشلت في ذلك.
- 📱 بعد مرور خمس عشر عام، حاول تعلم Java من خلال دورة على الهاتف لفهم صيغتها.
- 💻 استخدمت IDE باسم Eclipse لبرمجة Java، وهو أكثر البرمجيات شعبية مقارنة بIDE أخرى مثل NetBeans.
- 👋 لقد قمت بإنشاء أول برنامج بلغة Java، وهو بسيط وينبغي أن يطبع 'Hello World'.
- 🎮 أردت إنشاء لعبة角色扮演 (RPG) قديمة، مشابهة لألعاب NES مثل 'Dragon Quest'.
- 🖼️ استخدمت Java لرسم نافذة (frame) للعبة، وأنا قادر على إنشاء لعبة مبنية تمامًا على Java التقليدية.
- 👾 أنشأت فئات جديدة للعبة مثل 'entity' و 'player' لإعادة استخدام الشفرة في الشخصيات الغير الحية (NPCs).
- 🛠️ تعلمت كيفية إنشاء خريطة المربعات (tile map) ونظام الكاميرا لتحسين أداء اللعبة.
- 🎨 استخدمت أدوات الرسم البياني (Pixel Art) لتحسين لون لوحة اللعب وتصميم الشخصيات.
- 🔊 أضفت الصوتيات والموسيقى للعبة، وقمت بإنشاء نظام توقف (pausing state) لعرض الحالة والمخزون.
- 🌍 أضفت خريطة العالم ونظام الانتقال بين المدن والعالم الخارجي للعبة.
Q & A
ما هي اللغة البرمجة التي تجذب الشخص الذي يتحدث في النص؟
-لغة برمجة جافا (Java) هي التي تجذب الشخص الذي يتحدث في النص.
لماذا يرى جافا كلغة برمجة لذيذة الصوت؟
-الشخص يرى جافا كلغة برمجة لذيذة الصوت لأنها كانت اللغة التي تم بناء الألعاب الشهيرة مثل رون سكيب (RuneScape) وماين كرافت (Minecraft) بها.
ما هي الميزة الرئيسية للغة برمجة جافا التي تميزها عن اللغات الأخرى؟
-الميزة الرئيسية للغة برمجة جافا هي أنها تتيح للمبرمجين الكتابة مرة وتشغيل الكود في أي مكان (write once, run everywhere)، مما يعني أن الكود جافا يعمل تلقائيًا على أنظمة تشغيل أخرى بدون إعادة ترجمة.
متى تم إطلاق لغة برمجة جافا للمرة الأولى؟
-تم إطلاق لغة برمجة جافا لأول مرة في عام 1995.
لماذا توقف الشخص عن المحاولة في تعلم جافا عندما كان يبلغ من العمر 12 عامًا؟
-الشخص توقف عن المحاولة في تعلم جافا عندما كان يبلغ من العمر 12 عامًا لأنه أصبح مزعجًا بعد قراءته للجزء الأول من كتاب "برمجة الألعاب الإلكترونية للشرير الخبيث" ومحاولة نسخ الكود.
ما هو IDE الذي تم استخدامه في النص لبرمجة بلغة جافا؟
-IDE الذي تم استخدامه في النص لبرمجة بلغة جافا هو إكليس (Eclipse).
ما هي الخطوات التي اتبعها الشخص لإنشاء برنامج 'hello world' بلغة جافا؟
-الخطوات التي اتبعها الشخص لإنشاء برنامج 'hello world' بلغة جافا هي إنشاء حزمة (package) وتسميتها 'Main'، ثم إنشاء فئة (class) وتسميتها 'main'، وأخيرًا إدخال الكود 'System.out.println("hello world")'.
ماذا يقصد الشخص بـ 'RPG' في النص؟
-RPG في النص يشير إلى لعبة تقمص الأدوار (Role-Playing Game)، وهي نوع من الألعاب الإلكترونية التي تتضمن تفاعل اللاعب مع عالم خيالي وتتضمن تطور الشخصية والتفاعل مع الشخصيات غير اللاعبة.
لماذا يرى الشخص أن تصميم لعبة RPG بدون محركات لعبة هو ممتع ومثير؟
-الشخص يرى تصميم لعبة RPG بدون محركات لعبة هو ممتع ومثير لأنه يشعر بالإنجاز والرضا عندما يبني شيئًا من الصفر ويكون على علم أنه هو الذي قام ببناء اللعبة بنفسه.
ما هي المصادر التي ينصح بها الشخص لتعلم جافا؟
-الشخص ينصح بسلسلة الدروس التي قام بها ري نوف (rynow) وبرنامج تعليمي برينتل (Brilliant) لتعلم البرمجة.
Outlines
🤖 Java Game Development Journey
The script begins with the narrator's fascination with Java, a programming language they find both delicious-sounding and historically significant in game development, citing RuneScape and Minecraft as examples. They recount an early attempt to learn Java from a library book, 'Programming Video Games for the Evil Genius,' which ended in frustration. Fast forward 15 years, the narrator embarks on a quest to redeem themselves by creating a game using Java. They start by taking a refresher course on Java syntax via a mobile app, then move on to using Eclipse IDE, a popular choice for Java development. The first project is a classic 'Hello World' program, followed by the ambitious goal of creating an old-school RPG inspired by NES games like Dragon Quest. The script details the initial steps in game development, including setting up a JFrame for the game window, creating entity and player classes, and implementing basic sprite movement.
🎨 Crafting an RPG with Java: Art and Sound
The second paragraph delves into the artistic and auditory aspects of game development. The narrator discusses the challenges of creating vector art for the game, eventually opting for pixel art to capture the quirky charm of classic RPGs. They mention using a pixel art software that doubles as a level editor by exporting tiles as text files. Moving on to sound, the narrator experiments with LabTur, generating various sound effects and crafting music with Beatbox, a new experience for them. They also introduce a pausing state system for inventory and stats viewing, and create a rudimentary world map to test room transitions between towns and the overworld. The addition of NPCs using the previously established entity system is highlighted, along with a dialogue system that allows characters to interact. The paragraph concludes with the narrator's intention to save combat mechanics for a future video, reflecting on the rewarding experience of building a game from scratch without a game engine and expressing their enjoyment of working with Java. They recommend RN's tutorial series for those interested in Java and promote Brilliant.org for interactive learning in various fields, including programming.
Mindmap
Keywords
💡Java
💡RuneScape وMinecraft
💡برمجة الألعاب
💡IDE (بيئة تطوير متكاملة)
💡Hello World
💡RPG (Rôle-Playing Game)
💡jframe
💡Sprite
💡Tile Map
💡Pixel Art
💡Soundtrack
Highlights
Java's 'write once, run anywhere' capability is highlighted as a key feature.
The speaker's childhood interest in Java was sparked by video games.
A past attempt to learn Java at age 12 was abandoned due to frustration.
A Java course on a mobile device was taken to refresh the speaker's knowledge.
Eclipse IDE was chosen for Java development over NetBeans.
Creating a 'Hello World' program in Java was the first step in the project.
The ambition to create an RPG game was inspired by classic NES titles.
Java's built-in JFrame was used to create a game window.
The creation of entity and player classes for code reusability is discussed.
A tutorial series by rynow was found to be very helpful for understanding Java game development.
A tile map system was created using a text file and array.
A camera system was implemented to move the tileset instead of the player.
Artwork for the game was updated to a pixel art style inspired by NES games.
Pixel art was used for game assets, and a pixel art software feature was used for level editing.
Sound effects and music were created using LabTur and Beatbox.
A pausing state system was created for inventory and stats viewing.
A world map was designed and a room transition system was implemented.
NPCs were added to the game using the entity system for ease.
A dialogue system was implemented for NPC interactions.
The speaker finds creating games without a game engine rewarding despite the challenges.
The speaker highly recommends RN's tutorial series for those interested in Java game development.
Brilliant.org is promoted as a learning platform for programming and other subjects.
The speaker's website, gus.fun, is mentioned for more information and content.
Transcripts
Java has always fascinated me not only
is it the most delicious sounding
programming language I've ever heard but
some of my favorite childhood games like
RuneScape and Minecraft were made using
it it was created to let programmers
write once and run everywhere meaning
Java code automatically works on other
operating systems without having to
recompile which is truly a beautiful
thing and ever since it's release in
1995 it has remained one of the most
popular programming languages needless
to say I've been anxious for a long time
to try it out and see what I can do with
it now I must confess when I was 12
before I even made video games I went to
my local library and picked up this book
called programming video games for the
Evil Genius a pretty cheesy name for a
book that was just about learning Java
of course after skim reading a chapter
or two and trying to copy the code I
quickly became frustrated and completely
gave up so fast forwarding almost 15
years later I think it's time for me to
redeem myself and see if I can actually
make a game from scratch using Java not
scratch I mean Java you get you get what
I'm saying so starting off on my Java
Quest I did something that I haven't
done in a while and that was actually
taking a little Java course on my phone
and by take a course I mean I just kind
of did a couple levels to get a feel for
what the syntax was like and honestly if
you're a beginner or new to programming
languages uh I feel like this is just
like a good thing to do it just kind of
gives you a general idea before you just
start jumping into it anywh who after I
was done getting familiar with the
basics I downloaded Eclipse which is an
IDE and just in case you don't know what
that is it's basically just software
that you use to code in but this one's
specifically for Java and I seem to
remember using an IDE called net beans
as a kid but Eclipse seems a lot more
popular now so I just figured I would go
with the crowd after that I set off to
create a simple hello world program
which was pretty straightforward
basically you just create a package and
I named it Maine and then you create a
class and I also called it main I know
it's confusing just trust me on it after
that I slapped in the classic system out
print line hello world and there you go
your first Java program I did it so
after getting my feet wet I knew I was
ready to start working on my real
project instead of CR a little mini game
like I normally do for these kinds of
videos I want to do something I've been
dreaming about for a while now and
that's making an RPG and I'm not talking
about rocket launchers here I mean like
an old grindy RPG that you would play on
the NES games like Dragon Quest and
Earthbound Beginnings I don't know why
but I find these games simplistic art
style super strange characters and
repetitive combat to be so Charming they
always feel so empty yet so full of
character at the same time so now we
know what direction the game's going to
take it's time for us to do something
basic and that's just draw a window and
no I'm not talking about getting out a
box of crayons and drawing a house with
a window I'm talking about that frame
that you see on your desktop when you
play a game luckily for us Java has its
own built-in container class called
jframe meaning our game can be built
purely with Vanilla Java so I set up
jframe and made some of the parameters
any who after doing all that I was able
to successfully draw a window and as you
can tell I was very excited next I
created two new classes entity and
player I'm planning on making NPCs later
on so creating an entity class allows me
just to reuse that code for the player
and NPC for example like drawing their
Sprites or checking for collisions and
speaking of Sprites I was able to load
and draw the Sticky's image make a move
around the screen so yay I should also
point out that I found this wonderful
tutorial series by rynow and it was
beyond helpful he does a really good job
explaining how all this works so if you
want to know more about the nitty-gritty
details and all the code definitely
check it out next I want to dive into
creating a tile map system this is
something that has always been
intimidating for me for some reason it
turns out to be super easy essentially
all you have to do is create a text file
full of numbers the numbers represent
different types of tiles like zero is
water and like one is grass and two is
sand then all you need to do is load the
data into an array and then slap it into
a for Loop boom you got yourself a tile
map and that's great and all but how do
you make a camera system so that the
player like can move around a larger
tile ma area well the trick is instead
of moving the player you move the tile
set after that I made an if statement to
see what tiles were on screen that way I
could save performance by only rendering
what the player could see and last I
created collisions so you couldn't just
like walk on the water so there you go
now as you can tell the artwork is
looking a little rough around the edges
and since 50% of RPGs is just artwork I
felt like we probably should update this
now my original idea was to create a
vector art style inspired by Byron be's
Pokemon world map illustrations I've
been a big fan of his work for a while
and thought an RPG could look Super
Fresh in this style though I quickly
realized that higher resolution Vector
artwork wasn't going to scale well down
into pixels so this led me to kind of
just create this same style but using
pixel art instead I thought the results
of this were kind of cool but I
personally felt like this missed that
quirky charm that I wanted to emulate in
my favorite NES RPGs so after a slightly
iterative process and the use of the NES
color palette I ended up with this my
animal inspired RPG so with that done I
got to work replacing and adding in all
the new tiles and artwork I also found
that pixel edit the pixel art software I
use has a feature that lets you export
tiles out as a text file essentially
turning my art software into my level
editor which was pretty sweet after this
I felt like the sound aspect of the game
needed to be addressed so I jumped into
lab tur I generated a couple of
different sounds and then added them to
the game I especially love this door
sound when you enter a house it just
It's oddly satisfying for music I made
it myself using beatbox which I haven't
used before I was surprised how easy it
was to pick up but uh my song's a little
clunky so let me know what you think
after that I created a pausing State
system so you can eventually look at
your inventory and view your stats and I
also Drew this text onto the screen so
that text is actually a font I also know
that world maps are a pretty big deal in
these types of RPGs so I jumped back
into pixel edit and made this kind of
smaller world map just as a test run to
see how I liked it this also means I had
to create a room transition system so
you could go from towns to the Overworld
right now there's only one town but I
think it's it's pretty cool it's start
starting to feel like an RPG at this
point I knew it was probably time to add
NPCs I mean they're such a critical part
using that entity system I mentioned
earlier was super easy and made adding
these NPCs take no time at all and then
I add a dialogue system so I could have
Bears say weird things like this and
with that we have a basic RPG structure
we're still missing combat which is the
most crucial part of the game but I want
to save that for a future video because
this was a project I just really enjoyed
working on I can't explain it but making
a game without a game engine is super
satisfying it's difficult and
frustrating especially when you know you
could do it 10 times faster using
something else but it's also really
rewarding cuz you know that you made it
yourself I have a lot of plans what I
could do with this RPG in the future
even just as a passion project please
let me know if you like to see more of
it if not I'll probably just continue to
work on it on my own time overall I
really enjoy Java I think this has
probably been my favorite language I've
used so far in this series I highly
highly recommend you check out RN's
tutorial series on Java it's
unbelievably helpful it explains
everything that I covered in this video
pretty much and even if you're just
mildly interested check it out also if
you're wanting to learn how to code
yourself and you don't know how to get
started check out a word from today's
sponsor brilliant okay you might know
this by now but brilliant is where you
learn by doing with thousands of
interactive lessons in math data
analysis programming and of course AI
now one thing I really like about it is
brilliant helps build your critical
thinking skills through problem solving
not memorization so while you're
building real knowledge on specific
topics you're also becoming a better
thinker brilliant is a learning platform
designed to be uniquely effective each
lesson is filled with Hands-On problem
solving that can let you play with
Concepts a method proven to be six times
more effective than just watching boring
lecture videos plus all the content on
brilliant is crafted by an award-winning
team of teachers researchers
professionals from MIT Caltech Duke
Microsoft and learning a little every
day is one of the most important things
you can do for both your personal and
professional growth brilliant helps you
build real knowledge in minutes a day
with fun lessons you can do whenever you
have time it's basically the opposite of
mindlessly scrolling which is a
beautiful thing now if you want to start
programming brilliant has a growing
number of programming courses that are a
great way to start building foundational
programming skills and learn real world
applications get familiar with python
and start building programs on day one
with a drag and drop editor learn
essential coding elements things that
everyone should know like loops and
variables and most importantly develop
your mind to actually think like a
programmer to try everything brilliant
has to offer for free for a full 30 days
visit brilliant.org goodus or click the
link in the description you'll also get
uh 20% off annual premium subscription
so check it out also I just want to give
my website a shout out gus. fun check it
out it's got some information on there
latest videos and a picture of me wow
let me know if there's any other coding
challenges you want me to tackle in the
future and I'll see you next time
تصفح المزيد من مقاطع الفيديو ذات الصلة
The JavaScript Survival Guide
برمجة تطبيقات الموبايل (اندرويد وايفون) | خريطة تعلم برمجة تطبيقات الجوال 2024
تعلم replit في 18 دقيقة
كيفية إنشاء شخصية متحركة تتحدث باستخدام أدوات الذكاء الاصطناعي مجانية و الربح منها
تعلم تدريج الشعر بطريقة احترافية وسهلة ،أسرار تدريج الشعر للرجال بماكينة WaahiL # حلاقين مصر #
"okay, but I want GPT to perform 10x for my specific use case" - Here is how
5.0 / 5 (0 votes)