Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Voroz

Pages: 1 ... 3 4 [5] 6 7 ... 9
61
SFML projects / Re: SFML Light System - Let There Be Light
« on: May 05, 2014, 03:51:48 am »
Ok the fix for this (i just tried) is to create another view with the screen resolution instead of using the normal one and then use screenSize instead of viewSize for the
screenSize.y - worldposition.y
part like this:
sf::View lightView;
lightView.setSize(screenSize.x, screenSize.y);
lightView.setCenter(View1.getCenter().x, View1.getCenter().y);

screenSize.y - worldposition.y

ls.SetView(lightView);

62
SFML projects / Re: SFML Light System - Let There Be Light
« on: May 04, 2014, 07:45:55 pm »
So the question is: how would I handle this with varying map sizes since it seems the hulls are all relative to the window?
Not sure what you mean here. You just need to do
viewSize.y - worldposition.y
and the size of the map doesn't matter.

63
Feature requests / Hardware cursor
« on: May 01, 2014, 04:42:19 pm »
I'd like to see a hardware cursor since if you use a sprite to display the cursor then it's too unresponsive even at 60 fps.
I know it's been asked for before but i don't want to revive an old thread and i saw that Laurent thinks it's a very low priority but i think it's quite an important feature for most games that uses a mouse.

64
SFML projects / Re: SFML Test game
« on: April 28, 2014, 10:22:27 pm »
I've worked a bit more on it and updated the link with the new file.
Now there's shadows for the box2d objects and many more boxes. Spawning them randomly across the map.

65
SFML projects / Re: SFML Light System - Let There Be Light
« on: April 27, 2014, 09:25:25 pm »
If anyone else has this problem a temporary solution that works well is to put a convex hull with
"m_renderLightOverHull = false;"
in the top left corner. That will solve the problem. It worked for me with a 6x6 sized square, but you can probably make it even smaller.

66
SFML projects / Re: SFML Light System - Let There Be Light
« on: April 26, 2014, 05:52:22 pm »
If you have time you can try reproducing this by having max 1 light and placing it near the top left corner in your application. If that works for you i'd like to know.
There is always max 1 light with this problem but which light it is changes almost randomly it seems so to know which light is the bugged one you should only have 1 light spawned.

You can download the app here if you wanna see the issue for yourself: https://dl.dropboxusercontent.com/u/150244750/Release.rar

You can notice if you right click in the top left corner to make a light there the issue is not there. Only the characters light gives the issue because i spawned the character light first. But if i start shooting alot of fireballs(lights) it will sometimes make another light the issue for a while. It's acting very weird.


This is a version where i remove the character light and you can instead right click or fireball to see the issue with those lights. For example if you use the rightclick light and then fireball at the same time the issue will stay only with the right click light, but if you shut that light down then the issue is with the fireballs instead. Sounds a bit complicated and it is, but you can try it for yourself:
https://dl.dropboxusercontent.com/u/150244750/noCharLight.rar

67
SFML projects / Re: SFML Light System - Let There Be Light
« on: April 26, 2014, 04:22:27 pm »
Light class is pure virtual so you only could use it as base class for your own light class. Emmisive is light for rendering a light with a shape of texture. I use only Point_Light class.

Your bug is strange. I did't occur this kind of glitches. You could try to rebuild your whole code ;) When I get back to home I'll upload my version of ltbl with my blend modes and changes.
The thing is that i think this is a bug with ltbl and i think your code also has the bug because if you run the ltbl demo app that you have in your ltbl folder the same bug is there if you move the cursor to the top left corner. I want to know what change can be done to ltbl to fix this :/.

68
SFML projects / Re: SFML Light System - Let There Be Light
« on: April 26, 2014, 03:05:10 pm »
There is function setAlwaysUpdate. At first you have to add light to light system and then setAlwaysUpdate.

Quote
lSystem.AddLight(player.getLight());
    player.getLight()->SetAlwaysUpdate(true);
Ah ok. Yeah i tried it now but it made no differance. I update every light manually in my code anyway.

edit: Are you using light_point or normal light or emissive light or what btw? I'm using Light_Point because that's what i could get to work.

69
SFML projects / Re: SFML Light System - Let There Be Light
« on: April 26, 2014, 02:43:16 pm »
I mean make quad with max int value. Could you post screen shot? Are you set alwaysUpdate to true?
ok. one second for screenshot

edit: http://imgur.com/gAtE9D2

last picture is when my character is at the top left corner with that light.

edit2: Also i tried using AlwaysUpdate(). Not sure if i did it correctly though. I'm just suppoed to write
light->back().lightPoint->AlwaysUpdate();
? It takes no argument like true or false.

70
SFML projects / Re: SFML Light System - Let There Be Light
« on: April 26, 2014, 02:10:32 pm »
I'm creating light system by "create" function. I have some glitches when I was using only constructor.

Maybe large size (int_min, int_max) could solve your problem. I have bug in editor map. When I add new light i have to "reload" light system by setting view position to 0,0.

When I had only 1 (flashlight) I have ugly effect. No penumbra. I had at first add light and then I had to move it, that was only solve I know.

I have 0,0 x 10k,10k quad tree and all works fine.

what do you mean with "large size (int_min, int_max)"? I've tried making a new light view twice as big as the screen view so the corner that gives extra light won't often be a problem.
But that makes it so all lights becomes twice as big and they don't move where they should.

edit: I tried what you said with using create and also the 10k quadtree. it's the same problem still. I think you might have it too but just not noticed it in your app.

71
SFML projects / Re: SFML Light System - Let There Be Light
« on: April 26, 2014, 02:45:46 am »
I think this is a quad tree bug. Try to set bigger quad or make size of quad to 0, 0. That's all that I could say without code.
And what is the quad? This part?
ltbl::LightSystem ls(AABB(Vec2f(0.0f, 0.0f), Vec2f(static_cast<float>(0), static_cast<float>(0))), &App, "data/lightFin.png", "data/shaders/lightAttenuationShader.frag");
I did already set it to 0 after reading that someone had issue with crashes and after that i also had that issue when reducing size of one of my lights.

In your zombie game do you also have this issue if you have only 1 light source and try moving it to the top left corner? I've noticed that it's only 1 of the lights at a time that will cause this.


Here most relevant code for the lighting.

// --------------------- Light System Setup ---------------------
//Set AABB to 0 to avoid crashes with some light sizes
ltbl::LightSystem ls(AABB(Vec2f(0.0f, 0.0f), Vec2f(static_cast<float>(0), static_cast<float>(0))), &App, "data/lightFin.png", "data/shaders/lightAttenuationShader.frag");
newLight(&ls, &characterLight); /*This sets all the settings and adds the light etc.
didn't include the function because it would get messy and my bug is even represented in the ltbl demo so i don't think it's a coding issue.
*/


//Update light
for (int i = 0; i < characterLight.size(); i++){
    characterLight[i].lightPoint->SetCenter(Vec2f(character.back().circle.body->GetPosition().x*PPM, screenSize.y-character.back().circle.body->GetPosition().y*PPM)); //Y axis inverted
}

//Lights
ls.SetView(View1);
ls.RenderLights();
ls.RenderLightTexture();

72
SFML projects / Re: SFML Light System - Let There Be Light
« on: April 26, 2014, 01:20:22 am »
Hello. I'm using "let there be light" and i like it. The only problem i'm having is that in the top left corner and also some on the left side of the screen there is a spot where one light will make it so the whole screen lights up.
Maybe you wanted this as a spot for a sun or something but it doesn't work for my top view game. If i move up to that corner with my characters light it will get too bright.

I tried identifying the problem. My characters light was always the light that worked this way, my testlight on mouse position didn't have that effect at all.
So i tried switching spawn time of those 2 lights so the mouselight spawned before the characters light, and then the problem was gone (i thought).
 I then made it so that light didn't attach to mouse anymore but spawned outside the screen. That didn't work, it only worked if i had atleast 1 pixel of that light on my screen, so i adjusted it so i had (didn't even notice that small light anyway).

Later i noticed that when i added more lights the problem would come back and another light would become the "sun" light. The light that makes the screen light up much more if you move the light to the top left corner.

You can see this same problem in the "let there be light" demo program. Just move the light up to the corner and you see it. The problem is not that big in that application but i use bigger lights so i don't have to move that close to the corner for it to happen.

I've looked through the source code in search of any function that was made to cause that, but can't find anything and i'm not such a good programmer yet. Anyway do you know of a solution for this problem?

Thanks for your time.


73
SFML projects / Re: SFML Test game
« on: April 25, 2014, 12:49:08 am »
Yeah nice big image. ;D

Anyways looks quite nice. Did you also make the UI part?
I haven't made any of the art myself. I made the animation of the character walking in maya and then exporting all the frames to a png file, but the model itself was downloaded.

The UI i got from path of exile through extracting the images with some program. The icons for items i've found through google images and then scaling them down to fit and applying alpha channel. I used to have my own mana orb but it didn't look near as good as this one so :).

I did make that grass though with a maya tool and the floor part was made by taking an image and copy paste many of those floor parts to create one large area.

The lighting system is called "Let there be light".

So yeah i know that i can't really use this art for a final game but i wanted something that looked better than having to draw stuff in paint myself as a placeholder ^^. The art makes such a huge differance of how a game looks. I wish i could draw well :/.

edit: There's also an inventory on button i / b, i got someone to draw that bag for me very long ago, it doesn't look very great and at that time i was using magenta color for alpha channel which makes the bag get a purple outline.

edit2: I really like the technique of using maya for creating 2d images though to give a nice feel of 2.5d like the character is.
Also i realize that i should have said from the start that i wasn't actually the artist of all this. Don't wanna have you think that i made the art.

74
SFML projects / SFML Test game
« on: April 24, 2014, 09:20:06 pm »
Hi.

I've been working on and off on a game mostly to try and learn something and have fun. I'm not sure what sort of game i'd like it to become tbh and i'll probably try to learn some more programming before i finish it.

Anyway i just wanted to post it here to show what i've done so far with SFML :).

if you move down a bit from where you spawn in the game there are some box2d boxes and at coordinates 8000,2000 there are some enemies also made in box2d. They wont hurt you though, just follow you.

Tell me if you have any ideas of how i could make something of this that doesn't take too much time for 1 person, thanks for your time.

https://dl.dropboxusercontent.com/u/150244750/Release.rar

Make sure you are using a 1920*1080 or 1680*1050 screen and chose the corresponding exe file or it won't run as it should. Also i've tested this app on 1680*1050 and have only had someone else test it on a 1920*1080 screen (he said it ran normally on that resolution) so i can't be sure if it runs as it should on that higher resolution.

edit: Also i'm sorry about the filesize. Almost exclusively the big background image taking up that filesize. It's 75 mb because of the grass that i made in maya.

75
General / Re: Create unlimited amount of bullets
« on: January 03, 2014, 07:46:24 pm »
Ok i solved it. I was multiplying the speed with character.bullet[0].speed, which worked before when that bullet was always declared in the array. Now it wasn't. I noticed it when only the first bullet costed any mana (i was also subtracting character.bullet[0].manaCost). So now that works, but there are some performance issues i think in that i always create new bodies to the world. I need to check somehow that if there is a free body to use it will use that one instead.

Pages: 1 ... 3 4 [5] 6 7 ... 9
anything