Hidden

Compose Simplicity

Page 3


Bullets Muse

Today was the day I finally crushed the problem of the weapons not shooting like normal. For two days I wrestled with the problem of rewriting the weapon code so that the bullet, zoid, weapon all remained as separate entities so that I could mix and match them later on for easy user customization.

I converted two scripts, including the code in my previous post, Player_Zoid_Control, and bullet_control into three other scripts, Weapon_Handle, Bullet_Handle, Bullet_Mech, so that the zoid, weapon, bullet respectively can do their own stuff, just exchanging state messages to communicate. It sounded great to me, except it won’t shoot.

I logged the OnRayHit event and found the bullet hitting the floor most of the time. Other times it shot itself in the foot. Sometimes it flew to who knew where and all I could see was a fleck of dust off the screen. What the heck?

I used the following code...

Continue reading →


Pattern Muse

Boofolder.png

As I commenced the rewriting and porting of my code to Github, I felt amazed on how the heck I could have developed the game without coughing blood six months ago. All the .blend, .boo, .cs, .prefab etc files together, with all sorts of names for scripts, along with strange implementation of ideas over different scripts.

Case in point: Inside the Player_Zoid_Control script that controlled the zoid, there was one mouse event handler that handles shooting events when the right mouse button is clicked. It was supposed to shoot when the cool down period is not on and decrease the ammo count.

Somewhere inside the script
if Input.GetMouseButton(1):
    if ammo_clip[pointerpt[0]]>0 and fire_bool[pointerpt[0]] is false:
        bulletprefab1= Stat.bulletlist[pointerpt[0]].Prefab
        height=self.transform.position+velocity*offset
        rotate=self.transform.rotation
...

Continue reading →


Blitz-Zoids MMORPG

Blitz

  • View code on Github
  • Get the current incarnation of the game
  • Discuss!

First things first

Finally finished porting the scripts to Github for source control. I nearly fainted when I looked back to my codebase after a six month hiatus.

This game is a MMORPG using similar idea as ZOIDS, built with Unity3d. It’s still in the alpha mode but anyhow, we have modelers coming in but we’re short of programmers, so come by the forums and join the team!

As you can see in the Github code base, the code is written in Boo, a language which has similar syntax as Python. I chose to use it instead of [C](csharp.net/) and JS mainly because of the support for Python-like syntax.

Comparisons between generic lists and hashtables of Boo and C:

Boo:

        I_am_a_list=[1,2,3]

        I_am_a_hashtable={"motion": "forward", "shoot":false}

C:

        using System.Collections.Generic;
...

Continue reading →