Welcome to tridi game development

In this blog, i'll try to explain how to create game, tips and tricks to develop game, especially using my 3D engine, tridi - in English and Indonesia.

Tampilkan postingan dengan label tridi code. Tampilkan semua postingan
Tampilkan postingan dengan label tridi code. Tampilkan semua postingan

Lets coding, II

First, i have to make this game first and ensure that the code is simple enough but complete enough to help all of you understanding what tridi is. And from my current bricks game code, i got screenshot like this:


Ok, for the code, you can grab bricks source code. But i will update this code sometimes, so you can check again another time.

Line Intersection

This function is very crucial for this bricks game. So i have search on google and found a fast algorithm and write python version. You can view the code at mylib.py. If you want to see the detail, please visit http://www.antihax.net/2D_Line_Intersection

Trial and error

Some number of the code in the game source is created by trial and error, especially for setting the camera, setting shadow parameter, light parameter, etc. So you can try to the number on the code.

Lets start coding I

First, i have make a minimalist tridi core for download. Grab it here 3d Core. If you lazy do make the model, here the models i made. The only things you gonna change is the bricks.py

For sound effect. You can find it your self. You will need a collision sound effect when the ball bounching, crash sound effect for bricks. And maybe another sound effect you like. But we will focus at the graphics first.

If you dont need the music plugins to play SNES and PSF format, you can delete plugins folder.

Now, you should install python first, we need python just to get its "idle" python editor. You can install any version of python. Or if you prefer other editor, you can use any editor you like (and doesn't have to install python). Remember, you DONT NEED TO INSTALL PYTHON to run tridi game. Tridi has included all neccesary library and binary to run its games.

To try tridi works, extract the core to a folder and run "cmd.bat", after that a console will pop out. Now type "run.bat" and press "return". If you got Error messages, please contact me. This mean tridi isnot ready for your PC, i have try on some PC and some of them cannot run tridi. I already investigate on this issue, but i dont know yet what causing the problem.





Why using the console, to help you when you got error message.


Indonesia

Pertama, silahkan download tridi minimal disini 3d Core. Jika anda malas bikin modelnya, silahkan pakai yg saya buat disini models. Nantinya yang perlu anda ganti adalah bricks.py

Untuk suara nanti saja , aku fokusnya ke grfis dulu.

Untuk membuat kode program anda butuh editor, bisa dengan menginstall python, maka anda akan mendapatkan "idle" python editor. Atau memakai editor kesukaan anda. Ingat ,tridi tidak membutuhkan anda menginstall Python untuk menjalankan gamenya.

Untuk mencoba apakah tridi udah bisa digunakan, coba ekstrak file ke misal c:\tridi kemudian buk folder tsb, jalankan cmd.bat, setelah itu ketik run.bat dan tekan enter. Kegunaan memunculkan konsol dulu adalah anda bisa tau errornya apa. Kalau sudah nggak error nantinya pemakai tinggal menjalankan run.bat dari explorer.