• Create Account

## Which api to use? for a 2d indie (not happy with unity)

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

14 replies to this topic

### #1mazdaplz  Members

Posted 09 April 2014 - 01:31 AM

i am by no means new to programming, last year i spent quite a few months messing with carmack's code in quake2 in C and C++
i have also developed for XNA in C# in the past, and have developed homebrew demos for handheld consoles,

my first programming language was turbopascal around 1997-1998. but programming is not all that i do. (i can do rendering, modeling, drawing, illustrating, spriting, etc, etc.)

i think i have the skills needed to make a small game start to finish now (minus the sound, maybe).

it will be a 2d game (side view) will support multiplayer and pvp. should be cheat protected! and i plan to put it up on steam as an indie title, or maybe as a store game on consoles too if at all possible; but steam is my aim for now with the others coming hopefully a bit later

doing a bit of research on this i have given myself a headache, i just don't know what api is the correct one to make a 2d indie game for sale on steam that will allow me to secure the netcode and not limit what i'm tryin to do.

i am currently looking at unity, but it seems way to gimmicky and requires training much like an adobe suite application, you have to know where the buttons are, dealing with stuff they want you to deal with like layers (instead of setting different Z values) it just seems like more trouble than it's worth for me right now.

on the plus sides, it seems it does save a little bit of time and the result is multi platform, is it really worth it?

what sort of API would you suggest? i don't really want to deal with low level stuff like pixels and that kinda stuff, i'm not trying to reinvent the wheel. i'd hopefully use a library to handle the basics like drawing sprites and so forth, but i need a powerful and flexible platform so i don't have to worry about arbitrary limitations like limits on the sprite size (tryin to go HD) or a flawed and easily hackable netcode (though i still want some of the heavy lifting done in this area because i am a novice in programming multiplayer and securing data from clients onto servers)

what would you guys recommend? help an independent developer out so i can begin knowing i haven't made a big mistake!!

if you're going to recommend a library, should i go opengl? i hear it's better than directx but i don't know if those will help me deal with the sprites, sounds... that's the kind of stuff i want a XNA type platform to work with (obviously not XNA because it's not current and not to be sold on steam)

i want a library to hold my hand and handle stuff like dealing with in-game windows, drawing the stuff, scaling.
but unity is too much hand holding for me!!!! i think i'd like to be more free in my approach and work directly with code

i thank you for your time beforehand !

Edited by mazdaplz, 09 April 2014 - 01:41 AM.

### #2HyperV  Members

Posted 09 April 2014 - 03:06 AM

Monogame ,Haxe or AS3.

HyperV

### #3mazdaplz  Members

Posted 09 April 2014 - 11:58 AM

hey there HyperV!
thanks for the suggestions, i went through the feature list of monogame and haxe.
haxe seems like a language that can output applications for mobiles and browser as well as windows. and the api seems rather crude, no window handling no scaling..

monogame seems quite promising, at least for windows and xbox360; but i really want to look to the future and develop for xboxone, playstation 4 (not yet supported), windows and the steam console that is coming up; i really don't want or need to develop for mobile platforms or browsers at all;

actionscript 3 is just... i'd rather go with unity lol. i don't think flash is that much different

just those solutions seem more mobile based and web based than what i want to do; my game idea wouldn't do well without real controls; touch screen isn't going to cut it for the gameplay i'm looking for at all

i was looking at SDL and SFML; maybe these would be a good idea? would these allow me to port my game over to PS4 or XBone easily? should i try and program for directX or openGL???

### #4ProtectedMode  Members

Posted 09 April 2014 - 12:13 PM

I recommend SFML, except if you need ports for consoles. SFML works fine on all major PC platforms, is fast and written using modern C++. I have to tell you that there aren't that many good engines, frameworks or libraries that support all major PC platforms plus the consoles. As you seem to like relatively low-level code I recommend using a library like SFML or SDL as you said.

### #5xbattlestation  Members

Posted 09 April 2014 - 04:25 PM

(obviously not XNA because it's not current and not to be sold on steam)

That is not true, according to Steam's FAQ

There isn't anything wrong with XNA, it just doesn't support the tablet part of Windows 8, or the new XBox.  It is still a great development environment, and when you need to move on you can just port it to MonoGame.

Storm Clouds over the Western Front - 2D aerial combat WIP | DarklightXNA on Twitter | 2DFlightSim on Youtube

### #6frankinshtein  Members

Posted 09 April 2014 - 05:32 PM

Do you know C++? If yes then try Oxygine framework.

In the basis of the engine there is a scene graph, that is similar to Flash one. To be short, You can call this as Flash for C++, but more comfortable and way faster. Initially it was developed for mobile platforms (iOS, Android), but can be also used for PC games.

### #7EMascheG  Members

Posted 09 April 2014 - 06:14 PM

Maybe you can try Love2D, Is written in Lua with C++works good on all major PC platforms, Besides have support for Android, have unofficial Port in iOS, nLOVE port replacing OpenGL and OpenAL with SDL, Even are working a port for PS Vita if you are interesting. For web port there one called Loveliness but is incomplete and Work in Progress.

Edited by EMascheG, 09 April 2014 - 06:15 PM.

### #8mazdaplz  Members

Posted 06 May 2014 - 10:05 PM

alright guys thanks for all the help i think i came to a conclussion, which may or may not help others on their choice but this is what i am going for;

so after considering many of your suggestions seriously, i game SFML a try.
it's not bad! i was kinda liking it - then, i decided to see what others had done with SFML... what a dissapointment! all games are amateurish at best! then checking out SDL they have valve backing them which is great! and you have portability to mobile and mac/linux.

so really SDL is the more sensible choice, but it doesn't do as much out of the box.
so if you're going to go through all the hassle then why not just use opengl by itself? so i researched that end and came up with http://www.glfw.org/

which just came out some months ago; i gave it a good look; it seems like a very good very low level library for handling the basic stuff;

after deciding wether to go low level with GLFW or just let the library do the gruntwork i realized that if valve had been putting their faith in sdl so they can get indie games on steam then there's really nothing wrong about relying on the API for a bit.

after i decided that, the choice was easy; i gave monogame a last consideration and picked monogame as the api of choice.

if i wanted to reinvent the wheel i would certainly go with GLFW, and dont get me wrong it's tempting for a perfectionist like me;
but monogame now has ps4 support so that's what turned the tables and gave me a final desicion -

monogame it is.

i have to say sorry to hyperV - he was right all along

### #9mazdaplz  Members

Posted 06 May 2014 - 10:30 PM

here is how they stack by category and how i came up with the solution

the three i considered at the end:

SDL        monogame      GLFW

flexibiblity         4****         3***                5*****
portability         3***          5*****              4****
features           3***          5*****              2**
accesibility       3***          4****               2**
speed              4****         4****               5*****

flexibility is how far you can push them beyond their intended usage - since monogame is XNA it is a bit restricted and comes up the loser with 3 starts

portability is how many systems i can port the app to, instantly- monogame the clear winner.
features is how much heavy lifting the program does, xna is a very useful library so i give it the edge here. GLFW is VERY bare bones.
accessibility is user friendliness. again the edge to monogame.
speed is how much the library gets in the way of your programming, how cumbersome the library is. edge goes to GLFW though not by a lot.

### #10kburkhart84  Members

Posted 07 May 2014 - 07:52 AM

I just thought I'd remember you about Gamemaker Studio.  It has several games made with it released on Steam too.  It supports mobile, though that isn't your interest, and it support the major desktop OSs as well.  They added some console support announced this last GDC, and likely have more in the works.  The software is very capable and getting more so.  I'd say it can likely handle your project as is, or if you need something a little more special, you could write a dll, though I only think you might need one for your networking.  GMStudio has networking support, but it isn't a full fledged system yet, rather basic send/receive kind of things, though it may be all you need, and if it is, it should work on all exports.

The GML scripting has its quirks, but it allows you to do pretty much anything you want, including a massive RPG, a complex platformer, or really about anything.  You can access many events through the system, for example the step event has begin, step, and end, which allow you to force things to happen in a certain order on different objects in case one depends on another for some reason.  The draw event is also split up like that, though the drawing is mostly automatic unless you need something different, like one object to draw a few child objects that aren't separate in code, like if you use an array to represent your level.

The last thing I have to say about this is the price.  It isn't free unless you want a really limiting version.  You'd have to check the website to see which version you'd want and how much it costs, as there is a cheaper $49 version, though the best version at the lower price is probably the professional at$99, considering the features it adds on.  Then you could go with the Master Collection at $799, which includes all current and future exports for this version cycle. Last thing to consider is that it is my understanding that export for the PS4 would be free(due to their partnership with Sony) if you obtain a PS4 devkit, though to start out I don't think you want to go that route, rather as a later plan. So you could start with the$99 professional version and work with Windows, and then if you get good with it and have something worth porting, get that devkit.

### #11FGFS  Members

Posted 07 May 2014 - 10:31 AM

http://www.phoronix.com/scan.php?page=news_item&px=MTY4MTM

### #12kunos  Members

Posted 07 May 2014 - 11:02 AM

As you are learning by yourself, the list of tech to make a 2D game goes on and on.. after all it's 2014 and these things are pretty much a solved problem and vastly below the levels that can be achieved by modern hardware.

One thing to consider in deciding for your language/API.. I see you talking about trying to avoid cheating. If that is the case, you might want to look into a language not trivial to decompile. This means avoid C#, Java of course Python.. and/or put as much game logic on the server as possible.

Although.. to be honest, considering it is your first game I wouldnt really care.. if you come up with something players think is worth crack open to cheat then it means you are already rich and doing very well ;)

My personal suggestion: Use Go with GLFW/OpenGL.. you get a compiled binary, hard to crack and easy immediate portability to Win, Linux and Mac... and you get all of this while having fun with a great modern language. Of course the price to pay is little information available about doing games with it.

### #13mazdaplz  Members

Posted 08 May 2014 - 03:23 AM

yes it is the first game i will try to helm professionally for sale;
i have worked on independent titles before though as part of a team, but this is no small undertaking; i appreciate the suggestions -
i really want to work with GLFW but i really really need the major console support; at least 1 of them

at any rate the game i'm planning to make isn't impossible to port over or anything, i won't be using any fancy libraries for anything; just some opengl eyecandy which i can do with either lib/

-kburkhart:

yes i know about game maker studio, i used to code for it in late 2006-mid2008 but an interpreted script isn't as good as actually compiling the language (it is a made up language, gml?)  it is a little bit buggy working on it; it's great for learning how to make games and you have to applaud the community which is great (i kept being a regular visitor of the game design forum for years after even when i wasn't actually coding-) there's some great theory to be learned about game design and theory of programming; but i think once you practice a lot with it it's time to move on, it serves its purpose of learning tool in excellent fashion i'll say. but i'm trying to avoid all of those artist-focused apis like gamemaker and unity.

right now i need something that is as fast and as low level as possible and probably a bit more secure than your standard GML language application

Edited by mazdaplz, 08 May 2014 - 03:26 AM.

### #14kunos  Members

Posted 08 May 2014 - 05:19 AM

i really want to work with GLFW but i really really need the major console support; at least 1 of them

well and I really hope you understand that GLFW is just an API to abstract some part of an OpenGL application such as window and contex creation and control plus some input in a platform indipendent manner.

By itself GLFW can't do anything.. so saying "I want to use GLFW" really doesnt make any sense at all.. what you really end up doing is working with OpenGL and do 10-11 calls to GLFW in your main function.

Also.. major consoles do not use OpenGL.. on the console world you are basically only left with SteamOS supporting OpenGL. I think in my experience Monogame seems like the only framework to give some hopes to be ported almost everywhere with minimal changes.. unless you want to jump ship and go with something like Unity even if you dont like it.

You see, low level automatically means no trivial cross platform support.

### #15kburkhart84  Members

Posted 08 May 2014 - 08:01 AM

What kunos said....if you don't want to have to take lots of efforts for porting, you will have to use a higher level language, software, or a pre-built engine of sorts.  Gamemaker and Unity are probably the 2 best at this generally, though there are competitors.  I've never used Monogame, but if someone else says it works, I'll believe it.

You say 2006 - 2008 was when you were using Gamemaker.  Back then it wasn't Gamemaker Studio, and it was also a whole different product.  It still isn't perfect, but it is better than it was, far better.  The same can be said about Unity, though the two programs took different paths to get there having started with different purposes.  While technically it is true that an interpreted language is slower, for most games, including 3d games, it is fast enough.  The game logic is rarely the problem, rather the underlying render code, which you generally don't have to access.  I guarantee it is easy to write bad C/C++ that runs slower than your average interpreted language.  And with 2d games, it is even better because they tend to have lower speed/performance requirements than 3d games.  The last thing I should add about this subject is that in the case of Gamemaker, they have added a few exports that are fully compiled native, as in not a C++ compiled runner interpreting GML, rather the GML gets compiled fully to C++ with Visual Studio.  This makes some games run faster, but some games get no effect because the things slowing them down weren't the interpreted code speed.

But let's be honest.  You can look up plenty of topics about this.  If your goal is simply game creation, you are better off going with a higher level language/software as opposed to coding down to the metal.  Very few people use Assembly anymore for exactly that reason.  Someone mentioned above that in general, 2d game creation is a problem that is pretty much solved.  There are many implementations of 2d collision detection, including pixel/pixel collision, and it has been generally optimized to death.  So why would you want to redo all(or any) of it?

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.