FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Author Topic: Me, my game, and some code (Animations Attack/React/Death)  (Read 2118 times)

bryan_r59

  • Newbie
  • Posts: 1
    • View Profile
Me, my game, and some code (Animations Attack/React/Death)
« on: September 04, 2010, 01:43:39 am »

So in this post I will be mostly sharing my progress combined with scripts i have put together. The total time elapsed is about 4 days of solid work which usually ranged between 2-6 hours.

The purpose of this post will be to share with other FIFE game developers the code I have assimilated into my project since Day 1 like from Rio-de-hola as well as my own simplistic implementations of those designs.

I typically  attempt to produce scripts which achieve only short-term modularity and flexibility. This is because at this phase in development I feel it is more appropriate to approach tasks singularly.

# ##############################
0. Video to show what I did: http://www.youtube.com/watch?v=5uKppSu8H4Q
# ##############################

# ##############################
# 1. Project Name and Location of it + FIFE
# ##############################

Because navigating folders and my limited knowledge of my OS (linux/ubuntu), I extracted FIFE-0.3.1 onto my Desktop.
This means with my Terminal program I will have to change the directory like so:
cd /home/bryan/Desktop/FIFE-0.3.1

I chose to place my FIFE project in the demos folder along with Rio_De_Hola. For me this makes it easier to remember and navigate between them as I will be learning a good deal from Rio_De_Hola. I understand my game can't yet and may never achieve "demo" status or become a standard "demo" which FIFE developers would recommend as an example for other newbies.

The folder which contains my game project is named: "bryan_game". The first thing I did was copy over many of Rio_De_Hola's resource type files so I could meet the minimum requirements of every potential thing my game could have in common with Rio_De_Hola. It is also very important to keep an identical structuring of folders so first time tests of the game won't be spent tracking down custom paths.

It may be wise to name the main script file (which launch your game) a slightly different label than "run.py". This prevents from accidentally launching or exiting rio_de_hola when you meant to exit your game, and vice-versa.

Note: When you no longer need to run rio_de_hola, and just need to peek at its scripts, it would then be fine to just rename your main script to "run.py" so people can spot it right away .


# ##############################
# 2. Several chunks of Scripts and the End of this Post
# ##############################

Sadly this post is already to lengthy tonight and the rate at I have moved so far it would be forever before I covered the essentials of my project.

So I rather just share my most recent accomplishment in regard to scripting/animations.

Edit: In summary the girl.py and hero.py script files have attack and hit functions which can use the arguments that are passed in to call either attack or hit from the other class.


# ##############################
# 2b. World.py
# ##############################

http://fife.pastebin.com/2uuZT48T

# ##############################
# 2c. Girl.py
# ##############################
http://fife.pastebin.com/qXVd75Mi

# ##############################
# 2d. Hero.py
# ##############################

http://fife.pastebin.com/HqJkv2Aq

# ##############################
# 2e. Agent.py
# ##############################

Actually, Agent.py is exactly the same and no modifications were needed.
Logged