CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 14 of 14
  1. #1
    Join Date
    Jan 2011
    Location
    Orange County, CA
    Posts
    82

    Question Program Idea Questions

    Background:
    ok, i was in school today drifting off in class, and i came up with an idea. i wanted to make a program that is basically like a beginning game creater program, like u can make a 3D city or something with just cubes, spheres, whatever 3D triangles are called, etc, etc, etc....


    Basics of the Program in Mind:
    i made a quick sketch in class, and basically just want all the tabs and option buttons on the top, in the middle would be a black square in which u create ur 3D world/edit code, and bottom is info on specific shapes and stuff.

    I also want to make it to where you can switch between two tabs: animation and code. the animation tab would be where u make objects and create ur world, and the code tab would show you the code that is used to make said animations, and u can also edit that urself (but no debugger), and i would like it to be multiple languages and not just C++, but thats optional.

    when in the animation tab, u can create, delete and edit all shapes to your liking, and when you make a plane (like a face of a cube) with whatever objects used, you can choose a color for that plane, or upload pictures on it. i will need physics codes and stuff like that, because i know i would eventually like to add some physics to toy around with when im bored


    Actual Questions:
    ok, first off i know there are plenty of programs out there that do what i just described (and that they could easily be team projects), but thats not the point, i want to try to make my own for fun that i can add to/update/edit as i get better, but i dont know much about C++ other than for basic console apps, and im not sure if this is even possible, which brings me to my two questions:
    • is this even possible to do in C++?

    • if so, what specific part(s) of C++ would i need to learn?



    PS:
    if anything i tried to describe above is not clear in any way, just ask and i will try to make it more clear for you.

  2. #2
    Join Date
    Nov 2008
    Location
    England
    Posts
    748

    Re: Program Idea Questions

    Yes its possible but a long way past beginner level coding. What you sound like you want to create is a scripting language which can be used to build a 3d world. You might be better off using one of the proprietry games designer type packages. I hear those based on OGRE are pretty good though I have no direct experience of them. Not sure what scripting ogre uses but a large proportion of current games use Lua as their scripting language.
    Get Microsoft Visual C++ Express here or CodeBlocks here.
    Get STLFilt here to radically improve error messages when using the STL.
    Get these two can't live without C++ libraries, BOOST here and Loki here.
    Check your code with the Comeau Compiler and FlexeLint for standards compliance and some subtle errors.
    Always use [code] code tags [/code] to make code legible and preserve indentation.
    Do not ask for help writing destructive software such as viruses, gamehacks, keyloggers and the suchlike.

  3. #3
    Join Date
    Oct 2010
    Posts
    60

    Re: Program Idea Questions

    For the graphics, you'll need something like OpenGL. As Russco said, that's past beginner level. However, the simulation might not be as difficult. You'd need to store where each object is, and that's it. For example, you could store a sphere by storing its location and radius. I'm not sure what you mean by the code tab though.

  4. #4
    Join Date
    Jan 2011
    Location
    Orange County, CA
    Posts
    82

    Re: Program Idea Questions

    Quote Originally Posted by Russco View Post
    Yes its possible but a long way past beginner level coding.
    ok, i figured if it was possible that it would be more advanced, that was kind of the point; to learn it

    Quote Originally Posted by Russco View Post
    What you sound like you want to create is a scripting language which can be used to build a 3d world.
    no (alteast i dont think so), i was thinking along the lines of visual C++ for for the program window and buttons and stuff, and i saw something on google yesterday saying there is a library for making geometric shapes (2D and 3D), but i didnt get a clear answer on what it was called and how to use it, plus i had other things to do at that time that were more important. --that i was planning on using for the shapes part.

    Quote Originally Posted by Russco View Post
    You might be better off using one of the proprietry games designer type packages.
    ok, this is a perfect example of what im not looking for. i want to make the program i stated above for mostly one purpose:
    its a perfect way to help me branch out my knowledge on coding (over time), and give me that little extra push to actually do it, because i would actually use something i made and (out of pride) will always be looking for ways to improve it, getting me involved and asking questions.
    --dont u think that would be a great way to learn about coding?

    also, the other reason is...well.... basically bragging rights. all scripting i know (C++, HTML/XHTML, and learning javascript/DHTML) ive taught myself during this school year (ive had no teachers or classes in any comp-related subjects, although i am going to take a comp science class next year), and being able to say i made something like this would be really cool, and likely to get me involved in other projects....

  5. #5
    Join Date
    Jan 2011
    Location
    Orange County, CA
    Posts
    82

    Re: Program Idea Questions

    Quote Originally Posted by henryswanson View Post
    For the graphics, you'll need something like OpenGL. As Russco said, that's past beginner level.
    ok, now we're getting somewhere. i have no idea what OpenGL is, so ima be googling that after this post
    ...and i dont care about the level, the point of this project is to learn more about coding, therefore advancing my "level" of programming

    Quote Originally Posted by henryswanson View Post
    I'm not sure what you mean by the code tab though.
    well, if u have ever used visual C++, u can add stuff like buttons and what not on a ur window that ur creating on one tab, switch to another tab and see the code which makes what u created possible, and from there u can edit the code the way u like (although u do HAVE to add code to make most stuff work).
    ...or, like when u open two or more websites on ur browser (in one window) and u can switch between the "tabs" to go to the different sites, but for the program, u get something like i stated for the visual C++ example, where basically one is for animation and the other is for specific changes in the code for options not included or stuff that is purposely not included that is for u to fill out.

  6. #6
    Join Date
    Nov 2008
    Location
    England
    Posts
    748

    Re: Program Idea Questions

    As I said, because you want to edit code and have it reflected in a 3d world at runtime you would need a scripting language to do it. You can roll your own or use a readymade such as lua. The way I understood it, you want to be able to edit the world and have script generated or edit the script and have the changes affect the world. C++ is a compiled language not interpreted. Scripts are interpretted which is why they are used. The C++ side of the project would be the windowing, the script interpreter, the script generator, the API for the scripting and the graphics code including physics ie the game functionality. The script side will call functions in the C++( the API ) to do its work but is interpreted at runtime by the script interpreter. This side will likely house the game logic.
    This is how most games these days work. Most of the RPGs I have played lately use lua. Baldurs gate/NWN series rpg's had their own script language which if I remember rightly was called actionscript. Unreal games use unrealscript. WOW uses lua as do most games by NCSoft.The game engines themselves are a mix of C/C++ and possibly some asm.
    Is this not what you were after?
    Most of this work is done for you in the packages I suggested. OK you dont want to use them but instead wish to write your own, well thats commendable but very difficult even for experienced coders especially as 3d is important to you. 2d is a hell of a lot easier.
    As for graphics librarys, on windows DirectX is the native solution whereas OpenGL is portable across different operating systems. Neither are particularly easy to learn and you will also need a good maths knowledge especially where matrices and vectors are concerned. You would need good knowledge of data structures too such as the BSP tree.
    As I said before this is way past beginner level. If your goal is to learn C++ well then stick with console programming until your skills improve before moving onto simpler graphics stuff. Jumping in to animated 3d graphics without that knowledge is like diving in at the deep end of a swimming pool wearing heavy weights and being unable to swim.
    Get Microsoft Visual C++ Express here or CodeBlocks here.
    Get STLFilt here to radically improve error messages when using the STL.
    Get these two can't live without C++ libraries, BOOST here and Loki here.
    Check your code with the Comeau Compiler and FlexeLint for standards compliance and some subtle errors.
    Always use [code] code tags [/code] to make code legible and preserve indentation.
    Do not ask for help writing destructive software such as viruses, gamehacks, keyloggers and the suchlike.

  7. #7
    Join Date
    May 2009
    Posts
    2,413

    Re: Program Idea Questions

    Quote Originally Posted by iiSoMeGuY 7x View Post
    is this even possible to do in C++?
    You can do anything in C++ but for this particular project I would strongly consider Python. Using Python you're not as likely to get bogged down in detail as you are using C++.

    Phyton is a scripting language so you get scripting capability for free. What you need to look for are GUI and 3D subsystems but that shouldn't be too hard to find because Python is very popular in the scientific community where visualization of results is important. Pick a 3D package that offers an abstraction above the driver level thus avoiding the intricacies of OpenGL (or Direct3D).

    Python is not some weird obscure marginal language but almost as popular as C++. At least according to the Tiobe index,

    http://www.tiobe.com/index.php/conte...pci/index.html
    Last edited by nuzzle; March 25th, 2011 at 06:07 AM.

  8. #8
    Join Date
    Jan 2011
    Location
    Orange County, CA
    Posts
    82

    Re: Program Idea Questions

    Quote Originally Posted by Russco View Post
    As I said, because you want to edit code and have it reflected in a 3d world at runtime you would need a scripting language to do it. You can roll your own or use a readymade such as lua. The way I understood it, you want to be able to edit the world and have script generated or edit the script and have the changes affect the world. C++ is a compiled language not interpreted. Scripts are interpretted which is why they are used. The C++ side of the project would be the windowing, the script interpreter, the script generator, the API for the scripting and the graphics code including physics ie the game functionality. The script side will call functions in the C++( the API ) to do its work but is interpreted at runtime by the script interpreter. This side will likely house the game logic.....
    Is this not what you were after?
    ....Most of this work is done for you in the packages I suggested. OK you dont want to use them but instead wish to write your own, well thats commendable but very difficult even for experienced coders especially as 3d is important to you. 2d is a hell of a lot easier.
    oh...
    well i didnt know id have to do THAT much, i thought that i could do the whole thing in C++.
    nevermind then on this project. :'(

  9. #9
    Join Date
    Jan 2011
    Location
    Orange County, CA
    Posts
    82

    Re: Program Idea Questions

    Quote Originally Posted by nuzzle View Post
    Phyton is a scripting language so you get scripting capability for free. What you need to look for are GUI and 3D subsystems but that shouldn't be too hard to find because Python is very popular in the scientific community where visualization of results is important. Pick a 3D package that offers an abstraction above the driver level thus avoiding the intricacies of OpenGL (or Direct3D).
    ya, that seems easier, but to be honest i dont feel like learning another language. i dont really have the time or patience at the moment.
    (i have spanish i HAVE to learn, doing XHTML for family/friends for free, and having to learn javascript/DHTML for the websites, and practicing C++ on the side)
    ...i think thats enough for now...

  10. #10
    Join Date
    May 2009
    Posts
    2,413

    Re: Program Idea Questions

    Quote Originally Posted by iiSoMeGuY 7x View Post
    ya, that seems easier, but to be honest i dont feel like learning another language. i dont really have the time or patience at the moment.
    (i have spanish i HAVE to learn, doing XHTML for family/friends for free, and having to learn javascript/DHTML for the websites, and practicing C++ on the side)
    ...i think thats enough for now...
    In that case I suggest you go for an application framework and a good match for your requirements is Qt. It provides GUI facilities, a scripting engine and 3D graphics with OpenGL, all in one package.

    You'll have to learn Qt of course but you'll still program in C++.

    http://qt.nokia.com/

  11. #11
    Join Date
    Jan 2011
    Location
    Orange County, CA
    Posts
    82

    Re: Program Idea Questions

    Quote Originally Posted by nuzzle View Post
    In that case I suggest you go for an application framework and a good match for your requirements is Qt. It provides GUI facilities, a scripting engine and 3D graphics with OpenGL, all in one package.

    You'll have to learn Qt of course but you'll still program in C++.

    http://qt.nokia.com/
    oh wow.....
    i downloaded QT a while back but never got into it becuase of that, lol!
    i saw some youtube vid about it and some tutorials, but then i was only interested in it because of the GUI, and my compiler doesnt compile GUI codes right for some reason...
    ....but ya, ill look into it some more then, thanks!

  12. #12
    Join Date
    Jun 2009
    Location
    oklahoma
    Posts
    199

    Re: Program Idea Questions

    Qt has it's own IDE and compiler.... works great.
    I used Visual Studios for years, it only took a few days of using Qt to fall in love with it.
    I highly recommend it!

  13. #13
    Join Date
    May 2009
    Posts
    2,413

    Re: Program Idea Questions

    Quote Originally Posted by iiSoMeGuY 7x View Post
    ill look into it some more then, thanks!
    You can get help here,

    http://www.qtcentre.org/forum.php

  14. #14
    Join Date
    Jan 2011
    Location
    Orange County, CA
    Posts
    82

    Re: Program Idea Questions

    Quote Originally Posted by jnmacd View Post
    Qt has it's own IDE and compiler.... works great.
    I used Visual Studios for years, it only took a few days of using Qt to fall in love with it.
    I highly recommend it!
    ok then, i guess it might actually be worth my time to learn then, thanks!

    Quote Originally Posted by nuzzle View Post
    You can get help here,

    http://www.qtcentre.org/forum.php
    will do, already bookmarked
    thanks!

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured