Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Please where do i Start??  (Read 6846 times)

0 Members and 1 Guest are viewing this topic.

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Please where do i Start??
« on: September 19, 2007, 04:22:02 AM »

Hi I kow this question must get asked a billion times but i can not seam to find any tutorials on how to get into this program.

I have done the tutorials that shift with the manual but they do not really explain how to get a project off the ground as they are all about editing existing projects. Also they are just about the set up of a room. The tutorials do not go into inventory, creating actors from scratch 2D or 3D and a host of other major function essential to creating even a basic 2 room test game. Also i found no tutorials on including FMV in your game. I understand you guys use the thoora codec.... and ogg for full sound (not midi). I found no tutorials going into detail about this either. Can you use other video formates? Eg XviD (another free open source mpeg4 compressed format)

Dose anyone have any tutorials on how to start a new project from scratch? Or is that not a good idea.

Also there seams to be no tutorials on how to use 3D Charicters? Are there any tutorials you guys know about this.

Any help or suggestions welcome.
« Last Edit: September 19, 2007, 05:34:45 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

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Please where do i Start??
« Reply #1 on: September 19, 2007, 07:48:24 AM »

There are no other tutorials as far as I know. But all the things you said can be learnt with:
1) Reading the docs (detailed info about anything including 3D characters)
2) Checking the existing demo projects. WME files are simple text files in readable form that you can read and understand and not some binary custom format

Those should easily cover the basic wme knowledge. Then, everything else is a matter of scripting.

I understand you guys use the thoora codec.... and ogg for full sound (not midi). I found no tutorials going into detail about this either. Can you use other video formates? Eg XviD (another free open source mpeg4 compressed format)

All those questions and the use of ogg vorbis (music/sounds) & ogg theora are covered in the docs that are included in the wme package you have downloaded. You can use any video format you like in the avi container, including XviD, but that has advantages and disadvantaged that you can find in the docs. The most important it that XviD (and any other video/audio format) isn't just "another free open source mpeg4 format". Just because it's opensource it doesn't mean you can use it for something else than educational or private purposes because it is covered by very expensive software patents. So, if you want to use some other format keep in mind that you can't bundle the decoder with your software unless you are willing to pay a few 1000s of €. You can only direct the user with the right instructions on how to find the decoder which is not very user friendly.
Logged
fl*p

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: Please where do i Start??
« Reply #2 on: September 19, 2007, 08:11:01 AM »

Well if there are no other tutorials, when i get it figured out I will make some :)

Lets start with the FMV thing.

If you search the manual for VIDEO only three topic get listed concerning video


One of these is a section of the manual telling you how Theora is a built in codec and if you use it you need not bundle potentially expensive 3rd party codecs. + It also walks about a script change to init the theroa part of the engine.

the 2nd is a listing of commands for the entity script (I think)

the 3rd is a listing of the game object script. (I thought an entity was a game object?)

So from looking at this it seams to me that a to insert a video you need to make an entity and attach the video to that some how.

If i try to make a entity i can only load this default pacman template and have no idea to go from there.


I have looked though the search on the fourm but all i find is code snipits like

var video1 = Scene.CreateEntity();
video1.X = 420;
video1.Y = 400;
video1.PlayTheora("video\moon.ogg");

How do you use this code?
« Last Edit: September 19, 2007, 08:18:49 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

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Re: Please where do i Start??
« Reply #3 on: September 19, 2007, 08:45:54 AM »

To play theora all you need to do I think is write:

Game.PlayTheora("insert filename path here");

...and it should play the video.

You can put a theora file into an entity in SceneEdit, as opposed to an animated sprite, but you will learn more about sprites when you start making your game.

You can easily create your own entities such as the "old guy" entity by "adding" a new entity and then just deleting the pacman stuff and replacing it with your own entity stuff. But first of all, you need to learn and understand what entites are and when to use them, and you can learn that by following the "scene creation step by step" part of the help files.

The best way to learn WME is to follow the "scene creation" part of the help documents as that will teach you the basics of how the engine works, and the basics of putting a game together. Once you understand those basics, then you can start to learn more complex things as they relate to the specific things you want to do for your game.

Before learning how to play videos, I think it's more important to learn how to actually make a game.
Logged

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Please where do i Start??
« Reply #4 on: September 19, 2007, 08:48:26 AM »

First of all I forgot to welcome you in our forums.... so.... welcome!

It would be cool if you are interested sometime in the future to make some tutorials, they could be very useful at the wme wiki.

Now... to your questions. Both Game & Entities are game objects. So the help file lists the video related methods that each object accepts.

To use an entity to play a video is more flexible but for full screen video the Game.PlayTheora() method can be used too.

The code you posted creates a dynamic entity (at runtime), places it at the X, Y coordinates and then plays the moon.ogg video. You can use this code at any script you prefer, depending on your purpose. You could use it in the scene_init.script for example if you want to have a video in the scene all the time (a tv).
Logged
fl*p

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: Please where do i Start??
« Reply #5 on: September 19, 2007, 11:28:26 AM »

The best way to learn WME is to follow the "scene creation" part of the help documents as that will teach you the basics of how the engine works, and the basics of putting a game together. Once you understand those basics, then you can start to learn more complex things as they relate to the specific things you want to do for your game.

Before learning how to play videos, I think it's more important to learn how to actually make a game.

I totally agree.. I am a big belive in examples.  This is what i am doing.. I used to be very into AGS. I think once i get my head around things you guys may even want to play my games :) heh.. dosn't matter i have fun making them. I just need to get a handle on how the scripting works in this app. I have made a simple hello world room. It is just a room with a few boxes and very simple animated stick finger for a charter to walk around and interact. I'n my list of stuff to learn I am up to putting a video in a selected space (eg a space inside a area of the main window) and then i wantto try and make a full screen video bit...  then gradualy move down the other tings i will want to do as i peace together how to make a working game.

To be understood please understand the tutorials in the manual are very clear. I can make backgrounds, make waypoints, make objects for walking in front and behind, set up clickable hot zones... my scripting is crap.. but i know where to load the scripts.. layering etc.. basically i can now do the tutorial with out even reading the manual. (in fact i have) The tutorials are great but they basically just tell me how to substitute gfx for other gfx... I do not really understand what to do to make somthing new. somthing from scratch

I mean I have a scene.. i add a entity.. I can not select the video.. ogg or avi.  This code "Game.PlayTheora("insert filename path here");" that was posted.. where dose that go?

So to make a video I need to create an entity inside the "scenes/room1" with the Add Sprite entity?
or
Do I add entity directly in the Project manager window, by making a folder called entities and right click add...

And even if i do it either way I can not select avi / ogg files i can only select bitmap or sprite files.

« Last Edit: September 19, 2007, 11:31:07 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

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Please where do i Start??
« Reply #6 on: September 19, 2007, 09:00:50 PM »

You can't assign the video directly in SceneEdit, it must by played in a script. Also, as odnorf said before, there's a difference between Game.PlayTheora() and Entity.PlayTheora(). Game.PlayTheora() plays a full-screen video and the game is suspended in the meantime. While entities can play video within scenes.

I have looked though the search on the fourm but all i find is code snipits like

var video1 = Scene.CreateEntity();
video1.X = 420;
video1.Y = 400;
video1.PlayTheora("video\moon.ogg");

How do you use this code?

Well you call this code when you want to play the video. For example, if you want the video to play once the player enters the scene, put this code to the scene_init.script of that particular scene.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: Please where do i Start??
« Reply #7 on: September 19, 2007, 11:13:02 PM »

I am so sorry for being so dense... Can we dumb it down a little?

How exactly would you play it in a script? How do you add a script that is not attached to a entity?

How can you interact with an entity with out a script?


It is the scripting that I am confused about... I mean i can do all the scripting from the tutorials but i have NO idea what you guys all mean when you say.. "Run the video from a script"
« Last Edit: September 20, 2007, 01:40:10 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

CMK2901

  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 35
  • Zoidberg is afoot!
    • View Profile
    • CMK Studios
Re: Please where do i Start??
« Reply #8 on: September 20, 2007, 05:04:15 AM »

I'll try to shed some light on this for you, because it took me awhile to get used to how WME handles things.  And even now, I'm not completely sure, but it's a much more powerful system than AGS.  It seems that WME tries to be more obtuse than AGS...where AGS might have a function Game.shakeScreen(), WME will provide the lower-level abilities to make your own shakeScreen() function.  Overall, this makes for much more possibility.

Some thoughts:

1) The directory tree in the editor is simply a reflection of the folders in your project root directory.  So, if you have your project "GreatGame" in the projects folder, the directory tree will display the folders in "GreatGame".  The reason I tell you this seemingly obvious point is because it is best to take the example template game and just reorganize the directories into something you understand to build your game around.  For my project, I renamed the directories to: actors, entities, fonts, interface, items, scenes, scripts, sprites.  Not only does this make it easier to wrap your head around where all the resources are, but it also helps to keep your raw assets organized (if that makes sense).

2) Regard everything in WME as an object, which is just a bit different from AGS.  The "Game" object is the main sort of overarching object that encompasses everything else, but every entity in your scenes is an object, and can have it's own script (which for me, goes in the "[sceneName]/scr" folder).  For example, if I have an object in my scene called "MovieScreen", I can have a file in the "scr" directory of my scene directory called "MovieScreen.script", where you do things that apply to the movie screen.

3) What you seem to be confused about is putting movies in scenes...you can't just put a movie entity in the scene for it to play; you have to do it through a script.  Because the "Game" object encapsulates everything, if you run "Game.PlayTheora();" it will play over everything.  If you used the command "this.PlayTheora();" in "MovieScreen.script", for example, "this" would refer to the MovieScreen object and the video would play at the position of the MovieScreen object in the scene.  When they say "Run the video from a script", it means you'll have to program a bit.

4) A big hurdle for me was understanding events when I first started using WME.  There is a chain that events go through to reach your scene scripts that is as follows:

User ---> Game.script ---> [Objects]

If you open "Game.script", you'll see something similar to this somewhere:
Code: [Select]
on "LeftClick"
{
// what did we click?
var ActObj = Game.ActiveObject;
 
//if we clicked on a scene object...
if(ActObj != null)
{
ActObj.ApplyEvent("LeftClick");
}
// else propagate the LeftClick event to a scene
else
{
Scene.ApplyEvent("LeftClick");
}
}

Basically, when there is a left click, this event is called, which gets the object that was clicked and applies the even to that object, unless no object was clicked, in which case it just sends an even to the scene.  Generally, this is "LeftClick", but you can call it anything you want, which is the power behind events.  You can put ActObj.ApplyEvent("foo"); in the above clause and then have a "on "foo"" block in your object code to do whatever you want.  For example, my code for this section checks what cursor the player is using to pick between applying Look, Interact, Talk, and Walk events.  You could do anything with this.



...so, I hope some of that was helpful.  I still have trouble understanding some things, but this is how I explain it to myself, and it seems to make sense.  Of course, if anything about is just flat out wrong or too confusing, I invite a moderator to delete this or modify it.  But I hope it sheds some light on how things work.
Logged
CMK Studios
I don't think we're hearing the same voices.

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Please where do i Start??
« Reply #9 on: September 20, 2007, 06:41:47 AM »

Of course, if anything about is just flat out wrong or too confusing, I invite a moderator to delete this or modify it.
No no, it's very well described. As I said before, the "official" WME docs lack some kind of "big picture" chapter to introduce WME to absolute beginners. That's something I'd like to address very soon (well at least until meta finishes the book ;)).
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.076 seconds with 20 queries.