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

Pages: [1]
1
General discussions / Re: void pointer
« on: May 21, 2015, 02:14:20 pm »
Ye guess you guys are right. Wanted to be lazy but guess its a bad solution long term.

2
General discussions / Re: void pointer
« on: May 21, 2015, 01:30:26 am »
Thats pretty much how I'm solving it now, but would be nice if they just made it so its there in the official release. Would save me a lot of time and I don't have to write extra code to achieve more or less the same thing.

If no one wants to use it, they simply ignore it and the void* is just the to hold user data.

Quote
I dn't see how a void* pointer would help knowing what sprite the mouse is on

Well you said it yourself. Lets say that i cast a string to void and put it inside userdata variable for the sprite. Then i simply check if the sprite contains the coordinates of the mouse and get the userdata variable, cast it back to string and see what the sprite is. It could even contain a pointer to a class object and stuff.

That would make life alot easier.

3
SFML projects / Re: Shooter project - Early development
« on: May 21, 2015, 12:56:05 am »
cheers mate. Got the map editor up and running now. Still alot of work left but I'm getting there.
https://www.youtube.com/watch?v=AReyCZyi8AE&feature=youtu.be

4
General discussions / void pointer
« on: May 21, 2015, 12:45:47 am »
Hi there guys. Is it just me or would it be nice to have a void* variable for the sprites which the user can set in order to distinguish between sprites.

For example, lets say that i'm making a map-editor and wants to play the game at the same time. I'm drawing the the game objects on top of the screen and when i click on them with the mouse, i pretty much spawn that item. Its kind of hard to distinguish those sprites from the other sprites which might be the rest of the UI.

If we had a void* i could just see what sprite contains the mouse coordinates and get the void* from the variable and cast it back to whatever i set it to and see if the sprite is the editorItemSprite for example.

Just a though.

5
SFML projects / Shooter project - Early development
« on: May 20, 2015, 02:42:27 am »
Hi there guys. I'm creating a platformer game and though I'll share my youtube channel if anyone is interested in following the project. If you have any questions or perhaps better artwork, let me know :)

This is my channel on youtube:

https://www.youtube.com/channel/UC9deB5U8ODjUnM__ou3AptA

I'll try to update this thread as the game progresses and talk a little in upcoming video about the game logic.

Best regards
nilo

Pages: [1]
anything