Jump to content


Photo

SLUDGE Adventure Engine now with GLES2 support

port adventure game developmentadventure development

  • Please log in to reply
51 replies to this topic

#21 OFFLINE   BigMc

BigMc

    Member

  • Members
  • PipPip
  • 29 posts
  • Local time: 11:20 AM

Posted 15 January 2012 - 06:25 PM

Thank you very much for now! :)
There's still a chance that others can make it work with this build, because the shader files are just not at the right place. Normally everything is installed to /usr/local during "make install". So all the folders from the tarball (or at least the shaders in share/sludge) have to be copied there on the Pandora. (i.e. /usr/local/share/sludge/scale.vert etc.). If the shaders are found, we will see it from the output.

Then it could be that they fail to build, because I didn't yet specify the default precision for floats in the fragment shaders. If that should be the case

precision mediump float;

has to be added to the beginning of all .frag files.

EDIT: I fixed the missing pkg-config files thing , the black screen and the encoding issue in SVN. Remains the EGL configuration change for people who want to compile themselves.

#22 OFFLINE   Clop

Clop

    Advanced Member

  • Members
  • PipPipPip
  • 176 posts
  • Local time: 11:20 AM
  • LocationBesançon (France)

Posted 15 January 2012 - 07:17 PM

Ok, still a black window but logs seems much better. I added the precision line to the frag files and run correctly my test (wrong paths in my PND).

*** Engine compiled Jan 15 2012 at 18:35:31.
Video mode 480 360 set successfully.
Compiling vertex shader...
EGL Opening X11 display
EGL Getting EGL display
EGL Initializing
EGL_VENDOR: Imagination Technologies
EGL_VERSION: 1.4 build 1.4.14.2616
EGL_EXTENSIONS: EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_vg_parent_image EGL_IMG_context_priority
EGL Found 2 available configs
EGL Config 0
EGL Binding API
EGL Creating Context
EGL Creating window surface
EGL Making Current
EGL Complete
Shader InfoLog:
Success.
Compiling fragment shader...
Shader InfoLog:
Compile failed.
ERROR: Invalid call to function fwidth: extension OES_standard_derivatives is not enabled.
ERROR: 0:24: 'assign' :  cannot convert from 'float' to '2-component vector of float'
ERROR: 2 compilation errors. No code generated.
WARNING: 0:29: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 0:30: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 0:31: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 0:32: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 0:51: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 5 compilation warnings.
Error building "scale" shader program!
Advanced anti-aliasing is not possible. Using linear anti-aliasing instead.
Compiling vertex shader...
Shader InfoLog:
Success.
Compiling fragment shader...
Shader InfoLog:
Success.
Compiling fragment shader...
Shader InfoLog:
Success.
Shaders compiled.
Shader program linked.
Built shader program: 560008 (yuv)
Compiling vertex shader...
Shader InfoLog:
Success.
Compiling fragment shader...
Shader InfoLog:
Success.
Shaders compiled.
Shader program linked.
Built shader program: 770011 (texture)
Compiling vertex shader...
Shader InfoLog:
Success.
Compiling fragment shader...
Shader InfoLog:
Success.
Shaders compiled.
Shader program linked.
Built shader program: 980014 (color)
Max texture image units: 8
Deleting texture while list is already empty.
Deleting texture while list is already empty.
loadBankForAnim: New sprite bank created OK
Failed to create stream from MOD: Unsupported type
SLUDGE v2.2.0 non-fatal indigestion report
I can't load a music resource I've been told to play. Sorry.
loadBankForAnim: New sprite bank created OK
loadBankForAnim: New sprite bank created OK

I don't know if that explains the black window... And , now, I'm going for my luggage :D
---------------
Clop' - My ports: http://stuff.doumenc...orts/index.html
UrbanTerror fan here, if you're playing it too, don't hesitate to contact [FiD]Clop :D

#23 OFFLINE   BigMc

BigMc

    Member

  • Members
  • PipPip
  • 29 posts
  • Local time: 11:20 AM

Posted 15 January 2012 - 07:22 PM

The line

#extension GL_OES_standard_derivatives : enable

has to be added to the beginning of scale.frag.

EDIT: And by the way, alure should be compiled with VorbisFile, FLAC and DUMB available so that all the games can play their sounds. But that can wait for later. Out of Order will have no music without DUMB.

#24 OFFLINE   Clop

Clop

    Advanced Member

  • Members
  • PipPipPip
  • 176 posts
  • Local time: 11:20 AM
  • LocationBesançon (France)

Posted 15 January 2012 - 07:39 PM

Added it, still a black window :D

Video mode 480 360 set successfully.
Compiling vertex shader...
EGL Opening X11 display
EGL Getting EGL display
EGL Initializing
EGL_VENDOR: Imagination Technologies
EGL_VERSION: 1.4 build 1.4.14.2616
EGL_EXTENSIONS: EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_vg_parent_image EGL_IMG_context_priority
EGL Found 2 available configs
EGL Config 0
EGL Binding API
EGL Creating Context
EGL Creating window surface
EGL Making Current
EGL Complete
Shader InfoLog:
Success.
 
Compiling fragment shader...
Shader InfoLog:
Compile failed.
WARNING: 0:25: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 0:30: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 0:31: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 0:32: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 0:33: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 0:52: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results
WARNING: 6 compilation warnings.
 
Error building "scale" shader program!


About alure comilation: yeah, i know i didn't built it with correct support. But, as you say, that can wait a bit.
---------------
Clop' - My ports: http://stuff.doumenc...orts/index.html
UrbanTerror fan here, if you're playing it too, don't hesitate to contact [FiD]Clop :D

#25 OFFLINE   BigMc

BigMc

    Member

  • Members
  • PipPip
  • 29 posts
  • Local time: 11:20 AM

Posted 15 January 2012 - 07:44 PM

You could copy scale_noaa.frag to scale.frag for now to get rid of the warnings and the antialiasing.

#26 OFFLINE   Clop

Clop

    Advanced Member

  • Members
  • PipPipPip
  • 176 posts
  • Local time: 11:20 AM
  • LocationBesançon (France)

Posted 15 January 2012 - 08:03 PM

:D

It works (kinda)!

First real bug: When mouse gets off window, application freeze.


For those who want to try it, PND file attached and the example can be found here : http://depot.doumenc...ra/VerbCoin.slg (forum don't let me upload it).

Just drop the slg file somewhere and run the PND. You should have a File Selection Dialog pop up, just choose the slg file.

Attached Files


---------------
Clop' - My ports: http://stuff.doumenc...orts/index.html
UrbanTerror fan here, if you're playing it too, don't hesitate to contact [FiD]Clop :D

#27 OFFLINE   BigMc

BigMc

    Member

  • Members
  • PipPip
  • 29 posts
  • Local time: 11:20 AM

Posted 15 January 2012 - 08:08 PM

Yay! Good work! :D

The background shouldn't be black, but I hope we can get that resolved too. :)

#28 OFFLINE   sebt3

sebt3

    PowerFreak Troll, leave him alone

  • Members
  • PipPipPip
  • 2284 posts
  • Local time: 11:20 AM

Donator

Posted 15 January 2012 - 08:42 PM

The background shouldn't be black, but I hope we can get that resolved too. :)

What size is the background texture ?

- [ PNDS ] - [ Yactfeau ] -

Spoiler

#29 OFFLINE   BigMc

BigMc

    Member

  • Members
  • PipPip
  • 29 posts
  • Local time: 11:20 AM

Posted 15 January 2012 - 08:53 PM

1024x512

#30 OFFLINE   sebt3

sebt3

    PowerFreak Troll, leave him alone

  • Members
  • PipPipPip
  • 2284 posts
  • Local time: 11:20 AM

Donator

Posted 15 January 2012 - 09:32 PM

ahh that's it, 512x512 is the max size supported

- [ PNDS ] - [ Yactfeau ] -

Spoiler

#31 OFFLINE   BigMc

BigMc

    Member

  • Members
  • PipPip
  • 29 posts
  • Local time: 11:20 AM

Posted 15 January 2012 - 09:36 PM

Ok, that should be easily fixed, as the code for resizing is already there to get to powers of two. Is there a way to find out at compile time that it's compiled for Pandora or do I have to let the user pass an --enable-pandora?

#32 OFFLINE   sebt3

sebt3

    PowerFreak Troll, leave him alone

  • Members
  • PipPipPip
  • 2284 posts
  • Local time: 11:20 AM

Donator

Posted 15 January 2012 - 09:50 PM

Ok, that should be easily fixed, as the code for resizing is already there to get to powers of two. Is there a way to find out at compile time that it's compiled for Pandora or do I have to let the user pass an --enable-pandora?

There is no way to guess that (well my toolchain define PANDORA, but that's only one in many...). May be a --texture-max-size would be better ;) as many other GLES device have the same limitation (dont know about the recent device)

- [ PNDS ] - [ Yactfeau ] -

Spoiler

#33 OFFLINE   BigMc

BigMc

    Member

  • Members
  • PipPip
  • 29 posts
  • Local time: 11:20 AM

Posted 15 January 2012 - 10:15 PM

Ok it's not that easy to get the textures smaller. The current code assumes they are scaled up. This may take a while.

#34 OFFLINE   Geca

Geca

    Advanced Member

  • Members
  • PipPipPip
  • 146 posts
  • Local time: 10:20 AM

Posted 15 January 2012 - 10:57 PM

Amazing!

#35 OFFLINE   BigMc

BigMc

    Member

  • Members
  • PipPip
  • 29 posts
  • Local time: 11:20 AM

Posted 16 January 2012 - 02:19 AM

If someone wants to read something about SLUDGE in german, there's an introductory article in freiesMagazin 12/2011.

#36 OFFLINE   BigMc

BigMc

    Member

  • Members
  • PipPip
  • 29 posts
  • Local time: 11:20 AM

Posted 16 January 2012 - 01:48 PM

Scaling down the textures is probably not the best idea, because some games have very large textures. If there is a scene that doesn't fit on the screen, the background texture can easily be over 2000 pixels wide and only a part of that is visible.

I think a better solution would be to have a small library wrapping around OpenGLs texture handling functions and taking care of splitting large images into small enough chunks (creating multiple GL textures) and putting them back together when drawing.

Such a thing could also take care of creating only textures with sizes in powers of two. It could be used for any game port. I wonder if that already exists, I didn't find anything. Or if at least someone did something similar in a game. If not, is someone interested in creating it? I don't know when I'll come around to do it myself.

#37 OFFLINE   mcobit

mcobit

    Does this thing work?

  • Members
  • PipPipPip
  • 5691 posts
  • Local time: 12:20 PM
  • LocationFrankfurt a.M., Germany

Donator

Posted 16 January 2012 - 01:50 PM

Good idea, but I would be concerned about performance, if you stitch textures together. It still has to be loaded by the sgx after all.

#38 OFFLINE   BigMc

BigMc

    Member

  • Members
  • PipPip
  • 29 posts
  • Local time: 11:20 AM

Posted 16 January 2012 - 11:18 PM

It depends all on the game. Out Of Order's native resolution is 640*480 and I'm not aware of any larger backdrops there. Some of the newer games have backdrops over 2000 pixels wide. If there are new games developed, the developers can always create a build with smaller resolution for mobile devices if they want.

So how many 512x512 textures can be loaded at the same time? If it's only about memory, one of them is 512 kB.

#39 OFFLINE   bonapart

bonapart

    Newbie

  • Members
  • Pip
  • 7 posts
  • Local time: 01:20 PM
  • LocationNevinnomyssk

Posted 17 January 2012 - 04:54 AM

BigMc, 24mb per all textures if i'm not mistaken
p.s. will perform test on maemo(n9\n900) in nearest time

#40 OFFLINE   BigMc

BigMc

    Member

  • Members
  • PipPip
  • 29 posts
  • Local time: 11:20 AM

Posted 17 January 2012 - 10:31 PM

I'm optimistic that stitching together a few textures should be okay. And I'm already curious about the Maemo results. :)



Also tagged with one or more of these keywords: port, adventure, game, developmentadventure, development

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users