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.

Topics - brainydexter

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

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;


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 ?


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  :)

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

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

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]