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

Pages: 1 [2] 3
16
General / Re: How to hold the game map in tile-based 2d game?
« on: November 24, 2014, 02:33:36 pm »
Thanks very much for explaining.

Quote
And I would use a 1D std::vector and compute 1D indices from 2D indices, it's easier to manage.

So if i have 180*40 space(1d vector 7200) and need to get info about cell 45*20(for example), i should get access to vector[45*40+20]? I understand correctly?

17
General / Re: How to hold the game map in tile-based 2d game?
« on: November 24, 2014, 01:59:12 am »
So i have 2d std::vector, and i am holding every cell(even empty) in MxN space?
p.S. I am gonna hold a simple int, but is it good manner? If i have a cell with value 34, i wouldn't have idea what's that stuff. Or enum solves my question?

18
General / Re: How to hold the game map in tile-based 2d game?
« on: November 20, 2014, 01:30:51 am »
That's still not much.  Don't worry about your map size for now and start working on the rest of your game.  You can always do performance tests once you have something functional.

So if my tile keys are represented with int, i can use int mapMatrix[180][40] ? or nah?

19
General / Re: Welp, this is a good start: "Run-Time Check Failure #2"
« on: November 17, 2014, 10:49:31 pm »
Do you use MD linking for release and MTd for debugging? That's important.
And ofc use -d libs for debugging and those without -d to release :-)

20
General / Re: How to hold the game map in tile-based 2d game?
« on: November 15, 2014, 11:45:54 pm »
I meant 180x40 tiles and each is 32 pixels * 32 pixels :)
That means 7200 boxes, 180 in width and 40 in height.. My game uses view scrolling
I think it's a way bigger than 32x32  :)
But i got what u mean. I ll better use the std::vector in this case. I have no necessarity for big matrix if i have 30-40 objects on map, 6-8 of each type.

21
General / Re: How to hold the game map in tile-based 2d game?
« on: November 15, 2014, 11:13:06 pm »
For such a small map I'd say "it doesn't matter".
Just stick it in a std::vector and move on.
What's a big map then? I thought such matrix will use lots of CPU resourses

22
General / Re: How to hold the game map in tile-based 2d game?
« on: November 15, 2014, 11:11:50 pm »
Okay, for example i have a game without any tiles no more.
Let's imagine we have a basic class mapObject, or sth like that. We have an std::vector<mapObject*>,where we can hold objects of inherited objects like tree, bush, house or stone etc. Each object holds it's coordinates and size, key of texture and so on. Is it efficient solution? I mean, we can draw these objects on map using for cycle, check collisions with player etc..

Sorry for my bad English, sure you got what I mean.

23
General / [SOLVED]How to hold the game map in tile-based 2d game?
« on: November 15, 2014, 02:02:19 pm »
For example, i have 180x40 map, each tile is 32x32 pixels.
Is it efficiently to hold em in the two-dimensional matrix? Is this bad way? I am new to gamedev, so i have some troubles with this question.
Another idea is to hold game objects in vector of pointers, is this better one?
Thanks for answers.

24
General / Re: The program exiting with code -1073741515
« on: October 04, 2014, 01:09:44 am »
Damn, it works perfect in QTcreator on linux.

25
General / Re: The program exiting with code -1073741515
« on: October 01, 2014, 04:13:03 pm »
Decided to use MS studio instead creator in sfml case.
Can someone close topic? Thx for everyone above.

26
General / Re: The program exiting with code -1073741515
« on: October 01, 2014, 11:58:18 am »
The guy above says his sfml(gcc 4.7.0 compatible) works with 4.8.2 too..
seems like i need to install <5.0 version of qtcreator with 4.7 gcc

27
General / Re: The program exiting with code -1073741515
« on: October 01, 2014, 11:52:50 am »
If i understand you correctly..
Toogled stack in windows->views, while debugging the threads are empty. Put breakpoint at line 8


28
General / Re: The program exiting with code -1073741515
« on: October 01, 2014, 11:07:15 am »
Sure.
Btw, in Visual Studio everything works correctly.

29
General / Re: The program exiting with code -1073741515
« on: October 01, 2014, 10:40:24 am »
Started debugger, at line 8
 sf::RenderWindow App(sf::VideoMode(800, 600, 32), "Hello World - SFML");
exited with code 0xc0000135
Btw here's my output for gcc -v.


30
General / Re: The program exiting with code -1073741515
« on: September 30, 2014, 11:11:59 pm »
I use SFML with GCC 4.8.2 on RedHat 6.5 (via devtoolsets2) and it works fine. So the answer to that question would be "yes".
Thanx you too.

Pages: 1 [2] 3
anything