Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: I couldnt get the package idea  (Read 2746 times)

0 Members and 1 Guest are viewing this topic.

lechuck

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 14
    • View Profile
I couldnt get the package idea
« on: December 03, 2007, 05:32:15 AM »

Hello everybody

I m writing because i think i couldnt get the idea of package correctly.
the idea is to separate the game into diferent package, that are a kind of "independent". I mean, i could have the main game in a package and a voice and fx package, and the main game could work without the another package, and all this is transparent to programmer or user???

Thanks
Logged

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: I couldnt get the package idea
« Reply #1 on: December 03, 2007, 07:12:26 AM »

this took me a while to get sorted as well.... imagine each packadge as a directory in your main folder...

ROOT -game.exe
        -settings.exe
        -DATA -actors
                  -Scripts
                  -Etc etc etc

Now the files in the data (default pack) are read as if they are from the root. So the path of the files is NOT including the data name in the path...

Example .... say all your locations are stored in a locations.pak... .  all the files in the pack itself are "virtual" stored in the root of the folder.. So basically it means that when you are typing your paths you just drop everything but the NAME of the pack from the path line and they will compile and work correctly.

How to use them?

Well... i think that while separating packs can be a bit hard to get your head around i think it has many advantages...

My game as a freeware hobby project will only be played by people downloading it,.... so the voice.pak is an optional download. As is the videointro.pak witch contains full motion video files. This way a user can downlaod a lightweight version of the game OR get the whole entire game.

Also by separating the locations into packs there own packs I can have a more complicated dir structure for my scripting.. one i find works a lot better for how i run.. eg my packs are say inn.pak, mountiantop.pak, bedroom.pak etc etc.

Paks also have a priority system.. so if you have teh same files in different packs it will sue the data from the higher priority pack. As i have all my data files split in many packs if i need to make a update to the game to fix a bug.. i simple release a new teeny tinny pak.. as a patch. This imo is a great reason to split locations.

Quote
I mean, i could have the main game in a package and a voice and fx package, and the main game could work without the another package
So to answer your question (just re-read it and got a little off track) YES.

In fact my game is designed to be a episodic game.. .as in you play it in small installments like say watching a tv show. The main game data can be played with ANY of the episodes with out the need to have the other eps. In fact we are working now on a actor patch that allows you to load the old eps and see a completely different side of the same story though a new charicter that you "unlock" in the games latter eps.

An even further extension of this (if we ever get to it) is to expand the games into the "world" rather than charicter based.. and have completely new games set in the same universe that can use the original location pak files if the game requires them to enter a room used in any other game in that world

Oh you can also store you paks in dirs inside your game dir so all the paks are not making the root of your game dir all messy.. but i forget off the top of my hea dhow to do that.
« Last Edit: December 05, 2007, 06:17:00 AM by Jyujinkai »
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: I couldnt get the package idea
« Reply #2 on: December 03, 2007, 07:24:17 AM »

oh yea i tihink it is adding to the wme.ini file in the root of your game install dir.

Code: WME Script
  1. [Resource]
  2. PackagePaths=PackagePath1;PackagePath2;PackagePath3

Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe

lechuck

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 14
    • View Profile
Re: I couldnt get the package idea
« Reply #3 on: December 05, 2007, 04:47:53 AM »

thanks.
you cleared the idea to me.
but i have a question... playing with package i try to do a soundfx package with some file, and when i tried to reference it from the data package by copy the filename option, the debugger said "warning" the absolute path bla.bla. did i forget to do an include???
thanks again
Logged

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: I couldnt get the package idea
« Reply #4 on: December 05, 2007, 06:17:11 AM »

There is was a bug.. guess it was not fixed in the new versions, i havn't retested it... but sometimes when you make a new pack the file paths from the right clikc "copy filename" is incorrect.

Try making the pack. saving and closing and reloading the app to refresh all the stuff....

Example.....

ROOT
    DATA.PAK
               - Files in there
    LOCATIONS.PAK
               - SW
                    -INN
                         -BARLEFT
                                    -SCR
                                         -scene_int.script
                                    -Bar_left.scene
                                    -background.jpg

In the above example.... these are the correct paths

Locations\SW\Inn\bar_left\bar_left.scene
Locations\SW\Inn\bar_left\background.jpg
Locations\SW\Inn\bar_left\src\scene_int.script

Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe
 

Page created in 0.103 seconds with 25 queries.