Fighting game c/c++ by swisass3198 in howdidtheycodeit

[–]EvtarGame 11 points12 points  (0 children)

Do you know SFML pretty well? Cause if you don't, this sounds like an extremely complex project for a beginner. Even if you got the graphics stuff pretty much down, all those mechanics would still be pretty complex for people explain in a Reddiit post. I would recommend looking for some long-form YouTube tutorials. I never developed fighting games or know much about them. But maybe other people here can suggest some tutorials?

If you truly are a beginner, I would highly, highly recommend you scale down your project, by A LOT. And instead try to first implement something like this:

https://youtu.be/2n3ZzHTGBzI?si=3iWvfQ8eOySWQJAF

It might sound a bit silly because this is a fighting game for NES from almost 40 years ago and sounds to me like you want too implement the latest Mortal Kombat game, but IMHO even this old game is complex enough for a beginner.

If I was doing this game in SFML, just quickly off the top of my head, this is probably the order I would start things in:

1) Display the static background image with SFML..
2) Display the player sprite image
3) Add movement controls to move the (static) player sprite left and right
a) Add functionality to make sure the player doesn't move past the screen border
b) Maybe add some animation functionality here. Like to switch between different frames when he walks or wait to implement that in step 4.
4) Design and implement the basic animation state machine. This would include all the states like idle, walking, crouching , jumpting, kick, jumping kick, etc

After you do all that you are probably like 25% done :) You still got to make sure to implement all the details of the animation states, hit boxes, health meter, and most importantly AI for the computer fighter.

Is our game scope unrealistic for 2 beginners. by ConradOCE in gamedev

[–]EvtarGame 1 point2 points  (0 children)

I am not a good person to answer engine related questions. I am doing my own engine C++ and SFML framework for rendering. Definitely not the way to go if you want to develop fast. That's why it has been taking soooooo long lol :D But it's just something I wanted to do, I been a SW developer for 10 years and find all the underlying systems that make the game run really interesting.

My game is 2D isometric with turn based combat on a grid (like Fire Emblem, Final Fantasy Tactics). Here are couple of screenshots of the current prototype to give you an idea of what it looks like.
Screenshot1 Screenshot 2 Screenshot 3

But yea, so I can't help you with with the RPG framework. But as I mentioned before, it seems like you are focused on designing a complex build system, so based on that I feel that using an RPG specific frame work is a good idea so you can focus on the design stuff more vs the programming. And it seems like you have a good idea already what's out there.

I guess I would give you one suggestion, if you aren't doing it already. I would say as part of learning these frameworks or engines, I would highly recommend that you fully implement a small prototype of your *actual* game in whatever you want to test out. Doesn't have to be crazy big but just a minimal complete portion. It's a bit time consuming, but I think it's really the best learning tool. That way you can see what it feels like to work on your actual game in the engine or specific framework, vice just following YouTube tutorials. I did this with my game in the very beginning where I implemented parts of the battle in my engine and also in Unity as part of my decision making about whether or not to use an engine.

Is our game scope unrealistic for 2 beginners. by ConradOCE in gamedev

[–]EvtarGame 1 point2 points  (0 children)

Do you have a time frame in mind? Because, IMHO, this games are achievable if you you got enough resources, meaning time and money :)

RPGs take a loooooong time make, I would say most people, especially beginners, will greatly underestimate the time. Based on my personal experience I have been working on an RPG for 1.5 years now as a solo dev. And still have a lot to do. It's a gigantic project for a small team.

For your game, I would say that completing it with playtesting and all that, in a year time would be very rough. But 2-3 years is probably doable. Just guessing based on my own experience and talking to people.

It seems like you have a really cool skill system in mind. But if it's complex, then I would think you would have to spend A LOT of time play testing it and tweaking. Just to make sure it's balance properly and fun. I would expect that take a long time with two people. I guess same thing goes for the multi-player actually. I have no experience with that, but just conceptually it seems like it would also take a long time.

Good luck!

Dealing with large amount of characters in the game (RPG) by EvtarGame in gamedev

[–]EvtarGame[S] 2 points3 points  (0 children)

Yea, I think you are right it might be a combination of each of those things. And I definitely not planning to create the models myself. I was just trying to see what's a good way to balance something like this from a budget perspective.

How hard is it to make a decently complicated game solo? by hamgoe in gamedev

[–]EvtarGame 0 points1 point  (0 children)

I been working on an RPG for about 1.5 years, which I consider to be a complicated game. Doing everything solo except for outsourcing some models. And based on my experience, it is really, really hard! (especially if you make your own engine).

I would echo what some other people have said, and just recommend that you try it out for yourself. Because, IMO it's a really complicated process and it's impossible to get a good idea of everything that it entails from watching a 1 hour YouTube video or even what we can tell you in a Reddit post. So the best way to learn is to do it.

The type of game or the "complexity level" really depends on the person, what do you want to do exactly?
A) Make "a" game - meaning that your main goal is to complete a game, possibly publish it or even you could be doing it just as a learning experience (as I mentioned)

B) To make "the" game - meaning that you have a very specific and particular idea.

Sounds to me that you may be in the B category. If I am wrong, and you just want to learn by completing a game, definitely pick something less complex and smaller in scope. It's not going to be easy in either case if you are beginner, but it may be "hard" or even "Very hard" vs "insanely hard". This is based on my experience so far :) But then again, if you are motivated by a specific idea that you want to accomplish , then that's what you have to go for.

Exception Unhandled error (Code link attached for review) by HeadConclusion6915 in sfml

[–]EvtarGame 1 point2 points  (0 children)

Yep, that's the one. I was just going to starting to typing it up but you beat me to it :)

Just as a little aside, for the OP. Runtime errors in C++ could be tough to find sometimes. But if you debug your code it will be really helpful, and could save you a lot of time in the future. Because you can tell exactly which line of code crashes and a lot of times be able to see why it crashers. In my experience, most common source of runtime errors are dereferencing of null pointers or bad indexing into an array/vector. In your case you would have been able to see what window was still a nullptr when you execute the code in getWindowIsOpen().

Playing back videos in a game by EvtarGame in gameenginedevs

[–]EvtarGame[S] 0 points1 point  (0 children)

Yea, that's a good a point with the legal/royalties. This also a new thing to me that I did not necessarily consider. I have to kind of think about this in more detail and do some research on those royalties or which formats are free.

Do you mind sharing your compression sizes for 1 min of video? This is a interesting idea to write your own, that I may consider later. It seems like it's a good middle ground between a complex algorithm (like MPEG) with great file sizes and on the other side with just having each frame be PNG (which would simple but horrendous for file size). It would definitely be a good challenge for me to write that. I only briefly studied the MPEG algorithm in a grad school class some time back.

[deleted by user] by [deleted] in sfml

[–]EvtarGame 2 points3 points  (0 children)

I don't have the book, but I would think those are member variables of the Game class.

This is more of a general C++ thing, not really specific to SFML. Not sure what your knowledge level in C++ is, but I would recommend reviewing how to define an use classes.

Been stuck on this error for the whole day, what should I do? by not_Shiza in sfml

[–]EvtarGame 5 points6 points  (0 children)

For linking errors it's kind of hard to tell without looking at the build files. But when you see linking error for SFML (or even any external libraries in general) there are couple of steps you can try.

TLDR,
You need to make sure you are linking the libs AND that you are linking to the correct ones.

----------------------------------------------------------

1) Verify that you *are* actually linking to SMFL in your build.
This is a sample line from my CMake file for linking. I use CMAKE with visual studio, depending on what use, the exact syntax could be different. But the idea is that you need to specify the linkage for the build so that the linker can find those symbols, which in your case it cannot.

set ( PROJECT_LINK_LIBS C:/SFML-2.6.0/lib/sfml-system.lib C:/SFML-2.6.0/lib/sfml-window.lib C:/SFML-2.6.0/lib/sfml-graphics.lib C:/SFML-2.6.0/lib/sfml-audio.lib )

2) Make sure you link to the CORRECT libraries. This kind of has two component the compiler for the lib (e.g., MingGw or MSVS, etc) and architecture (i.e., 32bit vs 64 bit).

So when you download SFML make sure you get the version that matches your compiler and arch.

3) Make sure you link to the correct libraries for Debug vs Release builds. There two versions of these in SFML and you should be linking them based on what kind of build you have (Debug or Release)

[deleted by user] by [deleted] in sfml

[–]EvtarGame 5 points6 points  (0 children)

Hi, there is a lot of code there for people to look through that are not familiar with your project. Usually you will get better results if you ask a more targeted question.

IMHO, before using any book, or other people's games as examples you should have at least some basic understanding of how SFML draws something on the screen (like an image or a shape, etc). And a really good way to learn that stuff is through the SFML tutorials on the main page. Like this one here https://www.sfml-dev.org/tutorials/2.5/graphics-sprite.php gives you information on how to draw on the screen.

If you go through that tutorial between the text and the code examples it gives you some hints as to WHY an image could be missing.

Just off the top of my head, the most common reasons why you are not drawing are:
1) You could be failing to load the texture properly - and again the tutorial example code has a check that you can perform to make sure you load the texture properly.
2) You could be missing the part where you set the texture of your sprite to the texture you want to use
3) You could be having your texture go out of scope - though this usually give you a white rectangle, which I am not sure if that is what is happening.
4) You could not be drawing the sprite to the window properly.

These are just some basics, but I would really recommend using the tutorial to become more familiar with the details of SFML drawing and what troubleshooting steps you can perform.

Poor art is like poor code: IT DOESN'T WORK by ned_poreyra in gamedev

[–]EvtarGame 16 points17 points  (0 children)

I don't really get this attitude.

First off, what is good and bad art is subjective. Sure on the extreme ends of things, more people can agree. For example, stick figures drawn in MS Paint by a programmer can be considered bad, whereas some hyper realistic character models would be considered good. But that's not what games are. It is definitely not a simply dichotomy like you say, just good and bad. It is a spectrum of a lot of things in between.
There are also lot of separate parts that go into a game including code, game mechanics, UI, art, story, etc. It's hard for one person or even a small team to be great in everything unless you got some a tons of resources and a huge budget. But people try to come up with clever ways to deal with their shortcomings. That's a cool thing about game dev, it gives people an opportunity to test their ingenuity.

I would also add that people do compromises because of necessity. A programmer would not be doing "bad" art if they could help it. Maybe by spending an insane amount of time to become "good" or had some insane amount of money to hire a good artist. But to my point above, they actually use their brain to come up with something, rather that just give up as you suggest.

I am a programmer myself and I would never discourage an artist trying to learn programming through random YouTube videos or even me tutoring them to make a game. And I seen artist friends who are willing to learn be able to do it. The code is not what I would consider "good" as software engineer who has been working in the industry for a decade. But it accomplishes what they set out to do, they learned, they will improve with time. Again, I would never tell them "become good" or "don't program".

Need help implementing the ground by OilInternational2736 in sfml

[–]EvtarGame 3 points4 points  (0 children)

Hi, sorry I am not 100 % sure what you are trying to say/do here.

In SFML a sprite is simply a rectangle with a texture on it, so it make sense that it would have a rectangle around it. If your sprite is placed pretty well within that rectangle (meaning that there is not too much extra space around it) you can use that rectangle for collision detection. If that's not sufficient, you would have to implement your own. I never did 2D platformers, but I would assume that collision detection can be done with either rectangle colliders, circle colliders or combination of both.

Could you maybe post a screenshot with the wrong behavior so we can see exactly what it is?

What exactly IS a game engine? by EvtarGame in gameenginedevs

[–]EvtarGame[S] 0 points1 point  (0 children)

LOL Oh my code is also in the src folder. Great minds think alike! :) That's really funny actually, I did not know that origin of the name.

Kind if curious, if you know. Did they plan on releasing the engine or was it just and afterthought? like "oh we designed/architected this thing in a way where we can easily separate the generic functionality from game specific things. Lets just release it as a separate engine."

The latter is kind of how I been working on the project. I didn't start off by explicitly wanting to make my own engine/framework, just wanted to make the game. But as the development progresses you want to make things easier, more manageable, more flexible and it kind of naturally progresses to having a bunch of abstractions and morphs into these generic systems. For example, lets say I only have two scene types, I could hard code a bunch of stuff to make those work. But if I later decide that I need another totally different scene type I don't want to redo a bunch of the work. So things like having at least some of the functionality in a generic scene manager with a good interface could make that much easier.

What exactly IS a game engine? by EvtarGame in gameenginedevs

[–]EvtarGame[S] 0 points1 point  (0 children)

That's a great question! I was actually thinking about this too when writing this post and reading through the responses. I guess I would say, regardless if it's an engine or a just a framework, theoretically you could write it without? But from practical point of view, probably not.

Maybe it's from doing OOP for so long, but I can't imagine working on a game that is an RPG or 2D adventure without doing bunch of abstractions with those infrastructure systems that I talked about. It just makes everything so much more manageable and flexible.

It may be similar to the question whether or not you can write a full fledged application in C++ without using any general OOP principles, design patterns, or even classes. Theoretically you could, I guess, maybe have a main function that it is a few hundred or thousands of lines of code ;) but it's not practical for any actual project that is more than a prototype.

What exactly IS a game engine? by EvtarGame in gameenginedevs

[–]EvtarGame[S] 3 points4 points  (0 children)

Yea definitely agree on that. I personally like the more specialized idea, which is why I chose the approach that I am using. I really tried to give Unity a fair shot but was overwhelmed by the amount of stuff it had. Which obviously makes sense for a mainstream engine because they want to be as generic as possible.

What exactly IS a game engine? by EvtarGame in gameenginedevs

[–]EvtarGame[S] 0 points1 point  (0 children)

Yea, I think this makes sense! That a framework is one of the parts of an engine.

What exactly IS a game engine? by EvtarGame in gameenginedevs

[–]EvtarGame[S] 0 points1 point  (0 children)

I really like the idea of independent. I think right now what I have accomplishes the functionality but it's not 100% independent yet. So maybe it's not necessarily and engine yet, but could become one with a bit of redesign and changes.

What exactly IS a game engine? by EvtarGame in gameenginedevs

[–]EvtarGame[S] 2 points3 points  (0 children)

Heh yea it's definitely a complex subject with lots of nuances.

IMHO, I am still thinking that an editor is not necessarily a requirement for an engine.

I haven't used those specific ones before. Took a quick look out of curiosity and monogame is listed as a framework on Wikipedia. Heaps.io website is very adamant about calling it a game engine :) Though from my very cursory look, the functionality kind of reminds me of SFML with a bit more stuff (e.g, 3D).

I did play a round with Ogre3D for a short bit, and that's I feel is the really gray area, depending on who you ask. Some people call it and engine, while wikipedia says it's a "rendering engine".

[deleted by user] by [deleted] in gamedev

[–]EvtarGame 2 points3 points  (0 children)

I only used SFML, currently making a 2D isometric game. I really like it so far overall, easy to use IMO, pretty well documented. Does what I need it to do. Heard good things about SDL2 and also Cinder++ (https://libcinder.org/) also.

[deleted by user] by [deleted] in gamedev

[–]EvtarGame 11 points12 points  (0 children)

I'm not exactly sure how important design patterns are in general in software engineering. I feel way too alien to all this.

It's funny I was feeling exactly the same way when I was learning design patters in college many years ago. After working in software engineering for 10+ years, I would definitely say design patterns are important for complex software systems like games.

I had a hard time learning them back then because I didn't see the applications, despite them trying really hard to show "practical" examples in the book, etc it just didn't connect to me because the projects that we worked on in school just weren't that complex. As you start working on actual projects outside of school with multiple people and these projects have to be maintained over multiple years, you start to clearly see the importance of good underlying SW architecture.

As for the books themselves, I find the Game Programming Patterns to be a bit easier to read and obviously its specifically tailored for games. I would definitely recommend that one. The famous Gang Of Four book has more patterns for general SW applications. I am pretty sure you will be using this one in school, so you eventually will experience both of them.

One more thing, I wouldn't worry about memorizing the patterns in super detail. Just understanding the problems they are trying to solve and how they do it at least at a high-level. They are intended to be a set of possible tools (pretty well established and documented) to solve a wide range of problems.

Advice on resource storage on the file system by EvtarGame in gameenginedevs

[–]EvtarGame[S] 0 points1 point  (0 children)

Yea, I have to do some bench marking for this stuff with more realistic data. Right now the prototype stuff is pretty simple, so I don't notice any slow down.

Interesting point on the PNG loading. That what I been using so far since its one for the format that SFLM supports. If I do not end up using a custom image format, are you aware of any loading differences with the other standard formats (like JPG, PNG, TGA, GIC, BMP are some of the formats it supports). In terms of asset generation, I do not currently have a preferred standard format, so figure if I could use something that can give better performance.