y++;?
- Viewing Profile: Reputation: ryan20fun
About Me
not games that are boreing
i started with C# and XNA Game Studio 2 ,it was fun but was not to last
becouse i didnt like the Limitations of XNA GS2 and hence have
UPGRADED to DirectX & C++
Hope this wasent too Boreing
Community Stats
- Group Members
- Active Posts 500
- Profile Views 3,187
- Member Title Member
- Age 21 years old
- Birthday November 3, 1991
-
Gender
Male
-
Location
Milkyway Galaxy \ Earth \ Africa \ South Africa \ KZN \ Durban
-
Interests
Programeing
Gameing
Hikeing
Camping
Fishing
PaintBall
Wind Surfing
#4821998 C++ incremental pointer.
Posted by ryan20fun
on 11 June 2011 - 12:07 AM
#4820457 So you want to be a real programmer?
Posted by ryan20fun
on 07 June 2011 - 04:18 AM
C++ takes a lot of heat because it doesn't conform to today's fad ideas of mainline programming (this is IMHO, of course) namely: Strict adherence to OOP principles, and type safety. C++ wasn't designed to be an OO language, but rather to give you the ability to write OO code if you chose to. It was not really written to be type safe because strictly enforcing type safety can limit programmers, to a certain degree. It is a language of choice, designed to support multiple paradigms. Honestly, I think pure OO and type safety are both overrated... just like you should use the right tool for the job, you should use the right paradigm for the job -- and sometimes that is somewhat subjective. As for C++ being dangerous: Sure it is... it makes no effort to hold your hand. If you or I, as programmers, mess up then it won't work properly... because we messed up. The idea is to learn the tools available, apply good design skills (and I tend to think at least some degree of creative intuition), and be careful. If something is broken, take responsibility and fix it. Java/C# have somewhat different approach... They are "safer" to work in as often times you won't go quite as humorously or terrifyingly wrong, and yet they somewhat restrict you from trying the crazy idea which later turns out to be brilliant, etc etc etc. Of course, many will disagree, that is fine. When it comes to it, C++ is just as valid a language as Java/C#/whatever depending on use, and on programmer comfort and preference.
good points there.
heres another one:
it does not force you to do things in a specifiec mannor, i can do thread however i want, or i can read files however i want.
but the down side is that there are a lot of ways to shoot yourself in the foot, but when you have learnt that shooting yourself in the foot is not the way forward you do it in a better way
To be honest, I give you the exact same advice I gave medevilenemy, you should probably familiarize yourself with other languages a bit more, as your examples make very little sense. To use your file reading example, as for example in C#, I can't think of a single way you couldn't read a file like you could in C++. I mean, if you want to read a file byte by byte, you can, if you want to read a file to a memory buffer, you can, hell if you want to pInvoke back to the Win32 apis for whatever bizarro reason you can think of... you can.
Really, and with complete sincerity, I recommend you try a couple other languages, instead of going by their "reputations". I believe it will be an eye opening experience for you. I am not saying you will quit being a C++ programmer after, but I almost guarantee you will be a better programmer after, regardless to which language you chose to go with.
yes it proberbly was not the best example, but my point is that you can do it any way you want, in C# i found that certain stuff had to be done a certain way, wheres C++ does not really have a certain way of doing stuff.
#4820220 So you want to be a real programmer?
Posted by ryan20fun
on 06 June 2011 - 01:24 PM
C++ sucks because of it's (lack of) memory management and arcane syntactical constructs.
then dont use it.
if you cant handle the controll, use another language
C# sucks because it prevents you from getting down-n-dirty with the bits and bytes when you need to.
then learn C/C++
VB sucks because of it's overly-verbose syntax.
i also dont like the syntax, but it is supposed to be easy to learn for the non programmers.
Scripting languages suck because the performance needed just isn't there.
Lua can be "Compiled"(or so ive heard, so it is a lot faster)
COBOL sucks because ... well... ADD SUCK TO COBOL, MOVE COBOL TO SUCK PILE ... it's COBOL.
it appears that COBOL "sucks" for no apparent reason.
Java sucks because it's a pain in the butt for deployment to non-technical users.
well, thats where all the fun is
#4820217 So you want to be a real programmer?
Posted by ryan20fun
on 06 June 2011 - 01:17 PM
C++ takes a lot of heat because it doesn't conform to today's fad ideas of mainline programming (this is IMHO, of course
) namely: Strict adherence to OOP principles, and type safety. C++ wasn't designed to be an OO language, but rather to give you the ability to write OO code if you chose to. It was not really written to be type safe because strictly enforcing type safety can limit programmers, to a certain degree. It is a language of choice, designed to support multiple paradigms. Honestly, I think pure OO and type safety are both overrated... just like you should use the right tool for the job, you should use the right paradigm for the job -- and sometimes that is somewhat subjective. As for C++ being dangerous: Sure it is... it makes no effort to hold your hand. If you or I, as programmers, mess up then it won't work properly... because we messed up. The idea is to learn the tools available, apply good design skills (and I tend to think at least some degree of creative intuition), and be careful. If something is broken, take responsibility and fix it. Java/C# have somewhat different approach... They are "safer" to work in as often times you won't go quite as humorously or terrifyingly wrong, and yet they somewhat restrict you from trying the crazy idea which later turns out to be brilliant, etc etc etc. Of course, many will disagree, that is fine. When it comes to it, C++ is just as valid a language as Java/C#/whatever depending on use, and on programmer comfort and preference.
good points there.
heres another one:
it does not force you to do things in a specifiec mannor, i can do thread however i want, or i can read files however i want.
but the down side is that there are a lot of ways to shoot yourself in the foot, but when you have learnt that shooting yourself in the foot is not the way forward you do it in a better way
#4820145 Using 3ds Max and OpenGL
Posted by ryan20fun
on 06 June 2011 - 10:38 AM
#4820103 Using 3ds Max and OpenGL
Posted by ryan20fun
on 06 June 2011 - 09:11 AM
i have not used OpenGL yet.
#4820095 Using 3ds Max and OpenGL
Posted by ryan20fun
on 06 June 2011 - 08:58 AM
im pretty shure 3DS Max can export to a number of supported formats
#4820002 Simply2D - a platform game
Posted by ryan20fun
on 06 June 2011 - 01:34 AM
Hi.
when i opend it i could only see a portion of the window (half of it must be off screen)
can you add an option to manueally set PosX and PosY of window ?
You can move the window around but I should add an option to choose the width and height of the window.
Thanks for testing and leaving your comments, it's worth a lot!
the half that was missing was the half that had the title bar and the left half of the game window
#4819842 Simply2D - a platform game
Posted by ryan20fun
on 05 June 2011 - 02:06 PM
when i opend it i could only see a portion of the window (half of it must be off screen)
can you add an option to manueally set PosX and PosY of window ?
#4817398 Doubt in VS 2008
Posted by ryan20fun
on 29 May 2011 - 11:57 PM
I tried running a basic C++ windows program. When it was Win32, it was not building giving some error. But when I changed it to x86, it was built.
thats actually kinda funny(well, to me)
you tried Build the 32Bit version and it did not Compile, so you chaanged that to thje 32Bit version(again) and it worked
#4817396 Getting started with DirectX
Posted by ryan20fun
on 29 May 2011 - 11:54 PM
I am using Visual Studio 2008, windows 7 64-bit.
I downloaded DirectX SDK August 2007 and installed it.
When I tried to build a tutorial program, it said "can not open dx3d10d.lib"
Please help me why this error is coming. The file is present in the required folder of VS.
why are you using a SDK that is 4 Years Old ?
#4815513 Power of two sprites...?
Posted by ryan20fun
on 25 May 2011 - 03:42 AM
D3DXIMAGE_INFO d3dxImageInfo; D3DXCreateTextureFromFileEx( D3D9Device, L"..\\donut.bmp", 320, // I had to set width manually. D3DPOOL_DEFAULT works for textures but causes problems for D3DXSPRITE. 384, // I had to set height manually. D3DPOOL_DEFAULT works for textures but causes problems for D3DXSPRITE. 1, // Don't create mip-maps when you plan on using D3DXSPRITE. It throws off the pixel math for sprite animation. D3DPOOL_DEFAULT, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, D3DCOLOR_COLORVALUE(0.0f, 0.0f, 0.0f, 1.0f), &d3dxImageInfo, NULL, &texture ); // Create our sprite... D3DXCreateSprite( D3D9Device, &sprite );
did that help ?
#4815265 DirectX 9 switching window state
Posted by ryan20fun
on 24 May 2011 - 01:26 PM
Ughhhhh that sounds so annoying x)
All the images I load are using POOL_DEFAULT which means I'm going to have to add something that keeps track of all images that are loaded and then some way of reloading all images and recreating all the sprites D:
I've been trying the workaround ryan suggested with making it look full screen by changing the screen resolution but can't figure out how to do that in C++
I tried changing my method to do this:if (!windowed) { //setup the device mode DEVMODE devmode; devmode.dmSize = sizeof(DEVMODE); devmode.dmPelsWidth = mGameWindow.GetWidth(); devmode.dmFields |= DM_PELSWIDTH; devmode.dmPelsHeight = mGameWindow.GetHeight(); devmode.dmFields |= DM_PELSHEIGHT; devmode.dmBitsPerPel = 32; devmode.dmFields |= DM_BITSPERPEL; //position the window to 0, 0 mGameWindow.SetPosition(0, 0); //change screen resolution ChangeDisplaySettings(&devmode, 0); } else { //set screen resolution to initial settings ChangeDisplaySettings(&initDev, 0); //position window in middle of the screen mGameWindow.CenterScreen(); }
But that doesn't seem to do anything at all, the window moves like I tell it to (0,0 for full screen and back to the middle for windowed) and the border disappears and comes back when windowed like it should but the screen resolution itself doesn't change. Any ideas how to do this? it'll save having to do all the reloading of textures etc.
so, that code imatates fullscreen ?
can you post the code that creates the window ?
what i would do is this (i have my screen set to 1024x768)
set window position to 0,0
and screen width and height to 1024,768
and make it a borderless window (i hade the code to do this but i dont think i have it anymore, but you should only need to set the borderstyle to none)
- Home
- » Viewing Profile: Reputation: ryan20fun


Find content