Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: General Game Programming Advice  (Read 3963 times)

0 Members and 2 Guests are viewing this topic.

Valeour

  • Newbie
  • *
  • Posts: 19
    • View Profile
General Game Programming Advice
« on: June 25, 2011, 04:23:32 pm »
(If I'm in the wrong forum, I apologize, but I'm considering something and need advice, so I thought here was best.)

Okay, as stated, I need some advice, but first a bit of back story;
I've just finished my third year of college and now moving on to Uni in September to study Computer Games Development, now I've studied a lot in programming over the last two years, to the point where I'm currently contracted for a small time project. I pretty fluent in VB.NET, but that's irrelevant, here's my 'dilemma';
I've been delving into C++ alot in the last 2 years learning from books, but only now have I realised that the books are fairly out-dated, and the engine used in one of them is very... I don't know really, I call it clunky, but I think it might be my programming that's causing lag in my games.
But in any case, I've been looking into other types of engines and programming, I've been searching for the last 3 days on what I can do next, everything points to OpenGL, SDL, and the reason why I'm here: SFML.

I've been constantly looking at SFML, and I'm more than impressed with what's been accomplished with it, but looking at source codes, alot of things pretty much go against what I've learned. (Well, not against, just seem worlds apart). I know about game loops and managers and things (Well, not really how to make a manager...), but I really don't know where to start I guess is what I'm saying. I'd very much like to make a TD game in SFML, (I have done with the 'old' engine I used, but my friend stated that he gets at least 10fps on it, where I get around a full 30 or 60).
But anyway, where can I start learning? The tutorials are very limited here, and the 'Basic Game Engine' tutorial and source I've read many a-time, and I am still none the wiser. I'm also not the kind of person who likes to just take code without any understanding, which is why I can't just copy and paste said tutorial engine.

I know I've babbled on, but in absolute honesty, I'm confused and at a loss of what to do. Not only that, but I'm already 3 weeks into my summer and I'm completely bored, which makes me even more confused.

Another little thing I have, is that I got my hand on an Android phone yesterday, and I've been dying to make games on that, but is it worth playing around with SFML first to get my head around further game development, or just go right ahead and start getting my head around Android Game Development now?

Don't get me wrong, I can program fairly well (in my opinion anyway), but I always have a trouble getting the ball rolling, and I'm still trying to learn.

Also, if you want to check more of my ramblings or my TD game, check out my blog which is in my signature, and sorry again for rambling.
Check out my blog; Technical Daze

cordr81

  • Newbie
  • *
  • Posts: 5
    • View Profile
General Game Programming Advice
« Reply #1 on: June 29, 2011, 12:31:34 am »
Quote
Another little thing I have, is that I got my hand on an Android phone yesterday, and I've been dying to make games on that, but is it worth playing around with SFML first to get my head around further game development, or just go right ahead and start getting my head around Android Game Development now

I'd say it's most important to answer that question for yourself before deciding anything else.  If your ultimate goal is Android development I'd just start on that.  The learning curve my be more steep if you're less familiar with the technologies, but there's going to be a lot more of the types of guides and tutorials with the sheer popularity of the platform.

Don't get me wrong, I just started playing with SFML and love it and plan on continuing to use it, but if mobile app development is your goal, SFML doesn't fit in real well from what I know so far.

Valeour

  • Newbie
  • *
  • Posts: 19
    • View Profile
General Game Programming Advice
« Reply #2 on: June 29, 2011, 12:42:06 am »
Thank you for the reply. :)

It's not so much my ultimate goal, but it's something i definitely want to dabble in, and see if i can make some money on the side. (Nothing really to live off of, but just enough to be able to buy things every now and then, I know it's a vain goal, but hey)

I mainly want to program for fun. I'll probably end up switching between the two a lot, just out of boredom.

But you're right, I'll start with Android first and see how I get on. I was just wondering if I'd get a better understanding of Game Development if I used SFML.

But we'll see, thank you very much.
Check out my blog; Technical Daze

MorleyDev

  • Full Member
  • ***
  • Posts: 219
  • "It is not enough for code to work."
    • View Profile
    • http://www.morleydev.co.uk/
General Game Programming Advice
« Reply #3 on: June 29, 2011, 12:50:08 am »
Write Games, Not Engines.

If you wish to develop for Android, it uses Java (or to be PC a derivative language very similar to Java in every way but as it doesn't provide the entire Java library it is definitely not Java at all except for being it in nearly every way).
http://developer.android.com/guide/index.html

The iOS (iPhone, iPad, iPod Touch) uses Objective-C.

The Windows Phone uses Silverlight (So can be written using almost any .NET language), and for games it's recommended you use XNA which means you also have the potential to support Xbox and PC.

You can compile code from other languages for the Android and iOS, but you need to create the bindings. For iOS create Objective-C bindings. For Android you use the NDK to make Java bindings. For Silverlight, whilst you can mix C#, VB, F# and so-on you can't use C++/CLI from what I know. You can still mix it with XNA but that limits you to just targeting the PC.

There are tool sets and "languages" created which you can actually compile to Android and iOS, and some even have Windows Phone and even HTML5 compilation as well.

SFML uses OpenGL and so the actual library won't travel over to any of these since even the ones that use OpenGL (iOS and Android) use the Embedded Systems version. So if you really wish to make something for Android, you have questions like if you want to limit yourself to just Android or all mobiles or android and pc or...

SFML, java2d, OpenGL ES, DirectX, Allegro, the graphical parts XNA...they are all at their core rendering APIs. None of them teach you anything about game development the others will not. It's making games that teaches you game development ^^

If just Android, stick to Java. The NDK is a pain in the arse to use and usually not worth it.

(Damnit I nerd sniped myself with that link to the android page and you posted before me xD)
UnitTest11 - A unit testing library in C++ written to take advantage of C++11.

All code is guilty until proven innocent, unworthy until tested, and pointless without singular and well-defined purpose.

Valeour

  • Newbie
  • *
  • Posts: 19
    • View Profile
General Game Programming Advice
« Reply #4 on: June 30, 2011, 02:46:30 pm »
I'm aware that I shouldn't write engines, but I was literally only after a basic game loop, not a full on Source styled engine, but I know what you mean.

I'm also aware that SFML won't teach me game development, but I mean like, will it help give me a better understanding of how i can implement it into game development, or something else? This is why I'm confused, I don't even understand myself.

I've been reading about APIs for ages, and I've looked at loads, and most websites I went to just recommended SFML.

In all honesty, all I really want to do, is just be able to open some kind of template, and just code away at some game design rather than starting all the basics. I just like to mess around with code, I love doing random and clever things, and making games is just more fun, but every time I start, i just get put off with the starting.

But yeah, the Tower Defence game I made lags a bit on older PCs, and I wanted to look into APIs for hardware acceleration and what not, but 2D hardware acceleration is rare or something along those lines and somewhat difficult. So I just wondered if SFML would be a solution to that.

Thank you very much for your post, I'm gonna try my hand at NDK again today. (I've already made a snowflake follow your finger on the touch screen, revolutionary, I know.)

I was starting to get worried the other day that I was going to get no replies, because the topic had about 150 views, so again, I'm thankful.

Thank yooooou <3

Edit: Oh and that reminds me, I looked into XNA before, but I couldn't find anything on how to change it to C++ rather than C#. I've heard/read that it's possible, but if you have any idea how, care to enlighten?
Or am I just being retarded and you just create a .cpp filetype?
Check out my blog; Technical Daze

aNewHobby

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
    • Live 4 Ever Or Die Trying
Re: General Game Programming Advice
« Reply #5 on: May 01, 2012, 12:17:39 am »
Write Games, Not Engines.

If you wish to develop for Android, it uses Java (or to be PC a derivative language very similar to Java in every way but as it doesn't provide the entire Java library it is definitely not Java at all except for being it in nearly every way).
http://developer.android.com/guide/index.html

The iOS (iPhone, iPad, iPod Touch) uses Objective-C.

The Windows Phone uses Silverlight (So can be written using almost any .NET language), and for games it's recommended you use XNA which means you also have the potential to support Xbox and PC.

You can compile code from other languages for the Android and iOS, but you need to create the bindings. For iOS create Objective-C bindings. For Android you use the NDK to make Java bindings. For Silverlight, whilst you can mix C#, VB, F# and so-on you can't use C++/CLI from what I know. You can still mix it with XNA but that limits you to just targeting the PC.

There are tool sets and "languages" created which you can actually compile to Android and iOS, and some even have Windows Phone and even HTML5 compilation as well.

SFML uses OpenGL and so the actual library won't travel over to any of these since even the ones that use OpenGL (iOS and Android) use the Embedded Systems version. So if you really wish to make something for Android, you have questions like if you want to limit yourself to just Android or all mobiles or android and pc or...

SFML, java2d, OpenGL ES, DirectX, Allegro, the graphical parts XNA...they are all at their core rendering APIs. None of them teach you anything about game development the others will not. It's making games that teaches you game development ^^

If just Android, stick to Java. The NDK is a pain in the arse to use and usually not worth it.

(Damnit I nerd sniped myself with that link to the android page and you posted before me xD)

I know this is an old topic.. but I thought I would necro it rather than start a new one...

My question is as SFML is not (for now at least) compatible with these modern platforms.. namely iOS for iPhone and iPad and Android and that windows one I know nothing about.. what would people recommend. Is there a universal sfml type thing I can look to with out heading int oa cross platform engine like Unity or Shiva or w/e?

I am curious what more serious coders think about developing for all these diffrent platforms.. I mean it is a lot more than just PC and Mac and Linux now....
Twitter: @Jyinkies
My Own Little Spot on the Net: - Live4everOrDieTrying.info (Blog)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: General Game Programming Advice
« Reply #6 on: May 01, 2012, 03:12:47 am »
I know this is an old topic.. but I thought I would necro it rather than start a new one...

You would've better opened a new thread instead of bumping over one year old topics.
Specially since you're talking about OSs for mobile platforms which has dramatically changed in the last year.

My question is as SFML is not (for now at least) compatible with these modern platforms.. namely iOS for iPhone and iPad and Android and that windows one I know nothing about.. what would people recommend. Is there a universal sfml type thing I can look to with out heading int oa cross platform engine like Unity or Shiva or w/e?

I am curious what more serious coders think about developing for all these diffrent platforms.. I mean it is a lot more than just PC and Mac and Linux now....

It's just iOS, Android and Windows Phone no need to add iPhone and iPad otherwise you could also add Galaxy Note or HTC.  >:(

In my opinion it's just wrong that one tries to combine everything because a mobile device is just not the same as desktop PC. But then again there are games that work on both devices good so a unifying library would still be nice. I guess google can reveal quite a lot. ;)

But as most of the people in here, stop trying to generalize stuff and work on big engines and instead create something that works, is well designed and thought through and then make sure it runs on all three many distros (Linux, Mac, Windows) after this you can think about porting it to a mobile device.

Also if you're using standard C++ you'll get pretty far and can easily port the system related calls to the new platform.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/