Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411423 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 18, 2024, 11:02:04 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Choosing the right engine for a 2D metroidvania style game.
Pages: [1]
Print
Author Topic: Choosing the right engine for a 2D metroidvania style game.  (Read 22709 times)
wiggle_waggle
Guest
« on: February 04, 2014, 04:20:35 PM »

Hi guys, this is my first post on TIG and I'm hoping that you can help me answer some of my questions.

To quickly introduce myself, I'm an artist working in the AAA industry. Over the past year I've been trying to learn how to create my own personal games.

I've decided start working on a proper project and I'm currently planning to create a pixel art, metroidvania style game that centers around the use of a grappling hook. I have been working on it originally in Unity, but have recently came across some major rendering issues that might force to move to an engine built specifically for 2D games. I've been having a problem with image tearing on sprites that use point filtering and have yet to find a solution to that problem.

I've been researching different 2D engines over the past week and found myself deeply confused as to which one to learn and use. Being used to complete game-making solutions such as UDK, CryEngine and Unity, I'm looking for an environment that comes bundled with some basic tools and features such as:

- level editor that allows for visual placement of objects, actors and tweaking variables inside the viewport and assigning scripts in a fashion similar to Unity

- timeline sprite animation tools

- asset management library

- uses a standard programming or scripting language such as LUA, C#, C++, Python, Action Script etc.

- I do not need a built in physics solution as I would be creating an arcade movement system and had some bad experiences with trying to control Unity's Box2D implementation


Out of all tools I have come across, Game Maker seems to be the closest one to meeting my requirements, but comes with its own scripting language. I've heard some things about it being limiting and as such, I'm wary of learning it only to hit a brick wall down the road.

Other tools such as Stencyl or Construct offer promises of being friendly to non-programmers, but seem quite limiting. I'm also not afraid of getting my hand dirty and implementing some major functionality myself, so visual scripting editors are not necessary for me. 

I've looked at some of the Flash frameworks such as Flixel and FlashPunk. While I've heard some great things about these, they seem to be bare-bones and mostly code-focused. While using Flash would be good, since I have some AS3 experience and 2D games look great in it, I'm confused as to how difficult it is to implement some of the generic tools into the pipeline.


I'm aware that "please, google this for me" threads are often frowned upon, but I'm hoping that some of you could help point me into the right direction. I would be grateful if some of you could join me in this discussion as the amount of information available on the internet is often overwhelming.
« Last Edit: February 04, 2014, 04:31:01 PM by wiggle_waggle » Logged
J-Snake
Level 10
*****


A fool with a tool is still a fool.


View Profile WWW
« Reply #1 on: February 04, 2014, 05:04:45 PM »

There is no need for that. I am working on a spiritual successor to Super Metroid. Just join me and I will provide you the best engine one can possibly imagine for a next gen 2D metroid game. I could use a good artist.

Ok, joking aside (but you still have my offer)

Unity has recently added native 2D support. I think overall it will be a good solution for you, if not the best you can get. There is also a focus on very efficient 2D rendering. So you might recheck it. My guess is that it is possibly the most flexible engine among the big ones. UDK and Cryengine are unlikely to be practical for 2D needs.
Logged

Independent game developer with an elaborate focus on interesting gameplay, rewarding depth of play and technical quality.<br /><br />Trap Them: http://store.steampowered.com/app/375930
agersant
Level 4
****



View Profile
« Reply #2 on: February 05, 2014, 12:21:35 AM »

Polycode fits your description perfectly but it's still in its first releases so stability/docs/community are lacking a bit.

I would recommend staying away from Flash (the Adobe product, not the AS frameworks), it is not well-suited for gamedev bigger than advertising games.
Logged
Richard Kain
Level 10
*****



View Profile WWW
« Reply #3 on: February 05, 2014, 12:18:41 PM »

I would still suggest using Unity. For starters, you already have some experience using it. As far as the 2D physics system in Unity works, I would advise using it only for the collision detection, and handling the "physics" in code. Remember that tweaking the input will be necessary to get more traditional 2D movement.

As far as the sprite tearing, your best bet would be to write a custom shader. Cooking up your own shader will give you more precise control over how the final sprite is rendered. Custom shaders in Unity are extremely powerful once you've learned how to use them, and can allow all sorts of rendering effects and work-arounds. I would point you to this article on Gamasutra about the custom shaders in "Lovers In A Dangerous Space-Time." It gives a fine example of how that team used a fairly simple custom shader to work around an issue they were having with Unity.
Logged
Amirai
Level 1
*



View Profile WWW
« Reply #4 on: February 05, 2014, 12:44:28 PM »

Construct's event system might seem limiting, but you can make pretty much anything with it as long as it's 2d. It's definitely capable of a metroidvania. Here's an example game made with construct classic (C2's previous version):



The game game could definitely be made in C2 (I don't recommend construct classic, it's unsupported, has some issues and C2 is way, way better). C2's event system basically is a scripting language with a fancy user interface instead of typing, but you can use keyboard shortcuts to type some events.

I highly recommend it unless you're trying to put something substantial on mobile, as there is no perfect solution for getting games on that platform yet but it's being worked on and is improving, so something will eventually turn up. Sony has also not announced any support for HTML5 games yet on PS4, so I don't know if that will become an option later or not.

I can't comment on other tools because I haven't really used them.
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #5 on: February 07, 2014, 03:50:06 PM »

What kind of problem did you run with unity? I've worked with UDK, Crytek and others and to me unity is by far the best choice for solo developers (and small teams)
Logged

wiggle_waggle
Guest
« Reply #6 on: February 09, 2014, 08:24:50 AM »

Thanks for the comments guys!

Yeah, I would definitely prefer to stay with Unity, as I really enjoy using it and love its component-oriented architecture. I have spent some time with it and managed to alleviate most of the problems by moving to 2D Toolkit and using its camera, making sure that all movement is done using integers wherever possible, tweaking the texture settings and capping my framerate. For the most part, this gives pixel perfect results, but I still notice some issues, particularly at higher movement speeds. There is also a "jump" that happens at regular intervals, even though all I'm doing in my test scene is panning the camera.

The results are pretty much pixel perfect now, but there are things that still look weird. Here's an example I've made to give you an idea. It's my test scene with a placeholder sprite taken from Castlevania Symphony of The Night. The style of my own art will probably be much simpler and less detailed, but for now I'm using it to test some worst case scenarios.

Clicky Use the arrow keys to control the camera.


As you can see (assuming this is not my monitor) despite the scene being rendered with a point filter, the results look a bit "smudgy". Especially when moving diagonally. Some of the pixels are also interpolated in a weird way; it's the most noticeable on the yellow fringe on the curtains. I realize that it doesn't look too bad right now, but previously this issue was happening all over the screen, with pixels "swimming" around with every movement.

Richard: I had a look at the article and it is certainly interesting. I do wonder though, whether it's something that could be improved with a new shader, or if it's something that is inherent to pixel art being rendered on 3D planes. As for your comments on physics, I completely agree. I was planning to use multiple triggers for controlling the collision and writing my custom physics from the scratch. Implementing proper swinging mechanic makes me worried, but at least the controls should feel good if I manage to get it right.

agersant: Polycode looks very interesting. I will have a look at it. Thanks.

Amirai: Thanks for the info. Construct is looking interesting, but I've been a bit worried on how difficult it might be to implement custom physics in it. Also, while I do not have plans to publish the game anywhere yet (this is meant to be merely a personal demo at this point) I would aim more towards PC and consoles rather than mobile.
Logged
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #7 on: February 09, 2014, 08:45:05 AM »

I figured that was the problem. The 2d support is fairly new and it wasn't made thinking in low res art, I know because I'm going through a similar problem with my project. But I like your result so far, I don't see any significant blur. There's a lot of people struggling with this issue and coming up with solutions (I remember reading some successful attempts in unity answers), have you went to the unity community for help?

Can't you make this game in game maker? I'm always tempted to do something in it because it's so pixel friendly but there's always some limitation that blocks the original game design.
Logged

Amirai
Level 1
*



View Profile WWW
« Reply #8 on: February 09, 2014, 05:25:51 PM »

Amirai: Thanks for the info. Construct is looking interesting, but I've been a bit worried on how difficult it might be to implement custom physics in it. Also, while I do not have plans to publish the game anywhere yet (this is meant to be merely a personal demo at this point) I would aim more towards PC and consoles rather than mobile.

Construct's built-in physics are customizable enough through the event sheet that they could almost undoubtedly be made to do whatever you want.
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #9 on: February 10, 2014, 04:12:42 PM »

Maybe write a custom renderer that write directly to a texture target?
Logged

wiggle_waggle
Guest
« Reply #10 on: February 11, 2014, 01:47:13 PM »

diegzumillo: Thanks, I've had a look at Unity's forums but haven't come across any solutions. Seeing how you mention successful fixes, I will spend some more time and try to find out more. I've been thinking of trying out Game Maker, but jut like you mentioned, I always keep hearing about the limitations.

Thanks for linking me to your thread. There is some really good info in there and your results are looking really good Smiley

Amirai: Interesting. Is it possible to completely remove the built in physics and replace them with a custom physics code designed from scratch? I'm going for a very arcade, non-realistic movement. I tried implementing that in Unity, but the inbuilt physics proved impossible to tweak, so I ended up ditching them.

Gimym JIMBERT: Hmm, that sounds interesting. I was under the impression that Unity's rendering code cannot be modified. If it's possible, this would give me an option of fixing my problems down the road. Since I come from an art background, it's something that would probably go beyond my current programming skills.


I think I will stick with Unity for now. Even if I'm not able to completely remove these issues, I might be able to minimize them by changing the direction of my art. I was originally thinking of something along the lines of Sword and Sorcery, but I could probably go for something "cleaner" and higher res and enable bilinear filtering. At the same time, going higher res will make the art more time consuming, so it's something I will need to give some hard thinking.
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #11 on: February 11, 2014, 01:57:00 PM »

Can't comment on the performance, but when unity3D hadn't any "2D workflow" I contemplate this idea, here is a quick google on the matter:
http://forum.unity3d.com/threads/13525-How-to-copy-a-rectangle-area-from-a-texture-to-another-one
http://answers.unity3d.com/questions/144240/copy-paste-multiple-texture2ds-into-new-texture2d.html
Also thought of hijacking the ongui() to place pixel perfect image on the screen.
Logged

J-Snake
Level 10
*****


A fool with a tool is still a fool.


View Profile WWW
« Reply #12 on: February 11, 2014, 02:28:38 PM »

There is also a "jump" that happens at regular intervals, even though all I'm doing in my test scene is panning the camera.
It happens because the framerate of the game doesn't exactly match the one of the screen, so in order to keep the rate an update will be either delayed or executed multiple times in a row at times. It won't happen with variable update rates (but web players might have their own display rates, in which case there is nothing you can do). There are methods to perform visual interpolation to smooth that out, but I fear it will be very unpractical to implement it in Unity. The easiest fix is to update the camera in the variable update, if that is what you want.

What can also help is to disable v-sync while keeping the update at fixed intervals. It will add screen-tearing but possibly stutter less around and make the game more responsive since the updates are more consistent. In worst case the picture output can still stutter and tear.

The lack of control of the game-loop itself in Unity is what initially prevented me to use it, but it might suffice for others with some work arounds.
Logged

Independent game developer with an elaborate focus on interesting gameplay, rewarding depth of play and technical quality.<br /><br />Trap Them: http://store.steampowered.com/app/375930
J-Snake
Level 10
*****


A fool with a tool is still a fool.


View Profile WWW
« Reply #13 on: February 11, 2014, 02:34:46 PM »

Another option is to wait for G-Sync. Bad joke, I know.
Logged

Independent game developer with an elaborate focus on interesting gameplay, rewarding depth of play and technical quality.<br /><br />Trap Them: http://store.steampowered.com/app/375930
s_l_m
Level 8
***


Open to collabs


View Profile
« Reply #14 on: February 11, 2014, 02:57:23 PM »

If you do end up going the Unity route I would recommend Futile as opposed to the official Unity 2D stuff, it is a more code based workflow and has been used in a few semi-big games (such as Pocket Trains). I would also consider using Flixel or Phaser (which is an html5 library that is kinda sorta based on Flixel). Just throwing out ideas though
Logged

Think happy thoughts.
wiggle_waggle
Guest
« Reply #15 on: February 11, 2014, 04:12:54 PM »

Gimym JIMBERT: Thanks for the links! I will need to do some more reading before I fully understand how should I go about implementing such solution. However, if I understand correctly, it's based on the idea of compositing all individual sprites in the scene into one, flattened texture thus bypassing all of the sub-pixel weirdness? I will need to get a better understanding of the rendering process, but at the very least I'm happy to see that there might be some potential workarounds.

J-Snake: Thanks for pointing me in the right direction. I looked up variable updates and found a lot of info on the issue (though majority of it seems to be referring to XNA, rather than Unity). I will try find out how to implement that in Unity!

s_l_m: Cheers! I'm curious about Futile, but I'm not sure if a code-based approach will be suitable for this project. I will need to look into it further and see what the pros and cons are. I'm currently using 2D Toolkit instead of the Unity's native 2D tools and I quite like its visual nature. However, I have yet to try anything complex with it, so I'm not entirely sure about its limitations.

Thanks for all the info guys. That's a lot of stuff to sink in for a code newbie like me, but this is largely a learning exercise so I'm happy to try out different things and experiment.
Logged
Gregg Williams
Level 10
*****


Retromite code daemon


View Profile WWW
« Reply #16 on: February 11, 2014, 04:29:24 PM »

How complex graphically are your scenes that currently have tearing or jitter? Usually these problems show up way more in super simple test cases (like trying to smoothly scroll a sprite across a blank background for instance) and tend to vanish/blend away once your in a full high detail scene.
Logged

J-Snake
Level 10
*****


A fool with a tool is still a fool.


View Profile WWW
« Reply #17 on: February 11, 2014, 07:39:42 PM »

J-Snake: Thanks for pointing me in the right direction. I looked up variable updates and found a lot of info on the issue (though majority of it seems to be referring to XNA, rather than Unity). I will try find out how to implement that in Unity!
These should be the unity functions:
http://unity3d.com/learn/tutorials/modules/beginner/scripting/update-and-fixedupdate.

But make sure you understand game loops.

Yes, there are many articles because fixed update in XNA had major flaws, especially in previous versions (but was denied). That is why I reimplemented it myself, otherwise I would abort XNA aswell.
Logged

Independent game developer with an elaborate focus on interesting gameplay, rewarding depth of play and technical quality.<br /><br />Trap Them: http://store.steampowered.com/app/375930
Amirai
Level 1
*



View Profile WWW
« Reply #18 on: February 13, 2014, 12:10:04 AM »

Amirai: Interesting. Is it possible to completely remove the built in physics and replace them with a custom physics code designed from scratch? I'm going for a very arcade, non-realistic movement. I tried implementing that in Unity, but the inbuilt physics proved impossible to tweak, so I ended up ditching them.

Yep. C2's event system is extremely flexible, you can make pretty much whatever you want with it.
Logged

elpegaso7
TIGBaby
*


View Profile
« Reply #19 on: June 23, 2018, 07:31:13 PM »

There is no need for that. I am working on a spiritual successor to Super Metroid. Just join me and I will provide you the best engine one can possibly imagine for a next gen 2D metroid game. I could use a good artist.

Ok, joking aside (but you still have my offer)

Unity has recently added native 2D support. I think overall it will be a good solution for you, if not the best you can get. There is also a focus on very efficient 2D rendering. So you might recheck it. My guess is that it is possibly the most flexible engine among the big ones. UDK and Cryengine are unlikely to be practical for 2D needs.

J-snake, How can I get in touch with you? I'm also interested in a castlevania game
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic