Register FAQ Search Today's Posts Mark Forums Read
Go Back   JazzJackrabbit Community Forums » Maintenance & Feedback » JJ2+ Issue Tracker

Feature Request Scriptable custom textured background

szmol96 szmol96's Avatar

JCF Member

Joined: Jun 2013

Posts: 83

szmol96 is doing well so far

Jul 13, 2018, 02:11 PM
szmol96 is offline
Reply With Quote
Scriptable custom textured background

Well, the title says it all. Just ignore it if I'm asking something that can't be done or not worth the effort.
__________________
All your base are belong to us.
Stijn Stijn's Avatar

Administrator

Joined: Mar 2001

Posts: 6,964

Stijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to behold

Jul 15, 2018, 10:36 AM
Stijn is offline
Reply With Quote
It would be useful if you expand a bit on what 'scripted' means in this context. If you mean a fully customizable texture distortion effect, a la shaders, that would probably require some major changes to the rendering pipeline, and is therefore a lot of work. But if you want to change a relatively limited set of parameters (like speed and fade colours are parameters you can tweak now), that could be easier to implement. In that case it would help if you described the kind of parameter you'd like to change, though.
szmol96 szmol96's Avatar

JCF Member

Joined: Jun 2013

Posts: 83

szmol96 is doing well so far

Jul 17, 2018, 08:31 AM
szmol96 is offline
Reply With Quote
What I meant was the former one you described: being able to script what shape the textured background takes. No special effects like blur, glowing and the like, though.
__________________
All your base are belong to us.
Seren Seren's Avatar

JCF Member

Joined: Feb 2010

Posts: 864

Seren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to all

Jul 17, 2018, 09:09 AM
Seren is offline
Reply With Quote
How do you imagine the API for that? What new classes or functions would you want to be added? Can you post a snippet of code showing sample use and its intended effect?
__________________

I am an official JJ2+ programmer and this has been an official JJ2+ statement.
szmol96 szmol96's Avatar

JCF Member

Joined: Jun 2013

Posts: 83

szmol96 is doing well so far

Jul 17, 2018, 01:06 PM
szmol96 is offline
Reply With Quote
Unfortunately I can't give answers to your questions, because I'm not familiar with any of this stuff. It was just an idea, it's your decision whether you implement it and how you do it. Please don't take it as a demand.
__________________
All your base are belong to us.
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,978

Violet CLM has disabled reputation

Jul 17, 2018, 02:03 PM
Violet CLM is offline
Reply With Quote
The point of the questions is trying to figure out what your idea is.
__________________
szmol96 szmol96's Avatar

JCF Member

Joined: Jun 2013

Posts: 83

szmol96 is doing well so far

Jul 19, 2018, 08:17 AM
szmol96 is offline
Reply With Quote
Well, the idea I have doesn't involve scripting only and could be used by anyone less familiar with AS. It's about drawing a heightmap with given image resolutions, which would determine the "shape" of the background itself, and the orientation of that shape could be manipulated in the script. I'm thinking of properties like zoom, stretch, rotation on different axes and mirroring (copies the shape and renders it on the opposite side of the center point).

EDIT: code for warp horizon in vertical orientation would be something like this:
Quote:
jjTEXTUREDBG customBG;

customBG.loadHeightmap("heightmapExample.png"); //loads a heightmap. using a flat shape for this example
customBG.zoom = 0;
customBG.stretchX = 0; //
customBG.stretchY = 0; //no stretching on any of the axes
customBG.stretchZ = 0; //
customBG.rotationX = 0;
customBG.rotationY = 0;
customBG.rotationZ = 256; //rotated 90 degrees clockwise on the Z axis with angle ranging from 0 to 1023
customBG.mirrored = true; //mirrors background shape around center point
__________________
All your base are belong to us.

Last edited by szmol96; Jul 19, 2018 at 09:08 AM.
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,978

Violet CLM has disabled reputation

May 4, 2023, 10:34 AM
Violet CLM is offline
Reply With Quote
This proposal is a lot more feasible now that we have property families like jjLAYER::warpHorizon. It would be difficult to make a rotated warp horizon run at a decent speed--horizontal lines fundamentally run much faster than vertical ones--but some more properties could certainly be added if there is interest.
__________________
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 02:15 PM.