Skip to main content
GameDev.net gamedev.net
🔒 Locked

Borland DX problem

Started by 3of5 Sep 6, 2000 at 5:51 AM 8 replies 500+ views
Original Post
3of5
3of5
I have 2 problems with Borland C++ Builder and DirectX: 1. When I compile a DX Program with C++ Builder 4, it works. But everytime when I have other windows open, my screen gets shrinked! (when exiting my prog) When I close all other windows and run my prog again, my screen returns to normal, again when I open DOS-prompt or windows explorer and run it, everything gets shrinked again! Anyone knows why? This also happens if I compile my prog with Borland''s free tools (compiler 5.5). Should I expect that everyone who''s playing my game won''t have open windows!?!?!? GRRRR...... 2. Where can I get DirectX libs which are ABSOLUTELY 100% compatible with a Borland compiler? I have Borland''s free tools, they include DX 7 libs/headers, but I have trouble fitting them to BCB4. Also I have DX 5 libs (downloaded) which should be compatible, but they don''t work with Borland''s compiler version 5.5 ! I am a bit tired downloading and fitting libs, also those I created with "implib" have problems! So anyone knows where to get working ones? Thanks in advance!
Ecko
Ecko
simple responce don''t use borland! Realy tho I would look at setting the cooperation level with the video card.

"If I wanted to hear the pitter patter of little feet I would put shoes on my cat!"- One Great Programmer (Garret Foster)
-----------------------------------------------------------"People who usualy use the word pedantic usualy are pedantic!"-me
Quantum
Quantum
your screen gets shrinked?

if you mean your actual screen area gets shrinked, then its probably your monitor.. my monitor does that too when switching resolutions
theprogrammer
theprogrammer
Hi there!

Could I see your code ? It looks like your code is crashing just before "DirectDraw Cleanup". This happened to me once, and I figured out an stupid error in my code.

Ecko : A very good answer. But if you couldn't change compiler, what would you do ?
I think there's no perfect language for game development. Some guys use GCC, Visual C, VectorC, etc. The key is not the language itself, but how you (as a programmer) work the language.

For building utils and editors, I prefer Delphi.

See ya, buddies!

TheProgrammer

Edited by - theprogrammer on September 13, 2000 3:54:05 PM
furby100
furby100
Download the libs, and replace dinput.lib with your own implib''ed version, then link in dxextra.lib (comes with their free compiler) which contains all the stuff you won''t get from implib''ing, ie the structs.

------------------------------
#pragma twice


sharewaregames.20m.com

risingdragon3
risingdragon3
You know, I had the same compabitily (sp?) problems with BCB + DX, (ie BCB didn''t like DInput.lib). I eventually worked around them. However DON''t get MS''s crap compiler, I mean it takes ages to compiler + link, and it doesn''t support ANSI C++ properly (mainly templates). You can get a library of components to speed up DX development, or if you are quite far along yours maybe you might want to download it just to fix one small bit of code .
goto: http://www.geocities.com/bcbdirectx. The library is still be pre-alpha phase (the code is stable and everything, just documentation is lacking). Oh and if you are far along yours (you''ve done ddraw, d3d, dinput, dsound, pak files, registry, import 3d models, and some more stuff) would you like to merge your library with mine (BCB DX Library)? Email me if so.
Otherwise I hope you do well, as one BCB developer to another, there''s so few of us, everyone uses MS !
3of5
3of5
Thanks for tips/advices !

Well, actually I haven''t done much yet. I made some tests trying to use DX libs with Borland. I have this book "SAMS Teach Yourself DirectX 7 Programming in 24 hours" (24 hrs my ass!), I started simply by trying to link those examples. The big problem with those examples is that they''re ment to be linked with Visual C++.

Ok, I managed to build one of the ddraw examples with BCB4 and with Borland''s free commandline tools! This example simply loads a pic to dd surface, but now it works in both of them. Ofcourse the next problem will come when I''ll try to jack in with dsound and dinput....

I''ve made dx apps before, but not with Borland compilers, that''s why it has been so troublesome for me to get them right, and that''s why I started with those ready-made examples. I previously used VC++ but I think it sucks. It has many advantages, but it crashed about once per every hour! So far BCB has crashed ZERO times in 4 weeks! cool! awesome! hurrah!

The other thing which makes me wonder is that now I have working DX7 libs, but I would also like to get fully working DX5 libs for Borland''s free tools. That is because I can''t expect everyone to have DX7 installed, anyone knows where to get them? Those I made with "implib" won''t work well, why-I don''t know.

I would also like to know if anyone knows any nice www-sites for BCB DX programming, it seems everyone''s using VC++ and it is hard to find decent help for BCB. Still I rather use it than Micro$oft''s compiler which bugs, bugs and bugs... and after zillion service packs.... it still bugs!



risingdragon3
risingdragon3
LoL!
quote:
. Still I rather use it than Micro$oft''s compiler which bugs, bugs and bugs... and after zillion service packs.... it still bugs!



Actually you can expect everyone to have DX7 installed, in fact on the CD (hidden deep down) there is a DX installer program. And there is a tutorial (DirectSetup) on how to install DX7. Plus the nice installer programs (You know, the setup program everyone uses ... BUT NOT M$ ) setup dx for you, or allow you, I haven''t got it. If you have to make your own, (like me), you can use DSetup to query for what version, and exec. the prog after giving the path (its actually a bit harder then that, like all MS stuff, but...).

Web sites... hmmm...:
turbo.gamedev.net (dedicated to BCB + Delphi Game programming). Thats about it, ''part from my site, which is just a temp front so GEOCITIES doesn''t take me down. Not that many BCB users, are there?

Also by the way, BCB is actually 2 compilers for the price of 1.
It also compiles Delphi! Which is usefull for stuff like pluggable factories BUT easier allowing you to do away with stuff like CODE # for each unit/ship/factory (thinking strat. game here, as I am doing one ). Just register the unit, and
bamm! No constant CODE, it all works! (And also is backwards compat, so you after adding unit SuperZoomer (j/k) and FlyingBomb, the old saved files will still work, even if you shuffle the register order around.
In fact, thats how BCB itself internally works. I don''t think you''ve done stuff like component creation, but it''s nice to know that BCB is created w/o compiler gimmicks (apart from __property and __closure).

Oh yeah, I have also used VC, it''s ... lets just say... not good. I just remembered, if you are new to BCB land, you probably haven''t got GExperts, which are plugins to BCB that help you tremedously. Ever copy + paste and then realize that the ''old'' overwritten clipboard contained important code? there is a gexpert that holds all of the clipboard (text) so you can copy + paste multiple bits of code.

Finally, BCB''s visual components come in handy for editors and such. It excels at dialog making, etc.



What should I put here?
Xai
Xai
You are wrong about one thing ... Direct X does NOT function like a hardware requirement. Unless you are targeting Windows NT 4 (meaning limiting yourself to DirectX 3 which is BUGGY BUGGY BUGGY) .. then you CAN AND SHOULD expect everyone to have the latest version of DirectX ... this is why microsoft makes it free to download ... and lets everyone put it on their game distribution cds ... MICROSOFT WILL NOT SUPPORT ANY OLDER VERSIONS OF DIRECTX ... they require people to install windows updates and patches before they will try to resolve various conflicts / bugs (unless the conflict prevents Windows from running correctly at all) .. and they consider DirectX to be part of windows ... so take the easy (and correct) way out .. and always use the newest version of DirectX .. it''s less buggy (D3D from DirectX 5 was NOT very nice), it''s faster, and it is what your users will have.
Xai
Xai
Now ... on a side note ... I use MSVC at work .. because in the past we have not known how to get regular Windows programs and DirectX to work in BCB (which we are now learning how to do) .. but at the time we started our project .. and still today .. there just are not enough books for Borland ... and the IDE needs a few improvements .. BUT I LOVE THE COMPILER ...

I own the following tools:
MSVC 6 (actually MS Studio Enterprise 6 .. but who cares eh)
Borland C++ 4.5, Borland C++ 5 w/ Design Tools
BCB 3, BCB 4, BCB 5 (all pro version)
as you can see .. I support borland ... we have ALWAYS used them for DOS apps ... for in house tools, etc ... and just last week ... we converted the first half of our game (12 modules in 60+ source files) to were they run exactly the same in both Borland C++ Builder 5 and Microsoft Visual C++ 6. (we have all the parts of our game that do not use DirectX converted ... we are about to make the plunge ... but still need help). During the conversion process ... we fixed MANY MANY unlikely problems that MSVC allowed that are not proper C++ ... and also made our code more type safe etc ... by eliminating all of the warnings BCB5 gave us ... EVEN the pesky unsigned / signed one

I really do not plan to ever use only BCB ... because using ANY one compiler causes you to think in terms of their quirks .. and not even know it ... and trust me .. there are one or two places where getting the program to work right in borland first was NOT working (casue it was too strict ... and we couldn''t find the problem) .. but once we solved it with VC .. we then figured out how to get it up on BCB ... in the future our plan is to use CodeWarrior, BCB, and MSVC to compile all the code ... it doesn''t really take any more time once you know how the projects work ... and the different error message prove VERY helpful (usually borlands are the best) ... good luck everyone .. and long live borland!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.