pouët.net

headache

category: residue [glöplog]
 
cout Ive been learning from the 'learn C++ in 1 video' on youtube
**kewl!!!**
and me av got a bit of a headache because my last experience of coding was at school with the zx spectrum in 1984-6
I wrote an electronic circuit board program for O level
it involved me creating virtual memory in order for the cursor to move around and place edit lines and components....

(serendipitously recently realising that in quantum physics the particle disappears when you look at it because guess what!! theres a mouse poiner and theres nothing there it is invisible(in memory)

anyway so that's as far as me av got but wondering what is the easiest way to learn how C++ intergrates with the new style of intel computer? the graphics card?, the chip??, the memory? etc all of which seemed unnecessary in my old spectrum program I had to create it all in the program?? the virtual memory for the screen...

kind of just findingmy feet and trying to find the most intuitive next step..
will have to watch the video a few more times...

many thanks for any advice

Starlight - humble monk
------------------------------
God is a scener
added on the 2015-11-02 07:48:23 by starlight starlight
What? Seriously, what?
added on the 2015-11-02 10:06:13 by EvilOne EvilOne
hi Evil one (OT I loved the evil one in mickey rourkes new greek mythology film thanks for the olive branch)

me is new to coding on these new machines? and new to C++
on the spectrum the virtual memory I created was the pixels on the screen so it was all so simple but these pc's look unnecessarily complicated or am I being paranoid?
added on the 2015-11-02 10:22:19 by starlight starlight
paranoia would be the least of your mental illness concerns
BB Image
added on the 2015-11-02 13:19:17 by RbR RbR
Meinten Sie: Headcrash.
added on the 2015-11-02 13:22:42 by moqui moqui
BB Image

Please post again when/if ever sober.. Thank you.
added on the 2015-11-02 13:36:00 by pixman pixman
Love you guys/creatures/drawings etc

there is no need to worry everything is easy to control and normalise or not :)
the coding can change anything how one wants it :)

there's even a delete and escape button, but I don't think i'll ever escape the vogon pouet
:)
added on the 2015-11-02 13:53:18 by starlight starlight
starlight, the thing you're finding is that the noostyle compooters have allllll these layers of abstraction between the drug-addled head of the demoscene programmer and the cold hard silicon; whereas on your ZX, you were much closer to the metal.

What I would advise is this: Take the simplest route to getting a good and fast framebuffer on the screen that you can draw to with some PutPixel(x,y,colour) function. This comes close to your previous experience, as you'll have a block of memory which maps to the screen, and you can draw pixels (fast!).

You can use that environment to implement many classic effects while learning teh C++ and from there you can go on to investigate 3D libraries etc.

So how to get to this point? I expected it would be a trivial Google away, but surprisingly that's not the case, so I knocked up a quick proggy.

It's a minimal example of getting a fast framebuffer up that you can draw to, using the cross-platform SDL library. There is a DoEffect() function where you can replace the contents to draw some effect, and helper functions for turning R,G,B values into SDL colours and putting them at some (x,y) coords. At the moment, it draws random dots all over the screen.

I'm not sure what IDE you're using; that should as-is in Code::Blocks if you paste it into the main.cpp of a new "SDL Project" from the New Project menu.

If using Visual Studio or something else, let me know and I can help set it up (if any of this is actually useful to you). If on a mac, let me know too as I can get it running there.
added on the 2015-11-03 13:29:28 by Fell Fell
Just to add, don't feel intimidated by all the strangnesses in these help functions. The only bit you should care to understand at first is DoEffect(), and how to change it. The other functions you will come to understand in time as you progress with the C / C++.

Now go thee forth and maketh teh pretties!
added on the 2015-11-03 13:32:01 by Fell Fell
hey fella thanks was up till the early hours (managed to get 4 hrs sleep though....) trying to get the commands to be recodnised with:

#include <iostream>

using namespace std; as explained in a tutorial I saw

eventually putting that code into a separate .h header file but still to no avail?
but I get the idea of the solutions libraries window with header, source, resource files etc
I was expecting that bit to be worse..

yes the drawing procedures are the bits I am eager to get at.... once the code is seen on the screen it becomes intuitive, with trial and error....

thanks for the prog, that's very kind thanks!! i'll look at that in a minute once me av been to loo.... (after all the awesome hardcore oneliners) hey the diamond models are safe guys!! hidden away in the septic tank :)
added on the 2015-11-04 12:05:20 by starlight starlight
thanks for that code I feel very privaledged...
that's gonna keep me away and busy for quite some time
:)
added on the 2015-11-04 12:28:15 by starlight starlight
Me av been going spair... :)
added on the 2015-11-04 15:21:38 by starlight starlight
Quote:
many thanks for any advice

just STFU
added on the 2015-11-04 23:50:03 by SiR SiR
Today demos are made like THIS
added on the 2015-11-05 01:51:10 by T$ T$
Fall: I've installed SDL into visual studio 12
and I have also installed symbols
have managed to get rid of all error messages apart from:
frameBuffer = SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, 32, SDL_HWSURFACE | SDL_DOUBLEBUF);

and flip

causing First-chance exception at * (user32.dll)

??
added on the 2015-11-11 12:33:38 by starlight starlight

login