Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 21 Nov 2005
Offline Last Active Aug 07 2015 07:35 AM

#5227739 Question about Frac() in GLSL shader

Posted by on 07 May 2015 - 07:48 AM

I'm not sure I understand what you're trying to say, you're talking about sampling the textures, and the calculation of the UVs comes before that.


If I pass a quad to OpenGL with top left corner with UVs (0, 0) and bottom right (1.0, 1.0) those are the exact values that reach the fragment shader.


Doing just frac() on those UVs will return 0.0 to all of them and only then I sample the textures using tex2D(), so the values will be all wrong.

#5159044 Color grading shader

Posted by on 08 June 2014 - 03:39 AM

Hi, thanks, did not know about textureFetch(), however it does not existe in GL ES 2.0.

By the way, I found the problem, and it was really stupid...


Disabling ATI Catalyst AI setting fixes it!

I guess this setting was making the texture into a 16 bit texture instead of 32 bit or something else really funky that did mess with the results...

Anyone has a clue what could cause it, and if there is a way to hint the drivers to not mess with the textures?

#5156681 Need some advice about Greenlight

Posted by on 29 May 2014 - 05:36 AM

Hi jefequeso!

To tell you the truth, those numbers you are teilling are kinda wrong...

My game went into Greenlight three months ago and yesterday it got approved by Valve.

The total number of "yes" votes to get into the top 100 is way smaller than 20 thousand, and even to get to top 10 (I've been there for a while) takes less than that.


I don't know your game, but if you already got youtubers playing it and it is going to be included in bundles, I guess it is has enough quality to be on Greenlight.

The main factor is, is there anything similar in Steam already?

If yes, and has higher production values, you're not going to have luck unless you have some unique features.

Otherwise, why not try it?


By the way, my game got approved without zero exposure in the media/youtube etc!

In my case it was a niche game that was unique to Steam, and I think that was the main reason people voted for it, especially after I announced a very cool feature that

boosted the votes a bit.


Greenlight actually gives you lots of exposure in the first days you publish, take this into account.

After the first week, the views will drop from thousands to almost zero, so get ready for that.


If you think your game is something players want, then go for it, as Tom Sloper said, it is just 100$, and anyway, it goes to charity smile.png

#5126844 Generating random points in a sphere

Posted by on 27 January 2014 - 07:01 PM


Here is the code that I use to generate uniform random points on a sphere (which is derived from the wolfram link posted above):

float u1 = randomRange( -1.0f, 1.0f );
float u2 = randomRange( 0.0f, 1.0f );
float r = sqrt( 1.0f - u1*u1 );
float theta = 2.0f*math::pi<float>()*u2;

return Vector3( r*cos( theta ), r*sin( theta ), u1 );

Thanks, it seems to work great :)

#4930946 How much work to make a game client like bloodline champions?

Posted by on 13 April 2012 - 07:43 AM

It will be expensive, think something like 3 to 4 months and a nice chunk of money.

#4924713 Different outfits for a character? (low poly)

Posted by on 23 March 2012 - 12:06 PM

Because if it's like that... then I have to make like millions (not exagerating) of character models so all possible clothes + color combinations?? Posted Image

Of course not, in this cases usually the cloth textures are in greyscale, and the color of each part is changed using code.

#4923262 How long would it take to make a decent full fps? (One person team..)

Posted by on 19 March 2012 - 05:53 AM

Depends on your experience and how much money you have to invest.
Could be done in one year or less if you are a experienced coder and pay someone to do the 3d art (would cost some thousand dollars I would expect).
If you can't pay, well, maybe you can find some artists that also want to make an fps. Your project has less chances of being finished this way though.
If you can't code, and you can't do 3d art, well, you'll have to start somewhere, but then, expect your project to take years to complete (you'll need a couple of years either in programming or art to get at a decent level)

#4911617 Finalizing Audio For Game

Posted by on 10 February 2012 - 04:49 AM

The missing tool that I'd like to have is a VST or some plugin that simulates the output of a device such as the iPhone. Or even better, a setup that will stream the audio output from the audio software directly to the device itself in real time - this way it'll be much easier to tweak the sounds and volume/compresing etc.

I also wanted a nicer way to preview audio in the devices, and you just gave me a nice idea for a VST, I'll give it a try this weekend.

#4904271 Rendering textures from obj file

Posted by on 19 January 2012 - 08:37 AM

"I thought that opengl es requires vt to be exact same amount as v. But there we have more texture coordinates than vertices."
Yes, OpenGL does, but obj does not require that. You can however expand the obj to have the same number of UVs and vertices.

To load the obj correctly you can't simply use the vertices supplied in the file, as lots of them usually need to be duplicated (or triplicated) in order to allow different UVs and normals per vertex.
For example, if you have a cube, and want each face of the cube to have different UVs (and in most cases, you'll want this), it means that each cube vertex needs to be duplicated 3 times.
So in the obj, you actually create your mesh vertices when you read the 'f' stuff, not when you read the 'v' (but of course, you need to read those to use them in the 'f')
The numbers after the slashes are the index of the UVs and normals.

For example:
f 5/5 4/13 8/14

This means to create a new face that uses vertex positions 5, 4 and 8, but uses UVs 5, 13 and 14.
You have to check if you already created a vertex that contains those attributes, otherwise create a new one.

#4902353 Lighting untextured polygons

Posted by on 13 January 2012 - 08:38 AM

It depends how you are defining the polygon color. If you are using the glColor functions, those only work if lighting is disabled.
To change the color used for lighting you have to define a material, with the glMaterial functions.

#4902291 How to get into graphical game programming?

Posted by on 13 January 2012 - 04:31 AM

You need to be comfortable working with pointers, templates, memory manipulation, debugging mildly complex programs, building programs in the range of 2000 lines of code minimum...

Everyone tries to make this step about 30% of the way to where they need to. If you think you're ready in 3 weeks, try in 9-12. Learning graphical programming concepts isn't exactly simple and is best done when you're already comfortable with the programming concepts that library integration brings.

Not exactly true, it depends, really. I moved from text-only to graphics programming without barely knowing about pointers and memory allocation (and did not know anything about the other topics, I just knew loops, arrays and structs, not much more). I did barely know what a library was and struggled with linker errors all the time.
That was more than a decade ago, with time I learned everything else and now I work as a graphic programmer.

Templates, really? What use there is the need for learning that concept at this point, he is not going to need that yet, he just needs to start messing around with some graphic libraries, SDL and such, and work his way up the rest of concepts. Working with graphics instead of text is surely more complex for a beginner but also much more interesting, and that's a sure way to make him want to learn more stuff instead of having the feeling of hitting a roadblock.

#4901965 Display List, Frustum Culling, Terrain LOD

Posted by on 12 January 2012 - 05:27 AM

Olá, lembro-me de falar contigo a uns tempos atrás quando começaste nisto do 3d Posted Image

But for Terrain I have my doubts, if I put the whole terrain in a display list, will it become heavy?

Faster than using glBegin .. glEnd

Does OpenGL do frustum culling to a display list?

No (with some exceptions, NVidia drivers do that for you), however it is a good a pratice to do frustum culling yourself.

What can I do to improve my engine?

Divide the terrain in chunks, and do a frustum test for each one.
Then improve it with a guadree, to reduce number of tests.
Then you can start looking into having LOD and other advanced techniques.

#4895702 Graphics & Languages [2D etc.]

Posted by on 20 December 2011 - 07:38 AM

What kind of pascal are you talking?
If you look into the more recent object pascal/delphi, it is perfectly suitable for making games.
Check out this game I've written using "modern" pascal: www.sushiquest.net
Also you might be interested in my game engine engine: www.pascalgameengine.com
I'm going to release it next month, and it allows to create 2D and 3D without having to worry about the low level stuff :)
And here is also another link with lots of helpful resources:

#4895252 Unity on the Wii with devkitPro?

Posted by on 19 December 2011 - 05:09 AM

I don't think the "normal" Unity allows to create Wii builds.
And since their requirments are "You must be a an Authorized Developer for the Wii console and obtain a Wii development kit", so I don't think you can get a version that can do it..
And even if you could, there's a very high probably of it not being compatible with devkitPro.
If you really want to make games for Wii, you'll have to use devkitPro and write C code, search in the net, I think I've seen some free graphic engines for the Wii before, made from someone in the homebrew community.

#4894525 SKY BATTLES - iOS game work in progress

Posted by on 16 December 2011 - 10:44 AM

Looking nice, how many people are working on it?
I suggest improving the water, right now it really stands out as a scrolling plane under the terrain. breaks the game atmosphere (the sky is very good though).
The best way to do this is to have a custom water mesh with proper UVs that you can scroll around, but try making the scrolling speed slower, and using a different water texture with less constrast.