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...


Pages: 1 [2] 3  All

Author Topic: WME and QFGish Adventure Game  (Read 21957 times)

0 Members and 1 Guest are viewing this topic.

McCoy

  • The cocido eater
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 365
  • Spurrrrrrring
    • View Profile
    • Spur Games
Re:WME and QFGish Adventure Game
« Reply #15 on: April 16, 2004, 11:58:07 PM »

I am happy to announce that WME is GOING TO BE the engine for SFLAH. I will make the official announcement on the SFLAH page, soon!!!

Wise choice ;D. Congratulations and welcome to the ever-growing WME community. We'll try to help you as much as we can. And I'm really waiting for your game, because it came to my mind to make some sort of RPG with WME too... someday... who knows, so I'm very very interested in seeing something like that working for real.
Logged

Click here to sign my sig!

Igorrr

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 130
  • Ugh...Ughugh!!!!!!
    • View Profile
    • Struggle For Life And Honour
Re: WME and QFGish Adventure Game
« Reply #16 on: April 19, 2004, 04:50:24 AM »

Well ok here is what I have done so far...
http://www.igorrr.com/files/spank_the_hero_sources.zip  (711kb)
It is extremely simple and can only be seen as a stress reliever.
At the moment I am working on a better day/night transition, trying to find out how I can make the oponent character move around independently, making him attack you, using ranged attacks and an online stats window.
Actually I am not sure how to acomplish all this, but seeing that I just started using WME a bit more than a week ago, I guess I'll be fine...
If you have suggestions on how to implement the other ideas please tell me.

If you are a curious person and look at the code and want to criticise it or make suggestions, please DO SO!!
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: WME and QFGish Adventure Game
« Reply #17 on: April 19, 2004, 07:57:37 AM »

Hehe, I only looked up the sources yet, can't wait to try it when I get home :)
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re: WME and QFGish Adventure Game
« Reply #18 on: April 19, 2004, 09:03:04 AM »

Hey Igorrr!

welcome from me, too, I'm glad to read you're going to realize your game with WME.

Of course I checked the sources (hehe) and hey - you're doing fine and obviously learning fast.
Logged
Mooh!

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re: WME and QFGish Adventure Game
« Reply #19 on: April 19, 2004, 09:19:58 AM »

Ou, I missed one thing - you use my snowflakes script. Hooray! ;D
(The drops were so small, I didn't notice them...)

Logged
Mooh!

MMR

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 349
  • http://mmrdeveloper.wordpress.com/
    • View Profile
    • TinyWME
Re: WME and QFGish Adventure Game
« Reply #20 on: April 19, 2004, 11:12:41 AM »

Igorrr I like the example too much!

The day/night transition's still a bit rough but works fine. The snowflakes effect is perfect... Maybe some "street-fighter-like" background music??? hahahaha

I'm impressed of what can you do with only "a week" of knowledge ;)

Logged

Igorrr

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 130
  • Ugh...Ughugh!!!!!!
    • View Profile
    • Struggle For Life And Honour
Re: WME and QFGish Adventure Game
« Reply #21 on: April 19, 2004, 03:59:17 PM »

Wow the week starts and suddenly all reply. Yes I really love the snowflake script and I was playing around with it, too.
It is true that I started with scripting with WME 2 days before I joined these forums. But I did try out other engines and I studied engineering in IT, so I do have some (if small) programming background.
IMO the scripting language is easy to use and the documentation is very good (can't wait until it's completed, though  ;)).

The new night/day transition has been implemented and the hero following you works better if I attach a script to that actor which runs in a infinite loop (but he still reacts too slow).

I have encountered 2 minor "problems".

In the WME.log file I get the error message:
"02:21: CBObject::AddScript - trying to add script 'actors\hero\hero.script' mutiple times (obj: 'hero')
02:21: Error opening file ''
I really don't know what that is? I have been searching the code for a reference but nada.

Also the moves are stored in the scene.script file. But if I want use the "On Mouseclick" events in other scripts it does not work. Also I don't know from where actually scene.script is called. Is it a basic script that is called with the first scene that is being loaded in the game?
I also noticed while I was trying to do new scenes that the contents of this script don't apply anymore. Can someone give me more info on this?
Logged

MMR

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 349
  • http://mmrdeveloper.wordpress.com/
    • View Profile
    • TinyWME
Re: WME and QFGish Adventure Game
« Reply #22 on: April 19, 2004, 04:12:12 PM »

Quote
In the WME.log file I get the error message:
"02:21: CBObject::AddScript - trying to add script 'actors\hero\hero.script' mutiple times (obj: 'hero')
02:21: Error opening file ''
I really don't know what that is? I have been searching the code for a reference but nada.

Are you attaching the script inside an infinite loop ??
Logged

Jerrot

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 690
    • View Profile
Re: WME and QFGish Adventure Game
« Reply #23 on: April 19, 2004, 04:37:37 PM »

"02:21: CBObject::AddScript - trying to add script 'actors\hero\hero.script' mutiple times (obj: 'hero')
02:21: Error opening file ''
I really don't know what that is? I have been searching the code for a reference but nada.

You should find the script call in the hero.actor file, no idea why it should be called twice though.

Also the moves are stored in the scene.script file. But if I want use the "On Mouseclick" events in other scripts it does not work.

You have the object hierarchy Game -> Scene -> Entities/Actors. So if you want to use the events independent from your scene, you can define them for the Game object. In the WME demo you can find these events in the game.script.

Maybe some general information (as far as I understood it up to now ;) ):

The game starts off with the default.game. By default there is an entry of the first script that is called ("scripts/game.script").

game.script (again - by default! You can change all this...) calls the game_daemon.script, which is running in the background AND it calls your first scene by e.g. Game.ChangeScene("scenes\room\room.scene");

Ok, and in room.scene you will find two attached scripts (be default... ;) !):   
SCRIPT="scripts\scene.script" and
SCRIPT="scenes\room\scr\scene_init.script"

That's it in general. The scene.script is for some general purpose, the scene_init.script is especially for THIS scene. You can find all this in ProjectMan, too, but since I only use the source files I couldn't tell you where... heh.

I also noticed while I was trying to do new scenes that the contents of this script don't apply anymore. Can someone give me more info on this?

Sorry - I didn't get you ?
Logged
Mooh!

Igorrr

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 130
  • Ugh...Ughugh!!!!!!
    • View Profile
    • Struggle For Life And Honour
Re: WME and QFGish Adventure Game
« Reply #24 on: April 19, 2004, 06:33:04 PM »

What happens is that all the mouse events are defined in the screen.script.
It works fine for the first scene.
Later I have added other scenes to try out different scenarios.
« Last Edit: April 19, 2004, 06:35:19 PM by Igorrr »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: WME and QFGish Adventure Game
« Reply #25 on: April 19, 2004, 06:37:16 PM »

What happens is that all the mouse events are defined in the screen.script.

You mean scene.script? Check if you have the (correct) scene.script attached to the other scenes. In SceneEdit click the Properites tab and then the "Scripts" button. You'll see what scripts are attached to 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

Igorrr

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 130
  • Ugh...Ughugh!!!!!!
    • View Profile
    • Struggle For Life And Honour
Re: WME and QFGish Adventure Game
« Reply #26 on: April 19, 2004, 07:37:36 PM »

Well... uhm... ahem....

gfdsag..sdafas

(*scratches his head*)...

I used the scene_tut sources for this. And I changed and deleted everything that was not needed. I just used the scene.script script as it was implemented there.
Now I did not see any scripts attached to the scenes. And I thought that a script called "scene.script" is always loaded for all scenes because I did not see any place in the code where it was referrenced, but still it must have been started somewhere.
Does what I say make sense? Maybe just tell me how scene.script is implement in the scene_tut (and sorry for stupid asking).

Oh and btw... what is CBSprite? I also have a file not found error in my WME.log because of that.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: WME and QFGish Adventure Game
« Reply #27 on: April 19, 2004, 08:07:42 PM »

And I thought that a script called "scene.script" is always loaded for all scenes because I did not see any place in the code where it was referrenced, but still it must have been started somewhere.

No, any script is only executed if it's attached to some object. Game, scene, entity, actor etc. By default, there's a "scene.script" in the "scripts" directory attached to every scene. This script has a very simple on "LeftClick" handler, which sends the actor to the point where the player has clicked.
If you add a new scene in ProjectMan, it will have this script attached by default. In other words, this script is shared among all the scenes (again, *by default*).
Other than that, every new scene has one more script attached, the "scene_init.script". This script should contain any initialization for that particular scene.

To sum it up: every scene has, by default, two scripts attached - the global shared "scene.script" and one private "scene_init.script".
Of course you can add as many other scripts as you want, this is just the default scheme.


Oh and btw... what is CBSprite? I also have a file not found error in my WME.log because of that.

CBSprite is the internal C++ class holding WME sprites. This error is probably caused by the snowflake.entity, because it references an empty filename.
« Last Edit: April 19, 2004, 08:09:47 PM by Mnemonic »
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Igorrr

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 130
  • Ugh...Ughugh!!!!!!
    • View Profile
    • Struggle For Life And Honour
Re: WME and QFGish Adventure Game
« Reply #28 on: April 19, 2004, 08:39:58 PM »

@MMR: No I did not attach the script in any loop. Maybe it has to do with the reloading the scene when you press F9.

@Mnemonic: thanks for the info. I still don't understand why in my new scene the content of the scene.script did not apply. Generally I have problems with the Mouse and Keyboard handlers. They only seem to work when I use them in the game.script and sometimes in the scene.script. But in all other scripts it does not work. At first I thought it was because you shouldn't have the same events handled many times. But when I deleted them from the scene and game script and added them only in a single script...nothing worked.
I guess I should look deeper into this before I ask anymore questions.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: WME and QFGish Adventure Game
« Reply #29 on: April 19, 2004, 08:50:54 PM »

Ok, sorry sorry sorry, now I understand (finally). The mouse and keyboard events are primarily received by the game object (i.e. by event handlers in scripts attached to Game). The default scripts route the clicks to the scene object, unless the player clicked some active object. So if you want to handle keypress events directly in scenes, you'll have to add something like this to your game script:

[code]
on "Keypress"
{
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
Pages: 1 [2] 3  All
 

Page created in 0.029 seconds with 23 queries.