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

Pages: 1 [2]
16
General / Re: Need Help From Someone Experienced with SFML
« on: October 04, 2015, 02:40:49 am »
Okay, thank you! My main concern was that I wouldn't be able to implement the same code and I didn't want to begin altering what I have only to figure out, hey, I need to entirely alter the design of my game. But thank you, I'll give that a shot.

17
General / Re: Need Help From Someone Experienced with SFML
« on: October 04, 2015, 02:26:29 am »
The game portion of the code is irrelevant.. It's based on a random number generator that only works if you're in the coordinates marked by '~'. My original C++ game is a while loop that continuously redraws a map, given a character position (X,Y). There are limits that the character, marked by 'X', cannot leave the boundaries of the map. As I said above, it's all in one huge 2D array given by example: int Map[17][22] = { ... } . That is how I drew the map, and the map is essentially re-declared and re-initialized every time an outside function called DrawMap(Position of Character) is called. That's how I made it so that the map looks the same every re-drawing except with the 'X' (Character) being in a different position.

So, given all of that, I have something that basically looks like this.

int a = 0, b = 0;
a = _getch();
if (a == 224)
      b = _getch()
      if (b == ...)
the different options for b are the different ASCII values for the arrow keys. That's how I get the 'X' to move around the map. What I'm wondering is, if I replace my map with graphics from SFML, will I still be able to implement this same type of code to move the character? Keep in mind, I have restrictions that say if character is in (x,y) and it's next to a wall, they cannot move into the wall. If you want to see the actual code, I'll send it to you. I don't want to just post my entire program because that ruins the point of me creating my own logic for it, especially because it could definitely be written in a lot of different ways.

ESSENTIALLY, all I'm asking is will I have to entirely rewrite my entire program? Or is it possible to merely replace my DrawMap() function with 2D graphics using SFML?

18
General / Re: Need Help From Someone Experienced with SFML
« on: October 04, 2015, 02:07:56 am »
I'm just asking for someone to help. Rather than go through every small detail of SFML, I was wondering if someone could help guide me in just building a small interface with the map I have. And I was also wondering if I would be able to take my code for movement and how I would implement it into a SFML interface.

19
General / Need Help From Someone Experienced with SFML
« on: October 04, 2015, 02:02:44 am »
Basically, my situation is this. I have created a small game (an image of the screen is down at the bottom). It's entirely text-based; I used a 2D array to create the map and I created the boundaries and everything using simply cin && cout options. By the way, it runs on C++. I was wondering if there is anyone who could help me, rather than create an entire new game, merely replace the map I have created with actual images (let's say brown for a wall, green for grass, etc.). I'm not trying to build an entirely new game, I merely want to replace my text-drawn map with an actual 2D image.

Pages: 1 [2]