×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    5

    Develop games in C?

    Hello,

    I started learning C programming language at my college and I have idea and sketches for a Symbian^3 game. I wonder can I create 2D game in Qt Creator only using C programming language?

    Game should have scores, that character is able to move from left<->right, that he can dodge objects and interact/collide with them, that background is moving (new object are coming and you need avoid them)...

    Thank you.

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,569

    Re: Develop games in C?

    Pure C won't work with Qt (need some C++, too), but you can mix C with C++ in various ways (C++ is more or less a superset of straight C).

    Might be easier, though, to pick up Java, instead of C++ with its Qt and then more difficult Symbian C++ variant quirks.

  3. #3
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    67

    Re: Develop games in C?

    If you want to develop in pure C, you would just need a "wrapper" of Qt and C++, just to set up application and handle events etc - this would be one or 2 classes, and then it could pass on to your C engine from there. The EPong or QtGameEnabler examples would be a good starting point, as they are already structured like this (separate wrapper and actual game)

  4. #4
    Nokia Developer Expert
    Join Date
    Oct 2008
    Posts
    40

    Re: Develop games in C?

    If you want to have extremely portable game then plain C/C++ is a good option as magicdave already replied.

    EPONG was created portability in mind and all the game logic is pure C/C++:
    https://projects.developer.nokia.com...ong_game_logic

    Then we have platform dependent code for Symbian C++ and Qt C++ so the project compiles nicely for Symbian SDK and Qt SDK. It would be possible to easily create Android and iPhone ports of this game as well.

  5. #5
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: Develop games in C?

    If you can already code in C, why not learn Qt? It is very easy to learn!
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

  6. #6
    Registered User
    Join Date
    Oct 2011
    Posts
    5

    Re: Develop games in C?

    Can you tell me what is the best book for learning Qt from beginning?

    And, how hard is it, how much experience do you need to have to programme game like Doodle Jump (I hope you know the game)?

  7. #7
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: Develop games in C?

    Having written a German Qt book myself, I am obviously biased. My issue is also that I know only German books - can you read this language?
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

  8. #8
    Registered User
    Join Date
    Oct 2011
    Posts
    5

    Re: Develop games in C?

    Unfortunately, I don't know German language so I can't read German books. Only books on English and Croatian language are option.

  9. #9
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: Develop games in C?

    Oh my. There is an official book from TrollTech which was my first contact with Qt, but while complete, it was a bit confusing.

    APress is said to have a current one with Jakl involved, but I have not had it in my hands yet (and wont as I can not review APress stuff being an APress author soon).
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

  10. #10
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    67

    Re: Develop games in C?

    Do you already know a decent amount of C++? If so, learning Qt is simple enough without a book. The standard things like strings or vectors function much as you'd expect, and the web has plenty on Qt specifics like signals and slots. The online documentation is very good. Basically read some intro to Qt programming pages till your head is full of them and then look through a few of the examples that come with the SDK, and you should be fine.

  11. #11
    Registered User
    Join Date
    Oct 2011
    Posts
    5

    Re: Develop games in C?

    Is there any way to open .sis file and see source code of application or game? I tried to open .sis file in Qt Creator, but only lot of numbers appeared.
    I don't want to copy anyone's hard work or something like that, I just want to see examples and see how they created some things.

  12. #12
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,569

    Re: Develop games in C?

    The .sis files can be unpackaged, but you won't find any source code inside. The source code is compiled to ARM processor instruction set binaries before being packaged as .sis files.

  13. #13
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,751

    Re: Develop games in C?

    Examples are more easily found in the Resources above, item "Code examples".

  14. #14
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    67

    Re: Develop games in C?

    You can try the game examples here: http://www.developer.nokia.com/Commu...Category:Games

    Based on your question about .sis files and the fact that you are recently started learning C, I would recommend that you spend a bit of time on simpler examples in C/C++ before jumping straight into making the game you want to make.

Similar Threads

  1. can we develop 3D games on carbide c++
    By smrati_kulshrestha in forum Symbian
    Replies: 2
    Last Post: 2008-03-14, 11:35
  2. What all is required to develop a multiplayer mobile games
    By abhisheik in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2006-06-07, 15:26
  3. Mulitplayer Games are very expensive to develop?
    By Woody_FX in forum Mobile Java General
    Replies: 3
    Last Post: 2004-03-15, 18:39
  4. How develop Java games on mobile phones?
    By ericzutter in forum Mobile Java General
    Replies: 4
    Last Post: 2003-11-20, 23:14
  5. Is it possible for me myself to develop games for 5510?
    By compl in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-03-19, 08:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×