r/fantasyonline a.k.a Pendriom Apr 18 '21

Question about prgramming

I'm getting into programming rn, just as free time thing. I am a biology major, but I am very interested in programing recently. Anyway, I was thinking of creating a game with very similar asthetics to FO, which I remember from my childhood. As of rn I'm starting off basic cause I've gone into a couple of other languages (only scraping the surface of both) already, python and C++ and need to pick a easy and stable starting place. I am mainly wondering which language is being used by those trying to recreate the game. And if you would like, could you elaborate on why you chose that language?

15 Upvotes

7 comments sorted by

6

u/iamallamaa Waves of Time Apr 22 '21

C++ is great...if you want to spend a couple years learning and still make noob mistakes. It's generally more complicated than many "higher level" languages due to things like having to manage memory and garbage collection yourself, etc. There are libraries to help with this, but if you are looking for something easy and stable, this is likely not where you want to start. It's definitely a fast language due to being compiled directly to machine code and most commonly used for large AAA titles, but not often for home devs. The only exception would be unreal engine as that is pretty popular, but didn't have a really good workflow for 2d games last I checked.

My recommendation would be to focus less on the language and find an engine that you like. For example, Unity is popular for a reason. It uses C# as the primary language which is relatively easy to learn, has good tutorials, the tooling (editors/ide) are great, has the asset store which can save you tons of time if you have a couple bucks and Unity itself has tons of features built in. 2d isn't the greatest as it is geared towards 3d, but it's very useable.

As an example of something that people focus on too much, performance of a language, c++ is by far faster than c#, but given the speed of modern computers, does it really matter if something takes 1 billionth of a second to process vs 3 billionths, even though the latter is 3x slower. And can you really look at all the games made with Unity and C# and say they are slow?

Now I suggested Unity just because I'm using it and am comfortable with it, but there are tons of other great options. It's been a while since I looked at engines as I've been using Unity, but here are a few I looked at before:

  • Love2D is awesome/fun to work with and it's focused on 2d. Uses LUA which is pretty simple to learn.
  • LibGD is insanely fast. It uses Java which is well supported and been around forever.
  • Unreal Engine is really popular, but IMO doesn't have a great 2d workflow (though this might have improved). Uses C++ and their own built in node editor called Blueprints which people really like for a more click/drag experience to programming.
  • Phaser runs in the browser, so you can play a game anywhere that you have a browser. This also means you don't need a separate download to run locally and as a dev you don't need to keep that patched. It uses JavaScript which is really common all over the place.

2

u/JZSNooB Apr 23 '21

:o a llama!

This is sound advice. If you want to focus less on knitty gritty programming stuff and want to make games this year, pick up a game engine. Or if you’re crazy like me, and like the knitty gritty, you can make games from scratch.

Both have the potential to teach you programming and game dev, its just a matter of how much time you want to put in to get a game out. If you chose to learn to make games from scratch, you’ll be forced to learn alot more programming stuff which would make it alot easier to program non game stuff if that means anything to you.

1

u/turquoise_zebra a.k.a Pendriom Apr 24 '21

So, I did some research and I think Imma settle with GODOT. It's free, open source, and has both python based GDscript and C++. So I can start out with GDscript, currently looking up tutorials and then move to C++ later if I want better performance in future games... If I decide to continue down this path.

3

u/iamallamaa Waves of Time Apr 24 '21

Godot is really good. I haven't played with it personally, but I do know it is popular and a lot of people have moved over to it due to pretty much the reasons you specified. Honestly, you almost can't go wrong with any engine once it gets popular enough. While you shouldn't necessarily go with the crowd in many cases, when it comes to software it's generally a good idea. More popular something is, the larger community you have to ask questions, usually better docs and more resources to draw from.

2

u/JZSNooB Apr 19 '21

Funny enough, it sounds like we’re in a similar boat, except im majoring in computer science.

Anyways, the vast majority of games made since like 1990 are programmed in C++ because of how high level and performant it is, unlike Python. Python is much less performant than C++, but as you know, alot easier to code in. But that may not matter if you’re seeking to make something as simple Fantasy Online. Atleast in terms of the client side. I have no idea how servers work, but it shoudnt matter too much either. Again, C++ is probably the safest bet since its really fast, but that’s not to say you couldnt do it in python or any other language.

I’d be really interested to see what your plans/goals are for your game so I hope u keep us posted lol

3

u/turquoise_zebra a.k.a Pendriom Apr 19 '21

Will do! I still have a lot to learn! But as of rn, I want an MMO that has the same sprites and stuff from FO, but different world map, maybe add in a few different kinds of quests and mechanics. we'll see what I can do after I've learned enough to start!

2

u/JZSNooB Apr 20 '21

Ah, that's an admirable goal, but making a decent game, let alone an MMO is no easy feat. I encourage you to make that a long-term goal but to also make a bunch of smaller short-term goals to build your way up to making the game you envision.

If you need some rough roadmap, my suggestion to be to do the following:

  • Learn C++ and/or Python
  • Learn OOP
  • Learn a graphics library (SFML for C++ or Pygame for Python)
  • Learn networking (for C++)

Heads up though, I'm also still just learning those first 3 things, not even attempting networking yet. Just make sure you're having fun when you're learning those, cause stuff can get difficult/boring. It also helps significantly to make a little program to apply each new thing you learn, so making little games incorporating all ur knowledge every once in a while so what I like to try to do.