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 - darekg11

Pages: 1 2 [3] 4 5 ... 9
31
General / Clean Up
« on: January 25, 2011, 08:55:52 am »
Yes, You have to free all allocated memeory, for exmaple to delete imgae in C binding of SFML You have:
sfImage_Destroy;

Also if You allocated some memory dynamically You need to free it also.

Google information about new and delete operators.

32
General discussions / Updating SFML
« on: January 21, 2011, 09:13:18 am »
Well I used all expect Network, anyway I am sure it will be worth it, thanks.

33
General discussions / Updating SFML
« on: January 20, 2011, 09:37:52 pm »
I did not recompile SFML by myself I used precompiled binaries, so it will be big changes in code?

And i want to move to 2.0 when it will be officialy released.

34
General discussions / Updating SFML
« on: January 20, 2011, 09:19:31 pm »
Hello, it's rather quick and easy question but I wonder how updating SFML looks like? Right now I am using 1.6 and it's great library but when official 2.0 come out how updating look like? Will coping new libs and dlls be enough? Or will I have to do some changes in code?


Thanks in advance.

35
General / Map editor -questions
« on: December 30, 2010, 05:54:04 pm »
I know but this game is just being made to gain some experience around 2D graphic and it will be give only to my friends, since it's game about them ;)
And I don't want them to like draw some dicks to character animation, I know that they would ^.^

36
General / Map editor -questions
« on: December 30, 2010, 10:00:30 am »
Hello, as You all know guys adding elements one by one is kinda annoying so I decided as everyoen to create my own Map Editor, it's not going to be tile based. I will use GTK+ to create whole GUI system, but I have some question:
1)There are going to be some layers, like non-collising,collising,NPC etc and non collision is going to be the biggest one. I will create that layer from sprites for example 50x50 big and I want to place like 50 of them, now it will be ridiculous to later need to use 50 sprites in game to create background. Should I group the sprites into a big background image and save it as seperate file? and then just use one sprite for it? I think it will be a lot better solution.
2)How should save the fiel format, or all that data? I want to do simple file where it's all listed in several groups. Collision, NPC etc and then pack it to RAR file secured with password and durning game just unpack archieve and when closing game it would be automatically deleted, is it good way to secure somehow files from being changed?


Thanks in advance for answers, best regards Darek.

37
General / Collision and moving depends on collision point
« on: December 26, 2010, 08:56:38 pm »
This si how it detects angles at most important point of colliding:


Please tell if it's right.

BTW: How can I make quick test with over 100 objects placed in different places and of different size? Take some big black rectangle then randomize values and setting them to SubRects of that rectangle and then again randomize values and place subrects at that randomize values?

38
General / Collision and moving depends on collision point
« on: December 26, 2010, 07:20:53 pm »
I think it works pretty good, I will post in like 2 minutes graph how it detectes angles and tell me if it detect right.

39
General / Collision and moving depends on collision point
« on: December 26, 2010, 06:58:33 pm »
Should I pack that collision area into shape and then do sfShape_TransformToGlobal?

Right now I only get: -2 or -1 angles, damn somewhere something is wrong : >

40
General / Collision and moving depends on collision point
« on: December 26, 2010, 05:23:19 pm »
Okay I will do it I hope it's gonna work : >

41
General / Collision and moving depends on collision point
« on: December 26, 2010, 04:46:35 pm »
Okay, step by step:
1)Compute center of collision, by divinding height and width of collision area
2)Compute center of object, by dividing it's height and width
3)I substract v1.x and v2.x
4)I substract v1.y and v2.y
5) I put result to atan2 function

Will i be able to detect point for all 8 options?

42
General / Collision and moving depends on collision point
« on: December 26, 2010, 04:21:45 pm »
I just looked throught some pages and found out this:
atan2(v2.y,v2.x) - atan2(v1.y,v1.x), will it give me right angle?

Sorry for kinda chaotic way of posts.

43
General / Collision and moving depends on collision point
« on: December 26, 2010, 04:15:44 pm »
Component of vector 2D is like x value and y value?
Anyway how could I use atan2 with 2 vectors as function takes only 2 paramets?
I want to get an angle.

44
General / Collision and moving depends on collision point
« on: December 26, 2010, 03:34:32 pm »
Oh yeah, damn it was simple x_x
So it shoud looks like:


And if Angle will be over or below certain values then I decide where I can move, right? Damn thank You, I was thinking about somethign like this but I was not sure how it should look.

On regular I am patient guy ;) Happy Christmas by the way, lol.

P.S How to calculate it? Well probably i will find it on google so.

45
General / Collision and moving depends on collision point
« on: December 26, 2010, 12:28:01 pm »
Anyone?

Okay fuck let's talk another way how can I make sprite not move in direction ahead of obstacle because right now it's shagging like hell.

Pages: 1 2 [3] 4 5 ... 9