Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 15 Sep 2006
Offline Last Active Today, 07:11 AM

#5263291 Unity or unreal engine 4 ? For 2D

Posted by Serapth on 23 November 2015 - 12:21 PM

I did a tutorial on creating a 2D game using Unreal Engine and I have reviewed dozens of game engines and when it comes to 2D games, especially for a beginner, the answer is dont use Unreal.


It's really that simple, it's overkill and frankly the features aren't that great either.  2D support in UE4 is very much a work in progress and it very much feels like fitting a square peg (2D) in a round hole (3D).  As it stands right now, there are so many better choices for a 2D game than UE4.  

#5263289 Unity or Unreal?

Posted by Serapth on 23 November 2015 - 12:15 PM

For someone with ZERO programming experience, the generally accepted "best" way to learn programming is using a language with a very tight feedback loop.  That is, write some code, see it run, repeat and rinse.  Often this is referred to as REPL (read-eval-print-loop), which is a glorified way of saying a programming language that you can write code and see it execute right away.  Python is a great example of this kind of language, as can be LUA.  


The ideal when learning ANYTHING  is to focus and cut down on noise.  When you were learning English, you focused on the basics like the alphabet first before even considering what a preposition was.  You started with small and easily identified words and built up from there.  Programming is no different really.


I actually wrote a guide aimed at helping parents start their kids on game programming but the same basic advice is just as applicable to anyone of any age.  You want to focus on a language/library/tool that rewards you constantly.  A beginner shouldn't start with a language that requires a few hundreds lines of code to draw a dot on screen for example.  Nor should they be dealing with complex linker or build settings from the 70s.  As a result I tend to think C++ or even Java ( im looking at you Eclipse/Maven/Gradle!!! ) are pretty poor choices.  C# is better, probably the best of those three, due to the great tooling and more polished nature of the language, but even it is lower level than I would recommend.


I personally think you should start with something like Lua/LOVE2D or Python/PyGame if you are focused on learning code first.  Or a higher level tool like Stencyl, RPG Maker or their ilk, if you are interested in game development first and programming second.

#5262351 Cocos2d-x...... :'(

Posted by Serapth on 16 November 2015 - 09:35 PM

Thanks for the replies!



   I did check out that tutorial and it was one of the best ones I found online, but it ended a bit too early in the process for me. It was great for learning the tools, but what I really wanted to know at the end was how to combine them. In SDL2, it was easy to make the game loop and it was clear where the loop was, which helped me a lot. I heard Cocos2d-x does the looping for me? or something like that, so I don't have direct access to the loop itself. Because of that, I'm really confused as to where and how to implement functions to handle input, actions, collision, etc.. It's great that you're starting a video series though! I'll definitely be checking those out smile.png Again, thanks for the reply!




You know there are 5 parts to the written tutorial right?  ( I will probably add more after the fact ).  Your questions about the game loop are covered in some detail in this part of the tutorial.


Yes, Cocos2d-x easily internalizes the main game loop, this is because Cocos2d-x is a higher level framework than SDL.  SDL basically provides the basics of a game, while Cocos2d-x is an actual game engine.  Instead of operating in a loop updating various parts of your game, you implement functions like update() and they are called by the engine.  The tutorial explains it in a great deal more detail.

#5262266 Cocos2d-x...... :'(

Posted by Serapth on 16 November 2015 - 09:47 AM

There are two kinds of camps out there right now.  The OTS and the NIH.


The Off-the-shelf (OTS) people believe that you shouldn't be writing your own code.  Others have already done that, and you shouldn't reinvent the wheel.  This camp will tell you that Cocos2d-x isn't good enough, because you're still writing code.  Use a game engine like Game Maker, Unity, Unreal 4, Construct 2, or some other game development environment.  This camp gets a huge speed-boost for making games, but can't do anything unique or original without extreme pain.


The not-invented-here (NIH) camp believes that if someone else wrote it, it sucks, and they could do better.  They spend their time writing everything from scratch and learning how all the low-level technology works.  They do this at the expense of very slow development times compared to the OTSs.


Of course there is somewhere in between for you.  My first question it this:

Do you think you're an OTS or a NIH?



As a general rule of thumb, I prefer and would tend to hire the third unmentioned type.  The pragmatic programmer.


Pragmatic frameworks exist too, that straddle that middle line between Off the Shelf and Not Invested Here.  You could argue every single project with open source fits that category I suppose.  However open projects with high level tools also exist, things like Godot, which is certainly rising in popularity for exactly this reason.


For the record, I agree with you completely, just adding my two cents on top.

#5262255 Cocos2d-x...... :'(

Posted by Serapth on 16 November 2015 - 09:07 AM

Setup is certainly C++'s Achilles heel.  It's got a build system made in the 80s based on one from the 70s designed in the 60s.  Compared to almost every other modern programming language, the build process in C++ quite simply stinks.


That said, Cocos2d-x actually does a very good job of making the code accessible to new developers, just at the cost of file size.  When you create a new Cocos2d-x project it compiles the entire library with each project, make it easy to get up and going, but your first compliation is going to be slow.  Fortunately subsequent compiles should be much faster.



As to good tutorials, I have a reasonably current Cocos2d-x tutorial series available here, that is aimed at beginners.  The screenshots show MacOS, but the install process should be nearly identical on Windows.   I am actually in the process of creating a video for each post in that series, so if you prefer video, you can see the setup process here.


If you like Cocos2d-x, stick with it.  The initial setup pains you only pay once.



There are certainly other options, and some are definitely easier to get up and going than C++.  I would say stay the hell away from ObjectiveC though... it's an awful language that is really only used on a single platform.  You can port ObjC to Android and other platforms, but it really isn't worth it.  For cross platform go C++, Java or even higher level or let your framework take care of it for you.

#5261007 Help with specs for laptop

Posted by Serapth on 08 November 2015 - 09:07 AM

I recently went through this exact process and put together a bit of a guide for people looking for a laptop for gamedev.


One major thing about this guide is it assumes you want your laptop for portability.  If you don't care about battery life or weight, they are many more options available.  If on the other hand those properties are important to you, this guide represents pretty much every option out there as of right now.

#5256399 Humbly asking for advice

Posted by Serapth on 09 October 2015 - 11:41 AM

As a hint, I wouldn't refer to them as human captial either... it's a bit dehumanizing. ;)

#5256396 SFML with C++ Tutorial Series

Posted by Serapth on 09 October 2015 - 11:31 AM

Several years ago I created a SFML tutorial series that to this day is still proving quite popular.  A fair bit has changed, both in the land of SFML, C++ and my ability to make tutorials.  Therefore I've launched a new SFML focused tutorial series.  Given that SFML is extremely popular among beginners and on this particular forum, I decided to share it here.


Unlike the previous tutorial, this one is both text and video based.  Both text and video versions cover basically the same information, so simply pick the format that you are most comfortable with.  This series is aimed at relative beginners, it assumes a certain knowledge of C++ but goes into enough detail that a C#, Java or C developer or of course a C++ beginner with a bit of language knowledge, should easily be able to follow along.


Right now the series consists of:




In time I will add a table of contents and update accordingly.  This series is a priority for me, so expect frequent new posts over the next couple weeks.  A new tutorial on keyboard input should be up very shortly.


As always feedback is certainly appreciated.  If you are following along and I lost your somewhere, certainly let me know!

#5254212 Should I learn c++ for game dev?

Posted by Serapth on 27 September 2015 - 12:12 AM

Learn C++.
Don't learn with C++.


#5253451 Game Development Laptop

Posted by Serapth on 22 September 2015 - 08:52 AM

If you have the money, I would recommend a MacBook Pro. Not because they are particularly fantastic but because they can run Mac OS X. This means you can then test your code on pretty much every desktop platform without dealing with dodgy hacks to get it to run on a non-Apple hardware. Generally iPhone development via Xcode and compiling can only really be done on Mac OS X too. And unless you are dealing with Unity (which stupidly doesn't output iOS x86 binaries for the official simulator), the iPhone simulator is really handy (no faffing about with developer licenses, provisioning profiles and other types of DRM.
If you want to test your code on Linux or *BSD (even if you don't intend to support these platforms, it is still great for checking code quality / testing). I highly recommend a 2009 era IBM/Lenovo Thinkpad. Many open-source developers (especially from the OpenBSD camp) use this hardware so it is well tested.
BUT, you could actually pick up a powerful Windows laptop *AND* a cheap x61 Thinkpad (~£75) for Linux for about the same cost as a MacBook Pro if you really know you are not interested in supporting Apple products. Which is fair enough and quite common, many developers choose to use DirectX after all.

I'd have gone the MBP route without a seconds thought... I already have a MacBook Air after all for my Mac needs and portability, so if I could get a powerful Mac capable of replacing both machines, win/win.

Thing is though, the available GPUs suck donkey nuts.

Until Apple fixes that, no sale for me.

#5253393 Game Development Laptop

Posted by Serapth on 21 September 2015 - 11:05 PM

With a laptop, you are paying more money for a weaker machine. Laptops are designed for portability first, performance second.
If you already understand that, good! Most people don't seem to understand that it's not merely a choice between Desktop X and Laptop Y, but that you're sacrificing power for portability. If you want real power and portability, you have to shell out double or triple the cost - cost that could've been re-invested in a more powerful desktop or a second monitor.
Portability is nice, but make sure you understand the tradeoff, because you don't get it for free - you pay for it by ending up with a weaker machine.
You might want to explicitly list out your priorities, and figure out how near the top or bottom 'portability' falls into that list.
For example:

  • "I want a laptop" -> Laptop
  • "with really good build quality" -> Desktop (assuming you meant "build speed"/compile-time)
  • "that won't easily overheat" -> Desktop
  • "or get damaged" -> Desktop
And I'd add in:
  • "permits later performances upgrades" -> Desktop (if you want to upgrade your videocard later)
  • "longer total lifetime" -> Desktop (lasts you 6+ years easily, verses laptop ~2-4 years average)
  • "capable of supporting alot of harddrives" -> Desktop (important if, by "animation" you meant video-editing)
  • "more screen real-estate" -> Desktop (important for any kind of work. You can plug in a second monitor to a laptop... not quite the same thing though)
  • "I want to lay on a couch while working" -> Laptop (not to be underestimated!)
  • "I need to bring my work to many different locations" -> Laptop
You said, "I want a laptop"
I answer: How much are you willing to sacrifice in other areas to gain portability?

I am the exact opposite of you these days, frankly desktops are dying and outside of the PC gaming space, there is little value there. The cost / performance ratio has shifted, as 10x more laptops or all in one desktops ( which are essentially laptops ) are sold, so economy of scale works in your favour.

You certainly have to make sacrafices but nowhere what it used to be. Especially with the rise of portable desktops... Aka, laptops that weight > 7lbs. Some of these have upgradable or external video options and easily interchanged internals. These are ideal for a person that wants in house portability but not travelling.

Really outside of hitting 60fps at 1080p+ in the latest AAA games, many desktop builds are stupendously overkill for most game devs. Heck my 2013 series laptop has a GPU and CPU combo more than capable of handling some sersiously high polygon Max/Maya/Blender scenes, compiles reasonably fast, runs Unreal Engine without lag or issue, etc... Sure, rendering or perhaps huge compiles I would like more juice on occassion, but thats easily and much more affordiably done in the cloud.

#5253382 Game Development Laptop

Posted by Serapth on 21 September 2015 - 08:19 PM

Depends on your priorities. If portability and battery life are important, the Razer Blade is a great choice. When I bought mine, they were expensive, now they are batshit insane expensive.

Im looking to replace mine shortly and I dont think I can justify the pricetag this time when so many other thin powerful laptops exist. Personally ill be looking at the Asus G50(?) and maybe an Acer Zenbook.

#5247876 Paradox 3D?

Posted by Serapth on 20 August 2015 - 08:05 AM

I actually just started working on a Paradox tutorial series ( http://www.gamefromscratch.com/page/Paradox-Game-Engine-Tutorial-Series.aspx ), its fairly young but growing.

Paradox is a solid engine, but very much under development and with meh documentation, a big part of why I did the tutorial series.

#5242653 Good Scripting Language for C

Posted by Serapth on 25 July 2015 - 12:57 PM

Highly opinionated but somewhat relevant.

Its funny how often these DSLs or even just "logic as data" eventually start over time evolving into complete scripting languages, ultimately rendering the inital decision to go this route moot.

#5242238 Good Scripting Language for C

Posted by Serapth on 23 July 2015 - 01:44 PM

Hey guys, I have decided that I am going to look more into C programming, now my next question is: What scripting languages can be used with C? What would be the best (in your opinion) for making games? Should I master C before I start scripting, or learn the two together?

Sorry if these sound like stupid questions haha, I just want to make sure I'm learning useful things and implementing them correctly.


If you havent learned C or C++ well yet don't even attempt to embed a scripting language.  That's like trying to invent a car before you've invented the wheel.  Perhaps a fun exercise, but doomed to failure.