Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 14 Aug 2011
Offline Last Active Feb 14 2016 07:32 PM

#5198130 Good open source engine 2d?

Posted by on 14 December 2014 - 09:39 AM

You can create a desktop game using LibGDX, as well as you can use Godot, Cocos2D-X and many many others that are not exclusivelly mobile.

#5195352 How should i process about embedding a SDL2 game into QT to make a level editor.

Posted by on 29 November 2014 - 10:24 AM

Nothing prevents you from creating a window with SDL and capturing the input events inside it, while you use Qt for the second window.

But you probably want to render inside the window, in a frame of some sort, so you'll probably have work around this.


The first possibility that pops in my mind is to use Qt's OpenGL API, to get the rendering target and such, and return whatever you need to SDL2 so it can render in a QtWidget.


What you could do as weel is trying and turning an SDL_Surface into a QtImage, and only use SDL to render to that surface. I don't really know how to do that, but it may be more googleable.

#5177269 Good open source engine 2d?

Posted by on 31 August 2014 - 02:19 PM

cocos2d - http://www.cocos2d-x.org/
moai - http://getmoai.com/

I wouldn't recommend moai, because it is a tad too complex for beginners, it is designed to be used by more experienced devs.


+1 for cocos2d.


Just SFML? I read that for physics in 2d games I should use something called Box2d. Does SFML takes care of the physics too? Or just the rendering part?

SFML is a multimedia library that "handles" media, system specifics and input. This includes rendering, audio, listening to kb&mouse/gamepads, networking and more.



But that's it, it gives you access to these resources, but it doesn't do any simulation. This means it does no physics, no collision detection...


Box2D is also a library, but it is a simulation one (physics simulation to be precise). This means it cannot render anything it is simulating, it "just does the math". You'd need to interpret its behavior to make it useful. Definitely not meant for beginners. There are many more ways to create physics though, and for a 2D sidescroller Box2D would probably be overkill, unless it is a physics game.

#5174037 GML Code crash when pathing (memory problem?)

Posted by on 15 August 2014 - 09:22 PM

Did you try adding a minimum delay for the order? Like only allowing the pathfinder to work, say, 10 times per second for each entity (as in add a 100 ms cooldown to it)?


I really do not know anything about GameMaker, nor even what language it uses. In other words, this is a complete shot in the dark here.

#5173493 What software(libraries, apis) should i use for my game?

Posted by on 13 August 2014 - 09:31 PM

As for your first question, if you are sticking to C or C++, I'd also recommend SDL 2. It is extensively used in the games industry, as the main development technology or sometimes to port games to new platforms.


About the engine controlling your game, that is not really accurate. You can do whatever you want with an engine like Unity, it does not restrict your ability to implement the gameplay. Of course, if you need some super fancy features as an exceptionally accurate physics or lighting, you'd be in for a hard time; it's hard to see a case where Unity wouldn't suffice though.

Now, about the advantages of using it, it is not an easy analysis to do. You have to consider the price of the engine for your desired platforms. Let's say your game has only simple physics, maybe some neat lighting system and doesn't need all features from Unity, chances are you could actually develop a smaller engine with a much better cost (time-cost) than you'd have to pay for it (monetarily). That is really case-specific.

1) Ive only heard of SDL being used when Valve was porting a game over to Linux to handle input and windowing

I can name many commercial games made with SDL over the top of my head: Starbound, Prison Architect, Amnesia, Faster Than Light, Overgrowth, Second Life... Not to mention that PyGame, Löve2D, Cryengine and many other engines are actually built on top of SDL.


#5173375 Getting direct acces to vector<unique_ptr<My_Class>> but ther...

Posted by on 13 August 2014 - 11:07 AM

when i know exactly what i am doing or what i want

Do you? Early optimization is a problem when you do not. Believe me, when I am starting a program, I never know precisely what I want. I only really understand my needs when part of the code is done and possibly redone some bits here and there.


Considering that you'd be using a vector to simulate a map, you'd be wasting a lot of memory and, instead of letting the map care for itself, you'd be concentrating all its relocation to a single operation.


If your containers will really be as big as you say, that a map wouldn't suffice, believe me, your cleanup will halt the program for fractions of seconds, causing FPS drops and other issues. This can also affect your physics engine, by generating exceptionally big "delta times" for it to simulate with. In addition, searching the way you mentioned your lookup would result in O(n) complexity or higher (any empty slots would make it > O(n) ), while std::map has it O( log(n) ).


In other words, trying to force a vector into a map would probably result in a lot more work for something that performs slower and uses more memory.

Unless you have good algorithms to insert, remove and search (as a red-black tree for an example), or some neat mechanism to avoid runtime stalls when rebalancing and possibly an automated memory pool to control your vector... but that is basically recreating the map container.

#5172672 Questions on Advertising

Posted by on 10 August 2014 - 06:46 PM

You should take a look at this link that I totally did not get from jbadams' forum signature: http://clicktobegin.net/business/20-ways-to-advertise-your-game/

#5172666 Why every time I search for UDK I find this

Posted by on 10 August 2014 - 06:08 PM

UDK can be used for FPS or any other first person games. It can also be used for top-view strategy games, 3D platformers, or anything you want. People that say it can only be used for FPS are badly misinformed.


Take a look at the UDK showcase, I'm pretty sure there'll be plenty of examples of "not-FPS" games there.


Anyway, as Krasten said, UDK is probably too much for a simple 2D game. There are countless possible frameworks for creating a 2D game, from Mono and MonoGame to MOAI.


That being said, aren't survival horror games are mostly determined by the content fed to FPS engines?

I think he means survival horror like in Amnesia, that is FP but definitely not a S, differing from Killing Floor, as an example. In case you have never seen Amnesia, the game doesn't have any weapons at all.


Usually, these games are filled with puzzles and scripted scenes rather than hordes of enemies.

#5172651 Getting direct acces to vector<unique_ptr<My_Class>> but ther...

Posted by on 10 August 2014 - 03:36 PM

Aren't you better off with a map?

#5172557 "Focused" learning resources

Posted by on 10 August 2014 - 12:23 AM

My favorite books are Game Coding Complete, Game Engine Architecture and Programming Game AI by Example.


Notice that all three are C++ books, but a C# programmer could certainly benefit from them as well.


The first, Game Coding Complete, gives an intermediate point of view on game dev. It is great if you can code a tetris but get lost on anything bigger than that.


The second, Game Engine Architecture, is also an intermediate book, that focus on the architecture of a game engine (duhh). It gives an overview of how parts fit together, and is a good book even if you don't plan on writing an engine. This book doesn't go too deep code-wise though, some snippets here and there, but nothing you can really go source-reading. This book has a fresh new edition, I think it came out last week.


The third one (even though it is already 10 years old) is a great book to read when you want to implement some basic AI on your game. It is full of code examples, but everything is windows specific (10yo, wouldn't expect anything different). Anyway, it actually gives a good introduction to AI and also introduces you to messaging systems, ECS... the scripting section is not good though, it is badly outdated.


As an honorable mention, I liked the "The" Game Production Handbook. It doesn't have anything to do with programming but is worth the read.


If you want to, you can explore the GD.net books section. They have some referred amazon links for you to browse (I prefer the BookDepository.com personally).

#5170751 Protect Against Speed hack

Posted by on 31 July 2014 - 06:49 PM

Why have I never seen anyone asking "How do I implement in-game cheats?" in these forums?

#5170154 Web Programming Proffession [ Need Advice] -

Posted by on 29 July 2014 - 01:56 PM

In my experience, there are two options when working with web dev: get a job or go freelance.


Getting a job is probably easier if you have something to show, a small portfolio if you will. So you'd need to have something to show, and what I did was creating sites for my family's and friends' businesses, for free (3 websites, to be exact).


Going freelance is harder, not as safe as a regular job, but can pay better. I say can because it is not necessarily true, it can take months before you can really rely on it. You'd need a good portfolio as well, to show potential clients, and all the deadlines are usually defined by contract.


Still, as someone said already, PHP.

With PHP, you can go autonomous or get a job. It is still the most asked language on interviews for this kind of job. A lot of people make jokes about it, but it is still a strong standard.


Secondly, it is good if you can handle yourself with at least one CMS. Be it Joomla, Drupal, Wordpress, or any. Familiarize yourself with the CMSs and a free framework such as Joomla's Gantry and T3 or Wordpress' Sparky. It will help you get nice websites to deliverable states in much less time; especially if you decide to go freelance. That's how I do it. I use Joomla mostly.

#5169845 I know a good amount of C++ but what do i need to know about game programming?

Posted by on 28 July 2014 - 02:14 PM

I like to think of games as simulations with fancy looks and with made up rules. Some of them are real-time, some aren't, some have a really complex UI, some doesn't.


The best way I found to understand the inner workings of a game software (that is not that different if you really have C++ experience) is by creating one.

Get the simplest of all, not real time, no fancy graphics, no fancy rules. Just go for a memory game like this one, for example.

#5168456 Allegro in CodeBlocks using MinGW - compiler/library version mismatch?

Posted by on 22 July 2014 - 02:19 PM

When I wrote that short tutorial I was using MinGW 4.8.1 myself; this shouldn't be the problem.


The obvious answer I could give you would be to download the Allegro binaries for MinGW 4.8.1, but I checked and they don't exist (these are community maintained, can't really complain).


The second obvious answer is telling you to compile Allegro 5.0.10 on your own instead of getting the binaries. Unfortunately Allegro is not an easy to build library, on the contrary, it takes a lot of time, needs some specific DirectX files and other libraries, a pain; go to this link if you want to give this a try.


Now, what you could really do is:

1 - Try adding the -fexceptions option to your compiler flags (right before `pkg-config --cflags --libs allegro-5.0 allegro_primitives-5.0` ), it's worth a try.

2 - Go to the www.allegro.cc forums and ask if anyone has the binaries for 4.8.1. The only time I had gone there for help they were really helpful.


Just as a side note, both Allegro and MinGW have new versions, MinGW is on 4.9.0 while Allegro has its 5.1 out (with a new API). I'd recommend going with both new versions even though they are considered unstable.

#5167727 C++ smart pointer usage

Posted by on 18 July 2014 - 09:40 PM

It is probably -std=c++14 or -std=c++1y

But you'll have to add it in the [Other Options] tab and unmark the -std=c++11 .