Blitz Hardwired - DX9 and DX11 Userlib (Part VII)

Community Forums/Showcase/Blitz Hardwired - DX9 and DX11 Userlib (Part VII)

Ploppy(Posted 2014) [#1]
I have to announce the sad demise of thread number VI, and the birth of its illegitimate child number VII. VI served us well, especially in the last week. But, time to move on....

I have just updated my upload from earlier on.

@BlitzSupport, I read your last post, but I think you downloaded the previous version just before I uploaded this new one. Indeed the dwarves are negatively coloured, they have been configured this way with my simple dxEntityNegative command. Have you noticed even with this shader function that it will get darker when you shine a light on it - looks really weird. I quite like it.

Anyway, I have made quite a few modifications to the vertex and pixel shaders. I have found bugs that I hadn't discovered before - so for me I have made some progress in getting it back together but correctly this time. I haven't finished yet, but feel that I am on the right track.

Ok, you should notice an increase in speed using the hw shaders in the maze.bb. Please note that in the dx9 version that the walls are rendered using the directx 9 fixed function pipeline, but the dwarves are rendered using the hardwired shaders. Since the dwarves have been set to negative colour, and a negative effect is not available in direct9's ffp, hardwired will automatically switch to the hw shaders. This is why you have two different lighting effects in the render - the walls will be rendered using the directx9 techinique of spotlighted textures. However the dwarves are rendered using my spotlight technique found in the pixel shader. This was done deliberatly to show the difference. You will notice this difference especially when you see a dwarf and it will become apparent. This is a good demonstration of how hardwired can easily switch beween render modes in directx 9. The render mode (fixed function pipeline/hardwired shaders/user-created shaders) will completely fall to the choice of the programmer in the end - he/she will have complete control on how the renderer should proceed. For the moment, however I still of course have a few bugs to iron out. But I'm getting there...

In this dx11 version of maze.bb, everything is of course rendered using my shaders, because directx11 is not equipped with it's own default shaders. I have never understood that actually, directx11 is more recent than dx9. It is without a doubt more powerful than dx9, but has less friendliness so to speak. Dx11 provides you with raw power, but no alternative. Still, that's my problem I guess more than yours. I guess I just like moaning :)

Shaders are evil, by the way for anyone that doesn't know them well. For good and fast gfx manipulation using the techiniques of today one cannot do without them- no doubt about it. But they are evil - I mean they are so evil they probably have a poster of emperor Palpatine on their bedroom wall. Why do I not like them?? Because all of their 'constants' (global variables) that have to be perfectly aligned, sometimes including padding depending on the variable. I will explain much more on how to use shaders as I release more and more shader commands so you will be able to make and use your own, if you dare. But they are not easy in any case. I'm still learning a lot about them, and shaders are definatly the way to go. But, boy aren't they tough to program perfectly...

For info, I have now put back all the quaternion and matrix functions that I had added - these functions were not in any way upsetting the renderer.

Hardwired userlib / Command list here / List in Excel format / Libvlc dll's here




Ploppy(Posted 2014) [#2]
Having a bit of fun with maze.bb tonight. Just made the horror version (maze_horror.bb). Amazing what difference it make with a bit of lighting (this only works in dx11 mode for the moment) Tense stuff...


Hardwired userlib / Command list here / List in Excel format / Libvlc dll's here




Guy Fawkes(Posted 2014) [#3]
FUN! =D


Rick Nasher(Posted 2014) [#4]
Hi Ploppy, new results:

maze.bb - all fine in both dx9(no flashlight) and dx11. Before the DX9 version didn't work anymore, so you must have nailed it.

maze_horror.bb - great effect, only hard to see the map. Can almost hear the "all prisoners should remain in their cells.." voiceover. :-)
test8b.bb , test10.bb and test10d.bb - msg: user lib function not found..


therevills(Posted 2014) [#5]
Like I said yesterday, I have backtracked my code a bit. Once a week I archive my whole project (about 5GB of code all in all, includes, libs, docs, sdk's, data, images the whole kit and kaboodle) and copy it all to a second hard drive. That way, if ever a have a hard-drive corruption or an evil virus or whatever, I should have a way of getting my project back. At the same time archiving it all gives me precisely a way of backtracking if I do code myself into a hole.


Hey Ploppy - Do you use a source control system such as Git or Hg? If not, they will say you a lot of work when backtracking thru your code and archiving...

Also I don't know if you have already posted it, but is the source code available for HW?


Guy Fawkes(Posted 2014) [#6]
Yea, I wanted to know that myself. If so, that would be great so we can add to the project! :)


GaryV(Posted 2014) [#7]
Yea, I wanted to know that myself. If so, that would be great so we can add to the project! :)


You are doing enough to kill the project as it is with your asinine suggestions and demands. You, in any way touching the source for the project would be the ultimate death of it (which does seem to be your goal).


Ploppy(Posted 2014) [#8]
@Rick, I hope I have nailed it. Don't worry about test8.bb, test10.bb and test10d.bb. This is normal, I have taken out a few commands temporarily - they will be put back in slowly but surely. So for the moment, these tests will try to call the functions that currently don't exist.

@therevils/GF, nope I will not be releasing any source code.


Guy Fawkes(Posted 2014) [#9]
Gary, I feel sorry for you. Having to pick on other people just to feel good about yourself. I hope karma gives you everything that it owes you. I am now ignoring you and no longer care what you have to say.

DON'T FEED THE TROLLZ! =D


Steve Elliott(Posted 2014) [#10]
He's right though GF. Just let Ploppy get on prioritising and implementing what he feels without demands. Saying it nicely is still a demand...And really? You want to mess about with his C++/DirectX 11 code? We both know that's beyond you, so just be patient and let Ploppy do his stuff.


Hotshot2005(Posted 2014) [#11]

He's right though GF. Just let Ploppy get on prioritising and implementing what he feels without demands. Saying it nicely is still a demand...And really? You want to mess about with his C++/DirectX 11 code? We both know that's beyond you, so just be patient and let Ploppy do his stuff.



I dont normally agree everythings on what people say but I have agree on what above statement say


Guy Fawkes(Posted 2014) [#12]
@Steve Elliot & Hotshot: I am now ignoring you for your ignorance. You can say all you want but I will not give you the satisfaction of a response.

Trying to pick on other people to make yourselves feel better. -.- You're terrible.

And I don't CARE if you don't care. I hope you both get the karma you deserve because she is one MEAN...... :-X

DON'T FEED T3H TROLLZ! :D


GfK(Posted 2014) [#13]
@Guy Fawkes - Nobody is picking on you. You appear to have a major persecution complex which you should probably seek professional help about, if you haven't already.

That is all. Since you've already told me numerous times that you're ignoring me (as well as [apparently] everybody else on this forum), I do not anticipate a response.

Oh, and you should probably stay away from this thread for the benefit of the OP, since you seem quite adept at driving everybody away.


Ploppy(Posted 2014) [#14]
I have to say that personally I would really really, and have up until now, like to keep a neutral stance in these kind of 'disputes'. I do have my own opinion about all this though I try not to express it too strongly. Although of course you all are free to express your opinion when and how you want, and some opinions I agree with, I feel I cannot do such as I would like to take some kind of responsability in all this. This mainly because these threads exist for my project at the end of the day. I would like not have to 'take sides'. But I would equally like to quosh 'bickering' that could get out of hand. I feel I am forced to react, but I do not wish to - if it was my wish I would remain neutral (more or less).

All I ask is that we all try to work on this very same principal, getting hardwired done. I think the best way to do this, if it really is worth something to you in the long-run, is just to let me get on with it in the manner of my choosing. It is tough enough as it is. I have my work, my family life and responsabilities like everyone else. On top of this, I have this wonderful obsession that I have been working on since october 2013. I think about it a lot, I read a lot - I do research on the net in the best way to resolve a problem. In brief, I do not need too many outside factors to complicate things further.

I really do appreciate suggestions, comments and even praise (good for ego). But all this for the sake of constructiveness, please. But I cannot pander to personal requests all the time, I try to go with the flow of my code as much as I can, and I cannot cut off just like that. You can always ask, but ONCE is enough. I do read every post in the threads with great interest, and I have a memory too. So, asking again and again just becomes very rude. So please, patience, I am doing what I can. If it's not good enough or I'm not going fast enough, or if I'm not doing what you insist upon I would suggest that you keep that to yourself, or try making a 3d engine yourself, or just look elsewhere. I feel that I have contributed very often, when I can, to the forum with news, responses, and updates. But always with the same goal in mind. I don't think you can complain too much about my dedication to this all. So please respect this fact, and help me rather than hinder. This is what I am principally looking for. I am not stopping and would not wish to stop anyone from expressing his/her opinion, but when it starts to feel as though I'm back at school it gets a bit hard to deal with.

I appreciate even more than the above any bug-reports (with examples helps me too) for my releases. Hardwired is a work in progress, and its source code is huge not to mention the fact that the whole project is just incredibly ambitious. There are going to be bugs, and things I've just forgot to put in. I need help, I think this forum is great in helping me along with the growth of hardwired and I would like to thank you all for the support you have given me up until now. So please, let us as much a possible keep to the same objective, getting HW as complete as possible. I'm counting on your help, but as much as I'm counting on your patience.

Hope I've been clear about how I feel, and I haven't 'vexed' anyone in the process. But if I have, so be it.


Hotshot2005(Posted 2014) [#15]
What a Perfect Respond Ploppy :)


Guy Fawkes(Posted 2014) [#16]
I apologize to you, ploppy, but no one else.


JBR(Posted 2014) [#17]
I'm hurt man, why no apology to me. :-)


Guy Fawkes(Posted 2014) [#18]
So what do you have planned for the next few days, Ploppy? :)


Ploppy(Posted 2014) [#19]
Oh, not much - just probably a nice quick lobotomy to forget the majority of this new thread that has pretty much depressed me. I wasn't expecting this. I am not a fan of negativity - so counter-productive.


GaryV(Posted 2014) [#20]
Better watch out Ploppy or Thundros/Guy Fawkes will ignore you, too. :c)


Steve Elliott(Posted 2014) [#21]
I totally understand Ploppy, I'm doing the same as you, so wasn't prepared to show my hand early...Because I know it can be a circus here...Just keep plodding away mate, you're doing great...Sorry if that sound's condescending lol.


GaryV(Posted 2014) [#22]
Ploppy, the majority of us are really looking forward to your engine and are looking forward to each version you release.


Rick Nasher(Posted 2014) [#23]
Would be nice if people could forget their ego's and quarrels of the past, burry the hatches and honor Ploppy's request to keep his thread clean. If some people can't why don't they open a separate thread of their own to go battle/flame each other there instead of doing it here, on of the, if not THE most productive/promising projects in a long time. Or do we need a moderator/good dictator to just erase the unnecessary comments and keep things clean and in line? << please do NOT reply to my comment too, no need for that. Just trying to appeal to common sense. Lets prove democracy can actually work without some people beating each others virtual head in. -Peace on planet earth-


Guy Fawkes(Posted 2014) [#24]
See Rick, what others here are failing to realize, is that I am completely ignoring them and going on about my day just wondering what Ploppy is doing for hardwired for the future. :) I'm not arguing with anyone anymore. They aren't worth my time. :)

I LOVE what you're doing, Ploppy! Keep up the GREAT work! :D

YOU have SINGLE-HANDEDLY brought BlitzBasic AND BlitzPlus AND might I add, Blitzmax back from the dead!

You DESERVE kudos, so kudos to you, Ploppy & keep up the GREAT work! :)

Sincerely,

~GF


BlitzSupport(Posted 2014) [#25]
Sooo... back on topic!


@BlitzSupport, I read your last post, but I think you downloaded the previous version just before I uploaded this new one. Indeed the dwarves are negatively coloured, they have been configured this way with my simple dxEntityNegative command. Have you noticed even with this shader function that it will get darker when you shine a light on it - looks really weird. I quite like it.



You're right -- the latest version shows the same metal textures in both versions, and it's good to know the dwarf chaps are meant to be negative. Yep, it's a nice effect once you know it's right! :P

Working fine for me anyway -- maze and maze_horror both seem to work properly.

I thought it was interesting that you said shaders were really hard to do, as I really enjoyed playing with them (pixel shaders, that is) in Mark's sadly abandoned Max3D, though they were GLSL shaders and I don't really know the DX version (though they look similar to me).

I don't know how easy it is in general, but in Max3D you could refer to the depth buffer and amend the colour pixels really easily to pull off simple effects -- I even managed a fairly convincing DOF emulation:



(Note bb_BlurBuffer, bb_ColorBuffer and bb_BlurBuffer -- these were the Max3D-native buffers you could use.)

Sort-of off-topic: I have thought recently, with many demands for a new Blitz3D-style engine in light of Mark's recent blog posts, that it would be really cool if we had a basic OpenGL/DX9+ 3D engine with a Blitz3D-like shader language built in to the main language (as in a limited set of commands/syntax you could use from functions within the 'Blitz3D' language) -- they would be read by the compiler and output as shader code, converted Monkey-style to GLSL/whatever shader source, eg:

ShaderFunction DOF () ' Depth of field!

    If ReadShaderPixel (x, y) Then etc...

    DrawImage ... ' Syntax error! Only shader code supported here!

End Function

Graphics3D 640, 480

SetShader DOF

' Game code here



Not really something you can accommodate, but I do think it'd be really cool -- accessible shaders -- pixel shaders, at least. (That's all I played with.)

Being able to refer to specific buffers such as the depth buffer from within shader source would be cool in HW, though... in some distant future anyway!


Yasha(Posted 2014) [#26]
it would be really cool if we had a basic OpenGL/DX9+ 3D engine with a Blitz3D-like shader language built in to the main language (as in a limited set of commands/syntax you could use from functions within the 'Blitz3D' language) -- they would be read by the compiler and output as shader code, converted Monkey-style to GLSL/whatever shader source


Yes. Yes!

It's honestly baffling that (as far as I know) no existing engines or "game languages" do this at the moment. It's basically the most foundationally important thing for a graphical application, and everyone ignores it in favour of stupid separate files in a badly-designed language. Thus making everyone's projects a disorganized mess, across engines.

Listen, graphics community: compiling to GLSL is OK! If people can compile to C, they can compile to shaders and OpenCL too! Compiling a single application to heterogenous target code really shouldn't be such a revolutionary idea.


(I'm using something like this internally, because I hate separated files with the fury of a thousand suns, but it's not in a shareable state right now and obviously not for Blitz3D, sorry.)


Ploppy(Posted 2014) [#27]
I agree with you both, I do like the idea of blitz having it's own form of shader language. It is definatly doable, but probably way above my head. I'd have to get into parsing, error checking, converting into ASM, a lot of new factors to consider. At the same time these 'functions' would have to be compiled by the blitz compliler, so would not be part of a dll userlib. A userlib could eventually process a script but the compilation of these functions using this method would have to be made during runtime, like with how HLSL executes - meaning that a shader function would still remain separate from the main program code and you couldn't incorporate them together in the same script. But theoretically it's a very enticing idea...

I thought it was interesting that you said shaders were really hard to do,


For me the shaders themselves are not particularly difficult. They are fairly similar in construction to c++ even. It's preparing/sending the constant table that for me is a bit of a nightmare. Since hlsl relies on 16-byte registers, you have to align all constants to these register sets - meaning sometimes you have to pad out some things. Arrays too have to be padded out, they are not packed. A real headache sometimes, cos if you forget this 16-byte rule, you get weird results from the shader in question. A few weeks ago I even managed to upset my gfx adapter by badly aligning my constants and it started drawing random stuff all over my screen, even when my compiler test had finished running and I was working on other windows - freaky! I had to even reset my pc to get any sense out of it. Still I battle on. I think that when I do get to the stage where I am including shader support on hardwired I will try to get some kind on manager going at the same time that will take care of this alignment automatically. Well, if it is possible. I would like to keep hardwired as friendly and accessible to the user without costing it much performance.


Ploppy(Posted 2014) [#28]
Hi all, just got in from work and have got a message from paypal. Just wanted to say thanks to BlitzSupport for the donation - much obliged. A great show of faith. I hope the project comes to fruition to really show merit for such a donation. But any case, much appreciated...


Ploppy(Posted 2014) [#29]
After many hours trying to sort out my shader compatibilty porblems, I feel as though I have ammost cracked it. Almost, but not quite. I would like to know if you have the same results as I do.

Now the dx9 version of maze.bb is renderered entirely using the hw shaders (dxHWShaders is set to true). This is done deliberately to test if these shaders now work. For me, yes - before the dx9 shaders did not render textures. They should now, please confirm. I am aware of a few texture problems with dx9 shaders (see dwarf's axe for a good example), and I am working on it. The dx11 version should work like a dream though (fingers crossed).

The instancing demo should equally work in dx9 mode (dx11 mode not yet finished for instancing), please see test10.bb and let me know if it works...

Hopefully, in the next day or two this will be all sorted and we'll be back on track. I am working tomorrow so my time with HW is limited, but I'll try my best. Once these shaders have been all sorted out I will bring back texture boundaries too - for the moment they are still disabled...

I have brightened maze_horror.bb a bit.

Thanks as always for any assistance.

Hardwired userlib / Command list here / List in Excel format / Libvlc dll's here




Rick Nasher(Posted 2014) [#30]
Don't shoot the messenger, but unfortunately Maze.bb in DX9 is now looking the same again as before you fixed it in the previous version.

Did a larger screenshot to show what I mean:



Ploppy(Posted 2014) [#31]
Okay, thankx, I will look into it.... :D


Ploppy(Posted 2014) [#32]
Hello all. I'm taking a break from shaders, so nothing new on that front. I need a break from it to reflect a bit, in the meantime I am moving on to other parts of hardwired that need servicing.

Today, there are two new functions. Don't hold your breath though...

dxPrint(string$) - The old tried and trusted command - if you don't know how to use this one where have you been for the last 30 years. One of the oldest basic commands around. Worked well for its time but the bb version isn't recommended (see below for why)
dxWrite%(string$) - Almost the same as dxPrint but does not start a new line.

Okay, these commands seem like simple additions, and from your point of view they probably are. But for me, not at all. I'll explain, it's all to do with the directx and, if you like to a certain extent even the gfx adapter architecture.

According the blitz3d/+ rules, Print/Write will render text directly to the frontbuffer. This makes all the difference, the issue is all about memory access. The frontbuffer, of course is the current rendered image, which is being shown on the screen. This image has exclusive access by the gfx adapter once this data has been sent by the pc's motherboard. The backbuffer, is a buffer that is not linked currently with the screen, so the access is available to the cpu. According to the rules of directx 9, accessing the frontbuffer directly is a very slow procedure. The cpu has to wait between frames when the screen is not drawing (the 'vertical blank') to have the 'right' to retrieve any data. It's even written in the official microsoft documentation that it's not a great practice to perfom using the frontbuffer because of it's performance.

Strangely enough, directx 7 seems to achieve a better frontbuffer access that dx9. I haven't quite understood how, but perhaps it uses 'tricks' rather that accessing the gpu's data. One trick would be to keep a 'copy' of the frontbuffer each time the front and back buffers are flipped.

With directx, one cannot write directly to the frontbuffer like you can to the backbuffer. All you can do to the frontbuffer basically read its contents (like I said above - slow!!), and when ready send the backbuffer to replace it using a flip. So, printing becomes much more complicated than a 'simple' text command. For anyone interested, I have detailed the way I have for the moment decided to adopt in order to print text to the frontbuffer, so it gives the same kind of results as in the blitz equivalent.

1. Save a copy of the whole of the back buffer into a temporary buffer
2. Save a copy of the whole of the front buffer into a temporary buffer
3. Copy the saved front buffer to the backbuffer. In a dxPrint command, if the following text will fall 'below' the height of the screen, this copy of the front buffer will begin lower than coordinates (0,0), so to 'scroll' to screen up; as in a classic Print command
4. If there is a scroll in progress clear the very bottom part of the backbuffer with the colour used in dxClsColor command, taking its height from the amount of pixels the screen will be scrolled up.
5. Draw the text onto the backbuffer and update the 'pen' coodinates depending on font size, and the string width/height.
6. Flip the screen so that the new 'frontbuffer' comes into view.
7. Recopy the saved version of the backbuffer back to the backbuffer.
8. Free up memory used by saved version of front buffer
9. Free up memory used by saved version of back buffer

This is very long-winded (a bit like this post :D), it is slow, and quite frankly I'm not proud of it. The code is good, should be bug-less (I've said that before ;D), but dxPrint and dxWrite are not recommended for people that wish a fluid performance from thier games/apps. I cannot do much more than this. This is not due to my own programming limits, but more the directx/machine limits. We are not generally supposed to directly access the frontbuffer. You can, but it is slow. In any case, for good general programming you do not need to access the frontbuffer. It is messy, ugly and quite unecessary for modern programming (this is my personal opinion b4 anyone shoots me down ;D).

Despite the fact that the frontbuffer render of a print command is not great, I still personally have a deep fondness for the command itself. It is probably the first ever command I used on a BBC micro so many years ago. Who can forget the classic first programs such as



,for example? I guess that the Print command makes me a little nostalgic. Nethertheless, this hardwired version was much trickier than meets the eye. I do not think that many people will need to use it any way, most use the text commands that write to the back buffer whatever the compiler. But I had to put it in so to continue to remain faithful to the b3d/b+ command list. So here we are, dxPrint and dxWrite in all their 'beauty'.

I will say this much, I do use Print quite a lot when I'm debugging my blitz programs.

Please note - These two commands do not currently work in the dx11 mode of hardwired...

Hardwired userlib / Command list here / List in Excel format / Libvlc dll's here




virtlands(Posted 2014) [#33]
Congratulations, you updated and fixed dx11_test.bb and maze.bb. Those two work fine.

[ maze.bb in dx11 mode : ] --- Dx11 mode looks more crisp than dx9; I see a difference.


[ dx11_test.bb : (looking good) ]


The maze_horror.bb flickers at a rate of about once per second,
in both DX9 and DX11 versions, (i.e., the screen temporarily goes black.)

Concerning maze_horror.bb,
The colors in dx9 mode look dark and sort of dull.
The dx11 version looks crisp. -- Both do flicker.
The dx11 version is missing that map thingy. ]

I like your dxPrint command. Is it possible to run dxPrint in Windowed mode? I don't know how to override GetBestGfxMode.


Ploppy(Posted 2014) [#34]
I haven't yet tested dxPrint in windowed mode, but I will try later. Normally, if I've programmed it right, yes. Grabbing the frontbuffer with dx9 is tricky, for even in windowed mode it will grab the whole screen. So in order to copy the front buffer to the back buffer of a windowed app, you have to grab the rectangle where the the window's pixels reside in the grabbed frontbuffer.

Just so I know, does anybody have a touchscreen, and would be prepared to test out some touchscreen commands? I don't have one, but I think it would be a nice addition to HW. Access seems pretty straightforward, so I will do it.

EDIT: Phones windows phones can run hardwired too, at a guess. If that's true, does anyone have a windows phone to test out touchscrreen stuff??


virtlands(Posted 2014) [#35]
My laptop is a touchscreen.
---- HP TouchSmart 15.6" Pavilion Laptop 6GB 750GB | 15-N047CL

It makes it easy to use Win8.1 Metro mode.
In some ways, the touchscreen is similar to dragging the mouse.

I'll be glad to test your touchscreen code.


Ploppy(Posted 2014) [#36]
Thanks VL, I'll let you know when it's ready, may be a day or two (or more if something unexpected comes along ;) )....


Rick Nasher(Posted 2014) [#37]
Same results as VirtLands. Working better then the last update, but noticed besides the walls, the dwarfs textures are flickering also. In DX9 and D11 differently though.

DX9: walls don't appear to flicker as much but the entire dwarf appears to disappear when closing in and reappears seemingly randomly(spooky).

DX11: the walls flicker and sometimes disappear even for a splitsecond and allow viewing through. The textures on the dwarfs appear to flicker very quickly, like 5 times in a split sec and in sequence and for all separate body pieces, like: firsr body then head, then shoulderpiece, then hand, then axe and again from start.

I guess something is being done double causing a slowdown, making the visualization of the textures, well.. visible.
But at least it's visible now. In test10.bb and test10d.bb I didn't see the dwarfs yet, but now the texture floors are visible while before was all white in test10d.bb and distorted/dark in test10.bb.

AFAIK are Windows phones running on something like the dreaded Windows RT for ARM CPU's which aren't compatible with x86 instructions, so no regular Windows S/W would work. The new tablets however(like D*ll Venue11Pro) run on intel's(or compatibles) with a real Winows 8.1 so there it should indeed run fine.


JBR(Posted 2014) [#38]
Don't know if this is possible but is there any way to read the depth buffer? I only need to read it.


Ploppy(Posted 2014) [#39]
If I recall (do not quote me on this- I could be wrong) you cannot read/access the depth buffer. You can control how the rasterizer uses the z-buffer (write pixel if under current z-buffer value/write pixel if equal to the current z-buffer value/write pixel if over the current z-buffer value/etc.). You can also enable/disbale z-buffer reading and writing at any moment. But I'll do a bit of research just to be sure.

What I will include in Hardwired, which is possible, will be full stencil buffer support. Stencils are similar in some respects to the z-buffer and are used by the rasterization process to make restrictions to parts of the viewport configured by the user.


therevills(Posted 2014) [#40]
@therevills/GF, nope I will not be releasing any source code.


Hey Ploppy - just wondering why since you are releasing the dlls free, it looks like a lot of people are willing to help you and by opening the source code more people can help you.

At the end of the day, its your choice of course :)


Ploppy(Posted 2014) [#41]
I do know what you're saying. But I do not wish to release my source although sharing it may (it may not too) help in the long run. This is because I do not want lots of different versions out that could lose me credibility as HW's developer. I wish to assume full responsability for its growth and eventual success. I am as proud as much as amazed of how far I've got with it so far. This is my baby, I am becoming more and more confident that HW will reach completion. I wish to take full credit for this and, if it does end up full of bugs and gives bad performance (rest asseured this is not a future I forsee but who knows? I must stay with my feet firmly on the ground at the same time) I will take the flak for it. It's a pride/reputation thing. I have put hundreds of hours into HW, and will no doubt put hundreds more in. If I have decided to give this away it it because I do not want money to be my driving force. I really do realise I could make a considerable amount of money with a completed project, and it's not as though I don't need money (donations always welcome, but no way obligatory). But if I concentrate just on 'making a buck' and not simply my passion for blitz and the idea that people could make blitz relive with a nice new sheen, well I think the end result would not be so good and of course I would not have so much support. But I will get something out of it if it isn't money - the satisfaction of completing and publishing a project that people use, and my name & reputation out on the developer market too. Not too bad a protfolio at the end of the day, a working 3d engine. I'd love to get myself into this industry as a c++ developer, but with no qualifications and 40 years on the clock I would need something to convince potential employers. And rest assured, I am keeping my eye closely peeled for the release of dx12. As soon as it does, you can expect a dx12 version of HW in a relatively short time. So HW should, if I'm not biting off more than I can chew, finish by becoming reputable and one of the top choices in free 3d-engines. I will however ask for my name to be credited for any use on freeware products, and insist on a credit for any commercial releases that use hardwired.

So, no source, but on the other hand I will probably end up releasing an SDK in the not too distant future...


GaryV(Posted 2014) [#42]
just wondering why since you are releasing the dlls free,

There is a difference between freeware and open source.

it looks like a lot of people are willing to help you and by opening the source code more people can help you.

There has been NOBODY in any of Ploppys threads that is able to help or willing to help. If somebody was truly capable of helping, they would be using a 3D engine of their own that they have written, instead of relying on Ploppy and his engine.


Ploppy: Please ignore the trolls asking for open source and making the subtle hints that you are not good enough to finish the engine. They are not remotely capable of doing anything with it and it will not benefit them, or you. Their only reason for asking you to make it open source is so they can kill it, just as they did with Max3D and demanding it be open source because they said Mark was not capable of finishing it.

If you make your engine open source, it will indeed be dead as NOBODY will touch it and anybody who even attempts to would have their work ignored and ridiculed for not being an "official" release. The green eyed monster has always been the driving force of many in this community and when they see somebody like you with talent and skill, the green eyed monster consumes them and eats at them and they will do anything they can to kill off your project. Stay true to your goals and always maintain total control over your product. Other than bug reports, listening to suggestions from others here would be career suicide as several here clearly want your product dead.

You have done an awesome job on HW. Keep up the good work. I have some vacation time coming up in a few months and I look forward to trying it out with something other than Blitz.


therevills(Posted 2014) [#43]
Wtf Gary... Just wtf!

@ploppy I understand, good luck with it.


Steve Elliott(Posted 2014) [#44]

I do not wish to release my source although sharing it may (it may not too) help in the long run. This is because I do not want lots of different versions out that could lose me credibility as HW's developer. I wish to assume full responsability for its growth and eventual success.



I totally agree with this stance Ploppy...Open source has been mentioned a couple of times now and Ploppy has once again had to say NO, and explained his thoughts why not.


Guy Fawkes(Posted 2014) [#45]
Get back on topic instead of flaming each other. I will continue ignoring any stupid comments.


GfK(Posted 2014) [#46]
Get back on topic instead of flaming each other. I will continue ignoring any stupid comments.

For what it's worth - people repeatedly boasting about how they're ignoring stupid comments, are even more irritating than people making stupid comments. In doing so, you are acknowledging the very existence of stupid comments, and therefore not ignoring them at all.


Guy Fawkes(Posted 2014) [#47]
Get back on topic instead of flaming each other. I will continue ignoring any stupid comments.

For what it's worth - people repeatedly boasting about how they're ignoring stupid comments, are even more irritating than people making stupid comments. In doing so, you are acknowledging the very existence of stupid comments, and therefore not ignoring them at all.


^ Don't feed the trolls, ppl! =D

TROLLLLLLLLLLLLLOLOLOLOLOLOL!


Guy Fawkes(Posted 2014) [#48]
Hey Ploppy! :) Can you add "TFormVector" & "GetBrushTexture" if it's not too much trouble to ask?

Thanks again & keep up the GREAT work! HW is looking more awesome each & every day!

~GF


GaryV(Posted 2014) [#49]
Get back on topic instead of flaming each other. I will continue ignoring any stupid comments.
Thank you for reaffirming my point. Nice to see even YOU do not like Thundros/Guy Fawkes.


Guy Fawkes(Posted 2014) [#50]
Get back on topic instead of flaming each other. I will continue ignoring any stupid comments.
Thank you for reaffirming my point. Nice to see even YOU do not like Thundros/Guy Fawkes.


^ Feeding the trollz is BAD for your health ppl! :D

AHAHAHAHAHAHAHA!


Rick Nasher(Posted 2014) [#51]
Ok, now for something more constructive to avoid repeating the same old questions/answers/discussions/flamewar here endlessly:
Perhaps a good idea to put up a FAQ or Wiki for this to refer to?

If then a question comes up again that's already been answered then simply a matter of pointing towards the FAQ/Wiki.
Cos I can understand not all people will go through threads I to VII..(and up)
Might help to keep the threads clean from distractions and keep focus on the code?


Guy Fawkes(Posted 2014) [#52]
Ok, now for something more constructive to avoid repeating the same old questions/answers/discussions/flamewar here endlessly:
Perhaps a good idea to put up a FAQ or Wiki for this to refer to?

If then a question comes up again that's already been answered then simply a matter of pointing towards the FAQ/Wiki.
Cos I can understand not all people will go through threads I to VII..(and up)
Might help to keep the threads clean from distractions and keep focus on the code?


THANK you, Rick Nasher!

FINALLY, someone with some SENSE!

I agree with you 100%, Rick Nasher!

We NEED a Wiki for this!


Ploppy(Posted 2014) [#53]
OMG, I haven't been keeping an eye on this thread for a few hours, and it looks as though we're now going back into the school courtyard for another bout. Come on GuyFawkes, don't you see that constantly repeating 'i'm ignoring this guy, that one and now you too' every time is not doing anyone any favors? I think that everyone is smart enough to understand that the first time, and furthermore they do not really need to know. It's not as though they are going to mark it up on their calander 'the day GuyFawkes decided to ignore me' or some such thing. Everyone will just carry on like normal, I think I speak for everyone by saying that they will get over it. So please stop with this 'I'm ignoring you' stuff, because IMHO it is not doing you any favours credibility wise. I mean, if you could virtually pull someone's pig-tails or give them a virtual 'dead-arm' on the forum, would you have done that too? You do not realise that these kind of comments are really putting out negative vibes. If in some post or other someone disagrees with you, why not try to deal with it? I do not wish to condescend, but it may already be too late anyway. We all have different opinions, we all have to learn to respect them, and at the same time try to understand other peoples poin't of view. No one will agree with the others 100% of the time.

Look GF, I really don't want to end up like this, but if this continues I'm quitting. Not Hardwired, of course - I am getting very far with it and plan to carry on as far as I can. But I will just abandon the forum - I have very much liked it up until now, I have had some priceless feedback, but now it seems the threads are becoming frayed. I'll just find another forum, that's all. These bad vibes are not doing anyone any good - I'm sick of the word 'Trolls' coming up from time to time, the bickering and the ignoring. All this for me is just poisoning the threads. If you cannot put your differences behind you GF, please just ignore these threads.

Now if this isn't clear, I don't know what is - I've really tried to be tactful about this up until now, for I didn't want to offend Guy Fawkes especially. But I think I have no choice. Desperate mesures for desperate times.

@Rick Nasher
Perhaps a good idea to put up a FAQ or Wiki for this to refer to?

I do very much like your idea, in my opinion it would help clarify certain things about hardwired. Problem is I have so many things to do that I can't do that myself yet. I would eventually like to ask someone to help me write up a page, but I feel it would be incorrect to ask someone to do it for me - it is not my place to 'recruit' anyone. And if someone, anyone proposed to help me put this together (to which I would probably accept with open arms) it is foreseeable that someone else would not be in agreement - almost as in a jealous sulk. It may be my imagination, but this is the kind of mentality I am feeling of the forum at the moment. So, I'm sorry I would have to say no also to anyone proposing to help me with a FAQ - mainly because I would like to avoid even more reason to what I would call a squabble.

I think we are seriously getting off the rails with this thread. I am wasting a lot of my time now with pointless banalities that get us nowhere but at the same time are sending some away from the forum already. I am trying to keep some order in this up until now and keep the discussion light-hearted and constructive. But it seems to be that as time goes on, I'm losing the battle. I'm sick of wasting my time with all this...


Rick Nasher(Posted 2014) [#54]
I know, that's why I didn't offer yet. Just take your time and don't worry.


virtlands(Posted 2014) [#55]
quote @Ploppy:
I do know what you're saying. But I do not wish to release my source although sharing it may (it may not too) help in the long run.
This is because I do not want lots of different versions out that could lose me credibility as HW's developer.

I'm confident Plop can handle his masterpiece (DirectX) alone.

My hunch is that Ploppy creates his source code from the following sources,
so.... if anyone wants to create their own DirectX code, then voilà ----

:::::
DirectX SDK version 9 : http://www.microsoft.com/en-us/download/details.aspx?id=6812
Windows Software Dev Kit (SDK) for Win8 : (~~Dx11 sdk) http://msdn.microsoft.com/en-us/windows/hh852363.aspx
Visual Studio Editions : http://www.visualstudio.com/downloads/download-visual-studio-vs
Ms Dev Network: http://msdn.microsoft.com/en-US/
OpenGL SDK : http://www.opengl.org/sdk/

-------------------------------------------------------------------------


Ploppy(Posted 2014) [#56]
I use pretty much the first in the list, the rest I do not personally use and of course lots and lots of google searching. And then, just a lot of trial and error in coding something solid. It's like a big jigsaw puzzle, sometimes it takes a while to get all the pieces to fit, but the final image is worth it...


Ploppy(Posted 2014) [#57]
Hi,
There is a new update out. I have spent the last few days restructuring and optimising my code once again; you should notice speed improvements in both the rendertime and the load time when you run a compiled bb. Things are generally more efficient, and much tidier code-wise for me.

For info, I think that this release will mainly interest VirtLands, and anyone with a touchscreen. I have spent relatively little time today on creating a few touchscreen commands (test program available - touchscreen_test.bb)....

Windows covers a large range of touchscreen activity, the functions I have added to hardwired are just a portion is what the windows functions are capable of. If I can get touchscreen access working I will also add functions to be able to program gestures and to detect them. Pretty cool I think.

dxTouchscreenTouched%() - Returns true if screen has been touched since the last time dxTouchscreenTouched was called
dxTouchscreenXPos#() - Returns the x position of where the screen was last touched (measured in hundreths of physical screen coordinates)
dxTouchscreenYPos#() - Returns the y position of where the screen was last touched (measured in hundreths of physical screen coordinates)
dxTouchscreenWidth%() - Returns the width of the digit where the screen was last touched (measured in hundreths of physical screen coordinates)
dxTouchscreenHeight%() - Returns the height of the digit where the screen was last touched (measured in hundreths of physical screen coordinates)
dxTouchscreenTime%() - Returns the system time of the last touch event caught by hardwired (measured in millisecs)

Please note:I am completely blind for these commands, because I do not have a touchscreen myself. I cannot test these commands, but if I have followed the logic of the MS docs, my new commands should work.

So, VirtLands, please confirm that this works or not for I have no way of knowing. I hope it does, but if it doesn't I, for the moment am not going to spend much time on getting it working. I am just curious to know if I can get it to work or not. Touchscreen functions are not my priority for the moment, but if I do manage to access these windows functions I will include this in hardwired. I guess I just basically wanted to know for the fun of it, but it would be a great addition in any case. It would add to blitz's accesibility.

Small but important note: All touchscreen commands will only work on windows created by hardwired. The functions will be useless to classic blitz windows. It is also to note that these functions will NOT crash for pc's not possessing touchscreens, these functions will just return zero.

Hardwired userlib / Command list here / List in Excel format / Libvlc dll's here




Guy Fawkes(Posted 2014) [#58]
Wow Ploppy, keep up the good work! :)


virtlands(Posted 2014) [#59]
Je crois que vous avez oublié de mettre à jour le fichier DLL. !

@G.F.>
Wow Ploppy, keep up the good work! :)
Yes.


Guy Fawkes(Posted 2014) [#60]
@Virtlands: "I think you forgot to update the DLL file"


BlitzSupport(Posted 2014) [#61]
Or the .decls? Worth checking anyway...


Guy Fawkes(Posted 2014) [#62]
No, that's what the french term Virtlands brought up is in English.


Ploppy(Posted 2014) [#63]
Strange, works fine for me. Well, it runs - I get zero for all the results but it runs...

Just to be sure, I have recompiled and re-uploaded. Please try again...


haben Sie vergessen, kopieren Sie die Datei decls das letzte Mal?


Hardwired userlib / Command list here / List in Excel format / Libvlc dll's here




Ploppy(Posted 2014) [#64]
@GF I have just added a few functions you requested. These were easy ones, didn't take long so here we are. I have tested them they look to work correctly...

dxGetBrushTexture%() - Returns the texture of a brush!
dxTFormVector(x#,y#,z#,source_entity,dest_entity) - Work's just like the blitz command
dxTFormNormal(x#,y#,z#,source_entity,dest_entity) - Work's just like the blitz command

Hardwired userlib / Command list here / List in Excel format / Libvlc dll's here




Ploppy(Posted 2014) [#65]
New maths functions have now been added to hardwired. For many, these functions will not be needed, but can be useful so some (me included). These following functions/commands will give blitz the ablility to use double floating point variables. The floating point variables used on classic blitz take up 4 bytes, double floating point variables take up 8 bytes each. This greater size allows for a greater range of numbers and a better precision. Test in double_precision_example.bb....

dxCreateDouble%() - Create a double variable and return its handle
dxFreeDouble(double%) - Free up a double
dxDoubleMultiply(double_1%,double_2,result%) - Calculate the product of double1 and double2 and save to result
dxDoubleDivide(double_1%,double_2,result%) - Divide double1 by double2 and save to result
dxDoubleAdd(double_1%,double_2,result%) - Add double1 to double2 and save to result
dxDoubleSubtract(double_1%,double_2,result%) - Subtract double2 from double1 and save to result
dxDoubleToFloat#(double%) - Return a double converted to a float number
dxDoubleToInt%(double%) - Return a double converted to an int
dxDoubleFromString(double%,string$) - Set a double variable from a string
dxDoubleFromFloat(double%,float#) - Set a double variable from a float
dxDoubleFromInt(double%,int%) - Set a double variable from an integer number
dxDoubleCopy(source_double%,destination_double%) - Copy source double to destination double
dxDoubleToString$(double%) - Retrieve double to a string value
dxDoubleSqrt(source_double%,destination_double%) - Find the sqaure root of source and save to destinaton
dxDoubleSin(source_double%,destination_double%) - Find the sine of source and save to destinaton
dxDoubleCos(source_double%,destination_double%) - Find the cosine of source and save to destinaton
dxDoubleTan(source_double%,destination_double%) - Find the tangent of source and save to destinaton
dxDoubleASin(source_double%,destination_double%) - Find the arc sine of source and save to destinaton
dxDoubleACos(source_double%,destination_double%) - Find the arc cosine of source and save to destinaton
dxDoubleATan(source_double%,destination_double%) - Find the arc tangent of source and save to destinaton
dxDoubleATan2(double_1%,double_2%,destination_double%) - Find the arc tangent of double1,double2 and save to destinaton
dxDoubleSinh(source_double%,destination_double%) - Find the hyperbolic sine of source and save to destinaton
dxDoubleCosh(source_double%,destination_double%) - Find the hyperbolic cosine of source and save to destinaton
dxDoubleTanh(source_double%,destination_double%) - Find the hyperbolic tangent of source and save to destinaton
dxDoubleAbs(source_double%,destination_double%) - Find the absolute value of source and save to destinaton
dxDoubleLog(source_double%,destination_double%) - Find the natural logarithm of source and save to destinaton
dxDoubleLog10(source_double%,destination_double%) - Find the common logarithm of source and save to destinaton
dxDoublePow(double_1%,double_2%,destination_double%) - Raise double_1 to the power of double_2 and save to destinaton
dxDoubleExp(source_double%,destination_double%) - Find the exponent of source and save to destinaton
dxDoubleCeiling(source_double%,destination_double%) - Round up source and save to destinaton
dxDoubleFloor(source_double%,destination_double%) - Round down source and save to destinaton
dxDoublePi(destination_double%) - Set double to the value of Pi
dxDoubleToRadians(source_double%,destination_double%) - Convert double from a degree value to a radian value
dxDoubleToDegrees(source_double%,destination_double%) - Convert double from a radian value to a degree value
dxDoubleSign%(source_double%) - Return the sign value of give double
dxDoubleEqualLessThan%(double_1%,double_2%) - Returns true if double1 is equal or less than double2
dxDoubleLessThan%(double_1%,double_2%) - Returns true if double1 is less than double2
dxDoubleEqualTo%(double_1%,double_2%) - Returns true if double1 is equal to double2
dxDoubleEqualBiggerThan%(double_1%,double_2%) - Returns true if double1 is equal or bigger than double2
dxDoubleBiggerThan%(double_1%,double_2%) - Returns true if double1 is bigger than double2
dxDoubleMod(double_1%,double_2%,double_result%) - Returns the modulo (remainder) of a division of double1 by double2 and save to double result


Guy Fawkes(Posted 2014) [#66]
Ploppy, you're amazing! :D Keep up the GREAT work! :D Thank you SO kindly! :D


Ploppy(Posted 2014) [#67]
I have now included the first copy of the license that I will include with Blitz Hardwired. This license is part of hardwired and can be obtained with the following function...

dxHardwiredLicence$() - Returns a string containing the whole of the license

An identical copy of this license is equally included with each release of Blitz Hardwired, contained in blitz_hardwired_license.txt.

Hardwired userlib / Command list here / List in Excel format / Libvlc dll's here




Guy Fawkes(Posted 2014) [#68]
This license is free yes? And I need the license to include any 3rd party application that can call a DLL so I can have access to more commands using Blitz Hardwired in those applications. (I already got it working for Blitzplus) :)


Yasha(Posted 2014) [#69]
Which licence is this? (for the record) The text itself doesn't identify it. (unless "Freeware License" is its name, but that looks unlikely)

Is it original? If so, who wrote it? Was it written by a legal professional? (are you a legal professional, out of interest?)


I said this in the first thread (and got booted for it, but I stand by my position), but using an existing licence template - and if it is one, identifying it - is incredibly important and extremely useful. As a non-lawyer, and like other NAL members here, I do not know what your licence means. (which jurisdiction? what if I want to run it on BSD? what's "accepted trademark practice"? why is there a warranty at all? why does section 6 exist? why does it talk about non-obligatory actions? etc.) I rely entirely on the fact that well-known, named licences are pored over by thousands of legal professionals and commentators and have been explained thousands of times and tested in court dozens of times across multiple jurisdictions, which means they can be picked up safely by laypeople, and any halfdecent company can slot them into an existing legal framework quickly and without effort. This doesn't apply to an original/unidentified licence.

Most pre-existing licence templates are optimised for open-source software, but you can still use Creative Commons on the result binary or something; plenty of other templates exist. (it looks to me like you could replace this whole thing with a choice between CC-BY-ND and CC-NC-ND, or just ditch the credit option for simplicity and go with the former)


At this stage of your project's development, perhaps yes this is minor quibbling. Especially if you are a lawyer and already took this into account. But it will be - or should be - a legitimate concern for the everyday end user. (It would also be handy if the licence were available separately; if it is, or were replaced with, a templated one, the name should be made very prominent.)


Note (since apparently in the past I was too blunt): no negative criticism is intended. This is great work. My feedback is provided solely in the hope that it is useful.


Ploppy(Posted 2014) [#70]
Hi Yasha, I took a license that was for a free published piece of software available on the net, modified it so it fit around my software and need and there you go. It seems pretty clear to me, and covers most grounds (if not all, dare I say ;D). It details what the author requires of the user, the rights of the author as far as intellectual property stands, and a legal disclaimer to avoid any confusion.

I don't think it has to have on official name, 'stamped' by a recognised body as such. I may be wrong here, I am of course NOT a legal professional - but I think we all figured that one out. This is all new ground to me, but I don't think we need to get too heavy when it's concerning free software at the end of the day. Just as long as the license is there and is clear, it should be enough to put minds at rest..... or at least I hope so... If you think I do need to delve futher to avoid any potential legal traps for either myself or the end-user please explain. I won't hide the fact to being a little more than foggy on all this. But I do realise that although free, if I want people to used HW I will have to include this stuff.


Ploppy(Posted 2014) [#71]
I have just released another update in the past few minutes. A few months ago someone suggested to me (can't remember who) that for the video part that hardwired checked if the host machine had VLC already installed or not. If so, it would use the VLC dll's from the installed VLC folder. This would avoid having to install these dll's to the project folder.

Well, thanks for the suggestion, I kept it in mind, and now have done it. If you have vlc (the 32-bit version) installed on your system, Hardwired will read the windows registry for the folder location and then use these libraries for all video functions.

I have tested this out on vidtest.bb, and it works great for me. Less hassle than copying over the files....




Yasha(Posted 2014) [#72]
Oh there's no requirement that a licence be recognised by anyone or written by a professional. If you put your name on it and it says what you want - no matter how illogical - it's the licence and that's that. If part of it is illegal, it generally just means the thing becomes void if someone test it in court.

As I tried to say above, the main advantage of a "named" licence is familiarity, i.e. we all already know what the GPL means. Its quirks have already been ironed out and tried by fire.


(Actually my suggestion would be to go for something much more restrictive than what you currently have, while it's in development, and change it up later. Since the point of keeping the source closed was quality and IP and auteur control, there's no point handing out a licence to people to use this potentially-broken alpha version in production code and sully your good name! I would from that perspective be concerned about a licence that offers any warranty at all. Opening yourself up to a lot there if a virus infects it during download.)


I can't imagine anyone cares about this much, but do also note that a licence text is itself a creative work in its own right, and technically subject to copyright of its own!


Ploppy(Posted 2014) [#73]
Thanks for your help on this, have you any links to stuff I could read because like I said - I am a bit hazy on all this....


Yasha(Posted 2014) [#74]
I've found GNU's resources on licensing to be very informative - although bear in mind that they're Freedom! radicals and their very first sentence ("Published software should be free software.") tells you most of what you need to know about the site's perspective. Still, their section on this stuff and especially the list of lots of alternate licences are very informative and should give you an idea of the background even if you don't actually use any of them.

https://www.gnu.org/licenses/licenses.html
https://www.gnu.org/licenses/license-list.html

Creative Commons also has lots of interesting and useful information, although they don't recommend that you use them for (open-source) software:

http://creativecommons.org/


Ploppy(Posted 2014) [#75]
Thanks Yasha for the leads, I'll do some good reading during my coffee breaks tomorrow. I'll see what I can do about getting a solid license going tomorrow evening (off to bed now, work at 6am)....


GaryV(Posted 2014) [#76]
Appreciate the license Ploppy. A new one to me having it in the DLL though. Due to certain terms in the license, I will look elsewhere for my 3D needs, but in no way is that a bad reflection of your product. You are doing an awesome job!


Guy Fawkes(Posted 2014) [#77]
Hey Ploppy. I found 1 more command that should be easy for you to implement into hardwired.

Edit: @Ploppy, Missing command is: "dxCaptureWorld()"!

I'll let you know of anymore possible missing commands!

Just a heads up!

Kudos, Ploppy! Keep up the great work!

Have a great day!

Sincerely,

~GF


Guy Fawkes(Posted 2014) [#78]
3 more missing commands for your records, @Ploppy:



As said above, I will let you know any missing commands for your records.

I think the above 3 get entity color commands & the updateworld() command are the only 4 missing so far, so GOOD job, Ploppy! :)

EDIT: There's one weird thing going on with "dxGetEntityFX%()".

It's saying "illegal type conversion" if I try to use:



Kudos to you bro!

Kindest Regards,

~GF


LineOf7s(Posted 2014) [#79]
GuyFawkes: If you just want to post a couple of lines of code, you're likely better off using the (code)(/code) forum codes (replace brackets with square brackets) rather than (codebox)(/codebox). The latter is better suited to large quantities of code that need to be restricted to a scrollable window, but if you don't have that much then it just takes up unnecessary space.

GaryV: Given Ploppy seems quite flexible at this stage as to the specifics of the license, perhaps feedback on the terms causing you issues could be taken into account and amended? Chances are the specific issues you're having are not even things he's considered and/or cares about.


Guy Fawkes(Posted 2014) [#80]
Ok, will do. :)


Ploppy(Posted 2014) [#81]
Guyfawkes, there are many missing commands. Thanks, but I don't need a list or a workplan, I'm doing fine by myself. I will sidetrack to finish a command or two if it's holding you or anyone else back from completing your bb code AND it's not too time-consuming for me. Otherwise, I'm working on it but not necessarily in any order.

Btw: dxCaptureWorld() looks less easy for my point of view than it does for you apparently - that's one reason why I haven't yet created this command....

I'll look into dxGetEntityFX, but it sounds like a decls error....

@GaryV, I am relooking into the details of my license, I will let you know...

@LineOf7s - You are completely right, when it comes to the license I'm all ears for the moment. Having the license in Hardwired is not something I particularly want, but what I understand if I want anyone to use it, Hardwired will nonetheless require one. So I am fairly flexible when it comes to amendments. I will however remain unflexible about no one modifing my work, or taking credit for it, or again them having to credit me for any published commercial work. Other than that, I'm open to suggestions.


Ploppy(Posted 2014) [#82]
@VirtLands, have you retried the touchscreen functons yet? I must say that I am curious.


Ploppy(Posted 2014) [#83]

(Actually my suggestion would be to go for something much more restrictive than what you currently have, while it's in development, and change it up later. Since the point of keeping the source closed was quality and IP and auteur control, there's no point handing out a licence to people to use this potentially-broken alpha version in production code and sully your good name! I would from that perspective be concerned about a licence that offers any warranty at all. Opening yourself up to a lot there if a virus infects it during download.)



After a bit of thought I do like what Yasha is getting at. Hardwired is still very much in production after all, it is not ready for an official release- not even close. So there isn't really any point of being hasty for a license which could open me up for more liability than I wish for - not good. So I think what I have done so far is good, to lay the ground for an eventual license. I think I will leave the license blank for the moment, and when a official release is made, then I will release a license at the same time. Gives me good time to do the research necessary to get a license up and ready that suits hardwired and it's requirements....


GaryV(Posted 2014) [#84]
@GaryV, I am relooking into the details of my license, I will let you know...
It doesn't matter. Even though I won't use it for my own stuff, I will happily keep testing for you.


I think I will leave the license blank for the moment, and when a official release is made, then I will release a license at the same time.

Very bad idea. You have a lot of people interested in your engine that are helping you test it. Some may be testing it by building projects that use your engine in the anticipation of its final release. Some are putting a lot of effort into using your engine. Many months from now when an official release is made and the license is finally made public, some may not like the license and be quite upset with the amount of time they have put into supporting your engine, that they might not have otherwise supported had the license been made available early on. Some may find themselves putting in a lot of work for nothing only to have to switch to another engine due to license issues.

Just avoid open source licenses since it is a closed source project. Also, it is best not to steal a license from another project. Some people pay thousands of dollars to have a lawyer draw up a license and the text of licenses are protected by copyright laws. If you swipe a license, there is a good chance you may get nailed at some point an receive a C&D or be brought into court looking for damages, ie., money for each copy of your software that was distributed, whether it was free or not.


Ploppy(Posted 2014) [#85]
Okay, hard to know what to do, I understand what you are saying and can understand that current hardwired users would like to have some peace of mind they are using something they can legally and for free, let's say. But at the same time, Yasha suggests that I should hold off whilst in alpha stage.

Bit confused about what to do.....and how to go about it if I do something.....

@BlitzSupport - I hope I don't seem too bold saying this but do you have any experience on this with blitz? Perhaps you could help, or would Mark Sibly have any opinion on this? - perhaps he could help since he has had some experience in these matters and I need advice. I don't think he is aware about Hardwired. If I could get some approval by BLR and at the same time some legal advice on how to proceed with my license it may be much more reassuring for all of us. Just an idea...


Yasha(Posted 2014) [#86]
Yasha suggests that I should hold off whilst in alpha stage.


What I mainly suggest is that you avoid issuing any warranty (check the second half of the MIT licence for a solid disclaimer of all responsibility), and probably never change that because TBH there's no reason to ever do so.

What I meant about restricting commercial use was more that you could discourage people from redistributing the library until further notice, in its incomplete state. Perhaps that's not a good idea, since some people might never want to start working with a tool they can't guarantee will ever change its terms. GaryV makes a good argument there.

For the record I don't think there's any practical value in such a restriction - I suggested it because it seemed like the sensible extension of your own opinions in post #41 - responsibility for, and control over, the whole work and so on.


Steve Elliott(Posted 2014) [#87]
DP hmmm.


Steve Elliott(Posted 2014) [#88]
I think Gary is worrying too much, Ploppy is being open and honest and has good intentions - and making good progress!...Seems to be striking the right balance, and on a mission to succeed. In my opinion, always best to hold back until you have something near completion - or it turns into a circus here.

However, I can understand Gary's reservations. I would never use somebody else's 3D Engine again because I've been let down so many times after investing time and effort in an engine that is simply dropped. I don't think that will be the case here...The guy seems motivated!


LittleDave(Posted 2014) [#89]
To keep Ploppy motivated,instead of moaning perhaps we should all use the donate button.Just a thought.


Guy Fawkes(Posted 2014) [#90]
When I finish my program, I will DEFINITELY donate. You do GREAT work Ploppy, & you deserve it! =)


Ploppy(Posted 2014) [#91]
All I'm asking from a commercial release is that I get a credit for my work and that nobody else takes credit for my work, that my name is recognised - nothing more. I do not personally call that a restriction, but more of a courtesy. Not that for the moment that Hardwired is finished, but I am pretty much handing it over on a silver plate already. If a can't get anything out of it, I can't see much interest in releasing it. I'm sorry, but I'm nobody's biatch. I cannot see why people have a problem with that. I mean, if I can't get anything out of the hours I have put into it, after all it would be an essetial part of a game/app, well then that's a lot of work for absolutely nothing in return. I have made it clear from the start that I am not asking money for this, although I do not refuse and am very happy to receive a donation, I do wish to make it very clear that I completely accept that a donation is choice and in no way expected of anybody. But I am not going to release my work based on the hope that somebody, somewhere at some point will use my software but no-one will realise the 3d-engine was designed and programmed by myself. Not much internal satifaction there, I think we're all agreed. Not great all this, motivation wise - especially when I am handing this out for free....


Derron(Posted 2014) [#92]
@Licence:

Just add a "watermark" (a small text) in one of the borders during the "dll" being techpreview/alpha/beta.

Liability is only a problem for certain people. Some phrases of popular licences are useless in certain countries. Of course there are people arguing if phrases like:
"I provide this dll free of costs but without taking any responsibility for things arising from using it. If used, giving credit to me is required."
are not detailed enough. Means: if you write things too generalized, one can try to make the whole thing getting invalid. But this all depends on what licence something has if you do not put a licence on it.

@Closed Source
All using your work should be clear that as soon as: you loose interest or loose the ability to work on it (moving to antarctica, getting ill, ...) they will not be able to develope the dll. As things might happen "in a sudden", you cannot guarantee to opensource it then. Open Source of course has licences enforcing others to credit your work. Most people will respect your licence as a credit does not cost much money (compared to pirated music/movies ...). Also the whole project might be on an advanced level - but way lower than what current engines offer. If one really wants to steal certain functionality - they would steal from one of the open source 3d engines (or leaked codes from commercial closed source engines).

I understand you a frightened of ripoffs, dozens of forks ... but hey, to be honest: do you really think there are hundreds of coders in this forum forking your software? I think most of them are willed to use your project - and thats it. There might be 1 or 2 who actually fork it but mainly to play with it - or to provide you with patches.

I made the code of my game public at github in 2013 ... guess how many patches were provided: 0 - and forks? 0. And I even have complete compilation guides (including using the BlitzMax Demo with a more current module set). Ok I got one user reporting where he thinks a specific bug happens (as he could understand a bit of the code because he had a visualBasic-background) but that was it. Before declaring it "open source" publically (I made "available" in my Subversion repo 2 years ago) I was frightened of people renaming our project, having more time than me and a coding buddy and finishing something off I started over 10 years ago. But hey - if they really achieve this, I can play theirs and see how they do things - and if I release something, I can call our little game "the original" :p.

Another nice thing to know: While nobody asked for the code, many asked for the assets I created. They asked if they get the permission to use it because they write something similar or for another target (browser game) - but all of them (as I know) asked BEFORE. Why? They all there hobbyist developers like we are. Real companies wont try to ripoff yours - and if they do you can still think of starting some legal action.


Above was only a personal thought and it is your decision, but you asked for advice from somebody knowing something about the problem.


It is a pitty that this project is DX-win-only (BlitzMax modules should be cross platform, so inclusion is not likely to happen).


bye
Ron


Ploppy(Posted 2014) [#93]
Hi Ron, I only have a PC. So, mac work would be much further down the line, if feasible. As for the open-source thing, the ONLY thing that would make me release my source would be if I knew I could't continue (due to illness, unforseen circomstances, etc). I assure you that for the moment (touch-wood), I am in full health and raring to continue to add to my source.

Regards


GaryV(Posted 2014) [#94]
All I'm asking from a commercial release is that I get a credit for my work and that nobody else takes credit for my work, that my name is recognised - nothing more. I do not personally call that a restriction, but more of a courtesy. Not that for the moment that Hardwired is finished, but I am pretty much handing it over on a silver plate already. If a can't get anything out of it, I can't see much interest in releasing it. I'm sorry, but I'm nobody's biatch. I cannot see why people have a problem with that.

I don't think anybody has a problem with that.


Ploppy(Posted 2014) [#95]
So what is the problem then?


RemiD(Posted 2014) [#96]

are not detailed enough. Means: if you write things too generalized, one can try to make the whole thing getting invalid.


Exactly. If the license is not detailed enough and clear enough, nobody will use your lib for a serious project.

Detailed enough and clear enough does not mean that you have to hire a lawyer to write it (a lawyer will probably have no idea how a lib can be used anyway...). It means it has to be clear about what rights you give to use, run, copy (as part of a app/game), distribute (as part of a app/game), sell (as part of a app/game), etc...
You can also write some restrictions so the license is more clear but by default the restrictions are automatic for all rights you do not give.

I say read some others licenses, see what apply | does not apply to your lib, write your own.

Also take note about what Yasha mentioned about the warranty, you don't want to be responsible for a damage caused to a machine because of the wrong use of your lib or because of a compatibility problem with the hardware.

One reason why i will probably not use your lib is support. What you do is generous but who wants to spend many hours making a app/game and when there is a bug caused by the lib, there is nobody to fix it ?
Personally i prefer to pay a developer for this service and be sure that it will be done.


Ploppy(Posted 2014) [#97]
I do know what you are saying but I do not plan on completly abandoning my creature once I release it to the wild anyway. I will provide feedback and bug corrections when necessary. I may not be an industry developer but I do have a certain pride in releasing a reliable product nonetheless.
But I respect your choice...

As for the license, I will work on it, do research and find somthing clear and that fits as many of our needs as possible. This is going to bore me to tears but I understand it is necessary...


Derron(Posted 2014) [#98]
Sometimes you just do not have the chance to continue working on something - eg you might get contracted and the contract does not allow working on such things during your personal spare time. Or you get ill and cannot longer operate on computers or ...

There is a bunch of life changers which can abandon a current project. So although you are enthusiastic about it ... you somewhere in the future might change your opinion - and this is what others surely know and are afraid of (if they plan so far to the future).
Of course "Open Source" does not guarantee to get a project continued after the main contributor stops developing it - but at least it is a dark light at the end of the tunnel of pessimism :D.

Another option is to have it partly closed source - means eg. something like a "connector" is closed source - but other parts are open source.

But like said: it is upon you to do or not to do things, I do not use your library (as win-only) so I just posting here to spread around my thoughts concerning licences.


bye
Ron


Ploppy(Posted 2014) [#99]
Reading back, I didn't get this phrase....
Most people will respect your licence as a credit does not cost much money (compared to pirated music/movies ...).


Since when does a credit cost money? It's just mentioning the name of author of said piece of sofware.


Derron(Posted 2014) [#100]
that is exactly what I am saying ... writing ones name (= giving credit) costs way less than a movie you would have bought if you did not pirate it.


bye
Ron


RemiD(Posted 2014) [#101]
I forgot to say : you have made a good work so far, congrats for that !


Guy Fawkes(Posted 2014) [#102]
Hey Ploppy. I hope it's ok if I converted the Blitz Hardwired DECLs to a pbi file in order to use Blitz Hardwired inside Purebasic. If not, then I won't continue talking about it. If so, I have made you an example Purebasic file and the library for Purebasic - Hardwired.

For some reason, it won't read the DLL even though the DLL is in the same folder as the example .pb file which includes in it, "Hardwired.pbi"...

Other than that, I got it working GOOD. :)

If I could get your email, I'll email you the example source as well as the Hardwired.pbi library I made out of the DECLs file.

Thanks alot, Ploppy!

Have a good evening!

Sincerely,

~GF


LittleDave(Posted 2014) [#103]
Hello Ploppy i take it having.

Created with HardWired(c) by Ploppy.

is ok to use.


Guy Fawkes(Posted 2014) [#104]
I know. I just need to hear it from Ploppy imself'. :)

It took well over 3 hours to convert it all, but if Ploppy can get it to read the DLL then all will be well! :)


virtlands(Posted 2014) [#105]
Well, I just got back, (glad to see all the posts). I reloaded touchscreen_test.bb, ...
The program loads, but runs with just zeroes;
I touched, and tapped, & traced the screen, and there's no responce.

- screenshot here -

--------
After a little searching, I have an idea that it needs these functions ::

BOOL WINAPI RegisterTouchWindow( _In_ HWND hWnd, _In_ ULONG ulFlags );
BOOL WINAPI IsTouchWindow( _In_ HWND hWnd, _Out_opt_ PULONG pulFlags );
BOOL WINAPI GetTouchInputInfo(_In_ HTOUCHINPUT hTouchInput, _In_ UINT Inputs, _Out_ PTOUCHINPUT pInputs, _In_ int cbSize );

I believe that the Blitz3D window requires RegisterTouchWindow(..) .

MSDN sources:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd317318%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/dd317326%28v=vs.85%29.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/dd372998%28v=vs.85%29.aspx
Windows Touch Samples: http://tinyurl.com/p5ssmcq
---------------------------------------------------------------------------------------
These are some other options, if you have time ::
--> Windows 8 Touch Injection API (simulate touch input) --> http://tinyurl.com/pff3ls7
--> Windows 7 Surface® 2.0 SDK (simulate touch input) --> http://tinyurl.com/a2skb6e ]
---------------------------------------------------------------------------------------
These following functions/commands will give blitz the ablility to use double floating point variables.
I like the dxDouble math additions. Just curious, can Directx do 80-bit or 128-bit math as well?

80-bit format: https://en.wikipedia.org/wiki/Extended_precision#Need_for_the_80-bit_format
Quadruple-precision floating-point format: https://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format

The "mutually assured destruction" function (mad) ::
http://msdn.microsoft.com/en-us/library/windows/desktop/ff471418%28v=vs.85%29.aspx
---------------------------------------------------------------------------------------
Concerning licenses, this one looks good :

Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) ::
http://creativecommons.org/licenses/by-sa/4.0/
"Hardwired™ by Ploppy"



MadJack(Posted 2014) [#106]
Running test10d.bb (the jumping dwarfs), the dwarfs render correctly with debug enabled but are solid black in non-debug mode (ran in windowed mode).

W7 64 bit, nvidia GeForce Gt640, dual monitor


Ploppy(Posted 2014) [#107]
Wow, quite a bit to catch up on since my last post, I guess...

@Derron, thanks I understand now. Sorry, I feel a bit of a dunce now, I shoud have got that earlier. Ooops.

@RemiD Thankyou for the kind words, my good man

@GuyFawkes, I'm perfectly okay on how you wish to use my dll, just as long as the dll itself isn't modified, including its filename. I originally created Hardwired for use as an extension to Blitz+/3D, but I completely understand it is adaptable to other languages/compilers. I have no problem with this, whatever makes you confortable. As for your PureBasic woes, you're on your own there, I have no idea what makes it tick.

@Virtlands, thanks for the license link, I will check it out - I have a bit of free time today to look into all this and welcome suggestions with open arms. Legal stuff is not my forté.

As for the touch commands, I did indeed use RegisterTouchWindow and GetTouchInputInfo. I even added the necessary event switch to detect this kind of input, but no joy. I guess I must have missed something out somewhere. Thanks for trying anyway - like I said this is not my priority for the moment, but I will come back to it at some point.

Concerning double precision floats - for info, directx does not even deal with double floating point numbers, and I believe this is the case even for the gfx adapter's abilities. This limit is for the moment 32-bit floats for numbers. I included these functions because you may wish for the processor to store/calculate 64-bit floats and convert them to normal floats when needed.

The processor can deal with 80-bit numbers and with some effort can even do 128-bit numbers. I may include functions for these, I don't know yet.

Here's a link to an interesting library that deals with variable sized floaters that may interest you - looks cool....

@MadJack

Running test10d.bb (the jumping dwarfs), the dwarfs render correctly with debug enabled but are solid black in non-debug mode (ran in windowed mode).


What a very strange bug. I have already had problems in the past between debug and release mode and things change. I'll look into this weird phenomenon. Cheers

@all I'm currently working on the user-created shader part of hardwired and have got most of the constants structures sorted out already. Perhaps no release for the next few days but with a bit of luck by the weekend people will be able at last to use thier own vertex and pixel shaders in blitz. Fingers crossed, but the code is looking good so far...


Ploppy(Posted 2014) [#108]
@VirtLands I had a quick look at my touchscreen code anyway and I have made a few modifs to it. I think it should work now, when you can please give it a shot - I have just uploaded a new update.... fanx...

Hardwired userlib / Command list here / List in Excel format / Libvlc dll's here




Guy Fawkes(Posted 2014) [#109]
Ok, Ploppy. Rather than make a separate thread for PB Hardwired, perhaps one of you Hardwired patrons can test this and find out why this thing won't load my PBI code. It's the one & only thing stopping me from completing PB - Hardwired.

Please Note: The only functions I have added actual functionality to are the ones being used in this demo.

Here's the codes:

Hardwired.pbi:



Hardwired_Example_CountGfxDrivers.pb:



Just like Blitzbasic, Hardwired.dll must be located along with the PBI file in the same exact folder as Hardwired_Example_CountGfxDrivers.pb.

Thanks again Ploppy, for this WONDERFUL DLL! :)

Sincerely,

~GF


Ploppy(Posted 2014) [#110]
Tonight's update is all about shader constants. The new functions/commands below are all about writing to them. Shader constants, as some will already know are global variables used by vertex and pixel shaders. These global variables do not change for all vertices processed by the vertex shader and all pixels processed by a pixel shader during the render of a 3d object. This is why they are commonly called constants.

To be able to prepare and manipulate these constants is a vital part of shader programming. Along with the vertex and texture information given by an entity when being sent to a shader, these global variables make up what is needed in order to achieve a wide scope of different effects and styles.

I will go into more detail about shader programming as time goes on, for the moment this will be easier for those who already have experience in HLSL. I will also add other functions as time goes by....

An example of the usage of these functions in provided in shadertest.bb

dxAddShaderConstant%(shader%,constant$,type%,flags%) : This function will record/map a 'constant' taken from a shader script. To be able to access a constant it is first necessary to inform hardwired of its existence. So, after loading a shader into memory, if you wish to be able change a contant's value, you will need to use this function to be able to map the constant's memory address. You only need to 'assign' a constant to a shader once per constant, and you do not need to assign all constants found within a shader if you do not wish to - just the ones you need.

Parameters
shader - handle of shader returned by dxCreateVertexShader or dxCreatePixelShader

constant$ - name of the constant to assign, the name of the constant is found in the HLSL shader script. Please note - the parameter is case-sensitive, please use exactly the same name as in the HLSL script. These constants are found in the cbuffer structure of the HLSL script, most of the time at the beginning of the script.

type - the variable's type - this will inform hardwired on how to treat this variable. Below if a list of each type and its function....

MANUAL TYPES
1 = float type - Define this constant as a float and you will be able to change the value of this float with the dxSetFloatShader command between frames to any float value
2 = float2 type - Define this constant as a float2 and you will be able to change the value of a constant containing a group of two float variables with the dxSetFloat2Shader command between frames to any float value
3 = float3 type - Define this constant as a float3 and you will be able to change the value of a constant containing a group of three float variables with the dxSetFloat3Shader command between frames to any float value
4 = float4 type - Define this constant as a float4 and you will be able to change the value of a constant containing a group of four float variables with the dxSetFloat2Shader command between frames to any float value
5 = int type - Define this constant as a int and you will be able to change the value of this int with the dxSetIntShader command between frames to any int value
6 = int2 type - Define this constant as a int2 and you will be able to change the value of a constant containing two int values with the dxSetInt2Shader command between frames to any int value
7 = int3 type - Define this constant as a int3 and you will be able to change the value of a constant containing three int values with the dxSetInt3Shader command between frames to any int value
8 = int4 type - Define this constant as a int4 and you will be able to change the value of a constant containing four int values with the dxSetInt4Shader command between frames to any int value
9 = bool type - Define this constant as a bool and you will be able to change the value of this float with the dxSetBoolShader command between frames to any boolean value
10 = matrix type - Define this constant as a matrix and you will be able to change the value of this float with the dxSetMatrixShader (I have not yet created this command) command between frames to any float value

AUTOMATIC TYPES
11 = entity matrix type - Signals hardwired to automatically set this constant to the matrix value holding the entity's position, rotation and scalar value that the shader is assigned to. This constant will be updated by the hardwired renderer.
12 = projection matrix - Signals hardwired to automatically set this constant to the projection matrix, this matrix hold the information about the currently used camera and is used to convert coordinates for rendering.
13 = view matrix signals hardwired to automatically set this constant to the view matrix, this matrix is used to convert between 3d projection coordinates and 2d screen coordinates.
14 = entity projection view matrix - the values of the entity matrix multiplied by the projection matrix and the view matrix
15 = entity proection matrix - the values of the entity matrix multiplied by the projection matrix
16= entity view matrix - the values of the entity matrix multiplied by the view matrix
17= view projection matrix - the values of the view matrix multiplied by the projection matrix
18 to 25 = light n°1 to 8's matrix - signals hardwired to set the constant to the light's matrix (holding it's position and rotational values). In the hardwired renderer, light n°1 corresponds to the closest light to the currently used camera, n°2 in the next closest and so on.
26 to 33 = light n°1 to 8's position - signals hardwired to set the constant to the light's positional values, this is a 3 float constant,a float for each x,y and z.
34 to 41 = light n°1 to 8's direction - signals hardwired to set the constant to the light's directional values, this is a 3 float constant,a float for each x,y and z.

flags -
1 = Transpose - When applicable, this flag will transpose a value before writing to the shader constant
2 = Inverse - When applicable, this flag will inverse a value before writing to the shader constant
4 = Normalise - When applicable, this flag will normalise a value before writing to the shader constant
8 = No position - When applicable, will signal hardwired not to send positional information to the shader
16= No rotation - When applicable, will signal hardwired not to send rotational information to the shader
32= No scale - When applicable, will signal hardwired not to send scalar information to the shader

Note: These flags can be OR'ed


dxAddShaderConstant will return, if succesful the index number of the assigned constant. If not successful, it will return a 0 (for example if you do not respect the case of a constant string value, hardwired will not find what you are looking for and reject the function request).

dxCountShaderConstants%(shader%) - Returns the current amount of constants that have been assigned
dxGetShaderConstantClass$(shader%,index%) - Return's a string containing the type description of a constant assigned using dxAddShaderConstant
dxGetShaderConstantType%(shader%,index%) - Return's the type of a constant assigned as set with dxAddShaderConstant
dxSetShaderConstantType(shader%,index%,type%) - Change a constant type to chosen type
dxGetShaderConstantFlags%(shader%,index%) - Get a constant's current flag status
dxSetShaderConstantFlags(shader%,index%,flags%) - Change a constant's flag
dSetIntShader(shader%,index%,value%) - This is the command for manually changing an int constant.
dxSetBoolShader(shader%,index%,value%) - This is the command for manually changing an bool constant (true/false).
dxSetFloatShader(shader%,index%,value#) - This is the command for manually changing an float constant.
dxSetShaderConstantEntity(shader%,index%,entity%) - Use this command to set a constant to use the matrix of any entity other than the entity that is linked to the shader in question.
dxGetShaderConstantEntity%(shader%,index%) - Retrieve the handle of the entity set using dxSetShaderConstantEntity


All this is a lot to take in, I'll admit. And I probably haven't explained it very well. That's one reason why I've done a quick demo, please check out both shadertest.bb and shaders\color_shader.txt, which is the shader used in the demo. You may understand better looking at both codes to see the link that these above functions give.

These constant functions, and the ones I have yet to add, will become a very important part of the shader manipulation process used in hardwired. A lot of headway is being made in the way of shader control. I have yet to add certain things, such as vertex declarations so for the moment shaders will only recognise the default blitz vertex structure. But we are definately making a lot of progress...

Hardwired userlib / Command list here / List in Excel format / Libvlc dll's here




BlitzSupport(Posted 2014) [#111]
@Guy Fawkes:

Here's an excerpt from a PB wrapper I did for the old Blitz3D SDK, which shows what you need to define for each command:


Global b3ddll = OpenLibrary (#PB_Any, "b3d.dll")
If b3ddll = 0
	MessageRequester ("Fatal error!", "Failed to open b3d.dll!", #PB_MessageRequester_Ok)
	End
EndIf

; For each command...

; C function prototype (I suggest adding Proc or some other suffix to the command name):

	PrototypeC.l bbGraphics3DProc (w.l, h.l, d.l=0, mode.l=0)

; Global PB function of type "C function" -- the type below is the name of the PrototypeC function above:

	Global bbGraphics3D.bbGraphics3DProc

; Assign DLL/"C" function to global PB function:

	bbGraphics3D = GetFunction (b3ddll, "bbGraphics3D")



Guy Fawkes(Posted 2014) [#112]
Thanks ALOT, Blitz support. But for some reason, it won't read the DLL even though I checked filesize, which was WELL over 0 bytes using the same directory as used in "OpenLibrary()". :/

If I can just get it to load the DLL, then it's ALL down hill from there. :)

Thanks again!

Sincerely,

~GF


Osoko(Posted 2014) [#113]
Dear Ploppy,

I can make some test for the Touchscreen. Under Windows 7, IIyama T2452MTS

dxTouchscreenTouched(): Get ultra fast response with one finger touch !

In native blitz, i use Api_RegisterTouchWindow(SysWindows,TWF_WANTPALM)to get windows react fast. The action of touching the screen is traduced by having Mousehit(1) = true.

If you don't configure the windows ( HWND ) in TWF_WANTPALM mode ( this is the WM_TOUCH mode ), you are by default in a WM_GESTURE mode.

This mode take more time to react, as it tries to recognize the gesture. In this mode, if you touch the screen quickly and without moving the finger in any direction, you get nothing back.

In windows 8.1, the system reacts as in windows 7 in normal mode ( Gesture )


Get error when Two fingers touch : back to the editor, the exe crash, no message box.

X Coord return 160000 at max on 1920 px display : how to know the maxTouchResolution in X\Y ?

I will make some test of Hardwired under windows 8.1 as the touchscreen system is different.

Fast response is the first need for me and a big bonus would be the ability to deal with two fingers.

Make test with vidtest.bb work's perfect !
Make test10 don' t see any dwarf.


Ploppy(Posted 2014) [#114]
Hi Osoko, sorry I only understand a little. Your english is not too clear to me, but I understand that the touchscreen functions are working, but not completely working - that they are giving coordinates that do not exactly relate to the real screen coordinates. Is that correct??

If I am able to get hardwired to acccess the touch commands, then yes, I can equally get HW to access the gesture commands as well. So yes, two (or more) finger gestures will be possible later; no problem...

Regards....
Ploppy


Ploppy(Posted 2014) [#115]
deleted due to forum error


Rick Nasher(Posted 2014) [#116]
No dwarfs in test10 here too(not even with debug on), but in maze.bb in DX11 now all is perfect: no more flicker and textures mapped OK. In DX9 no more flickering too, but the dwarf is disappearing when closing in on it and the texture on the axe is wrongly mapped. Getting better all the time though.


Osoko(Posted 2014) [#117]
@Ploppy : Sorry for my bad english, I have partialy rewrite my previous post to get it more clear.

If you make some more TouchScreen prog, I find that having Two ( or more ) fingers returned with screen coordinate in WM_Touch mode ( react very fast ) would be perfect ! For me it could be enought to get your apps working perfectly with Touchscreen.


MadJack(Posted 2014) [#118]
Latest version: dxLoadTerrain is giving me a memory access violation in both debug/non-debug modes. Same result on both my work and home systems (both Nvidia).

I checked the texture can be loaded <correct path> and tried changing to some of the other textures but with the same result. Also tried windowed mode.


BlitzSupport(Posted 2014) [#119]
@Guy Fawkes: I don't know why that would be, sorry -- this works fine for me if the DLL is in the same folder as the saved program; no good reason it shouldn't! This code was simply edited down from your include file (and the 'success' line added to check):

If OpenLibrary(0, "Hardwired.dll")
 
	MessageRequester ("SUCCESS!", "Found Hardwired.dll!")
Else
  
  MessageRequester("ERROR!", "Could not find Hardwired.dll!"+"Exiting...")
  End
  
EndIf



virtlands(Posted 2014) [#120]
The touch screen code works now. ;)



The dxTouchscreenTouched() function returns to zero very quickly;
I inserted a temporary delay(3000) so that I could get the screenshot.

I made an attempt to capture and record some of that "touch" data using your functions ::

Click here to get the BB :: http://uploadingit.com/file/e2zb3pbs2thhpzcb/TouchDataRecord.bb




I hope I got the logic right.
The demonstration sometimes returns dxTouchscreenWidth()=0, which is a mystery to me.
Typical values for touch width & height are 000,100,200,300,400 ...

Another mystery is that when I touch the screen with 2 fingers (simultaneously at different spots), the program ends early.

This is complex stuff.

@G.F. I'll take a peek at your PureBasic DLL dilemma, to try to
figure it out, but I haven't used PureBasic in nearly 1 year,... I'm rusty on it.

Time for a break:




Guy Fawkes(Posted 2014) [#121]
Thanks, Virtlands! :)


Ploppy(Posted 2014) [#122]
@MadJack

Latest version: dxLoadTerrain is giving me a memory access violation in both debug/non-debug modes. Same result on both my work and home systems (both Nvidia).

I checked the texture can be loaded <correct path> and tried changing to some of the other textures but with the same result. Also tried windowed mode.



Sorry about that, I've been playing around with my code quite a bit recently. I probably forgot to put something back or some-such thing. I'll get that sorted out when I get back home....

@Virtlands
you got the touch code to work.

...neat! I will get this working little by little, but it's good to know I have the foundations of this already up and running. I'll keep you posted on this - remember both you and Osoko will be my eyes on this one. Cheers...


virtlands(Posted 2014) [#123]
(Sorry, duplicate post)


virtlands(Posted 2014) [#124]
(obsolete post)


Ploppy(Posted 2014) [#125]
Um... not sure I'll be doing much hw for the next few days. I have just got in from work, switched on pc and windows keeps crashing. I may have to reinstall and that takes a few days to get all back up n running...


Ploppy(Posted 2014) [#126]
Okay, problem sorted it seems. I think my hard drive was a little corrupt of something like that. Rest-assured it is not a virus, I have a good anti-virus.

@MadJack - Could you send me an example of your dxLoadTerain problem please, complete with the heightmap in a zip/rar folder. I tested out the command (test8.bb for example), and it works fine for me. I will need an example to work on in order to see why it's not working for you.

Thanx in advance


Ploppy(Posted 2014) [#127]
I have now updated the post containing the parameter list for the command dxAddShaderConstant, some new types have been included.

There are some new shader functions for this new update....

dxSetMatrixShader(shader%,index%,matrix%) - Will set a shaders constant that has a matrix type - You can define a matrix using the matrix commands as shown in previous post
dxSetFloat2Shader(shader%,index%,float_1#,float_2#) - Set a 'float2' constant for a shader constant
dxSetFloat3Shader(shader%,index%,float_1#,float_2#,float_3#) - Set a 'float3' constant for a shader constant
dxSetFloat4Shader(shader%,index%,float_1#,float_2#,float_3#,float_4#) - Set a 'float4' constant for a shader constant
dxSetInt2Shader(shader%,index%,int_1%,int_2%) - Set a 'int2' constant for a shader constant
dxSetInt3Shader(shader%,index%,int_1%,int_2%,int_3%) Set a 'int3' constant for a shader constant
dxSetInt4Shader(shader%,index%,int_1%,int_2%,int_3%,int_4%) Set a 'int4' constant for a shader constant

Hardwired will now render vertex shaders, it should work quite well now. I still have a few constants problems but it is getting better.

Please see my updated shadertest.bb for an example. This test is using a vertex and a pixel shader to render the sphere in the demo. Please note that the vertex shader 'skews' the sphere into a losange, and that the pixel shader changes the colour of the sphere. This is just an example, my two shaders here are very basic, but it gives you an idea.

We all now almost done for shader programming. I have a few more shader commands to add but the majority is now present for what is required for good shader coverage. The rest will be up to the blitz programmer. You can achieve a whole heap of effects using shaders, and with a little imagination the sky is the limit.

Hardwired userlib / Command list here / List in Excel format / Libvlc dll's here




Guy Fawkes(Posted 2014) [#128]
YEA! YOU GO, PLOPPY! =D


Guy Fawkes(Posted 2014) [#129]
Hey Ploppy, can I bother you to add a little request? Can you add something to grab the texture names and files from a 3D mesh IE: "textures\myaxetexture.jpg" and apply them to the mesh automatically? Because when I use dxLoadMesh("dwarf1.b3d", 0), it loads the mesh totally black and that leads me to believe it's not reading the texture file name(s) already embedded in the mesh itself.

Thanks alot, and continue the GREAT work, Ploppy! :)

Sincerely,

~GF


Ploppy(Posted 2014) [#130]
Hello, today I have started to concentrate on improving the help files. As time has been progressing I have obviously noticed that it is becoming less and less clear to keep track of all commands. So I have no update for hardwired today, but on the other hand I have uploaded my first draft of the hardwired help files. These help files are only compatible with the Blitz3d help system for the moment, the B+ version will come later. Just decompress this zip file to your Blitz3d folder. You may wish to back up the original folder first, and since I haven't quite yet finished these help files, I would recommend backing it up.

In order to work, these help files need to be written into the existing blitz3d's help folder (not an empty folder named 'help'), this is why I recommend backing it up, and not just simply renaming the existing folder.

When my help files are complete I may issue them with a little installer that backs up the b3d help files. For these help files I will release updates from time to time of course, as Hardwired progresses...

For the moment, the hardwired commands will not appear in the left-hand side of B3D's help system (categories/A-Z) - I should get that part finished tomorrow. For now B3D's help system should return a help page corresponding to a hardwired command when you hit F1, as you do with the classic B3D commands. All original B3D commands work like normal, I have not changed these help files in any way....

The original blitz's example files have been also converted to their HW equivalents. However, the conversion I used was automatically done by a program I created. The program did NOT take function defaults into account. So if an example does not work right away, it is only because some commands may be missing parameters that B3D uses as defaults. Simply add these params as their default values to the bb code and all should work fine.

Hardwired help files

Hardwired userlib / Command list here / List in Excel format / Libvlc dll's here




Guy Fawkes(Posted 2014) [#131]
WOW! That's AWESOME, Ploppy! :) Keep up the good work!

KUDOS to you!

Sincerely,

~GF


Ploppy(Posted 2014) [#132]
Hi GuyFawkes, thanks for the encouragement, but I pretty much understand and appreciate that already. Don't take this the wrong way, but the thing is, if you put in a new post saying pretty much the same thing every day, this is going to become a very long thread with only so much substance. Thanks, but please help me to keep the thread fluff to a minimum.


Guy Fawkes(Posted 2014) [#133]
Ok, sorry @Ploppy. >< Anyways, did you have a look at why the model doesn't load its' textures automatically if it has textures built into it? :)

Sincerely,

~GF


GfK(Posted 2014) [#134]
@Ploppy - have you considered using a worklog? You can keep external noise completely out of it that way, and only post about it in the forums when you release an update.


virtlands(Posted 2014) [#135]
@Plop:
Just decompress this zip file to your Blitz3d folder. You may wish to back up the original folder first,
and since I haven't quite yet finished these help files, I would recommend backing it up.

I created this option where you can have 2 versions of Blitz3D help open at the same time,
... as you choose, you can have both (a) and (b) :

(a) Ploppy's updated help system, (already built into Blitz3D)
(b) The classic Blitz3d help that has never been updated

I transferred the classic version into an ISO, for anyone that wants.

the link: --> http://uploadingit.com/file/bxguflzsk0fdrc5d/Blitz%20Manuals%20and%20Docs.iso

All you need to do is mount it with some kind of ISO software such as Daemon Tools Lite,
then click on the browser file index.html

Daemon Tools free version:: http://filehippo.com/download_daemon_tools



Guy Fawkes(Posted 2014) [#136]
Yo Ploppy =) Just thought I'd let you know that even though in Blitzplus, I do 'dxapptitle "my title"', it still says "Output Window" which is driving me crazy. When you get the chance, can you please fix it or at least tell me how to fix it? That would be MUCH appreciated!

Here's an image as proof of both the code I used, AND the problem.

http://i.imgur.com/CwwE0t4.png

Thanks again, & have a GREAT evening! :)

Sincerely,

~GF


Ploppy(Posted 2014) [#137]
I don't have access to my code right now but have you tried that command AFTER dxgraphics3d?


Guy Fawkes(Posted 2014) [#138]
Yea, that worked. But the problem now is, it needs to set the graphics title before the window even pops up. It's not doing that. Is there a way I can COMPLETELY hide the window at runtime until it switches the title?

Thanks alot, Ploppy! :)

Sincerely,

~GF


Ploppy(Posted 2014) [#139]
Sure there is


Guy Fawkes(Posted 2014) [#140]
How would I do it with Hardwired?


Ploppy(Posted 2014) [#141]
You would wait for it to be made. :D


Guy Fawkes(Posted 2014) [#142]
How long would that be Mr. Ploppy?


Steve Elliott(Posted 2014) [#143]
lol, time for a worklog - like Gfk suggested.


Ploppy(Posted 2014) [#144]
@GF, I will not give you any deadline, time or promise. I have noted, as for so many of your requests or comments on other functions or commands, that you would like this or that done. I get the impression that for you the scope of my project from my perspective is in line with your view of it all. Not at all, I'm afraid. Only I can see and know the whole scale of this code, I have my own priorities, so please keep it light - for I will help from time to time but I'm not getting sidetracked like this all the time. I am and will follow my own itinerary. But I will say this, if you keep on about what you would like, instead of it going up in my list of priorities it will most likely go down. I have nothing to lose, I work at my own pace, and prefer not to be too pressured. I have enough on my plate already.

It will all come in time.
Patience.

@Steve - LOL, how does one start a worklog btw? I really have no idea. I tried snooping around on the forum but couldn't find a link...


Steve Elliott(Posted 2014) [#145]
;) Top of the page - Worklogs, My Worklogs, Create New Worklog.


Ploppy(Posted 2014) [#146]
Can't find it...




Steve Elliott(Posted 2014) [#147]
No, top of this thread - not the home page.


Derron(Posted 2014) [#148]
http://www.blitzmax.com/logs/userlog.php?user=13255
or if you visit blitzbasic
http://www.blitzbasic.com/logs/userlog.php?user=13255

There you go.


bye
Ron


Ploppy(Posted 2014) [#149]
Thanks very much Derron, I couldn't find it but I don't know why. I did follow Steve's instructions, but I guess I messed up somewhere. I'll have a look at it...


GfK(Posted 2014) [#150]
@GF: Just leave Ploppy to get on with it and stop hounding the guy - he's already said that you only yesterday and you're completely ignoring his polite request. Contrary to what you appear to believe, he is not making this just for you and probably has a life of some sort beyond this forum.

Stuff gets done when it gets done.


Guy Fawkes(Posted 2014) [#151]
^... :)

Ploppy, I'm sorry you think I'm bothering you, but I'm not. I'm just asking if you can =eventually= fix some of the small problems with Hardwired.


virtlands(Posted 2014) [#152]
LOL, how does one start a worklog btw? I really have no idea. I tried snooping around on the forum but couldn't find a link...

I just discovered this, --> https://conceptboard.com/


Ploppy(Posted 2014) [#153]
Ploppy, I'm sorry you think I'm bothering you, but I'm not. I'm just asking if you can =eventually= fix some of the small problems with Hardwired.


GuyFawkes, in answer to your question I will ask you one in return. Do you think that I can eventually fix some of the small problems of hardwired??

Now I will elongate on this subject....

Do you think that every day I eventually fix some of the small problems of hardwired that you would not even be aware of??
Do you think that I have fixed an incredible amount of problems in hardwired that were real problems affecting both performance and memory consumption and that you will not even have noticed but were there??
Do you think that anyone, given a little time and effort is capable of defeating any problem presented before him or her, no matter who the person is of how big the problem just as long as it is possible according to the laws of physics and that the person in question is in good physical and mental health?

If the answer to this is a possible "yes" to all three why not just leave it as that and see what pans out??

Seen what I have already managed to pull off in hardwired over time don't you think that I will be able to pull of something seemingly relatively simple over time?. If you have trust and patience in my abilities given my track-record so far, I don't think you even need to answer this question because you should know the answer to it already. If this is the case, perhaps letting yourself go to this very same trust and patience could be very beneficial for both of us to give me time to breathe...


Kryzon(Posted 2014) [#154]
The egos in this thread — from all parties — are occupying a space that should be left for professionalism.


BlitzSupport(Posted 2014) [#155]
@Ploppy: please don't be put off by the minority.


Steve Elliott(Posted 2014) [#156]
Yep, just post a worklog...Now you know where ;) And tell people, here are my updates...Bugs only on feedback please, I'm following my own priorities...But I'm sure I'll eventually add any feature you're after.


Derron(Posted 2014) [#157]
Seen what I have already managed to pull off in hardwired over time don't you think that I will be able to pull of something seemingly relatively simple over time?.



Wow... so you are sure, without looking at the code, that the bug is a simple and straight forward solveable one? Sometimes bugs base on simple misconceptions and if you finished building your whole foundation you have to replace one the code bricks at the bottom: good luck not creating new bugs then.

Take each bug report serious - else you might run into a deadlock as nobody will early adopt your code.


I know you put a lot of effort into something and people cannot force you to do things, but keep the above in mind when doing things. Fixing bugs is the most boring and tedious kind of work done with code. I enjoy adding features, but bugs need to get fixed first (except you researched already that this bug is because of another thing which is subject to get changed soon).

PS: I experienced that many times now: people recognize bugs I am not able to reproduce on my dev computers ...but then after deep investigations and trial-and-error (to force erroring out/crashing) it is mostly something simple hidden in very old code (sometimes 5+ years ago) which is now - in combination with new code - is producing faulty results (happens if you do not unittest everything).
So save your time of "later" with researching reported bugs "now"... and yes I am aware of many bugreports being bugs in front of the screen instead of your code.


bye
Ron


Ploppy(Posted 2014) [#158]
Hi Ron, for the 'bug' in question I already know how to fix that one. I don't even call this one a bug personally because I designed the function to change an existing window's title name - so it was deliberate. All GuyFawkes wants is that dxAppTitle changes the name of a window before the window is created. Seems straightforward enough to me. I am just not yet devoting the time it needs to it, that's all. It's understandable I have my own priorities.

If you don't think I take bugs seriously you should have seen I pretty much devoted an entire thread to a bug concerning textures six months ago. I didn't give up on it and I got there in the end. This was a major bug, so I gave it a high priority. Sometimes I do even come to dead ends with bugs, like everybody else I would think. If I do, I leave it after a certain amount of time and come back at a later date. Giving it time for reflection sometimes helps and when you come back to it the bug can be staring you in the face. Sometimes a bug can also have a domino effect on other code too. It can also even be beneficial sometimes to begin on new code, as this can purely by chance, help reveal the source of the bug.


Ploppy(Posted 2014) [#159]
An updated version of the hardwired help files is now available. Again this is based on the b3d help system, and includes all the classic b3d commands as well as the new hardwired commands.

The category and a-z system now function just like with b3d. Just unzip this archive into the blitz3d help folder. Remember to back up your help folder before just in case.

Please note, now that the framework for the help system is up and running I decided to upload this version so people can make use of it. The hardwired commands have been categorised (some new categories too), but some hw commands are still missing their descriptions. In these cases you should have a blank help page exaplaining that the page it is in construction. Now I have this framework, all I need to do is write these descriptions... phew!!!



Hardwired help files

Hardwired userlib / Command list here / List in Excel format / Libvlc dll's here




Ploppy(Posted 2014) [#160]
Stop press...

I have now included direct access to the help pages on my web site....


Hotshot2005(Posted 2014) [#161]
Excellent Documents Ploppy :)


MadJack(Posted 2014) [#162]
Ploppy
@MadJack - Could you send me an example of your dxLoadTerain problem please,
It's just when I go to run test10d.bb or test9.bb - so it's not anything I've customised.

<edit> just tried downloading and running again in BB (making sure to update my decls) and same result - memory exception error on dxLoadTerrain


Ploppy(Posted 2014) [#163]
Okay - error found and new update uploaded, thanks for your help MadJack...








Ploppy(Posted 2014) [#164]
New help update,
The B+ version of the Hardwired Help files are now available in both downloadable and online versions. Just like the b3d version, just unzip the folder to your blitzplus/help folder. You may wish to back up the folder beforehand.

I am still in the process of writing the individual help descriptions for each of the new hardwired functions/commands, so sometimes in the help system you will just have a blank page for the moment, nothing more. But I'm working on it...

I have now taken out the excel list of commands from the site, these help files should nicely replace it.







Derron(Posted 2014) [#165]
Feel free to decrease the size of your signature... and maybe a bit less offsensive (regarding color choice). Looks a bit odd if you post a one liner ;D


bye
Ron


Ploppy(Posted 2014) [#166]
I may be able to find a non-agressive pink from my easel :D Are we talking about the color of the buttons or the color scheme of the HW help files??

I do not however consider this is a my signature, as it is not systematic. You may notice that I include my footer ONLY when I release a new update. Other simple posts such as this one, you will also notice, do not include this. So for updates, I do want to it stand out from the rest. But, your comments are taken on-board nonetheless. Thanks for that Ron.


Rick Nasher(Posted 2014) [#167]
@Ploppy: a few questions..

1) Does instancing use some special GPU/DX9/DX11 features/requirements? Cos up till now I haven't been able to make it work on my system(no dwarfs showing).
2) If so, does this also apply to maze.bb DX9 mode? Cos the dwarfs in there are only popping up before the camera (seemingly) random, but most of the time they never show up at all. This while the same example in DX11 mode is working OK.

As this is an ongoing issue at my system, my best guess is that it's hardware bound cos I don't hear anybody else mentioning the same problems except Osoko:
http://www.blitzbasic.com/Community/post.php?topic=102736&post=1232195

It would be interesting to compare specs of his system(so if you are reading this Osoko).
HW: Intel Core 2 Duo T5550 @ 1.83GHz, 3GB RAM, NVIDIA GeForce 8400 GS.
SW: Win 7 Ultimate X64, Blitz3D 1.106, FastExtension 1.17.


MadJack(Posted 2014) [#168]
Ploppy

Happy to report the terrain is being created now - no mem execption error.

However, and this is something I noticed before but thought it was the example code (but it isn't), the terrain doesn't move relative to the camera moving. In other words, it renders/appears frozen at the same angle/distance regardless if the camera is rotated/moves.

<edit> maze_horror.bb
Is unworkably dark under DX9 - no flashlight circle visible - just the wall ahead as a whole, very dim.

Works under DX11 - however still some flickering. Dwarves appear as expected.


Guy Fawkes(Posted 2014) [#169]
I'm LOVING the progress that's being made with this! :D I shall test some stuff for you guys a bit later. Working on my own DLL right now :D


LittleDave(Posted 2014) [#170]
Dreamotion @GF.

What dll you got cooking there Guy Fawkes.


MadJack(Posted 2014) [#171]
DxPointEntity doesn't seem to be quite right.
Example below, the camera seems to be pointing at 0,0,0 regardless of the target having been moved.

dxGraphics3D 1024,768,0,2 

dxApptitle "Direct x 9 test window"
dxShowMouse
 
cam=dxCreateCamera(0)
dxCameraRange cam,1,1000
dxPositionEntity cam,0,0,-20 ,1

ob = dxCreateCube(0)
dxMoveEntity ob,0,3,0 


Repeat

	dxPointEntity cam, ob,0	
	
	dxRenderWorld 0
	
	dxFlip 0

Until dxKeyDown(1)

End



virtlands(Posted 2014) [#172]
For G.F.
Here's an experimental metaprogram that converts Ploppy's
Hardwired.DECLS into working Purebasic PBI files .

http://uploadingit.com/file/ejsmzar6n9k19fpz/HardwiredDeclsToPBIproject.zip

In Summary,
run HardwiredDeclsToPBI.BB; It shall read the DECLS file, and generate 3 include files,
{ Hprototypes.pbi, Hglobals.pbi, HGetFunctions.pbi. }

These 3 files are then accessed by Hardwired.pbi


Guy Fawkes(Posted 2014) [#173]
@LittleDave: I'm making something that makes ALL game-like functions in PB, regardless of 2D OR 3D, easy as pie to use. :)

I'm SICK of things malfunctioning in PB, because PB's functions work a little weird. :3


Guy Fawkes(Posted 2014) [#174]
Virtlands... Ploppy. YOU COMPLETE ME! O_O XD ROFL!


Derron(Posted 2014) [#175]
@Ploppy & Colors
I talked about the colors of the "buttons" in the postings. And I recognized that the signature is different but there are people "manually" adding text to have "random signatures" in each post. Maybe use something less offensive (colorwise). Also I think todays browsers accept PNG and alpha channels, so you can use anti-aliased graphics on transparent backgrounds.


bye
Ron


Ploppy(Posted 2014) [#176]
Hi all, I'll keep it short because writing at work using mobile...

@Rick - No, I do not think it is your machine. You see no improvment for instancing for I have done no more on it since your last post on the subject. I decided to begin on user created shader commands. That way I can test out my hw shaders and perhaps see where the problem comes from. I have almost finished with base commands for user shaders. After that, I will be testing anew. For me, no question, your machine CAN handle instancing. It's my sloppy programming that's at fault.

@MadJack - Think I know where the problem lies with that. I'll fix that tonight. Thanx for test program.

@Derron - But they are png files. See the rounded corners of the buttons? That's alpha masking my friend.


Derron(Posted 2014) [#177]
You use single color transparency (like with GIF). alpha channels provide you with 256 transparency values - so soft shadows and anti-aliased lines should be possible. Your "curved border" looks jagged and like a hard cut-out.

I made a quick example (using similar "vibrant" colors and a not-so-subtle drop shadow) so you might see the difference to "1 color transparency" and "256 color transparency".
Todays buttons designs are flat ... but wait 10 years and gradient+shadows maybe even "beveling" will get "in" again.




PS: your buttons also have multiple variants how to write "b3d" or "b+" (capsed and noncapsed).

bye
Ron


Ploppy(Posted 2014) [#178]
Nice buttons. Quickly done too... This is not your first time I'm guessing, right??


Derron(Posted 2014) [#179]
As I have to create the graphics for my games on my own I have learned a bit here and there over the years, but still far far away from real artists. And to be honest: my "design favorites" are somewhat pre-2010 (i like gradients, light shadows, insets ...). Such buttons are really easy to produce if you use tools like PhotoShop (I have a really old CS1, but it does what I want from it): vector rectangle with rounded corners, multiply-gradient-effect (so a base color defines the "button color"), a drop shadow with adjusted values, text and "icons" are drawn "multiplied" (so they can be grey but get a color mix of the underlaying color).
Most time consuming was looking-writing what you have typed on your buttons.

When doing such things for websites you nowerdays even do no longer need a picture as CSS can handle it already (gradients, shadows and multiple "layers" with :after and :before).

If you have Photoshop: here is the PSD file


bye
Ron


Ploppy(Posted 2014) [#180]
Thanks Derron, am I free to use them? If so, I think I will - however I see the top two buttons in a green. I do have ps, that's what I did the previous buttons in (5-min quick job.)


Derron(Posted 2014) [#181]
You can do whatever you want with it (as much "Public Domain" as possible). Only problem you might have: TheSans is a commercial font, so you have to use another one (except you have that font installed).

bye
Ron


Ploppy(Posted 2014) [#182]
Cheers Derron, I'll get that sorted out in the next day or two. Same goes for a worklog, it does seem like a good idea. I will not abandon the forum, as it is a priceless resource for user feedback. But all updates will appear in the worklog, the bug reports an general chit-chat will stay here...

@all - New update made to help system (both online and zip versions) - the help system acts even more like the blitz original system and commands have been alphabetised. I have also added some command/function descriptions. More to come...

@MadJack - The bug has now been corrected and tested for dxPointEntity, new HW update out. Thanks again for bug report.... and sorry for bug....

@GuyFawkes dxAppTitle now works before or after a dxGraphics3D....enjoy.... btw, you were on about loading textures directly from a b3d mesh. I have almost finished this, but I don't have any of these kind of models to test. Do you have an example b3d mesh that has texture references in it, so I can test please...?







MadJack(Posted 2014) [#183]
Ploppy

Not there yet I think unfortunately.

The code below should see the camera orbiting the target but continuing to point at the target. Instead the target appears to drift up/down.

If you convert the code below to B3d code, you'll see that the target remains centred.

dxGraphics3D 1024,768,0,2 

dxApptitle "Direct x 9 test window"
dxShowMouse
 
cam=dxCreateCamera(0)
dxCameraRange cam,1,1000
dxPositionEntity cam,0,0,-20 ,1

ob = dxCreateCube(0)
dxMoveEntity ob,0,3,0 


Repeat

	dxMoveEntity cam,0.1,0,0
	dxPointEntity cam, ob,0		
	dxRenderWorld 0	
	dxFlip 0

Until dxKeyDown(1)

End


Regards test10d.bb:
The terrain is still frozen but additionally the dwarves are now solid black.

Let me know any further testing I can do.


Guy Fawkes(Posted 2014) [#184]
@Ploppy: Yes sir! :)

http://www.psionicgames.com/downloads/dwarf.zip

Use dwarf1.x in the "X" folder.

Also, thank you SO kindly for fixing apptitle! :D

Good news as well! Thanks to Virtlands, I got Purebasic Hardwired working! :D

Sincerely,

~GF


Ploppy(Posted 2014) [#185]
@MadJack - I have to admit I didn't check any more than with the test you had sent me. I'll sort that out tonight.

The stuff with the funny terrain/badly rendered dwarves I am aware of and is a work in progress. It is part of my hardwired shaders routines and not yet fully functional. Not to be confused with my user shader routines that do not use the same system.


Rick Nasher(Posted 2014) [#186]
Hmm latest update seems to restore an earlier situation in maze.bb.
DX9: Dwarfs now appear more frequent again and even close up. They do disappear though when moving the cam

DX11: Contrary to previous version, now the flickering of the walls is very present, almost like in a lightning storm.


Guy Fawkes(Posted 2014) [#187]
Hey Rick, I added you to yahoo IM. I'd have PM'd you on here, but this forum doesn't have private messages unfortunately. Sorry to temporarily hijack the thread, Ploppy. :)

Continue on then ^_^


Ploppy(Posted 2014) [#188]
@GuyFawkes, no probs - I'm not that posessive :)

@MadJack : I won't be releasing an update for dxPointEntity tonight. This bug discovery has led me to discover another discrepancy. I have to sort this out first for my dxPointEntity is dependant of it. So, I am working on it, and I feel that I've almost even cracked it. With a little luck, I'll release somthing tomorrow. In fact my quaternion/euler conversions are a little off so I am redoing them... I'll keep you in touch


Guy Fawkes(Posted 2014) [#189]
Thanks ALOT, Ploppy! :) Does that Dwarf help to find out the mystery of the black loaded 3d model? :)


Guy Fawkes(Posted 2014) [#190]
Hey ploppy, could you possibly add:



Also, dxGetEntityFX() says "Illegal Type Conversion".

Just thought I'd ask because conversion of my project was going well until I ran into this ><

These are literally the last 5 commands that are needed to finish my program conversion completely :)

If you need more information, I will gladly provide it for you. :)

Thanks alot, Ploppy! :)

Sincerely,

~GF


LineOf7s(Posted 2014) [#191]
These are literally the last 5 commands that are needed to finish my program conversion completely :)

Rubbish.

For the love of all that is holy, stop asking for commands before he pulls the pin on it altogether.

Oh the things I'm saying but not typing...


Ploppy(Posted 2014) [#192]
@LineOf7s - Lol

@GF - The entity color functions are already there (not using the funky name you gave them though) since a good while, check them out in all thier glory in HW help, 'Entity State' category. This is one good reason why I decided to do these help files, so people could see if these commands do exist or not.

The dxGetEntityFX() problem is just a typo in the .decls, just change the line

dxGetEntityFX(entity%) to

dxGetEntityFX%(entity%), and it should work....

And of course, if you felt like not waiting for me to add dxGetEntityShininess to HW, you could just do a workaround in blitz - just save the value to a variable every time you do a dxentityshininess call, for example. You could of course do the same with the other commands, if they didn't already exist in Hardwired. Just a bit of imagination needed here, a priceless tool which is more powerful than any programming language...

So, you see, there is nothing really holding you back at all... :D


Guy Fawkes(Posted 2014) [#193]
Ignoring the trollz (you know who you are), thanks Ploppy for the help :)


Ploppy(Posted 2014) [#194]
Here we go again...


Guy Fawkes(Posted 2014) [#195]
So Ploppy, I got Hardwired running on Purebasic, but I'm not sure if it's running correctly per-say. But I was able to get it to stop crashing. It just shows a black screen with no 3D. Thought I'd post this so you can take a look at it and judge for yourself. :)

Here's the zip file:

https://mega.co.nz/#!clpEnTaC!4zka-IdPtCSY0Q1g7jpE8AmYcHZMkkeFfC4NxlnkU4U

The forums won't let me turn it into a link using "...", so you'll have to copy & paste. Sorry for the inconvinience.

Enjoy! :)

Sincerely,

~GF


Ploppy(Posted 2014) [#196]
Hi Gf. I'm glad you're making some progress with Pb; but like I said you're on your own with this one. I'm sticking with blitz.

Good luck with that one, in any case...


Guy Fawkes(Posted 2014) [#197]
Hey Ploppy. With your permission of course, I would like the chance to post onto the Purebasic forums, the Purebasic Hardwired. I will of course give credit where credit is due.


Ploppy(Posted 2014) [#198]
Fine by me, in fact it makes sense to keep PB related matters in Pb's forum and blitz stuff here. All I want is that you do not modify the dll, including its filename and of course like you said due credit. The rest is your thing.


Guy Fawkes(Posted 2014) [#199]
Thanks alot, Ploppy! :)


Guy Fawkes(Posted 2014) [#200]
Hey, Ploppy. There is an internal bug in Hardwired that I just found. In the function "dxGetBrushTexture", it won't let me use any parameters which is causing the entire program to crash completely. Even if I try to add the parameters to it in the userlib which are missing, it still crashes.



The above is the example from the regular blitzbasic docs which I checked also matches EXACTLY to the hardwired docs.

Here's the function I made that crashes:



Thanks again for the help, Ploppy! :)

Sincerely,

~GF


Ploppy(Posted 2014) [#201]
What help?


Guy Fawkes(Posted 2014) [#202]
Just the fact that you MADE hardwired is a HUGE help to me :)


Ploppy(Posted 2014) [#203]
Nice to hear that, but for the moment it is pretty much only capable of doing what b3d already does - and that not completely either. If I get it finished however, especially with shaders up and running and dx11 capabilitites it will surpass b3d.


virtlands(Posted 2014) [#204]
@Ploppy :
What help?

HA! That's a good one.

Ploppy's 'help' section:




Guy Fawkes(Posted 2014) [#205]
@Virtlands: I tried that already with no parameters. It still crashed at that line... :/


Ploppy(Posted 2014) [#206]
There are probably a lot of other things quite likely to cause a crash in hardwired. The scope of the project is huge, and it will take me time to perfect the code and eliminate loopholes. So expect more bugs, as they will come. But do not expect me to deal with them right away, I have my own priorities with hw developement - if I get sidetracked all the time I won't get much done and the developement risks to become very stunted. Bugs will be noted, but I will follow my own pace - I have to.

It is also to be noted, this I have already stated that I have never ever released anything completed. I have only ever relesed one other thing in the past on to the net(chipmunk is in hibernation but I do wish to continue with it some day), but this is not complete either. GuyFawkes, I will tell you this, please do not put all your eggs into one basket. Although I have a lot of motivation for hardwired and have got quite far with it, I am to all intents and purposes a beginner in this field with no track record or experience. I do want to finish HW and I want it to do well. But I can garantee nothing whatsoever. I have never lied about that and I have never made any promises about hardwired's future. I want it to succeed, sure. But I must keep my feet firmly on the ground. Please do the same and remain realistic about it all. It is possibly a project that I am just not capable of finishing. I really will give it a good shot, and I refuse to give up a project that I have spent so many hours developing; that would be a waste of time. But who knows, perhaps at the end it is just too much for me.

What I need is time to perfect it all, and concentration. The more I have of both the more likely that hardwired will get somewhere. But I will very shortly be taking another break from it. It's hot summer weather now -outside time, it's the school holidays - gotta keep the kiddies ocupied, and I will be on holiday myself - going up to London to see my brother. So hardwired will probably sleep for a good part of august. Hardwired is a very ambitious project but when it comes down to it, it's not going to take 5 minutes to complete.


Guy Fawkes(Posted 2014) [#207]
@Ploppy: Don't EVER give up! No matter HOW hard it gets. Even if people troll you, or hassle you, or say you can't do it, don't let them get to you. I haven't, and it has gotten me to the point now of finishing the final touches to my program. :)

You are doing a GREAT job & you DESERVE this, Ploppy. You really do.

Thank you for doing this & continuing on.

Sincerely,

~GF


Ploppy(Posted 2014) [#208]
I really am fine with hardwired's developement, rest assured. Dont worry about that, but it'll take time. I am very very confident about that.

If however it does become too much (who knows) I WILL give up. If I realise it is really impossible after trying all I could to solve bugs and I just can't solve it, I will happily give up; saying 'well I gave it a good go, in any case'. I am not going to drive myself mad writing hardwired. That's all.

Hardwired for the moment is very much in developement, much will change, some functions will even disappear (not the b3d commands, they definately will stay). I have much to fine-tune and to add. Just do not put too much faith in my abilities, please. I am not in any way feeling pessimistic, but realistic - I know that anything can happen. And since I am not charging anything for hardwired I have nothing to lose by saying that at any moment hardwired could become a lost cause. I do not at all wish this but I have learnt that anything is possible and life is very ready to send us some very unexpected surprises from time to time. The show's not over until the fat lady sings - for HW that dame is not even in the building for the moment! There still is a lot to be accomplished.


virtlands(Posted 2014) [#209]
@Ploppy. There's no rush; I barely understand 10% of DirectX topic.


Guy Fawkes(Posted 2014) [#210]
Speaking of DirectX, is there a function (in regular blitzplus) or a DLL, which can mimic "SystemProperty$("Direct3DDevice7")" ? I tried SystemProperty$(), but that didn't work.


Rick Nasher(Posted 2014) [#211]
@GF (Of topic, just a brief one): Dunno if you were serious, but haven't been on messenger services for years.. sorry. But I should reconnect to some any these days yeah. I probably lost a lot of contacts when they pulled the plug on MSN(didn't check, life was too hectic).


Guy Fawkes(Posted 2014) [#212]
Off topic same as above: @Rick Nasher, do you have Skype?

Ok, continue on :)


Ploppy(Posted 2014) [#213]
Speaking of DirectX, is there a function (in regular blitzplus) or a DLL, which can mimic "SystemProperty$("Direct3DDevice7")" ? I tried SystemProperty$(), but that didn't work.

BlitzPlus doesn't use directx7


Guy Fawkes(Posted 2014) [#214]
Thanks, Ploppy :)


Ploppy(Posted 2014) [#215]
New thread...