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

Pages: [1]
1
SFML projects / Re: My Practice Beginner Games
« on: September 10, 2015, 12:19:57 am »
To me it looks like the ball gets faster and its trajectory gets curvy if you cut it fast enough, could be my imagination though
Nah, it is definitely this way but the overall effect is kinda small and negligible. You taking a huge risk of moving the paddle this fast only to get the ball slightly curvy and eventually score a point after 5 "moving-reflects". I think it would be nice to induce a bigger reflection-change independent of the speed you move the paddle but dependent on the area in which the paddle gets hit (center=ideal reflection | corners=steep reflection).

2
SFML projects / Re: MapMaker - Startproject for SFML
« on: September 10, 2015, 12:14:33 am »
You should totally use getters and setters. Copying the member once is a bad idea, because it leads to a copy which wouldn't update if the original changes.
Yeah, I had quite some trouble with this problem. You forget to change both member-variables once and the whole thing reacts quite strange to certain inputs. So I already imagined that it's bad to copy some specific variables but I thought calling a getter too many times isn't a desired solution either. ^^''

If you really need to have a reference to this object, you should better use std::shared_ptr instead.
If you are spending lots of time calling getters and setters, you should think about it, maybe this member should be in a class which uses this member variable. Maybe your class is doing to much stuff and the class which holds member functions which you access frequently needs to have a member function which would do the stuff with those variables!
I haven't done much with shared_ptr's but I'm planing to experiment with them the next days. In generel they are like normal pointers but delete the object they are pointing at if deleted / overrwritten with another object-adress?! Nevertheless it looks like I have to rethink my whole structure and organise which class is capable of doing certain tasks and split the different functions accordingly. Preferably this would have been done from the start but oh well... *hehe*

One question arises though:
For example if I want to stick with my Tile- and TileMap-Class (the latter has a map with all tiles and maintains them etc). Is there a smart way that my Tiles can get informations like their current size etc from the superior TileMap-Class? The other way round I would just create a getter in Tile-Class but this doesnt work in this direction. As you mentioned a smart way would be to just use Tiles as a struct in TileMap to have immediate access to all variables neccessary but I'm just curious if thers a clever way to solve this in general :P

Thx for your feedback Elias :)



3
SFML projects / Re: My Practice Beginner Games
« on: September 09, 2015, 11:42:26 pm »
Mhm, looks nice! I like the elctro-theme and the fitting sounds.
How long did it take you to get the game finished?

Imo the reflecting of the ball is a little bit "easy". As it is right now its really hard to beat the NPC cause he just moves with the ball and you dont have the tools necessary to get a big direction change. It would be nice if you would reflect stronger in one direction if you hit the ball with a corner of the paddle or smth like this.

4
SFML projects / Re: MapMaker - Startproject for SFML
« on: September 09, 2015, 05:54:51 pm »
I also get this kind of error in TileMap.hpp :
http://stackoverflow.com/questions/11692806/error-extra-qualification-student-on-member-student-fpermissive
Other than that it builds and works.
Wupsi, looks like a little bit too much Ctrl+C, Ctrl+V ^^''
I wonder why my compiler isn't saying anything about such kinds of errors. Guess it's "correcting" them intern but not even a warning occurred :<
Nevertheless, thx for your answers. I hope it works now :)


I had a general problem in my design and maybe someone can help. In principle my project should work like this:



The problem is: For example only the "TileMap-Class" (or maybe just the "Map-Class") should have informations about the actual level openend, the tile-number in x and y direction, tilesize, etc... but often I found it neccessary to access these informations also in the "MakerObjectManager-Class". One can simply say: Well, just make a GetXX()-Function and all should be fine, but I'm not sure about if its better to create such a function and call it everytime some information is needed or -and thats how I implemented it in the end- to create an own member for the variable in this classes, call the GetXX()-function ONCE and than only access this member again and again.
Is there some general rule how to approach this issue? Is it better to create an own member or call the GetFct each time you need the variable?  :o

Sorry for my bad english, I hope one can understand my question ^^

5
SFML projects / Re: MapMaker - Startproject for SFML
« on: September 09, 2015, 09:18:04 am »
In your picture, "F" would've been better to use in in "SFML"  :P
Kay, fixed it :P

I tried to compile it with clang++ on Fedora but you still use \ in include paths and then I had some other errors so I just gave up... :-\
Mäh, I didnt update the repository yesterday after reading about the "/" and "\" stuff... my bad. Finally fixed it now ^^''
What other errors do you get? I can't look into them if I dont know whats going wrong at other PCs. Could you make a screen of your compiler-log or smth?

6
SFML projects / Re:creation - a top down action rpg about undeads
« on: September 08, 2015, 11:17:13 pm »
Yes. Mostly using awesome programming books.
[...]
As for using ECS in you own project, it depends on your programming experience.
If this is one of your first games, I recommend to try out inheritance for a few classes that your game would have.
Then I recommend to start with simple component architecture:
http://gameprogrammingpatterns.com/component.html
You should see the improvement in using this method versus inheritance trees, I think.
Then you can try to implement a simple ECS and try to make some small games with it. Implementing ECS is pretty hard and can take some time, but it's worth it. But on the other hand it may lead you to confusion. :)
Thanks for your advice :)
Do you have a book recommendation for ECS? (just in case yours was perfect :P)


7
SFML projects / Re:creation - a top down action rpg about undeads
« on: September 08, 2015, 07:59:38 pm »
I really love the screenshots of your project. It is very motivating to see a project wich is already so far in its progress :)
I hope you will finish it that we can actually try and play it! Keep up the nice work! :3

Have you taught the whole programming stuff to yourself?
And do you recommend the ECS engine for a 2D-SFML-Game or would you like to change it after you've got to experience it yourself for quite some time? I just ask because I'm planning to start a game-project by myself and am still not sure wich approach to choose...

8
SFML projects / Re: MapMaker - Startproject for SFML
« on: September 08, 2015, 07:39:35 pm »
Uh, I didnt even notice someone answered here... sorry, I was kinda busy the last days.
Thx for the feedback all :)

@silverweed
The Code on GitHub was ofc supposed to work and it did on my PC.
I wasnt aware of a difference between "/" and "\" so I didnt give much attention to it, but will fix this in the future. As stated already: Private-Draw fct works cause inheritance :)
I have a lot of problems with naming because I just started programming. I can't choose a right "way" for me... gues it's highly recommended to use one and stick with it and I should get this done asap T_T


Unfortunately I deleted the old Project from GitHub the last days because I started from scratch again to get it a little bit more structured. (besides the old one was either way just a "how to sfml" for me xD)

New things are:
> tried to include the concept of State-Machienes
> maker-surface to select tileshape / texture / ...
> it's now possible to actually map yourself with the desired shapes etc ^^''
> Save / Load levels
> 5 different TileLayers
> variable MapSize
> zoom, move, etc your map
> MapGrid
> ...

Currently Disabled:
> Tile-Size-Option
> In-game-Visibility

To-Do:
> Cleaning up some unnecessary functions in my classes and choosing a appropriate name-convention for my variables
(right now it's a huge mess because I just started to code and didnt look back  ;D)
> Alpha-Support for texture
> Whole-Mode Menu
>> Draw: The one currently working
>> Select: Selecting multiple tiles with the mouse to fill all / delete all / Ctrl-X / ...
>> Objects: Special Objects like animated stuff / enemys / ...
> variable Texture-Size (currently the texture-pic has to be 720x720 with 72x72 per tile)

------------------------------
GitHub:
Click me ^^

Video:
(I'm too dumb to create a useable GIF without tons of artifacts...)

Pictures:

9
SFML projects / MapMaker - Startproject for SFML
« on: August 26, 2015, 07:07:36 pm »
Hello Everyone,

so I've started playing around with SFML (and C++) the last days and wanted to get some feedback on my Code. I've created some sort of Tile-Map-Creator (similar to the one in the tutroial) which can build a 2D-Map out of Triangles and squares based on a level-matrix (and textur-matrix).

I thought two classes would be appropriate:
a) TileMap wich contains the texture-image and position data of certain texture-sections
b) Map Entity, wich loads the World (also drawn in EventLoop)

What do you guys think?
Am I doing something completely wrong or does it look ok to you? :)

Pictures:
Example-2D World
Used Tileset (Credits: Cave Story; With little Explanation of Variable-Names)

Code:
>> GitHub

Pages: [1]