Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Guys, from where to start practical learning C++? — Gideros Forum

Guys, from where to start practical learning C++?

Hi all!

I know we have C++ adepts here! :smile:

I've decided to start learning C++ (I hope to manage 30-50 minutes every morning, this way I won't be distracted from main activities and won't have information overload).

C++ is vast, there're literally tens of thousands of books and resources, I don't know where to start.
And I should choose something very practical, very specific. I've decided to explore some vanilla C++ basics, then try some practical stuff in Unreal Engine.

My purposes are:
1) Contribute to Gideros plugins (if I'll become competent enough)
2) Satisfy my curiousity:
- what is there so scary in C++
- see how stuff works in 3D, particularly Unreal Engine
- see why exactly Lua is considered a great choice for game scripting (I didn't work with C++/C#, so I don't understand real reasons)

What exactly should I learn to be able to contribute to Gideros? Can you suggest some stuff? (books, other resources, etc.)

Thanks, guys!

George.
> Newcomers roadmap: from where to start learning Gideros
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Tagged:
+1 -1 (+4 / -0 )Share on Facebook

Comments

  • hgy29hgy29 Maintainer
    It really depends on which programming languages you already know. You'll need to learn C/C++ syntax, but many other languages were inspired from it (PHP, Java, Javscript, ...). Second thing, in C, as in many other languages, you need to manage memory (allocate/free) yourself.
    Other than that C/C++ is not really difficult. I can't give you book references since I didn't learn programming by books, but if you want to contribute to gideros for better graphics possibilities I think you should also understand how opengl/GPU rendering pipelines work.
    +1 -1 (+2 / -0 )Share on Facebook
  • Well I've been accepted on a Computer Sciences course at a local polytech so I'll be learning computery stuff (most of which I know) and programming (C++ and Java) for the next 3 years.. if the government gives me a student loan :)

    I'm looking forward to contributing a bit more to Gideros also :)
    +1 -1 (+5 / -0 )Share on Facebook
  • Thx guys!
    After little research I've decided to learn C++ basics from Learn X in Y Minutes and 'C++ Primer' by Lippman (this book is most frequently recommended for beginners).
    hgy29 said:

    It really depends on which programming languages you already know...
    ...for better graphics possibilities I think you should also understand how opengl/GPU rendering pipelines work.

    Currently I'm familiar only with scripting languages: JS and Lua.
    antix said:

    Well I've been accepted on a Computer Sciences course at a local polytech so I'll be learning computery stuff (most of which I know) and programming (C++ and Java) for the next 3 years.. if the government gives me a student loan :)

    IMO you can start learning C++ beforehand, it will make your education much easier later.
    > Newcomers roadmap: from where to start learning Gideros
    "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
    “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
  • john26john26 Maintainer
    IMO Lippman's Primer is dreadful. Instead go to www.learncpp.com. This online "tutorial" (actually it's a full textbook) is by far the best description of C++ I've ever seen and completely free. Suitable for the absolute beginner and for experienced users.
    +1 -1 (+2 / -0 )Share on Facebook
  • Thx! learncpp.com looks like it truly has everything I basically need, and it's laconic, and it's free.

    it's been a week or two since I've started C++ basics
    omg C++ looks like Leviathan after Lua :p
    > Newcomers roadmap: from where to start learning Gideros
    "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
    “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
  • Apollo14Apollo14 Member
    edited January 2019
    (offtopic)
    guys have you ever heard about SkookumScript?
    looks like some futuristic phenomenon :D
    > Newcomers roadmap: from where to start learning Gideros
    "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
    “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
  • btw some SkookumScript features are similar with Gideros async tasking
    http://www.skookumscript.com/about/look/
    // Two consecutive commands - will execute one after the other.
    guy._walk  // Guy completes walk.
    car._drive // Then car drives.
    println("Completed")
    > Newcomers roadmap: from where to start learning Gideros
    "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
    “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
  • SkookumScript has just been bought by Epic.
    http://skookumscript.com/blog/
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • Apollo14Apollo14 Member
    edited April 2019
    Hi all :smile: It's been few months since I've become curious about C++ and 3D.

    After series of trials I came to know that conquest of UE4 must be started from learning Blueprints, and doing it only from their official youtube playlists.
    Everything else is waste of time: third party stuff like lynda, udemy, whatever is on torrents, youtube channels, etc. - all bullcrap (it's not their fault, it's just because official tuts are too outstanding, it's not even fair :).

    C++ at start was totally wrong move (almost impossible to effectively learn both C++ and unreal structure, this combo is complicated as freaking hell). If we follow tutorials like a monkey, we can make yet another crappy shooter, but even slightest step aside guarantees hours of googling and brain screwing.

    And it was surprising to know that nowadays even AAA titles are sometimes 80% blueprint-based (most of smaller titles are 100% blueprints).

    And I'm afraid to even think about price of custom 3D models for games (3D assetstore stuff is pretty much like 2D assetstore stuff: 99% of it is freaking useless, with only difference that 3D models are sometimes very problematic to import and tune to personal needs).
    I don't know, maybe later I'll find some ideas for 3D hypercasual crap genre that is now in demand in appstores. Well, I'll try to...

    So I guess my first 'serious' project will be 2D :smile:

    p.s. video on Blueprints :D
    and Blueprints from hell :D

    Likes: MoKaLux

    > Newcomers roadmap: from where to start learning Gideros
    "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
    “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
    +1 -1 (+1 / -0 )Share on Facebook
  • olegoleg Member
    edited April 2019
    @Apollo14 я не думаю що 3д моделі майнкрафт дорого коштували розробнику =)
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • antixantix Member
    @Apollo14 yeah I have done some research myself and a large portion of games are made using the blueprint system.

    What did you find bad on lynda.com? I have unlimited access there now through the polytech that I am studying at and I've found their unreal engine stuff really good. Maybe I need to go and checkout the official ones to compare :)

    I'm also learning c# at polytech and finding that pretty good. I'm confident I can make the switch to c++ and Unreal Engine when I need to.

    I agree about cost of assets.. it's a barrier for sure. I have the same issues with 2D assets however.. they are always incomplete and mostly created in stupid sizes that need micromanagement. I suppose that's what happens when "artists" are left to rampantly create game assets with zero programming knowledge :D
  • Apollo14Apollo14 Member
    edited April 2019
    oleg said:

    @Apollo14 я не думаю що 3д моделі майнкрафт дорого коштували розробнику =)

    Yes, I'm thinking about hyper-casual 3d, where voxels or low-poly can be used.
    And, ironically, simple 3d games are sometimes much harder to code then templated shooters or racing, though it looks like opposite, with all them realistic models, etc. :D
    antix said:

    What did you find bad on lynda.com? I have unlimited access there now through the polytech that I am studying at and I've found their unreal engine stuff really good. Maybe I need to go and checkout the official ones to compare :)

    I honestly don't know, probably Epic have casted some unknown spells, their videos are as refreshing and easily digested as fresh orange juice on an empty stomach in the cheerful morning.

    Imo if you plan to dive into it later, the sooner you start the better, maybe 30-40 minutes a day like a hobby, progress will be effortless and constant.
    (but maybe it's only my experience, for other people it may work differently)
    I've found that I can't load too many things in my brain at once. Say if I spend 1 hour learning something new, it doesn't mean that after spending 5 hours I will learn 5 times more, not at all.
    > Newcomers roadmap: from where to start learning Gideros
    "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
    “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
  • @Apollo14 does it mean you want to experience 3d? If so I can suggest having a look at godot. I used it for 2d not for 3d though. They have made huge progress in 3d and tutorials for 3d are coming fast! Godot is very easy.
    Tell me what you think.
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • Apollo14Apollo14 Member
    edited April 2019
    MoKaLux said:

    @Apollo14 does it mean you want to experience 3d? If so I can suggest having a look at godot. I used it for 2d not for 3d though. They have made huge progress in 3d and tutorials for 3d are coming fast! Godot is very easy.
    Tell me what you think.

    I've heard a lot about godot, I guess it's very good, at least build size is not bloated like in UE.
    In UE I'm totally in love with blueprints (though sometimes they get ugly) and I'm very curious about their next scripting system (somewhat very different from existing scripting languages).
    > Newcomers roadmap: from where to start learning Gideros
    "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
    “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
  • hgy29hgy29 Maintainer
    @Apollo14, why not just sticking with gideros ? If your 3D project is really a simple game, Gideros may be up to the task. I am myself writing a 3D game (endless runner) with gideros at this time.

    Likes: oleg

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    edited April 2019
    To give you an idea of what my 3D WIP game looks like, see attached picture :)


    IMG_1832.PNG
    1125 x 2436 - 556K
    +1 -1 (+3 / -0 )Share on Facebook
  • Wow looks nice! I didn't think we could do that in Gideros!
    Can you pls share code snippet of something very basic? (like rotating 3D object)
    > Newcomers roadmap: from where to start learning Gideros
    "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
    “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
  • olegoleg Member
    Apollo14 said:

    Wow looks nice! I didn't think we could do that in Gideros!
    Can you pls share code snippet of something very basic? (like rotating 3D object)


    image.png
    862 x 427 - 69K

    Likes: Apollo14, MoKaLux

    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
    +1 -1 (+2 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    Actually, an example covering camera/viewport settings for 3D would be good, I don't think any of current examples use newests gideros features regarding 3D
    +1 -1 (+4 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    Something like this maybe ?
    -- Build our scene: a pyramid
    local pyramid_h=(3^0.5)/2
    local pyramid=Mesh.new(true) -- Create a 3D mesh
    pyramid:setVertexArray{
    	0,pyramid_h,0, -0.5,0,0.5, 0.5,0,0.5, -- Back Face
    	0,pyramid_h,0, -0.5,0,-0.5, 0.5,0,-0.5, -- Front Face
    	0,pyramid_h,0, 0.5,0,-0.5, 0.5,0,0.5, -- Right Face
    	0,pyramid_h,0, -0.5,0,-0.5, -0.5,0,0.5, -- Left Face
    	-0.5,0,0.5, 0.5,0,0.5, -0.5,0,-0.5, 0.5,0,-0.5, -- Bottom Face
    }
    pyramid:setColorArray{
    	0xFF0000,1,0xFF0000,1,0xFF0000,1, -- Back Face
    	0xFFFF00,1,0xFFFF00,1,0xFFFF00,1, -- Front Face
    	0x00FF00,1,0x00FF00,1,0x00FF00,1, -- Right Face
    	0x00FFFF,1,0x00FFFF,1,0x00FFFF,1, -- Left Face
    	0x0000FF,1,0x0000FF,1,0x0000FF,1,0x0000FF,1, -- Bottom Face
    }
    pyramid:setIndexArray{
    1,2,3, --Back face
    4,5,6, --Front face
    7,8,9, --Right face
    10,11,12, --Left face
    13,14,15,14,15,16, --Bottom face
    }
     
    --Build our viewport
    local scx,scy,scw,sch=application:getLogicalBounds() --Get logical insets
    scw-=scx sch-=scy --Convert insets to width and height
    local projection=Matrix.new() --Build up our 3D projection matrix
    projection:perspectiveProjection(70,-scw/sch,0.1,10) --We use a negative fov to reverse Y axis (so that it points upwards)
    local view=Viewport.new()
    view:setProjection(projection)
    -- Our projection maps 3D space to normalised space, that is -1,-1 to 1,1
    -- Scale the viewport so that it covers the full screen
    view:setScale(scw/2,sch/2) 
    view:setPosition(scx+scw/2,scy+sch/2) --Position it to screen center
    view:setContent(pyramid) --Set viewport content to our 3D scene
     
    --Animate
    Core.asyncCall(function()
    	stage:addChild(view) --Add view to stage
    	while true do
    		-- Rotate the pyramid around Y axis
    		pyramid:setRotationY(os:timer()*30)
    		--	Move camera up and down, always looking at the pyramid
    		view:lookAt(0,math.sin(os:timer()*2),-2, --Our eye/camera pos in 3D
    					0,0.5,0, --What we are looking at: roughly the center of the pyramid
    					0,1,0) --Up/Sky direction
    		Core.yield(true)
    	end
    end)
    +1 -1 (+4 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    @Apollo14 hello there, I have found this site for OpenGL and c++:

    http://www.sumantaguha.com/

    That may be a good start for learning and contribute to gideros?!
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
Sign In or Register to comment.