Duke4.net Forums: Those simple questions thread - Duke4.net Forums

Jump to content

  • 18 Pages +
  • « First
  • 5
  • 6
  • 7
  • 8
  • 9
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Those simple questions thread  "Simple questions, simple answers"

User is offline   Mblackwell 

  • Evil Overlord

#181

I'm not against, I was just saying you might not see a noticeable difference unless they are already tanking your framerate. Optimizations can't be a bad thing :P.
0

#182

Is there a method to make polymer lights work fine on MB-integrated GPU like intel HD Graphics and so on ?
I see that point lights work good, also on models, but not for spot lights: it seems they work only for a fraction after map loading

EDIT: This is noticeable in eduke32.log :
Initializing Polymer subsystem...
PR : FBO #1 initialization failed.
PR : FBO #2 initialization failed.
PR : FBO #3 initialization failed.
PR : FBO #4 initialization failed.
PR : FBO #5 initialization failed. 


This post has been edited by RichardStorm: 01 July 2014 - 09:36 AM

0

User is offline   Chip 

#183

How would I make the cheats "DNSTUFF" and "DNWEAPONS" set a player's gamevar? The wiki says there's an event that could very well do this and called "EVENT_ACTIVATECHEAT", but according to Eduke32 itself, that's not actually a known game event.

This post has been edited by Chip: 01 July 2014 - 10:21 AM

0

User is offline   Daedolon 

  • Ancient Blood God

#184

View PostChip, on 01 July 2014 - 10:04 AM, said:

How would I make the cheats "DNSTUFF" and "DNWEAPONS" set a player's gamevar?

For example:

onevent EVENT_ACTIVATECHEAT
    ifvare RETURN 1 // DNSTUFF
        setvar stuffcheat 1
    else ifvare RETURN 21 // DNWEAPONS
        setvar weaponcheat 1
endevent


The wiki explains a lot of EDuke32 functionality with examples.


View PostChip, on 01 July 2014 - 10:04 AM, said:

The wiki says there's an event that could very well do this and called "EVENT_ACTIVATECHEAT", but according to Eduke32 itself, that's not actually a known game event.

You're not using a version of EDuke32 with this event in it. It was added in revision 4515. Just download the latest version of EDuke32 to get support for the event.

This post has been edited by Daedolon: 01 July 2014 - 11:22 AM

0

#185

Did not tried yet, but this should work (and be more compact)
 onevent EVENT_ACTIVATECHEAT
  setvarvar MYVAR RETURN
 endevent


This post has been edited by RichardStorm: 01 July 2014 - 11:20 AM

0

User is offline   Chip 

#186

My problem was that Eduke32 doesn't seem recognize the event:

EDuke32 2.0.0devel r4476 (64-bit)
Compiled May 18 2014 03:04:25
Using D:/Programs/Duke3D/Duke3D Modds/New Queen/ for game data
Windows 7 (build 6.1.7600)
Initializing SDL system interface (compiled against SDL version 2.0.3, found version 2.0.3)
Using "windows" video driver
Searching for game data...
Using "DUKE3D.GRP" as main game data file.
Compiling: GAME.CON (211679 bytes)
Including: DEFS.CON (39726 bytes)
Including: VARS.CON (1847 bytes)
Including: USER.CON (50462 bytes)
Including: EVENTS.CON (21579 bytes)
EVENTS.CON: In event `EVENT_ACTIVATECHEAT':
EVENTS.CON:779: error: parameter `EVENT_ACTIVATECHEAT' is undefined.
Including: WEAPONS.CON (15298 bytes)
Found 0 warning(s), 1 error(s).


The code I had was this:

state maxthebackpack
setplayervar[THISACTOR].BACKPACKGOT 5
setplayer[THISACTOR].max_ammo_amount PISTOL_WEAPON 400
setplayer[THISACTOR].max_ammo_amount SHOTGUN_WEAPON 100
setplayer[THISACTOR].max_ammo_amount CHAINGUN_WEAPON 400
setplayer[THISACTOR].max_ammo_amount RPG_WEAPON 100
setplayer[THISACTOR].max_ammo_amount HANDBOMB_WEAPON 100
setplayer[THISACTOR].max_ammo_amount SHRINKER_WEAPON 100
setplayer[THISACTOR].max_ammo_amount GROW_WEAPON 100
setplayer[THISACTOR].max_ammo_amount DEVISTATOR_WEAPON 200
setplayer[THISACTOR].max_ammo_amount TRIPBOMB_WEAPON 20
setplayer[THISACTOR].max_ammo_amount FREEZE_WEAPON 200
ends


onevent EVENT_ACTIVATECHEAT
ifvare RETURN 1 						// Stuff
{
 setplayervar[THISACTOR].GOTPISTOL 1
 setplayervar[THISACTOR].GOTLASERPISTOL 1
 state maxthebackpack
}
else
ifvare RETURN 21 						// Weapons
{
 setplayervar[THISACTOR].GOTPISTOL 1
 setplayervar[THISACTOR].GOTLASERPISTOL 1
 state maxthebackpack
}
else
ifvare RETURN 22 state maxthebackpack				// Inventory
endevent


I've also just tried out your code in case I did something really silly that the event didn't like, but still wouldn't recognize the event. :P I'm going to try the absolute latest version of Eduke32 in case that does anything.

This post has been edited by Chip: 01 July 2014 - 11:34 AM

0

User is offline   Daedolon 

  • Ancient Blood God

#187

View PostChip, on 01 July 2014 - 11:29 AM, said:

EDuke32 2.0.0devel r4476 (64-bit)


EVENT_ACTIVATECHEAT was added in r4515, it does not exist in r4476.
0

User is offline   Chip 

#188

I've just tried the latest version - it all works now! I didn't realize that stuff like this (game events) are still being added regularly.

This post has been edited by Chip: 01 July 2014 - 11:40 AM

0

#189

Anyone for what i asked in #182 ?

EDIT: tried on another machine (an eeepc), no lights work on it

This post has been edited by RichardStorm: 01 July 2014 - 12:25 PM

0

User is offline   Kyanos 

#190

Try tweaking some pr_light variables in the console. Cant link i'm on my phone, look at the wiki console command list under polymer. I think one or two optimization variables could cause the spotlights not to work.

This post has been edited by Drek: 01 July 2014 - 01:44 PM

0

User is offline   Daedolon 

  • Ancient Blood God

#191

I think the range of how many sectors they pass can solve that issue.
0

User is offline   Mike Norvak 

  • Music Producer

#192

View PostMike Norvak, on 21 June 2014 - 08:15 AM, said:

Is there any option to change Gamma in mapster? F11 just changes brightness


BUMP!

Maybe a command?
0

User is offline   Hendricks266 

  • Weaponized Autism

  #193

cvars: vid_gamma, vid_contrast, vid_brightness
1

User is offline   Darkhog 

#194

Were "classic" and Polymost renderers updated to be able to utilize TROR? I don't want high graphics stuff like dynamic lights/shadows in my maps, but want to utilize TROR.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #195

Classic will work with simpler TROR. Polymost generally will glitch with TROR, and mirrors won't work with it in a map with TROR either.
0

User is offline   Darkhog 

#196

Oh. Good to know, I use Classic anyway. Though I've loaded TROR sample map (one with that subway cart thing and other stuff and saw some glitches like sprites being visible when they shouldn't (like cacti seen from an angle that should occlude it. It were only sprites though, geometry was OK, unless this ice thing and that thin platform weren't supposed to be floating.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #197

Just to be sure: trueror1.map demonstrates TROR. ror.map shows a simpler viewportal ROR that works in Classic and Polymost but hasn't had support added to Polymer yet (though said support would be much simpler than expanding TROR in Polymost).
0

User is offline   Darkhog 

#198

No, I think this was trueror. And as I said, geometry was fine in Classic, but there were issues regarding sprites being shown from angles they shouldn't be visible (like cacti in that pit with ladder and 2 (I think) pig cops.

//edit: Cacti in question: http://imgur.com/T8DYQff
...and same cacti visible through floor: http://imgur.com/1f1a0X8

There's also this oddity (horizontal bars, amount of which depends on how high you are, no, not THAT kind of high, don't think about it junkie!): http://imgur.com/mOBbCL5

This post has been edited by Darkhog: 03 July 2014 - 02:06 PM

0

User is offline   Chip 

#199

I'm working on displaying objects on the player's screen. 0 to 320 is the standard width, but what is the range for a widescreen resolution? I believe it starts at a negative value, but unsure exactly where it starts and to where it ends.

This post has been edited by Chip: 12 July 2014 - 07:11 AM

0

User is offline   Hendricks266 

  • Weaponized Autism

  #200

It depends on what widescreen resolution is actually in place, which you can detect with the gamevars xdim and ydim. The 0-320 range will always be centered, and the math works like this:

16:9 display
320 * xdim/ydim / 4/3 = 320 * 16/9 / 4/3 = 426 ⅔ units wide
-((426 ⅔ - 320) / 2) = -53 ⅓ is the left edge
320 + 53 ⅓ = 373 ⅓ is the right edge

You would absolutely want to use orientation flag 2048 for 16 bits of precision to approximate the decimal. (Multiply 320-based screen coordinates by 65536--or shiftvarl by 16 which is faster.)

-3495253 ⅓ is the left edge --> round down (left) to -3495254
24466773 ⅓ is the right edge --> round up (right) to 24466774

However.

Since this fractional stuff gets a tad messy, and since you would be either hardcoding one particular widescreen aspect ratio or writing lots of math, the optimal way is to take advantage of orientation flags 256 and 512. These treat the standard 0-320 coordinates as being pinned to the left edge and the right edge of the screen, respectively.
0

User is offline   Mark 

#201

A Google search did not provide an answer. Does someone have a link to a tut on how to create and / or setup a custom cutscene to play during the game? I want to display a short scene of a sector effect triggering elsewhere on the map.
0

User is offline   Mblackwell 

  • Evil Overlord

#202

In EVENT_DISPLAYROOMS change camerax cameray cameraz camerahoriz camerasect based on a custom camera sprite you place in the level and trigger the change based off of a var, which can also act as a countdown timer.
0

User is offline   Danukem 

  • Duke Plus Developer

#203

View PostMblackwell, on 12 July 2014 - 05:27 PM, said:

In EVENT_DISPLAYROOMS change camerax cameray cameraz camerahoriz camerasect based on a custom camera sprite you place in the level and trigger the change based off of a var, which can also act as a countdown timer.


Yup. He also needs to know how to manipulate angle and motion of the "camera" sprite, load values into it at map start, and start/end the sequence in-game via activation or some other method. Oh, and how to prevent unwanted things from happening while the cutscene is going on (like the player walking around, taking damage, etc.)
0

User is offline   Mark 

#204

To make things a little easier, the player would be in a small protected room when viewing the roughly 5 second cutscene camera and no camera movement is needed. However the Wiki is once again assuming that I know what else needs to be added besides the camera co-ordinates.

The triggering I should be able to figure out. And I think I saw somewhere a command to freeze the player so they stay in place to watch the cutscene.

I 'm a little confused about this part... " assume that the gamevar camerasprite is global and is set to the sprite ID of a special sprite when the camera is being used, and otherwise has a value of -1 "

But this amount of detail is getting a little OT for the simple question thread. I'll continue this in another thread I already started for con help.

This post has been edited by Mark.: 12 July 2014 - 06:20 PM

0

User is offline   Chip 

#205

View PostHendricks266, on 12 July 2014 - 07:34 AM, said:

It depends on what widescreen resolution is actually in place, which you can detect with the gamevars xdim and ydim. The 0-320 range will always be centered, and the math works like this:

16:9 display
320 * xdim/ydim / 4/3 = 320 * 16/9 / 4/3 = 426 ⅔ units wide
-((426 ⅔ - 320) / 2) = -53 ⅓ is the left edge
320 + 53 ⅓ = 373 ⅓ is the right edge

You would absolutely want to use orientation flag 2048 for 16 bits of precision to approximate the decimal. (Multiply 320-based screen coordinates by 65536--or shiftvarl by 16 which is faster.)

-3495253 ⅓ is the left edge --> round down (left) to -3495254
24466773 ⅓ is the right edge --> round up (right) to 24466774

However.

Since this fractional stuff gets a tad messy, and since you would be either hardcoding one particular widescreen aspect ratio or writing lots of math, the optimal way is to take advantage of orientation flags 256 and 512. These treat the standard 0-320 coordinates as being pinned to the left edge and the right edge of the screen, respectively.


This is very informative! I may be playing around with this later on.
Thanks. :P
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#206

The heck is this glitch with the floor shade in all of the Repository screenshots?

Posted Image
0

User is offline   Micky C 

  • Honored Donor

#207

That's just some old polymost glitch. Not sure if it's fixed these days or not.
2

#208

Still not fixed...
0

User is offline   Mark 

#209

Can someone post a link or a hint on how to use the floorz command in CON? The wiki has no documentation on it's use. I'm looking for a way to monitor a floor door's sector height to trigger something in an actor.

This post has been edited by Mark.: 19 July 2014 - 04:42 AM

0

User is offline   Hendricks266 

  • Weaponized Autism

  #210

'floorz' is a member of the sector structure. You use it with the getsector command.

getsector[<sector id>].floorz temp

In actor code, THISACTOR is a magic token for sectors that identifies the actor's current sector.

getsector[THISACTOR].floorz temp
1

Share this topic:


  • 18 Pages +
  • « First
  • 5
  • 6
  • 7
  • 8
  • 9
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options