Author Topic: SWF problems  (Read 9249 times)

0 Members and 1 Guest are viewing this topic.

motorsep

  • Hero Member
  • *****
  • Posts: 1,099
  • Karma: +78/-134
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: SWF problems
« Reply #15 on: June 23, 2016, 10:37:19 PM »
Your's .fla files are good but as I said earlier they needs a tutorial.

Like a tutorial about change native doom3 gui to doom1 gui (remember doom3wolrd).

Too many complex stuff and interactions.

But yes, files are good ))

You can't really do that without rewriting C++ code.

SWF files are basically just graphics and layout. How they interact, when and in what order they animate is driven by C++ entirely. RAGE had most of the stuff in ActionScript. Doom 4 (and the DOOM) evolved into having virtually no ActionScript. Doom 3 BFG's SWF menu system is almost identical to Doom 4, except dialog windows, that are identical to RAGE (AS driven instead of C++).

I don't know the state of ActionScript, but I do know that Flash is no more. Now it's Adobe Animate, which supports SWF, but perhaps doesn't have the same ActionScript Flash had. So in a way it was a good move to get off Action Script in Doom/BFG to avoid incompatibilities in the future.

bitterman

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: +9/-5
  • Doom Newbie
    • View Profile
Re: SWF problems
« Reply #16 on: June 24, 2016, 12:00:09 AM »
Thanks, it's interesting.

I'd like to know is it possible to provide in new HUD information about AI states, world positions and other (without coding).

Just like D3 with script and EditGUIs only:


motorsep

  • Hero Member
  • *****
  • Posts: 1,099
  • Karma: +78/-134
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: SWF problems
« Reply #17 on: June 24, 2016, 08:19:42 AM »
You'd need to add new elements to SWF in Flash, following the same scheme as other HUD elements, then write supporting code in C++.

bitterman

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: +9/-5
  • Doom Newbie
    • View Profile
Re: SWF problems
« Reply #18 on: July 01, 2016, 06:29:58 AM »
I have one question about swf decompile (JPEXS).

When I do this I see that one sprite (movie clip) have (associated) few files with ActionScript code (see picture).

Usually one sprite on scene have one layer named "actions" or "as" and then it must be associated with one AS file.

Is it few files means one sprite with few layers of as-code? In what cases is it necessary?

Thanks.

P.S. motorsep as I see you change AS-code from dialog.swf.
Can you give few tips about this file (destination, sprites organizations, AS-code, etc.)?
« Last Edit: July 01, 2016, 06:38:40 AM by bitterman »

motorsep

  • Hero Member
  • *****
  • Posts: 1,099
  • Karma: +78/-134
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: SWF problems
« Reply #19 on: July 01, 2016, 07:30:11 AM »
I don't understand what's going on with you  ??? I released SWF files so that anyone can look at the code/layout and check it against C++ code. It's really that simple now. No reverse engineering is required.

Get yourself a book about Flash MX with CD and activate trial using publicly available serial number (that's what I did) or get newer version some other way. Open dialog.SWF and see how it's done. There is a layer called AS which has all the AS code.
« Last Edit: July 01, 2016, 09:24:44 AM by motorsep »

bitterman

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: +9/-5
  • Doom Newbie
    • View Profile
Re: SWF problems
« Reply #20 on: July 02, 2016, 11:03:52 AM »
Ok, now I see:

This AS-code from original dialog.swf:

Code: [Select]
...btn.onPress = function()
{
this["func"...].call();
}

isn't works in my case.

But this code works:

Code: [Select]
...btn.onPress = function()
{
acceptCallBack();
}

But the cursor looks weird (see picture).

******************* upd ******************

Fix via extend background to fullscreen.
« Last Edit: July 02, 2016, 01:35:01 PM by bitterman »

bitterman

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: +9/-5
  • Doom Newbie
    • View Profile
Re: SWF problems (recordDemo issue)
« Reply #21 on: July 12, 2016, 10:51:35 PM »
May be anyone know:

Can't record a demo from BFG menu (e.g. in Main Menu, not in Game) via 'recordDemo' console command.

Menus are handmade, assets are minimal (may be this is problem).

As I remember, in D3 I used 'recordDemo', then 'stopRecording', then 'aviDemo demo000.demo' to convert from .demo to .tga (but not sure about recording from menu).

Thanks.

************************** upd ******************

Hmm, looks like full BFG version recorded demo from mainmenu but not played nor converted it with this error:

Quote
idRenderWorld::RenderScene: bad FOVs: 0.000000, 0.000000

Code: [Select]
/*

void idRenderWorldLocal::RenderScene( const renderView_t *renderView ) {

...

>>> if ( renderView->fov_x <= 0 || renderView->fov_y <= 0 ) {   <<<
common->Error( "idRenderWorld::RenderScene: bad FOVs: %f, %f", renderView->fov_x, renderView->fov_y );
}

But g_fov is set to 80 by default.

Can anyone check 'recordDemo/stopRecording/playDemo/aviDemo' in BFG version, please?

Is it works? My build is a Frankenstein's creature ))
« Last Edit: July 13, 2016, 06:25:58 AM by bitterman »

motorsep

  • Hero Member
  • *****
  • Posts: 1,099
  • Karma: +78/-134
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: SWF problems
« Reply #22 on: July 13, 2016, 08:31:22 AM »
Demo recording is not supported in BFG. But it's been fixed in Storm Engine 2 :)

bitterman

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: +9/-5
  • Doom Newbie
    • View Profile
Re: SWF problems
« Reply #23 on: July 13, 2016, 11:11:56 AM »
Yes, I found some info...

https://github.com/RobertBeckebans/RBDOOM-3-BFG/issues/127

Not sure, it was fixed in RBDoom or still WIP?

@motorsep, still not sure about compatibility. E.g. don't see doomintro.swf in SS2 pack.
Is Code was modified to start new game without doomintro, right?
« Last Edit: July 13, 2016, 11:28:01 AM by bitterman »

motorsep

  • Hero Member
  • *****
  • Posts: 1,099
  • Karma: +78/-134
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: SWF problems
« Reply #24 on: July 13, 2016, 11:29:47 AM »
I didn't include anything that I didn't need for my Phaeton game. Especially those text typing SWF files (they'd render over video).

Like I said, Storm Engine 2 is not directly compatible with Doom 3 BFG. It's was meant to be used in projects made from scratch. So, if you use SWF that come with SE2, and then figure out the rest of the assets, you can build your game using our engine.

bitterman

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: +9/-5
  • Doom Newbie
    • View Profile
Re: SWF problems (pacifier)
« Reply #25 on: July 22, 2016, 05:02:49 AM »
Because of some language barriers I realy don't understand this term ('Pacifier'), which hinders the understanding of code.

This is a movie clip (sprite) named "pacifier". If it's visible then engine (part of menus managment) makes one thing, if not - other thing. It uses some hardcoded funcs like:

IsPacifierVisible()
HidePacifier();

A 'pacifier' is a synonym of 'dummy' or 'empty' (not realy sure).

Can you tell me - what means this term (not neccesary in this Code)?

The purpose of the others variables is intuitive from their names but this... Really obscure idiomatic expression 8)
« Last Edit: July 22, 2016, 05:41:42 AM by bitterman »

motorsep

  • Hero Member
  • *****
  • Posts: 1,099
  • Karma: +78/-134
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: SWF problems
« Reply #26 on: July 22, 2016, 03:49:15 PM »
Yeah, poor naming IMO. Pacifier is just an animated indicator, like hourglass. Like when saving, or connecting somewhere, it's being rendered. I couldn't get it working (the game would freeze on any SWF pacifier I made), so I abandoned it.

bitterman

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: +9/-5
  • Doom Newbie
    • View Profile
Re: SWF problems
« Reply #27 on: July 22, 2016, 10:34:38 PM »
Yes, now I see. Thanks for explanation.

If you follow my way: about recordDemo issue http://idtechforums.fuzzylogicinc.com/index.php?topic=465.msg5360#msg5360
« Last Edit: August 01, 2016, 10:39:45 PM by bitterman »