Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - warmblood

Pages: [1] 2
1
General Discussion / Re: Latest beta: WME 1.8.7 (October 26, 2008)
« on: October 30, 2008, 12:46:41 AM »

I have a problem with the following setup (also others, but this is enough to show the problem):

- Scene is 1680x1050
- Screen is 1680x1050
- Game startup resolution is 1400x900

If I check Use desktop resolution, it works fine.
However, if I uncheck use desktop resolution - the game does not start, and there is no error message. If I have debug turned on always, the debug window comes up and then goes away before displaying any text.



2
Technical forum / Re: Change background
« on: August 07, 2008, 04:19:37 AM »
I think Daniels suggestion to cut the object out of the photo is usually best.

But if for some reason you don't want to cut the object out of the background, you can have two different background images. Since the background is an entity, you can change its sprite in script using the SetSprite method:

Code: WME Script
  1. ...
  2. var bkgrndEntity=Scene.GetNode("background");
  3. bkgrndEntity.SetSprite("scenes\room\background1.bmp");
  4. Sleep(1000);
  5. bkgrndEntity.SetSprite("scenes\room\background2.bmp");...
  6.  
  7. ...
  8.  

 
Or you could create a sprite entity and use the SetSprite method to change the photo at the appropriate time.

Or you could also create two sprite entities --one for each of the photos -- and make one or the other visible or invisible at the appropriate time (using the active attribute.)

Or you could make a sprite entity with two frames -- one for each of the photos -- and set the current frame at the appropriate time (using the CurrentFrame attribute).

Or...

I could go on, but I think you see there are many ways to achieve the same thing. As to which you should use, IMO, it depends on what you are trying to do.

3
Technical forum / Re: Screen Scroll Problem
« on: August 04, 2008, 01:24:55 PM »
Here are the steps I used to make a scrolling scene. The two problems I usually have are forgetting to adjust the floor (step 9), or forgetting to change the resolution of the Main layer (step 5).

(I didn't leave any details out, so it is frighteningly long, but not difficult.)

For this example, my display resolution is 1024x768. My background is 1400x1050, but you can change to suit your needs, as long as the background is bigger than the display. 

1. If you need to, create a new project using the Basic Project template.

2. Create a new scene. I chose the "Empty scene -1024x768", but it doesn't really matter. Make sure you copy the scrolling background to the scene folder (in my example case it is a 1400x1050 background.)

3. Open the new scene in the scene editor.

4. In the layer palette, click on the Main layer -- where it tells the size of the screen (usually 800x600) -- to select it.

5. Now click on the "Layer Properties" button just above (with the hand pointing to the page). Change the width and height to match your scrolling background -- in my case 1400x1050 -- and click the OK button.

6. Click on the background entity in the entity palette to select it.

7. Click on the ... button next to the Sprite path in the Entity Properties section and select the scrolling background, then click the Open button.

8.  Now reposition the scrolling background where you want it. When you look at the scene, you'll see a red outline around your background, and a blue outline -- that is the floor. If you use the scrollbars you should also see a light gray outline. That is the outline of the display. Now reposition the scrolling background relative to this gray outline. In my case, since the background is taller and wider than the gray outline, I adjusted it so that it corresponded with the display outline on the left and top, and extended beyond the gray outline on the right and bottom. (Note that if you forgot step 5, you won't be able to scroll to see all of your scrolling background.)

9. Finally, click on the Floor entity in the entity palette, and then adjust the floor (positioning the mouse over each corner until you see the + pointer and then dragging the point, and adding and deleting points as needed) so that it the character can walk to all parts of the scrolling background that you want accessible. Keep in mind that if the actor can't walk to an area, the game won't scroll to it. 

10. Save the scene and play the game. (You may need to make the new scene the startup scene if you don't have some way to get to it.)  The scene should scroll when the actor walks around it.




4
Technical forum / Re: Run game on Linux or Unix
« on: August 03, 2008, 04:26:50 PM »
I don't think he was implying that we don't care about the thread, I think he was saying that we should ignore the thread because he answered his own question.

5
Technical forum / Re: Screen Scroll Problem
« on: August 01, 2008, 06:24:36 PM »
Did you remember to make the floor the same size as the scene background? I've forgotten to do that and had the same problem you describe.

6
Technical forum / Re: I need brave testers with wide screens
« on: July 28, 2008, 09:38:43 PM »
@DocBass  - Are you talking about game resolution or display resolution?

When I open Project manager and change the resolution width (along LHS, under Startup settings) to something > 1600 -- for example, 1680. I get an error message "'Resolution - width' must be a number between 320 and 1600."  Of course I am able to use a higher resolution display -but it didn't show the full 1680x1050 background in my test -- the background scrolled.

Are you saying you can get a non-scrolling background bigger than 1600 to work? Do you hand edit the project start up options? ( I'm afraid to -- assuming that the 1600 limit is not just arbitrary -- although it may be an artifact of earlier technology limits.)

7
Technical forum / Re: I need brave testers with wide screens
« on: July 28, 2008, 01:06:03 AM »
I did a bunch more testing today and decided I needed to be very methodical to try to figure out when some strange things were happening. This may be overkill, but I thnk it is important because it does impact on how players will see your game at different game and display resolutions.

1) I started with a matrix with 9 game resolutions across the top (columns), and 9 display  resolutions along the side (rows). The idea is to try all of the combinations of these game and display resolutions.

2) I created a simple project with a default scene for each of the different monitor resolutions:
a)  Background is the size of the display resolutions.
b)  Floor is the size of the display resolution.

3) Then I looped through the following:

- For each display resolution:
    -- Make the corresponding scene (see 2 above) the startup scene
     -- for each game resolution (set at top lhs of project manager), run the game observing:
        --- was the Maintain aspect ration option displayed (Y/N)
        --- Screen capture of the display.
        --- If the background isn't totally visible, does it scroll when the actor moves?
        --- Any other problems?

I recorded the results in a spreadsheet.  A pdf printout of it is here:
http://fisherbee.com/knbShare/aspectRatio.pdf

You'll notice if you look at the resulting spreadsheet, that the way the scene is displayed is sometimes hard to predict.  In particular, it is hard to predict when the game will be displayed centered on the display, when it will be displayed at the top left. (IMO, it should always be centered.) I highlighted the wide game resolutions (columns) in yellow and the wide display resolutions (rows) in pink, and that does seem to be one important factor.

You cannot set the width of the game resolution higher than 1600.

Sometimes the game mysteriously switched to windowed mode -- sometimes only window mode was available, sometimes the next time I ran I could turn window mode off.

Sometimes I didn't get the "Maintain aspect ratio" option one time, but the next time I would. Didn't seem to be any particular pattern for this.

I'm sure I made some errors, because there was a lot to do and not much time to do it. Still, it seems to point to some potential problems.




8
Technical forum / Re: I need brave testers with wide screens
« on: July 24, 2008, 03:04:03 AM »
I've retested with three different computers, and ran into no problems at all.  As I said before, I think the problem is with that particular Dell notebook.

9
Technical forum / Re: Problemas con actor?
« on: July 22, 2008, 01:05:10 PM »
Here is a translation -- maybe not perfect, but hopefully Rajack can point out where it is mistranslated.

Quote
Hello, everyone.

It's only been a short time since I started with this software, and I have a problem.

I have revised the 3d Demo that comes with Wintermute time and again, but I haven't come up with a solution.

I have a very simple 3d scene, that consists of a floor and a crate. I have loaded Trinity and the 3ds file with it's corresponding render. The problem is that if the actor collides with tthe box, she does not pass behind it, but steps in it. Is it necessary to put a sprite on the crate to simulate the actor passing behind it? I ask because I have done testing with the example 3d project, I erased the sprite of the 4 crates that are in the exterior of the warehouse, and even then the actor, Trinity, is able to pass behind the crates. I don't believe I've skipped a step, but anything is possible.

I have seen also that in the 3D demo example, the actor, in certain places, is inserted a little into the walls or the crates of the warehouse. Can this be done better? How?

Thanks and cordial greetings.

10
Technical forum / Re: I need brave testers with wide screens
« on: July 19, 2008, 08:47:28 PM »
I've been testing various games (800x600 and 1024x768) at various monitor resolutions up to 1680x1050 with maintain aspect ratio checked and unchecked.  Everything worked as expected. That's the good news.

The bad news is that I ran into some other problems when I kept the test version of WME installed and started working on copies of my projects. Over time going in and out of the game in Debug mode, I ran into several problems. I'll report them, but don't know how helpful it will be since trying to reproduce these is going to be tough.

1) After pressing Esc to display menu, lost mouse pointer and had to end game in task manager. (This happened twice, and had never happened to me before with WME.)
2) Several times game froze and had to end using task manager.  Rebooted, restarted project manager and was able to run same game fine without changes, so it seems to be some kind of memory leak? (This happened 3-4 times, and had never happened to me before with WME.)
3) Huge slow down. It got so that it took four or five minutes to start a small game.  (I've had some problems with this before, but never to this extent.  In the past I always thought it was DirectX related since this computer - a Dell E1505 Dual Core with ATI Mobility Radeon X1400-- has problems I attribute to Dell's non-existant graphic card driver updates.)

I hope this is the kind of feedback you wanted. If I can nail things down any better, I'll let you know.


11
Technical forum / Re: Need help with LeftRelease, please
« on: July 13, 2008, 12:58:43 AM »
Brilliant!

Thanks so much, Mnemonic.  This was just the info I needed.  I went with the second option, because the entity that I'm dragging is fairly small (a text label) -- which explains why it kept losing the mouse focus.  Now it works great!

If anyone wants to know what I did, here is a summary:

1) Used two global variables: LeftButtonIsDown and DragEntityName (which were initialized in scene_init.script to false and null respectively)
to keep track of when the left button was clicked on a draggable entity, and the name of the entity that is being dragged.
2) Made the following changes to the script for my draggable entity to set the DragEntityName variable and to change the LeftRelease event handler into a method I call DragLeftRelease(). (this code fragment won't work as is -- just the changes are shown!)
Code: [Select]

on "LeftClick"
{
    LeftButtonIsDown=true; 
    DragEntityName=this.Name;
    //...
    // Other code here to make the entity follow the mouse...
    //...
}

// This method used to be the on "LeftRelease" event handler.
method DragLeftRelease ()
{
     LeftButtonIsDown=false; 
     DragEntityName=null;
    //...
    // logic to handle the entity positioning when player releases left mouse button
    // ...

}

3) Added an on "LeftRelease event handler to game.script that contains the following code, which can be used by any scene that has draggable entities:

Code: [Select]
on "LeftRelease"
{
    if (LeftButtonIsDown && DragEntityName!=null) {
        var theDraggedEntity=Scene.GetNode(DragEntityName);
        if (theDraggedEntity!=null) theDraggedEntity.DragLeftRelease();
    }
}




12
Technical forum / Need help with LeftRelease, please
« on: July 12, 2008, 04:17:33 AM »

I have a scene in an educational matching game where I drag and drop entities. (The approach I took was the same as TheDerman's Click and drag sprites topic here: http://forum.dead-code.org/index.php?topic=2269.0 -- the corrected code, of course.) It is slightly different in that If the entity is dropped close enough to the target location, it snaps into place. If it is too far away, it goes back to the original location.

Everything works beautifully EXCEPT sometimes (quite often) the LeftRelease event doesn't seem to trigger, and I'm left with the entity "stuck" to the mouse.  Sometimes I can get it unstuck if I click really fast, or if I go and pick up another entity (since they all use the same LeftButtonIsDown flag.) Sometimes after that the formerly stuck entity will correctly drag and position to the target location, but other times it just lies there, broken.

Has anyone else run into this problem? Any ideas on how I might try to resolve this? I'm not looking for code, just some ideas to try. Thanks!


13
Feature requests, suggestions / Re: sprite stepping
« on: July 03, 2008, 04:10:31 PM »
The beauty and power of WME is that you can do some of these things yourself*.  Just add this method to the script for the entity you want to step:

Code: [Select]

method StepSprite(stepFrames, looping)
{
   var theSprite=this.GetSpriteObject();
   var numFrames=theSprite.NumFrames;
   var nextFrame=theSprite.CurrentFrame + stepFrames;
   if (nextFrame >= numFrames) {
      if (looping)
         theSprite.CurrentFrame=0;
      else
         theSprite.CurrentFrame=numFrames-1;
   }
   else {
      if (nextFrame < 0) {
         if (looping)
            theSprite.CurrentFrame=numFrames-1;
         else
            theSprite.CurrentFrame=0;
      }
      else
         theSprite.CurrentFrame=nextFrame;
   }

   return theSprite.CurrentFrame;
}

EDIT: If stepFrames is +, the method steps forward through the sprite frames. If it is -, the method steps backward through the sprite frames.
If looping is true, when an "end" is reached (first frame or last frame) it loops back to the other end. If false, it stops at the end.


To test it:
1) In a new scene, create a non-looping sprite with at least 3 or 4 frames.
2) Create a sprite entity in your scene using this sprite.
3) Attach a script to the entity. The script should contain the code above.
4) In the same script, include the following event handler:

Code: [Select]
on "leftClick"
{
  var step=1;
  var loop=true;
  var ret = this.StepSprite(step,loop);
  Game.Msg("CurrentFrame = " + ret);
}

   

5) Run the example and click on the entity. You should step through the sprite frames one at a time, looping back to the beginning when you reach the end.
6) Try different values for step:
            if step=2   the sprite should step 2 at a time
            if step=-1  the sprite should step backwards one frame at a time.
            if step=-2  the sprite should step backwards two frames at a time.
7) If you change the variable loop to false, the sprite won't loop but otherwise you can step freely between frames.

I hope that helps.

EDIT: *Of course you probably knew that, but I hope it helps others who also want the functionality but don't want to wait!  :D





14
Game announcements / Re: the white chamber source code released
« on: July 03, 2008, 01:04:10 PM »
Thank you for this great resource. I've been studying (and playing) since I downloaded it. There's lots to learn from here.

15
Thanks, Daniel. Yes, I am able to get it to work using something like this, which just switches from frame 0 to frame 1 when the object is left clicked:

Code: [Select]
on "LeftClick"
{
sprCard=this.GetSpriteObject();

if (sprCard.CurrentFrame==1) sprCard.CurrentFrame=0;
else sprCard.CurrentFrame=0;
}

 :D It is so much more elegant to have one "card" sprite with n different faces, as opposed to n card sprites each with one face.

Pages: [1] 2

Page created in 0.05 seconds with 24 queries.