Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

C++ 3D

Name: Anonymous 2011-07-30 20:14

I am using C++, and moving on to doing 3D things with it. I've some good experience with Java3D's API.

My question: OpenGL / DirectX / ???someothersuggesteions???

Leaning more so to OpenGL. I've heard a bit about Ogre3D too.

Name: Anonymous 2011-07-30 20:37

fuck off with opengl/direct3d/phigs/gks!
learn math (trigonometry/geometry/algebra/quaternion) and physics (all you can) and then make your own rasterizer.

Name: Anonymous 2011-07-31 1:10

>>2
Enjoy your great efficiency and awesome hardware that will support your rasterizer.
You might as well write it in Ruby, because it's going to be as fast as a continent if you catch my drift.

Name: OP 2011-07-31 2:12

>>2
Unfortunately I'm a little pressed for time to make something from scratch. I and I'm very familiar with all those subjects except quaternions. So maybe sometime in the far future. And...

>>3
I could imagine, haha. I think I might actually just write the whole thing on a commodore 64 emulator. :rolleyes:

Name: Anonymous 2011-07-31 3:20

:rolleyes:

IHBT

Name: Anonymous 2011-07-31 3:54

>>1
Don't bother with Ogre3D or other archaic open-source projects. They're horrible and are nothing at all like what game developers are using or building for modern games.

If you go the Direct3D route, don't bother with D3D9 or D3D10, go straight for Direct3D11.

If you decide to learn OpenGL first, be wary as most tutorials and articles talk about the old deprecated OpenGL 1.x and 2.x stuff. Avoid NEHE tutorials like the plague. Try to find some information regarding OpenGL 4.x or OpenGL ES 2.0, which have removed the old obsolete fixed-function pipeline and immediate mode APIs.

Technically, Direct3D11 has more features and a stream-lined state model. It supports multi-threaded command buffer construction. OpenGL 4.2 should be getting multi-threaded support later this year.

>>3,4
Enjoy your great efficiency and awesome hardware that will support your rasterizer.

He's not that far off from where things are heading. Real-time graphics is returning to custom software rasterizers running on GPU hardware using OpenCL, DirectCompute, or other GPGPU languages.

Battlefield 3 for example contains a custom software scene compositor written in DirectCompute for the PC version and Cell SPU assembly language for the PS3 version (XBox 360 has shitty forward shading, lolol) which does the deferred shading and lighting pass.

So keep that in mind OP, you probably also want to learn about GPGPU programming as well.

Name: Anonymous 2011-07-31 4:37

Try to find some information regarding OpenGL 4.x or OpenGL ES 2.0, which have removed the old obsolete fixed-function pipeline and immediate mode APIs.
this and this hard.
OpenGL tutorial is not enough - it has to be OpenGL 2.0 tutorial at least. Otherwise they won't even tell you what a shader is, and without this knowledge you can only learn about old technology.

Name: OP 2011-07-31 4:54

>>6

Nix the Ogre3D, gotcha. Their plugs on Youtube seemed a little... meh.

D3d11, I'll definitely look into that.

I've found some awesome tutorials for OpenGL basics on Xoax.net using VC++ 2010. Things have been going smoothly, especially since the geometry concepts are the same (points, polygons, strips, what have you) as in J3d. I'll probably stick with this for now and double check the version when I get home, I'm away from my personal computer at the moment.

GPGPU? First time hearing about it ( I don't play a whole lot of games that aren't free or open-source - no I'm not poor or a freeloader, I just really like the creativity and the community behind most open projects. The fact that it's free is just a plus. My second home page is Google Code. Get at me). Though it definitely sounds appealing, I used to play around with assembly back in middle school, hacking cheap flash games with CheatEngine.

Thanks for the advice, anon. /prog/ is proving to be a much more productive resource then those lame ass forums, I'm sold.

And panning out, though it's cool to know where the latest and greatest games are getting their guts from, a big part of me has nostalgia for low-end graphics. Probably just me wishing that I was born sooner to see all the Atari stuff roll out. Though I'm not thinking *that* archaic - I am talking about working in 3d here, after all. My imagination is definitely thinking something along the lines of a hybrid. Perhaps N64 style. I'll see how it goes.

Name: Anonymous 2011-07-31 5:13

>>8
Well, the great thing about doing graphics through OpenCL or DirectCompute is that they are based off of ISO C99, with extensions for doing SIMD math, steaming data to/from buffers, and coordinating GPU threads and wavefronts. For someone who used to do demo coding on Amiga and DOS, this level of control on the GPU is very enticing to demoscene coders in a nostalgic sense as it finally makes doing software rendering practical again. There's lot of people experimenting with custom GPGPU ray-tracers, ray-casters, deferred shaders, and more esoteric types of graphical methods and data-structures that were previously confined to non-realtime.

Name: Anonymous 2011-07-31 5:37

>>8
OpenGL basics on Xoax.net
Skimmed through the tutorial.
It's what we've been warning you about - it's deprecated. Nothing about shaders. And no, "shading model" isn't it.
Skip to OpenGL 2.0 as soon as you get the basics, don't linger on this old tech.
GPGPU
Shaders allow executing programs on them. They are great for easily parallelizable code, as GPUs are essentially 1000-core processors with some limitations. GPGPU is just using those shader capabilities for computing non-graphical data.
I don't play a whole lot of games that aren't free or open-source
Those games are the best anyway. Dungeon Crawl, Dwarf Fortress, Spring (Total Annihilation remake) are far better than their commercial alternatives.
Thanks for the advice, anon. /prog/ is proving to be a much more productive resource then those lame ass forums
then
It's than.
My imagination is definitely thinking something along the lines of a hybrid.
As in, 2.5D (3D graphics for 2D game world), minimalistic 3D or what?
With shaders, you can get a lot of retro style effects without sacrificing quality.

Name: OP 2011-07-31 5:45

>>9
Sounds awesome o__o Watching a video on OpenCL now.

I used to write programs to do fractal computations, I can only imagine how it would run under openCL:
http://www.youtube.com/watch?v=IEWGTpsFtt8

.18 seconds, that's crazy. Though these guys are running much better hardware than I have, regardless, total codepr0n.

Now with this OpenCL business, it seems to deal mostly with C. Honestly I've never looked too deep into C code, and I may or may not remember a teacher/mentor of mine mentioning that the main difference was that C++ is object-orientated (and from playing with Java, I quite like objects). I'll correct myself if I'm wrong, but that's beside my point: Is it worth hopping over to C?

Name: Anonymous 2011-07-31 5:48

>>10
With shaders, you can get a lot of retro style effects without sacrificing quality.
You can do them without shaders,  without sacrificing portability.

Name: OP 2011-07-31 5:58

>>10

>It's than
Yeah sorry, second 5:46am in a row here xD Coffee coffee coffee coffee

And ok. I'll look elsewhere for more updated tutorials. Thanks for the heads up.

>Those games are the best anyway.
Absolutely!!

And yeah that's the idea, 3D graphics in 2d world or the other way around. Perhaps a game that switches between all out 3D and 2D depending on the context. Say you have some character in 'real life' who hacks himself physically into the internet to complete certain tasks or something (where it's all 2d). It would probably be set in atari's time period or something classy.

I also had the idea of making general-purpose programs (word processors, spreadsheets, music making software) that have 3D interfaces. You'd actually 'walk around' and put data in place, or something like that. Sounded like fun to me, as it could make writing essays for college that much more interesting, haha.

Name: Anonymous 2011-07-31 6:02

>>10
Those games are the best anyway.
Maybe you should try playing more games and diversify your taste beyond GNU/Freedom.

Name: OP 2011-07-31 6:03

I'm a CAD student, and for a long while now I thought it would be awesome to be able to work on the same 3D model/scene over the internet. Think 3ds Max: Co-op edition.

On quite a few of my projects, we usually are juggling the same file back and fourth, waiting for the other to finish something. With a lot of our software, it's just a pain in the ass to merge files.

Name: OP 2011-07-31 6:07

>>12
“What is this?” Mickey whispers, soft enough to sound threatening but loud enough for Pluto to prick up his ears in attention. “Well?” Mickey appears to want an answer. Pluto mimes that what Mickey is in fact holding is a newspaper and then smiles broadly. “No, this isn’t a newspaper, this is sh­it.” Mickey begins to roll the newspaper into a cylinder again. “And where does sh­it belong, Pluto?” The dog points towards the toilet, “Nope that’s not it, come here and I’ll show you.” Obeying its master, Pluto trots to Mickey’s side.

Mickey lifts Pluto’s wiry tail, revealing the tight, puckered lips of the dog’s arsehole. He licks his index finger and inserts it inside. Pluto whimpers slightly, the cold finger of his master rubbing the inner rim of his an­us a foreign experience; it begins to arouse him, strengthening his veined pen­is, causing his tongue to slide to the left of his mouth and saliva to accumulate in the pup’s gaping mouth.

“You like that, Pluto? You like my finger in your as­s?” Mickey begins to wriggle his index finger. This causes Pluto to writhe in pleasure at Mickey’s side. “You like me inside you Pluto? You enjoy this?” Pluto nods dramatically, the broad smile and sleepy eyes providing all the information Mickey needs. Picking up the soggy newspaper, already rolled into a tight cylinder, Pluto awaits the aforementioned task.

Mickey removes his index finger, much to Pluto’s distaste, forces Pluto to spread his legs and begins to tease his rump with the tube of wet news. Stroking the lips with the soft pages, watching the dog’s pen­is reach the pinnacle of arousal and throb as he baits Pluto’s sh­it-hole.

Pluto begins to weep, the pressure being too much. Although, in his doggy speak, Pluto begs for more. Pluto wants something to penetrate him deep inside. Mickey, the kind hearted soul that he is, inserts the newspaper entirely into Pluto’s an­us. Mickey crams the squishy tube deep into the bowels of the dog; but, unfortunately, the paper begins to break apart, sticking to the intestinal walls, lining Pluto’s gut with political bullsh­it.

The canine’s eyes bulge as he is penetrated; he clenches his teeth as his arsehole tightens around the softened tube. Pluto moans, aroused by the squishy thing inside him. “You like that, do ya, Pluto?” In between moans, Pluto manages to nod, “Too bad Pluto”. Mickey quickly removes his trademark shorts, revealing to Pluto his big black c­ock, stiff in anticipation.

Pluto’s mouth hits the floor, he never knew his master was that big before now and as it stands to attention before him he imagines it sliding up his hole. Mickey sees the excess drool slide to the edge of Pluto’s mouth, coupled with the glazed look in both of the eyes. “Do ya want me inside of ya, Pluto?” asks Mickey in a cheery tone. Pluto, still in a dreamlike state, doesn’t answer but Mickey doesn’t care. With his index finger, he pokes the remainder of the newspaper tube further into Pluto’s an­us, relinquishing a moan from the pup as he writhes about on the floor. Mickey then places the head of his pen­is against the lips of Pluto’s arsehole and slowly edges himself in, allowing the dog’s muscles to contract around his thick shaft.

As Mickey slowly pushes himself inside, his pen­is pushes the rolled up newspaper even further up Pluto’s intestinal tract, the doggy being penetrated further than he could ever think possible, his drool making puddles on the floor.

Suddenly, Mickey thrusts forward, shoving the entirety of his c­ock into the canine’s tight hole. This forces the rolled up newspaper to become stuck in his intestinal tract. Pluto screams his doggy screams, most of which sound more like barks than screams (but to a dog they would sound like screams), and he whines his doggy whine as blood trickles out of his doggy an­us in between the thrusts of his master.

As Mickey’s te­sticles slap against Pluto’s animated arse cheeks he allows himself a smile, his teeth glinting in the sunshine as his dog wails in doggy pain. His pen­is glides effortlessly into Pluto’s an­us, with the blood now acting as a lubricant, pumping away causing Pluto to moan and scream with a mixture of pain and pleasure. “You like it now Pluto? Do you want me to stop or have you learnt your lesson?” Mickey speaks quite sternly, as would a teacher to a child. He removes his pen­is from Pluto’s an­us, but keeps it on the brink of the dog’s anal lips, as would a teacher to a child, awaiting an answer.

Meanwhile, inside Pluto’s belly, all that pumping and grinding done by Mickey’s pen­is and the rolled up newspaper has done some serious damage and now Pluto is bleeding internally. However, the sun is shining through the main window of Mickey’s house, embracing both Mickey and Pluto with a hug of natural warmth. “Well?” Mickey still wants an answer from the hound, but it appears that Pluto is too weak to even reply. “Fine Pluto, I guess you haven’t learnt your lesson.” Mickey isn’t happy. Even after all they had been through, Pluto won’t even apologise to Mickey for this single incident. With tears streaming down his face, Mickey flips Pluto over, revealing the lighter fur coating of his under-belly, and begins to rub.

As Mickey rubs his stomach, Pluto nods his head in enjoyment. As Mickey, once again, begins to pump at his bloodstained an­us he begins to shake his head in an aggressive way. Mickey begins whispering “it’s okay, everything will be okay” into the ears of his beloved pal, still rubbing his belly yet pounding away with his big black c­ock.

Mickey then picks up the pace and begins pounding Pluto’s a­rse faster and faster in a continuative rhythmic fashion. The thrusts increase in tempo. Faster and faster, Mickey’s c­ock enters Pluto’s an­us, until the pounding reaches a state of climax at which point Mickey plunges his hands into Pluto’s belly, tearing his skin and ripping his gut wide open. Pluto begins to shake violently as his internal organs are placed on view. Mickey still pounds away at the body, the face of Pluto slowly drifting away but full of the pain and anguish that his master is inflicting on him. The body continues to spasm, even after the light in the eyes has gone.

Name: Anonymous 2011-07-31 6:10

>>11
Most teachers/professors get it wrong. C++ is not object-oriented, it's multi-paradigm. It supports procedural, object-oriented, generic, and functional programming. C is for the most part the procedural subset of C++, or rather, C++ took C and added a bunch of other stuff on top of it, some of it good, some of it less than good. In fact, many of the early C++ standards body people and the people who developed the STL which later got integrated with the Standard C++ Library hated OOP.

Most low-level graphics code is highly procedural and parallel in nature anyway, so even in C++, you'd be using the procedural and/or functional/generic subsets of the language. As for GPGPU, Microsoft is releasing a CTP of Windows C++ 2012 in September, which will have an implementation of C++AMP which supports using C++ across heterogeneous devices like GPUS (it essentially compiles down to DirectCompute code).

I'd suggest learning how to use the other parts of C++ rather then the strict OO stuff. Good C++ code favors class composition over inheritance, avoidance of overuse of virtual functions and exception handling, use of template classes and functions, and not trying to force procedural/functional code to be object-oriented--you use free functions for when it makes sense.

Now's a good time to get into C++ because C++11 is getting ratified in a couple of weeks which fixes a lot of the problems with the language.

Name: OP 2011-07-31 6:26

>>17

Yeah I'm not surprised he was wrong.

I started small with C++, didn't touch objects until later on - I basically just used C++ to turn my computer into a programmable calculator to do homework for me. Sold copies of my program - which was named after an energy drink - and used the cash to buy music CDs and stock equipment. (It took me AGES to get an iPod, and my original video just went bust so I'm back to CDs and streaming from my computer to my car stereo via logic control deck). Went on to classes and objects and such after that, mostly when I started doing things with fractals and I programmed my own imaginary number class for the heck of it.

C++11, totally marking that on my calendar.

Name: Anonymous 2011-07-31 6:26

>>6
Try to find some information regarding OpenGL 4.x or OpenGL ES 2.0
it should be mentioned you need the latest series of graphics cards to run OpenGL 4.x, so its not going to run on older machines or netbooks. Im not sure how well its supported in current Linux drivers

Name: Anonymous 2011-07-31 6:35

>>19
I'm using GL4.1 on Debian with the nVidia proprietary drivers.

Name: Anonymous 2011-07-31 6:52

Im curious, isnt learning DirectX or OpenGL overkill since you will eventually have to implement functions that manage the low level graphics calls...effectively making your own game engine. Wouldnt it be better to just start out using a game engine like Ogre or Panda right away and learn all the low level details of DX or OGL later?

Name: Anonymous 2011-07-31 6:59

Ogre or Panda
both are shit

Name: Anonymous 2011-07-31 7:06

>>22
both are shit
if you happen to be a game engine programmer, then fine, I can see you shooting down any game engine as confining or limiting. But just to say they are shit, no way, I know a lot of good programmers who love Ogre. I dont see how a beginner could get much better than that for starting out

Name: OP 2011-07-31 7:16

>>23

I've seen a lot of people on youtube who have used Ogre for simple games and things like that. Though I feel like Ogre would just be  a stepping stone to OpenGL or DirectX, and I'd much rather dive right in. I've used a few game engines - namely, eAthena and Source - and the whole reason I'm going back to C++ and learning OpenGL is because I wasn't very satisfied with the fact that I was just modifying someone else's work. Sure, I'm still doing it even at this level (I'd have to start mining for materials to make circuit boards to be anywhere near free of someone else's labor) - but just saying that I'm working with C++/OpenGL doesn't imply that I'm making a game.

tl;dr - Using Ogre just seems like procrastination. I'd have to learn the low level stuff eventually if I wanted to get serious, so why wait? A headache now is one less headache later.

For now, that's my goal, to make some sort of game engine.

Name: Anonymous 2011-07-31 7:21

>>24
I'd just like to interject for a moment, noko here is useless and rude.

Please continue.

Name: OP 2011-07-31 7:30

>>25

My bad. If it wasn't clear from my original posts, this is my first thread on /prog/ coming from someone who has only posted on /b/ and the like. Sorry!

Name: Anonymous 2011-07-31 8:27

>>26
You did far better than most homosexuals from /g/. Only :rolleyes:, xD, noko, lack of space after '>' and very minor grammar mistakes.
While it's obvious that you are new here, it's not jarring, like it is with most new posters, who shit up their posts with non-/prog/ memes, imageboard mannerisms like dumb insults in each post, "trading" (requests and "in return tits"), bad grammar...
>>24
Sometimes procrastination is good. You could start with the high level stuff, learn how to use it well and only progress down once you realize what you need and what is its end effect.
While I personally prefer low level stuff for learning (with high stuff I always wonder "how is it actually implemented" and often not just out of curiosity, but need), I don't think it's clearly better than starting out high level.
but just saying that I'm working with C++/OpenGL doesn't imply that I'm making a game.
With the whole OpenCL thing, OpenGL is slowly starting to imply only that what you do requires efficiency.

Name: OP 2011-07-31 8:50

>>27

Haha, thanks I suppose. Did I mention second day without any sleep?

And I totally agree. Procrastination can be good, if this were simply a hobby, which it is most of the time, but I'm on a project schedule here unfortunately.

I would love to get into more low level work. My very first programs were in BASIC from "Game Programming For Teens", a book I found in Borders back in 6th grade or something. While I knew subconsciously that things were going on behind the scenes, I didn't really feel a drive to learn it until I was exposed to online social networking. Some of the boards that I participated in would always suggest going lower (and 'suggest' is putting it lightly for some cases) and I just didn't really know where to start. I used to get a kick out of scrolling through the debug console, but that's as far as I got. I've looked up some things in the past hour or so about messing with the debug console to perform operations, but most of it was seriously outdated. What I'd like to see is some C++ code (or psuedocode, I guess would do of course) side by side with the assembly code, so I'd have something to relate to. I've found one or two examples, but they're in C. If I may ask, how did you go about learning (books, videos, both?) and at what level do you usually prefer to work?

Name: OP 2011-07-31 8:54

>>28

mention second day without sleep?

Uh wow, I don't think I could have made THAT more clear... and I proofread that, somewhat... Blah, I'll be back when I'm more competent and alert. Won't be too long.

Name: Anonymous 2011-07-31 9:03

For those that don't understand why things like Ogre and Panda are pure utter shit and are laughed at by real game developers, read these series of images:

http://macton.smugmug.com/gallery/8936708_T6zQX#593429185_vYzBb

Name: Anonymous 2011-07-31 9:06

>>30
Images... for code?

Name: Anonymous 2011-07-31 9:30

>>28
and 'suggest' is putting it lightly for some cases
Angriest people are usually the least knowledgeable ones.
Not arguing against this case, though - some low level knowledge is required, you just don't need to know it very well.
What I'd like to see is some C++ code (or psuedocode, I guess would do of course) side by side with the assembly code
Try compiling to assembly. Most compilers have this option. Assembly created this way can be quite unreadable with advanced functions (printf(), stream::operator<<(), map.insert()), but you should be able to read the basic stuff (addition, function calls, XOR) after a short while.
If I may ask, how did you go about learning (books, videos, both?) and at what level do you usually prefer to work?
I'm not too advanced. I usually start with "I want to do %BASICAPP%, with simple graphics" and google tutorials for it.
I write C stuff complemented with objects and ready to use data structures (std::map, std::vector). I'd say it's start of high level.
Blah, I'll be back when I'm more competent and alert. Won't be too long.
Lack of sleep causes a lot of health problems. /prog/ is not /b/ - threads don't scroll like toilet paper here. You can browse threads from 2007. I'd recommend reading some of the older threads, as there are few gems of high grade humor, sometimes coupled with valuable insights even.

Name: OP 2011-07-31 9:40

Angriest people

Couldn't agree more. My step father is a perfect example. Luckily, I'm far away from him now though.

Compiling to assembly

Yeah, that's clever. I'll give it a go in a few minutes.

Lack of sleep

Yeah, but the lack of sleep in this case is the health problem. I'm a little sick, waiting on meds. And yeah, that should kill some time, thanks.

Name: Anonymous 2011-07-31 10:07

>>32
I'd recommend reading some of the older threads, as there are few gems of high grade humor, sometimes coupled with valuable insights even.

Yeah, gotta love all of those ANUS and AUTISM threads. lololol XD amiright?

*ssspsllusssssshhhh*

I just took a dump in this thread.

Name: Anonymous 2011-07-31 10:08

>>30
Torchlight sold over a million copies. Vroom! Vroom!

Name: Anonymous 2011-07-31 10:15

Ignore >>34.

Name: Anonymous 2011-07-31 10:19

>>35
Does Torchlight run on consoles? Nope! They promised console support for Torchlight 2, but they're struggling to get the game performing decently enough. Ogre is too bloated for consoles and for lower-end PCs.

Name: Anonymous 2011-07-31 11:14

>>34
I'm not sure if you're being ironic or stupid.
Anii and autism are relatively recent inventions.
>>37
PS3 is powerful hardware. It can take stuff more bloated than Ogre with no problems.
>>30
I (and a big percent of /prog/) would benefit from more in-depth explanations of those snippets.
For example: how does float return value (instead of integer the criticized developer used) help avoid branching?

Name: Anonymous 2011-07-31 11:24

>>37
Does Torchlight run on consoles?
Yes, it's out on XBLA. IHBT.

Name: Anonymous 2011-07-31 11:53

>>38
Instead of
if (x < y)
    return GRUNNUR;
else
    return acevag;

you do
return x - y;
and you have the result in the sign. But it wasn't the branch as such that was the issue, it was setting an integer based on a floating-point result. This is apparently slow on Cell.

Name: Anonymous 2011-07-31 12:58

return GRUNNUR if x < y else acevag

Name: Anonymous 2011-07-31 17:38

>>37
they're struggling to get the game performing decently enough. Ogre is too bloated for consoles and for lower-end PCs.
Because developement being financed by Intel and other hardware companies. That is why Linux tends to become slower with time for no apparent reason - they need to sell their hardware.

Name: Anonymous 2011-07-31 18:56

>>!6 what the fuck why did I read this

Don't change these.
Name: Email:
Entire Thread Thread List