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

Pages: [1]
1
Window / [Solved] Yet another isolation of single Key events
« on: June 14, 2008, 11:47:16 pm »
I was able to solve the problem.. I moved in a few statements here and there, moreso.. for handling events, I had a problem with polling. Once, I moved in the key handling event statements within the polling loop, things went smooth.

Still thanks for the help  :)

Dexter

2
Window / [Solved] Yet another isolation of single Key events
« on: June 13, 2008, 03:50:42 pm »
This is essentially the code.. This is within the player class.. I dint put in other things here to keep things simple.

Code: [Select]
   
x += int (xspeed * TILEW);


After this code.. I put in this to restore the effect of speed, so that on the next loop count..if there is no key press..there is no hangover from the above xspeed.

Code: [Select]
xspeed = 0.0f;

3
Window / [Solved] Yet another isolation of single Key events
« on: June 13, 2008, 03:19:45 pm »
Hi..

Im trying to work out a game where the character movement is governed by arrow keys. I have used both :

Code: [Select]
if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Right))
        xspeed = 1.0f;


AND

Code: [Select]
if(Input.IsKeyDown(sf::Key::Right)) xspeed = 1.0f;

I do understand that the snippet 1 is present for single key presses and the latter one for situations with continous key presses. Now in my case, the latter one should be the solution since I want my character to keep moving till the time I release the arrow key.

To my misfortune, even when I press the right key (in this case) just once..my character shows a displacement which corresponds to more than 1 key hit event.. it shows an equivalent displacement of 2-3 key hits..

Any ideas.. how I can rectify this and why is the system behaving as it is ?

Thanks
Dexter[/code]

4
General discussions / Draw buildings with 2d iso Diamond
« on: March 26, 2008, 11:50:29 am »
I have a 2d isometric tiles(64 by 32) system drawn in diamond manner. It took me some time to understand the basics of this and draw the same. I want to now, place buildings on this isometric world. I have been searching a lot of places, but I get boggled down. Can any1 please suggest me as to how to approach this. I want to keep things simple as of now.

I would like to know as to what kind of art would i need..dimensions or any other info would help!

Also how to go about the whole thing of plotting buildings.

This might not be the best place to ask but I think there are a lot of people with experience who can guide me in the right direction.

Thanks  :)

5
General discussions / Toggle Resize between different video modes
« on: March 25, 2008, 10:42:24 am »
Hi..

Am still new to SFML and am trying to achieve the following:

Have this feat as an option in video modes:

- 800 by 600
- 1024 by 768
etc

Can any1 please suggest me as to how to go about it?

The scenario is simple..I have a 2d map array kind of a thing and an image of 32 by 32 that is to be displayed on the screen, concurrent with the 2d map array. My problem is, for the same 2d array extents..how do i manipulate the display??

If my post sounds obscure..(Im just thinking aloud..so it might!)..pls let me know..

Thanks  :)

Pages: [1]
anything