Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Need help xp win7 scramble textures uv

Author
Message
HomerS
12
Years of Service
User Offline
Joined: 8th Apr 2007
Location:
Posted: 7th Mar 2013 22:48
Help,

I made a game with DBC.

It works fine with my XP-PC. But......
On the PC with Win7, the objects are black, and some uv_maps are screambled.

Look the pictures.

I run the game as a stand-alone exe (pure exe file).

Can anyone help/explain?

Toedeledoki

Attachments

Login to view attachments
HomerS
12
Years of Service
User Offline
Joined: 8th Apr 2007
Location:
Posted: 9th Mar 2013 23:12
nobody?....

Toedeledoki
Libervurto
13
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 9th Mar 2013 23:14 Edited at: 9th Mar 2013 23:15
Not sure if this helps but I've found that sometimes setting ink x,1 instead of ink x,0 helps. Hmm that was in DBP now that I think of it. Oh well it is a completely illogical fix anyway.


HomerS
12
Years of Service
User Offline
Joined: 8th Apr 2007
Location:
Posted: 9th Mar 2013 23:20
i shall check my code for that, and so try to change it.

i will let you know if that works.

gr.

Toedeledoki
LBFN
12
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 11th Mar 2013 02:48
That is certainly an odd one. I doubt these ideas will fix it, but I can't think of much else, as I have never seen anything like that.

Anyway, are your textures perhaps a different format? i.e. some are .jpg while others are .png? Another thought is are the models all the same format? (i.e. all .x format or all .3ds format)

Lastly, are your textures all a power of 2? (i.e. 128 X 128 or 256 X 256)

I have XP and Win 7 computers - if you want to email me the .exe I will be glad to try it on both of them to be sure it is not something local to your computers.

So many games to code.....so little time.
HomerS
12
Years of Service
User Offline
Joined: 8th Apr 2007
Location:
Posted: 16th Mar 2013 23:37
hi,
the pics were jpg and bmp. i made the jpg to bmp. that is accoording to darkbasic media models the same way.

the boxes are created in darkbasic and textured after.

The textures are 256x256. the boat, the car, and the horse are models from darkbasic media self.

i tested the win 7 version on my work. dont know if it is w7 pro.
could be an admininstration problem maybe.

i found out that on the C: dir a map appears calling: "dbTemp".

The midi file is stored in here as well as "one" texture, the goldone that makes the same texture on the boat it is called then _virtual.mid and _virtual.bmp.

in this map also is a file called "workfile.tmp". There is my source code hiding. dont know if that is oke when i run it in an exe.

I shall test it on an other pc with win7 that has not run the game. So the changes might work, like the jpg to bmp. and rgb(1,1,1) etc.

I made a random nummering so the cards will randomley placed on the screen every time i start the game.exe. But when i start the game.exe the cards are laying everytime in the same way when i restart the game.

If i start the game in dbc it starts the same. when i get out the coderunner and restart it in dbc the cards seems to be scrambled in an other order. So the rnd function seems to work oke then.
But.....
when i then close dbc and then restarts dbc en run the code again, the same principle starts all over. the first round is the same as above, the second after recompailing the game also the same as above.
so... it looks like my randoms are stored somewhere and i can't get them empty. (starts at my pc left top corner with card 12 every first time).


used undim etc.

don't know what i have done wrong. i shall put the code here.

Oke, the code is not a beauty price, but it works (can play onely once).

I am still finetuning the code.

when it is finished i can put the cards also with it. the cards are .x files. created and textured in wings.

I send numberd cards. so you can make your own cards and pics.



i also want to thank the people on the form for helping me and eachother out.




The text is in dutch.

try to make your own exe.

card 24 is in my dbTemp map (only that one?).

i like to hear if it is oke.

(bought dbc 15 years? ago and never made a finished program. so i want to finish something with it. else it had to lay on the shelf for nothing. i do this for fun, not for selling games in the future.)

Now i go to bed. lol.

Other amateurs have fun with it!

Greetings!

Toedeledoki

Attachments

Login to view attachments
LBFN
12
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 17th Mar 2013 02:00
Okay, I ran it on my XP computer and it worked fine, but on my Win 7 computer I got the same result as you; the horse and lollipop are missing the texture and are black. Looking at the folders, I don't see the textures with the models for the ones that are black. I'm wondering why the textures aren't there.

To randomize the shuffle, you should be able to simply add the command RANDOMIZE TIMER() near the start of your code to give you different results. Every time I ran it, I got the same layout, so this should help.

If you could post up the two missing textures, I could try recompiling it into an .exe to see what I get.

Nice game, by the way.

So many games to code.....so little time.
HomerS
12
Years of Service
User Offline
Joined: 8th Apr 2007
Location:
Posted: 17th Mar 2013 11:57
The lolypop and the horse are static models that came with dbc. Look in the media map. They have no texture but are collored models.

you can try to open the .x file in a text editor to see if there is a file needed.

WOW!! Tnx for the randomize code! I use randomize 100 in the begin of the code and it realy works. Never found it before. I thought it was autmatically randomized with rnd() ech time you call that code, but isn't.

I made the game becouse I ever thought to make a cool game (like tomb raider/ gta etc ) but like the rest of the world it cost allot of work to get somthing working. So I disided (10 years later) to make a game that realy works. The memory game seemed to me one of the simplesed games to make. Although that this is also not that easy to program. But it starts to work now. I dont want to make big games. Only "easy" games like this. Maybe for educational games for the school I work for (or others).

Greetings.

Toedeledoki
Silverman
12
Years of Service
User Offline
Joined: 18th Jan 2007
Location: France
Posted: 17th Mar 2013 14:46 Edited at: 17th Mar 2013 14:49
Hi HomerS,

- in the DBClassic directory there is a file "setup.ini". Copy this file into the directory of your game, test(On the PC with Win7) by changing options in the "setup.ini" (Ex: blitflipmode = 1).

- if not work, compile and try this code:


So, in Win7, if you see the "mesh object" correctly, then it is necessary to convert objects black.
Tell us if it works.

DirectX 9.0c (February 2010)/ DBClassic v1.20
HomerS
12
Years of Service
User Offline
Joined: 8th Apr 2007
Location:
Posted: 18th Mar 2013 20:39
it is to much tricky track to me.


i leave it like this and wait till the darkbasic linux version coms out! lol

anyone used it in win 8?? Maybe this gives no problems?

Greetings.

Toedeledoki
Latch
13
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 19th Mar 2013 23:56
@HomerS

Some time ago, I encountered texturing problems when using images created in Blender. Specifically bmps. The models were textured fine in some versions of windows, but in others the textures simply didn't work. I pulled apart the bitmap and discovered that there was a small problem in the header. Certain versions of direct x ignored or dealt with the header, and some didn't.

My fix at the time was to rewrite the header of the image file whenever a file was loaded into DBC. I neede that routine because I was building an editor and I wanted to be sure the graphics files being loaded in were ok.

A simpler fix may be to use a paint program (different than whatever the image files were created in), and save them to a windows DIB format (bmp). Once bmp is created in the proper format, conversions to jpeg and so forth won't be corrupt.

I don't know if it's the problem with your images, but it's an easy fix if it is.

Enjoy your day.

Login to post a reply

Server time is: 2019-08-24 08:08:47
Your offset time is: 2019-08-24 08:08:47