PDA

نسخه کامل مشاهده نسخه کامل : Welcome to the lite-C workshops



RatAtouille
19-08-2010, 11:45
این تاپیک مخصوص کارگاه های 3d game Studio است که با کمک هم آن ها را ترجمه کنیم و در اختیار خود و دیگران قرار دهیم .

1- لطفا از دادن هرگونه پست بی ربط خود داری کنید (اسپم ندین)
2- شما هم در کار ترجمه همکاری کنید .
3- تشکر خود را با تکمه تشکر ابراز کنید نه با پست .
4- اگر مطلبی رو ترجمه میکنید حتما متن اینگلیسیش رو هم کنار آن یا در پست بعد بنویسین .


Gamestudio Workshops
Welcome to the lite-C workshops



Walk with me through 25 workshops

RatAtouille
19-08-2010, 11:59
[/COLOR]
معرفی
به کارگاه lite-C خوش آمدید ! اگر شما فقط این قسمت شگفت انگیز از نرم افزار را بدانید :شما یک برنامه قوی برای بازی با آن بدست آورید .اما ما آن را lite صدا میکنیم ؟ خوب ... بیشتز به این دلیل که نیاز کمتر به منابع و تلاش نصبت به سیستم های توسعه سنگین مثل Visual C++® دارد . با این وجود lite-C همراه برنامه های ساخت نرم افزار های کاربردی 2 بعدی و بازی های 3بعدی نیاز است میاید . آن شامل يك متور قدرتمند Acknex ، محيط ويرايش كد و اشكال زدا (برطرف كننده اشكال ) است .
قدم قدم با من در اين مسير 25 كارگاه بيا و يك برنامه نويس حرفه اي lite-c خواهي شد حتي اگر شما هرگز پيش از اين برنامه نويسي نكرده باشيد .شما براي كامل كردن كارگاه ها نياز به 25ساعت زمان خواهيد داشت.اما به من اعتماد كن - تو از انجام دادن اين كار خوشحال خواهي شد .بعد از تمام كردن كارگاه ها ، يك تست آنلاين براي چك كردن آنچه آموختيد بگيريد .
لینک آزمون اینترنتی آنلاین :

[ برای مشاهده لینک ، لطفا با نام کاربری خود وارد شوید یا ثبت نام کنید ]

RatAtouille
19-08-2010, 22:57
Welcome to the lite-C workshops! If you've just downloaded this amazing piece of software, beware: you've got a powerful toy to play with. But why do we call it 'lite'? Well... mainly because it requires a lot less effort and resources than a heavyweight development system like Visual C++®. Nevertheless, lite-C comes with all the software needed to create multimedia applications or 2D and 3D computer games: it includes the powerful Acknex engine and a script editor and debugger.

Walk with me through 25 workshops and you will become an advanced lite-C programmer even if you've never programmed before. You will need about 25 hours (well... that's slightly above one day if you don't sleep) to complete the workshops, but trust me - you will be glad you did it. At the end of the workshops, take the Online Quiz to check out what you've learned! And if you achieve less than 50%, start over...

RatAtouille
20-08-2010, 13:50
تمركز كارگاه ها براي برنامه نويسي بازي است و اكثر پروژه هاي lite-c بازي هاي كامپيوتري است . بنابراين ، ما در امكانات بازي Lite-c تمركز خواهيم كرد . ما همچنين ميخواهيم زبان c را معرفي كنيم ولي خيلي به جزئيات و ريزه كاري ها نميپردازيم .اگر شما ميخواهيد يك استاد واقعي در lite-c شويد من توصيه ميكنم كتاب c يا c++ را بخريد يا برويد از طريق خودآموز رايگان آنلاين ياد بگيريد مانند اين ، بعد از تمام كردن تمام كارگاه ها .
لینک خود آموز اینترنتی معرفی شده در سایت :

[ برای مشاهده لینک ، لطفا با نام کاربری خود وارد شوید یا ثبت نام کنید ]
لینک دانلود جدیدترین ورژن موتور بازی ساز 3d Game Studio A8 :


برای مشاهده محتوا ، لطفا وارد شوید یا ثبت نام کنید
3d game Studio Wiki
لینک ورود به صفحه دانشنامه آزاد موتور بازی ساز:

[ برای مشاهده لینک ، لطفا با نام کاربری خود وارد شوید یا ثبت نام کنید ]

RatAtouille
21-08-2010, 14:45
کارگاه 1 : آشنای با موتور بازی ساز
اگر شما ورژن کامل یا مجانی Game studio را بر روی کامپیوترنصب کردید ، ورودی برنامه باید در Start menu باشد . در گروه برنامه شما میتوانید میانبر Lite-C را مشاهده کنید : ویرایشگر کد (SED) ، ویرایشگر مدل و زمین (MED) ، ویرایشگر مرحله (WED) ، کتاب دستی . اجازه بده ببینیم آن ها چه کار میکنند .شامل کتابچه راهنمای کاربر از شرح تمام توابع lite-C همراه مثال هایش .ما اطلاعات زیادی را پوشش خواهیم داد در این کارگاه ها ، اما کتابچه راهنمای کاربر شامل شرح توابع بیشتری است .

---------- Post added at 03:45 PM ---------- Previous post was at 03:40 PM ----------

Workshop 01: Getting to know the engine

If you have installed a free or full Gamestudio version on your computer, the program should have an entry in Windows' start menu. In the program group you can see shortcuts to the Lite-C Script editor (SED), to the Model and Terrain editor (MED), to the level editor (WED), and to the manual. Let's see what they do:

- The manual contains the description of all the lite-C functions with examples. We will cover a lot of information in these workshops, but the manual contains the descriptions for many more functions.

RatAtouille
21-08-2010, 22:11
-ویرایش کد (SED) یک برنامه هست که به ما در نوشتن کمک میکنه ، اجرا میکنه ، کامپایل و اشکال زدایی میکند خط های کد های lite-c ما را .
-ویرایشگر مدل (MED) که همراه lite-C میاید و به ما اجازه میدهد به import یا ساخت آبجکت های 3 بعدی (مدل ها). نیاز به نمای زمین برای level خود ؟ از Med استفاده کنید برای ساخت آن .نیاز به یک مدل بازیکن دارید ؟ این را در MED بسازید ! اگر شما یک یک ویرایشگر 3 بعدی مورد علاقه خود را دارید ، شما میتوانید نمای و مدل خود را با آن بسازید ،و سپس آنها را وارد کنبد در MED و ذخیره کنید این ها را در فرمت MDL که موتور از آن استفاده میکند .
آیا برای شروع کردن کارتان مشتاق نیستید ؟ اطمینان داشته باشید که شما آرشیو litec_samples.zip در پوشه در کامپیوتر خود از حالت فشرده خارج کرده اید . Script Editor SED را آتش کنید ، File / Open را کلیک کنید . به سمت پوشه litec_samples حرکت کنید که شما آرشیو آن را از حالت فشرده خارج کردید(؟) و بر روی فایلscript01.c در پوشه workshop01 دوبل کلیک کنید .
در ویرایشگر شما باید چیزی شبیه این را ببینید :



function main( )
{
level_load("small.hmp");
ent_create("earth.mdl", vector(10, 20, 30), NULL);
}
این یک تابع کوچک و العان کامل برنامه lite-C است ; اجازه بدهید آن را اجرا کنیم با کلیک کردن بر روی دکمه مثلث سیاه (تست اجرا) از تولبار SED.


The script editor (SED) is the program that helps us write, execute, compile and debug our lines of lite-C code.
- The model editor (MED) which comes with lite-C allows us to import or create 3D objects (models). Need a terrain landscape for a game level? Use MED to create it! Need a player model? Create it in MED! If you have another favorite 3D editor, you can create your landscapes and models with it, and then import them in MED and save them in the mdl model format used by the engine.

Aren't you anxious to start working? Make sure that you unzipped the litec_samples.zip archive into a folder (not the Gamestudio folder!) on your PC. Fire up the Script Editor SED, click File / Open, navigate to the litec_samples folder that you've unzipped from the archive, and then double click the script01.c file from inside the workshop01 folder.

[ برای مشاهده لینک ، لطفا با نام کاربری خود وارد شوید یا ثبت نام کنید ]

In the editor you should see something like this:
function main( )
{
level_load("small.hmp");
ent_create("earth.mdl", vector(10, 20, 30), NULL);
}

This is a small, and yet fully functional lite-C program; let's run it by clicking the black triangle (Test Run) button from SED's toolbar.

[ برای مشاهده لینک ، لطفا با نام کاربری خود وارد شوید یا ثبت نام کنید ]

RatAtouille
22-08-2010, 10:13
شما خود را در نمای کوچک مرحله خود خواهید یافت ، یک مدل زمین معلق در هوا نیز در آن جا وجود دارد. زمانی که شما یک پیغام خطا شماهده میکنید به جای آن شبیه "Main Script Not Found - Check Preferences" شما احتمالا در حال حاظر با تنظیمات SED مشکل دارید .باز کنید :
Options / Preferences / Environment ، و اطمینان حاصل کنید که از فایل درست برای تست اجرا استفاده کرده اید علامت دار است . سپس اسکریپت را دوباره اجرا کنید .
[Alt] + [Enter] را فشار دهید برای اجرای برنامه به صورت تمام صفحه اجرا شود، فقط شما با هر برنامه کاربردی دیگری هم همین کار را انجام دهید . [Alt] + [Enter] را دوباره فشار دهید برای حالت پنجره . 0 (صفر) را بفشارید یک بار بر روی کیبور خود و مرحله را اکتشاف کنید با کلید های جهت نما [home] و [end] .
چه خوب به دنبال منظره !(؟) آن را تا زمانی که میخواهید برسی کنید ، و سپس [Esc] را فشار دهید برای خاموش کردن موتور بازی . شاید کنجکاو شده باشید چگونه یک نمای اینچنین بسازید یا این چنین مدلی .
این ها هر دو با MED ساخته شده اند در چند دقیقه (خوب بافت تصویری زمان بیشتری برده است) ، و ذخیره شده تحت نام "small.hmp" و ""earth.mdl .
اجازه بده یک بار دیگر یک نگاه به کد های داخل script01.c بیندازیم.

function main( )
{
level_load("small.hmp");
ent_create("earth.mdl", vector(10, 20, 30), NULL);
}

ما میتوانیم به چند چیز توجه کنیم :
1) پایان اسکریپت باید همراه .c باشد مانند script01.c .
2) اسکریپت باید به طور معمول شامل تابع به نام MAIN باشد .
3) یک تابع شامل چندین جمله است . اینجا level_load و ent_create که در داخل یک جفت کروشه بالدار قرار دارند .
4) یک جمله یک لیست از یک یا بیشتر پارامتر که در داخل یک جفت پرانتز قرار دارند () .


You will find yourself in a small landscape level; an earth globe model will be hovering in there as well. When you see an error message instead - like "Main Script Not Found - Check Preferences" - you have probably already experimented with SED's settings. Open Options / Preferences / Environment, and make sure that Use the current file for Test Run is checked. Then run the script again.

Press [Alt] + [Enter] to run the program in full screen mode, just like you do with any other Windows application; press [Alt] + [Enter] again to return to the window mode. Press the [0] (zero) key once on your keyboard and explore the level using the arrow keys, [Home] and [End].

[ برای مشاهده لینک ، لطفا با نام کاربری خود وارد شوید یا ثبت نام کنید ]

That's a nice looking landscape! Examine it for as long as you want, and then press the [Esc] key to shut down the game engine. You're probably curious how to create such a landscape or such a model. They are both created with the model editor MED in a few minutes (well the textures took a little longer), and stored under the file names "small.hmp" and "earth.mdl".

Let's take a look at the code inside script01.c one more time:

function main( )
{
level_load("small.hmp");
ent_create("earth.mdl", vector(10, 20, 30), NULL);
}

We can notice several things:
Scripts must end with ".c" (like "script01.c").
Scripts must normally contain a function named main.
A function contains several commands (here, level_load and ent_create) that are placed within a pair of winged brackets { }.
A command has a list of one or more parameters that are placed within a pair of parentheses ( ).




:40: :40: :40: :40:

RatAtouille
24-08-2010, 13:51
تابع main یک تابع ویژه است ؛ آن بطور خودکار در شروع بازی اجرا میشود ، بنابراین تمام خط ها در آن است اجرا خواهد شد زمانی که ما بر روی دکمه تست اجرا کلیک میکنیم .همانطور که شما میتوانید ببینید ، فرمان اول Level_Load یک مرحله به نام "Small.hmp" را لود میکند(نمایمان)و فرمان دومی ent_create یک وجودی به نام "earth.mdl" را لود میکند در موقعیت x = 10 , y = 20 , z = 30 در مرحله ، به آن گفتن که به سادگی در آن جا بایستد ، بدون انجام هیچ کاری (null) .ما باید چکار کنیم اگر بخواهیم یک زمین دیگر را ایجار کنیم ؟مدل mdl در بالای قبلی ؟ ما باید یک دستور به تابع main اضافه کنیم . البته !
function main( )
{
level_load("small.hmp");
ent_create("earth.mdl", vector(10, 20, 30), NULL);
ent_create("earth.mdl", vector(10, 20, 55), NULL);
}
یک خط جدید کد تایپ کنید با استفاده از SED مانند شما که از واژه پرداز مورد علاقه خود استفاده میکنید ، و پس اجازه بده پروژه را دوباره تست اجرا کنیم .
درواقع این کار کرده است ! گوی دوم ایجاد شده در x = 10 , y = 20 , z = 55 ، که به اندازه25 واحد بالاتر از اولی قرار داده شده است ، که z آن در 30 ست شده است. کلمه کلیدی vector که به سادگی ارزش گروه های نزدیک به هم x,y,z در ریز یک چتر قرار میدهد (؟)؛ ما بعدا در مورد تمام این مفاهیم صحبت خواهیم کرد پس احساس گناه نکنید ;) اگر شما بار اول آن ها را درک نکردید.
SED به ما اجازه دسترسی سریع به پرونده ها را به ما میدهد هروقت که به آن نیاز داریم ؛ بر روی دستور کمک کلیک کنید در پایین صفحه نمایش (اگر آن قبلا انتخواب نشده ) و سپس بر روی هر کدام از کلمه کلیدی های انجین کلیک کنید – شما شرح آن را خواهید دید فقط شبیه به عکس در زیر . این به صورت سودمند میاید اگر شما میخواهید یک دستور بنویسید، اما شما پارامتر های آن را به یاد نمی آورید .



Function main is a special function; it runs automatically at game start, so any commands that inside it will be executed when we press the Test Run button . As you can see, the first command level_load loads a level named "small.hmp" (our landscape) and the second command ent_create loads an entity named "earth.mdl" at a position of X = 10, Y = 20, Z = 30 in the level, telling it to simply stay there, without doing anything (NULL). What should we do if we'd like to create another earth.mdl entity on top of the previous one? We should add another command to function main, of course!
function main( )
{
level_load("small.hmp");
ent_create("earth.mdl", vector(10, 20, 30), NULL);
ent_create("earth.mdl", vector(10, 20, 55), NULL);
}

Type the new line of code using SED just like you would use your favorite word processor, and then let's Test Run the project again:

[ برای مشاهده لینک ، لطفا با نام کاربری خود وارد شوید یا ثبت نام کنید ]

It has worked indeed! The second sphere was created at x = 10, y = 20, z = 55, being placed 25 units (quants) above the first one, which has its z set to 30. The vector keyword simply groups together the x, y, z values under the same umbrella; we will talk about all these concepts later, so don't feel guilty ;) if you don't grasp them all at once.
[ برای مشاهده لینک ، لطفا با نام کاربری خود وارد شوید یا ثبت نام کنید ]

SED gives us quick access to the documentation whenever we need it; click the Command Help tab at the bottom of the screen (if it isn't selected already), and then click any engine keyword - you will see its description, just like in the picture below. This comes in handy if you want to write a command, but you don't remember its parameters.



Ending


This simple workshop has taught us how to load a level and how to create and place entities (our earth models) inside it. Don’t worry if you can’t understand how the code works: we'll cover everything in the following workshops. Let's begin with the most basic elements of every programming language in the world: the variables.


پایان کارگاه اول

RatAtouille
24-08-2010, 13:58
از استقبال بی نظر شما ممنونیم ! با این استقبال ادامه ترجمه فعلا تعطیله.

AMIR REZAs
24-08-2010, 14:01
انتظار داری چطوری استقبال بشه؟؟
مطمئن باش خیلی ها استفاده می کنند....
اگر خواستی مطالبت رو تو وبلاگم هم درج میکنم:20:
ادامه بده...........:46:

RatAtouille
02-09-2010, 11:43
ادامه ميدهيم .


Workshop 02: Variables

كارگاه دوم : متغير ها
متغير ها مكاني بر روي حافظه ي كامپيوتر شماست(مثل يك ظرف) كه ميتوان براي ذخيره اعداد مورد استفاده قرار داد . اجازه بده چند مثال Lite-c ببينيم .
var bullets = 7;
var health;
var lives = 3; // بازيكن 3 جان دارد
اين ها چند خط كوتاه كد هستند ولي ما ميتوانيم از آن ها براي يادگفتن خيلي از چيز هاي جديد استفاده كنيم :
1.تمام متغير ها بايد قبل از استفاده تعريف شوند ، از كلمه كليدي var استفاده كنيد. اگر شما اين كد را بنويسيد :
health = 100;
و شما متغيري به نام خون را قبل از استفاده از آن تعريف نكرده باشيد ،شما يك پيغام خطا از موتور دريافت خواهيد كرد.
2. تمام متغير ها ميتوانند مقادير اوليه را در شروع بازي دريافت كنند ، اما ما مجبور به كار نيستيم زماني كه اين كار مهم نيست . مثلا :
var bullets = 7;
var lives = 3;
3. ما ميتوانيم دستور هاي خودمان را اضافه كنيم .بعد از // موتور از كلمات،اصتلاحات،نماد ها و... چشم پوشي خواهد كرد و ما در اين مكان ميتوانيم توضيحات مفيد خود را به كد ها اضافه كنيم. مثال :
var car_speed; // the speed of the car that chases the player
// @%$%&^& Ha Ha Ha! %^&** I rule!

RatAtouille
02-09-2010, 15:43
A variable is a place in your computer's memory (just like a container) that can be used to store numbers. Let's see a few lite-C examples:
var bullets = 7;
var health;
var lives = 3; // the player has 3 lives
These are a few short lines of code but we can use them to learn many new things:
1. Every variable must be defined before being used, using the keyword named var. If you write this line of code:
health = 100;
and you haven't defined the variable named health before using it, you will get an engine error message.
2. Any variable can receive an initial value at game start, but we aren't forced to do that when the initial value does not matter. Example:
var bullets = 7;
var lives = 3;
3. We can add our own comments to the code. Every time it encounters two slashes // the engine will ignore the words, expressions, symbols, etc that follow it. This way we can add useful comments to our code:
var car_speed; // the speed of the car that chases the player
// @%$%&^& Ha Ha Ha! %^&** I rule!



..........