[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]

/agdg/ - Amateur Game Development General

AGDG - The Board

Catalog

8chan Bitcoin address: 1NpQaXqmCBji6gfX8UgaQEmEstvVY7U32C
The next generation of Infinity is here (discussion) (contribute)
Name
Email
Subject
Comment *
File
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Embed
(replaces files and can be used instead)
Oekaki
Show oekaki applet
(replaces files and can be used instead)
Options
dicesidesmodifier
Password (For file and post deletion.)

Allowed file types:jpg, jpeg, gif, png, webm, mp4, swf, pdf
Max filesize is 8 MB.
Max image dimensions are 10000 x 10000.
You may upload 5 per post.


Welcome to AGDG, have you ever made a game?
See also: /ideaguy/ | /vm/

File: 1441872860625.jpeg (17.45 KB, 500x336, 125:84, 1437077637.24A72397.jpeg)

21781c No.21777

Is there such a thing as a simple 2d engine/framework written in c++? They are either too simple or not simple enough there seems to be no middleground. Not interested in anything that needs it's own IDE to work with. It should be like SDL, include and link against to make it work.

some key features should be:

input handling

sound

animations

collisions

batch draw

Is there anything like this or do I have to become an enginedev?

493697 No.21782

SFML is the closest to middle of the road in my opinion, though I haven't looked for C++ frameworks much recently. It doesn't deal with animations or collisions (both are entirely your responsibility in the SFML library) and I'm not sure if/how it deals with batches in its 2D module.

You could possibly use SFML with extra libraries for animation and collisions, depending on how you want to do them.

As for batching, if SFML doesn't support them itself, any other library that works on top of OpenGL would be usable, since SFML uses OpenGL rather than DirectX (for portability purposes).


21781c No.21784

>>21782

I was using SDL so far but it has no support for animations or batching either.

Are there any modules that would do that which can be plugged into SDL?


29fadc No.21790

>>21777

>Is there anything like this or do I have to become an enginedev?

2D shouldn't need engines tbh.


493697 No.21791

>>21784

I haven't touched SDL for around a decade. SDL is written in/for C, and I generally hate using C. I'm currently programming with Love2D, but that's Lua, not C or C++.


21781c No.21794

>>21791

How does love2d compare to C++ frameworks performance wise?


493697 No.21800

>>21794

Decent. Not perfect, but it uses LuaJIT, a "Just In Time" bytecode compiler so it does actually run machine code. Check out LuaJIT's page for their performance comparisons. But there are some algorithms and such that won't perform quite as well as if coded in C or C++, but it easily outperforms just using regular interpreted Lua code.

That said, I've coded stuff up with it that ran at 60 fps with a lot of stuff on screen. The real limitation in my opinion is the same ones you'll find when you do anything else in graphics. For instance, if you're drawing thousands of semi-transparent quads across the entire screen, your framerate will suffer, due to fill rate limitations. but you can easily render a batch of tens of thousands of quads that take up small amounts of screenspace with no slowdowns.

Love2D also has collision, physics, networking, particle systems, UI, etc. It supports the use of texture atlases, so you can batch an entire tiled map so it renders in a single draw call. If you're careful, you could quite possibly set up all of your game state into a single batched draw call.

It does have some limitations: the developers are picky about adding things to it that they feel aren't needed, and the design they use makes it a bit difficult to use libraries that aren't written in pure Lua (so no SQLite library for me, unfortunately). They also have hardcoded save game folders. That is nice because the question is solved for you for all platforms they've ported to, but it's annoying because you can't just tell Love2D to open up an arbitrary file location. Any file you open HAS to be in the locations they designate. There are ways around it, but it's somewhat annoying that they don't just have a simple configuration option to relax these limitations.

These negatives aren't a problem for what I'm working on so far. It's open source, so if absolutely necessary I can go in and change things if I really need to. The license it uses also fully allow commercial games.


0ff664 No.21801

>>21777

I've heard of Angel2D, but I'm still reading through the documentation.

Have no clue if it's what you're looking for, seems like it's aimed more towards prototyping.


8b08b0 No.21803

>>21800

Does it support animations out of the box?

What modules would you say are a must have when working with love2d?


cf5d8e No.21804

>>21803

>>21794

As other anon said, LuaJIT is pretty damn fast for being interpreted but you still need to be realistic with what you can do with it. I've found that majority of slowdown you'll get is if you do any non-bitmap drawing. If you use batching and don't do anything silly, you can get some really great performance out of it.

There's a list of some of the most common libraries on the wiki: https://love2d.org/wiki/Category:Libraries but definitely go through their forums as the list is a bit outdated. Previous anon is on the mark about features; the only thing you'd actually need a library for would be animation. However there are a lot of libraries that make life easier, like abstracting input, sound management, etc.


8b08b0 No.21806

>>21804

This sounds pretty good however instead of testing a bunch of libraries I was hoping someone could recommend some that they are use and know are working. I would like to get off the ground asap. If I use a lib and then some time later it turns out no one uses that it would be a waste of time.


493697 No.21810

>>21806

Yeah, that's understandable. And also, that's why >>21804 said to visit their forums for the latest info about libraries. There are two animation libraries listed on the Wiki, both of which are fairly recent and should work with the latest version of Love2D.


8b08b0 No.21811

>>21810

Alright, thanks for all the info. This sounds very promising. I'm very used to C++ but lua seems easy enough to pick up


d23068 No.21830

>>21801

Angel2d is worth a try too, gonna check it out. Thanks.

>>21804

Last time I used love2d there was a very good GUI lib but it didn't work with the latest version of love. Did they update that?


dce704 No.21877

>>21777

You basically described SDL + Box2D with a bit of newb-level OpenGL


5675fb No.21925

>>21777

Game Maker.




[Return][Go to top][Catalog][Post a Reply]
Delete Post [ ]
[]
[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]