Hardwired/Hybrid - DX9 and DX11 Userlib(Part XIII)

Community Forums/Showcase/Hardwired/Hybrid - DX9 and DX11 Userlib(Part XIII)

Ploppy(Posted 2015) [#1]
For beginners to Hardwired or Hybrid, don't hesitate to refer to this link for a guide and FAQ.

New worklog entry - GUI Menus now added

Just so you know, Hardwired has just gone over the 800 function count (not including default Hybrid 2d command set), and still a lot to do...yikes!


Hardcoal(Posted 2015) [#2]
Do it with love :)


Ploppy(Posted 2015) [#3]
Love for Blitz


Rick Nasher(Posted 2015) [#4]
Absolutely Smurftastic!


Finally Blitz3d and BlitzPlus got married. This is in my opinion how Mark should have done it in the first place(was always bit disappointed it was separate). Gone is the need for external GUI extensions in one blow. Small remark: I had to change the code in gui_test.hb into below otherwise it would close all in blink of an eye(or before I could say close):
UncheckMenu chk
;DisableMenu disable



Steve Elliott(Posted 2015) [#5]
Yep...But Mark has become a language snob in my opinion...For all the added complexity, it's all about the economy, stupid...I mean graphic and sound capabilities!!


Rick Nasher(Posted 2015) [#6]
@Steve: Well, Mark is a brilliant coder I'm sure, but perhaps he should have listened a bit to his main audience and done Blitz3d 2.0 before he wandered off to spin-off's. But perhaps it wasn't that simple. He had a good idea foreseeing multi-platform and OOP was a good thing. Nevertheless like most bands that have a big hit they forget the origin and why it was such a big popular hit and try different styles, which may or may not hit it off with the public. This is where the niche is.


@Ploppy: To come back to the IDE improvement question(if relevant right) now:

1. Collapsable functions a la ideal and other modern editors(if easy to do).
2. Preview gfx/models/play audio when doubbleclicking on the file names in code. Just sent to MediaView in the bin folder or MS Paimt. Dunno for audio, perhaps your own player? Or better yet: allow to set the default player for certain media types in IDE preferences. Of course it doesn't know where all files indicated by filenames are residing so would only work on full path names, unless there's a new standardized Assets pane where to pick files from.(this might be too much a hassle so for time being and quick implementation, make it work on files with full path specified in code only).
3. In respect to above: add possibility to set preferences for Project and Asset folders.
4. If do-able allow these prefs to be set in a pane by selecting a "Preferences.." menu item in the "Help" menu section, along with other settings such as colors.
5. Of course the obvious Compile X64 menu item.
6. "Select icon.." for the compiled project .exe, making use of the recently introduced Linker directive.


Think this is enough(for now). :-)


Hardcoal(Posted 2015) [#7]
Mark is doing a lot of none sense (In my opinion..) while doing genius things at the same time..

He is a bit weird to me..
I cant get his goals.. and obviously money aint one of them..

Instead of releasing each time a new language
I would concentrate on one.. and improve it..

By this time he should had a great Blitzmax/monkey type of language..
with an Editor similar to Unity..

++


Guy Fawkes(Posted 2015) [#8]
LONG LIVE BLITZ3D / HYBRID / HARDWIRED! =D


Yue(Posted 2015) [#9]
Power full HYBRID.
http://www.yalosabes.com/images/animales-hibridos-01.jpg?6672a2


Ian Thompson(Posted 2015) [#10]
Its beginning to feel like less of a hybrid and more of what Blitz 2 should have been... :D


Panno(Posted 2015) [#11]
Hi Ploppy ,

i need you email for personal reasons.


Ploppy(Posted 2015) [#12]
Hello Panno, no probs - if you wish you can contact me on my Hardwired facebook page....


Ploppy(Posted 2015) [#13]
Gui event commands have now been added to Hardwired...


Ploppy(Posted 2015) [#14]
Just added a new little demo to prove that 3d and gui really do mix. You can try gui_test2.hb. Go on, check it out!

Another little update, I have just corrected a few bugs in the event detection code, looking solid now. Let me know if you see weird stuff though.

edit: just discovered a new bug in menu detection. I'll sort that out tomorrow. still, 3d with gui demo worx fine...

edit edit: ok, sorted...


Rick Nasher(Posted 2015) [#15]
I like this very very much.

Question: Can the gui stuff be used from Blitz3d+Hardwired dll right away for intro screens or frontends (for settings,resolution etc) and then used within 'normal' Blitz3d code or is it only approachable when working fully under the full blown Hardwired routines. I'm guessing this is the case for you probably needed to hack into the existing gfx routines?

If it is useable like that though then Harwired would from now on already be very useful to everyone who needs to write a gui, even though the DX9/11 stuff itself isn't completely finished yet.


Ploppy(Posted 2015) [#16]
I think you could mix in some respects. However any gui you create could only be placed on windows created by hardwired using the dxGraphics3d or dxCreateWindow commands. Once finished with the gui (after selecting in a main menu for example) you could close that window and open up a classic blitz window if you so desired. It should work I reckon.


JanDK(Posted 2015) [#17]
It's very exicting times to be a Blitz geek - I must say!!!


Guy Fawkes(Posted 2015) [#18]
Or, u can create a borderless window, and make it LOOK like it's attached to another window.


Rick Nasher(Posted 2015) [#19]
Interesting.. Looks like Blitz3d is outgrowing it's old clothes/breaking out of the box.


Guy Fawkes(Posted 2015) [#20]
Did anybody think of THAT? ;) :p


RLpacifist(Posted 2015) [#21]
I usually don't do oneliners, but this is just awesome! Keep it up Ploppy! :)


videz(Posted 2015) [#22]
awesome update Ploppy, keep it up :D


Ploppy(Posted 2015) [#23]
An all round question for anyone that frequents this thread - does anyone amongst you use a 64-bit pc? I will need testing. Thanks in advance


therevills(Posted 2015) [#24]
does anyone amongst you use a 64-bit pc?


I would have thought most people do these days...


Ploppy(Posted 2015) [#25]
Unfortunately, I don't. My compiler can of course compile 64-bit files, but my machine cannot run them. Ironic, and frustrating.... :'(


therevills(Posted 2015) [#26]
How old is your CPU? Mine is over 5 years old and supports 32bit and 64bit operating systems. I've got Windows 8.1 64bit currently installed.

I can test for you if you want.

Check out the windows verison stats on steam http://store.steampowered.com/hwsurvey?platform=pc


Ian Thompson(Posted 2015) [#27]
Windows 7 Home Premium 64 bit here.


Ploppy(Posted 2015) [#28]
Here's my system...

Intel Core2 4300 1.80GHz @ 1,8 GHz
MMX SSE SSE2 SSE3
2GB System RAM
NVIDIA GeForce 9600 GT
Windows 7


Ploppy(Posted 2015) [#29]
New worklog entry - First attempt at 64-bit version


BlitzSupport(Posted 2015) [#30]
That looks to be a 64-bit processor, Ploppy, so I assume you're just on 32-bit Windows... with 64-bit Windows you should be able to run them.

Intel Core2 4300

OK, so Windows isn't exactly cheap...


Rick Nasher(Posted 2015) [#31]
Win 7 Ultimate SP1 x64.
Intel Core2 Duo T5550 @ 1,8Ghz
3GB RAM
NVIDIA GeForce 8400M GS

TEST:
1. Started Hybrid.exe.
2. Tested as you suggested:
Print "hi"
Delay 1000
End

3. Pressed Play x64 button and got msg: "Unable to open linker.dll".
4. Pressed Play (x32?) button and compiled fine, output "hi" on black window for 1 sec.

- Can it be buttons are mixed up? For I would expect the x64 version to use the linker_x64.dll file. Same in menu's by the way.

Other things:
- Like the new icons very much, my compliments, only for "close" button I would rather use a trashcan for clearness, but that's personal taste.
- Like the Change Background color option, but it affects only the newly opened tabs. This has the nice side effect that you can have differently colored tabs for recognizing where you are quickly(until you close the IDE probably).
- The FAQ. *Me likey* ;-) Only colors are bit too bleached I guess. And of course the content needs an update, but need to find the time.
- You were mentioning the omission of DirectPlay. Coincidentally I posted a question regarding that topic(perhaps in the wrong section):
BlitzPlay,UDP,TCP=DirectPlay=obsolete in new DX? Perhaps you can enlighten me?


BlitzSupport(Posted 2015) [#32]
Doing a 64-bit build tells me it can't find linker.dll, whereas 32-bit works fine -- I see a "linker_x64.dll" in \bin but apparently it's not trying to use it.


Ploppy(Posted 2015) [#33]
Thanks for the feedback. Indeed, I did forget to program the compiler to use the 64-bit linker dll and not the 32-bit. I have now corrected that error, and another one related to the 32 and 64-bit runtime dll.

@Rick, I confirm that the first arrow is for compiling the 32-bit version, the second for the x64 version. F5, like always will compile the 32-bit version of the file. At present, I have not programmed a keyboard shortcut for 64-bit compiling, so just use the icon or menu.

DirectPlay was taken out of directx somewhere around 2008 if I recall correctly. There is from what I understand a x64 version of this dll but I can't seem to find it. Maybe I just heard wrong, though. In any case, dplay is depreciated, I'll have to look for another way to access multiplayer functions. I'm not worried though, I'll find it.


Ploppy(Posted 2015) [#34]
@Blitzsupport - you could well be right about my pc - I had no idea, I always assumed it was an x86 processor but checking out what the net says about my pc it is capable of using the x64 instruction set. I feel so stupid. You're a marvel, James. Thanks again ;D


Ploppy(Posted 2015) [#35]
I have just found a good utility that confirms your suspicion that my processor is indeed x64 capable. As Mr Ice Cube esq. once said, today was a good day.... cheers


Ploppy(Posted 2015) [#36]
Now listening to Ice Cube - ah the memories...


Rick Nasher(Posted 2015) [#37]
As long as it isn't Vanilla Ice you have my blessing.. Ice, Ice, babe. :0)
Never would have guessed though, didn't think you were the type.
Must admit that song didn't ring a bell right away, until I saw the Boys in the Hood scene(GTA flashback too). My girlfriend is more familiar with it, but hey she's from Guyana in the Caribbean so that don't count. lol
Perhaps time for a Dreadlock Holiday.. Cheers dude.


Ploppy(Posted 2015) [#38]
Lol


Ploppy(Posted 2015) [#39]
Any luck then with the x64 version?


BlitzSupport(Posted 2015) [#40]
:(

---------------------------
Hardwired error
---------------------------
Cannot lock onto module - serious stuff!
---------------------------
OK   
---------------------------


Again, 32-bit's fine...


I have just found a good utility that confirms your suspicion that my processor is indeed x64 capable. As Mr Ice Cube esq. once said, today was a good day.... cheers


Ha ha, free upgrade!


Ploppy(Posted 2015) [#41]
Cheers for the info - in some respects I consider it a mini victory to get that far with the x64 version without being able to test it. Once I get Win64 installed on my system (for which I am very motivated - A new version of windows is much less expensive than a whole new pc after all so I'll probably get that installed this weekend or so...), I will get this all sorted out.


BlitzSupport(Posted 2015) [#42]
Just noticed it said "Cannot find teapot resource" after that, then the "cannot lock onto module" twice again after that. Whether or not they relate to it failing to find the teapot, I don't know. (The 32-bit version presumably finds it, so maybe the 64-bit isn't looking in the right path? This is test11, BTW.)


col(Posted 2015) [#43]
Hiya,

I thought I'd have a play with this to help get by on a lazy Friday evening.
The icons in the editor don't appear to render correctly -


I also get the same error as BlitzSupport.

It also seems that you might not have compiled the Hardwired.dll as 64bit too?
You will need 2:- one for the 32 bit apps and one for the 64 bit apps.

[edit]Asus N56VZ Win7 x64[/edit]


Ploppy(Posted 2015) [#44]
Hi col, the icons are 'greyed out' by windows if they are not currently active. For example when you run the ide and have no current open project the save icon will not be useable so it will be inactive until you open or create a project. I plan to improve the greyed-out version.

Hardwired.dll will not have a 64-bit version as I explained in the worklog. From what I see there is no point in it because hardwired is effectively a userlib for b3d/b+, both of which are 32-bit. This makes a 64-bit hardwired incompatible with B3d/B+. Hybrid however contains a 64-bit version of hardwired as hybrid can compile in 64-bit (or at least soon it will - some bugs to iron out), so compatibility is retained.


col(Posted 2015) [#45]
Ahh I see,
I've not really followed every forum thread ( or all of your worklog - that'll teach me :D ) and now everything is clear, and I apologise for you repeating yourself.

I have a few questions because this is an area that I'm interested in and I'm curious on your approach...

Is the 64bit app using x64 opcodes? Does it use xmm registers etc? Are you rewriting the code generator ( possible from scratch ) to take advantage of the x64 assembly instructions?

Cheers.


Ploppy(Posted 2015) [#46]
Pretty much 99.9 percent of the code is written in c++, so I do not need to worry too much about opcodes. I do however have to respect the change in the size of address pointers in my code or else it will crash. Otherwise, visual studio takes care of the rest, compiling both x86 and x64 versions.

There is a little bit if asm code in the sorce, this is the tricky part, and I do not yet know if I have successfully converted it for the x64 opcodes. Once I have installed win64 and vs, I will run extensive tests to see if I have or not.


col(Posted 2015) [#47]
Oh,

I thought that the standard Blitz3D compiler generated 32bit assembly from the programmers source code? and my understanding is that you've modified the internal runtime for the later versions of DirectX?. And now you've modified it further for 64bit apps too.

I've only quickly glanced through the official released source from BRL so I could be completely wrong.


Ploppy(Posted 2015) [#48]
In fact, the blitz compiler does indeed convert the blitz program code into asm, this bit is the tricky part I was talking about. But since the majority of a compiled code assigns values to registers and then calls precompiled routines that are written in c++, the asm part remains small (yet essential of course) compared to the scope of the entire source.


col(Posted 2015) [#49]
Thanks for confirming the x86 code generation for the user code.
I just looked again myself too to confirm my suspicions.

Knowing that... tbh I think you'll need another code generator to generate the x64 code. Unfortunately it's not a simple case of compiling for x64 and everything is lovely and dandy.

Although, saying that, I would think if you correct the register allocation to take account of the Windows x64 calling convention then you could probably get it working relatively quickly, but again you'll need to cater for the couple of calling conventions that Windows x86 uses too, hence why I suggest another code generator - it will keep things simple and organised in the long run. Optimised x64 code generation is a completely different beast altogether!


Ploppy(Posted 2015) [#50]
I'm just so glad I have just discovered (thanks to blitzsupport) that my pc has the capability to test 64-bit code. That way, putting it all together will be so much easier. If I do have to recode the code generator I will do so. We'll see what we shall see but I'm stubborn enough so I won't give up easily on this...


Rick Nasher(Posted 2015) [#51]
Same results as BlitzSupport I'm afraid.


Ploppy(Posted 2015) [#52]
No probs. I'll look into that once I get everything installed. Thanks 4 your help.


Ploppy(Posted 2015) [#53]
Reinstalling windows (now x64) and everything else on top. Taking some time to get system back together. Hope it's worth it...


Rick Nasher(Posted 2015) [#54]
Welcome to the era of 64bits. No more shall the tyranny of 32 reign. ;-)


Ploppy(Posted 2015) [#55]
Still stuck on installation unfortunatly. Machine slowing down phenomenally for moment, memory and sata driver problems. Windoze is a real b*tch to install.

I'm not sure if 64-bit is gonna be confortably feasible for me, probably just pushing my machine's limits a bit too far. I may just give it all a break for a while, not enough courage for the moment to reinstall x86 windows; takes too long.


Rick Nasher(Posted 2015) [#56]
Hmm should be fine. I'm on virtually the same specs.
However I did notice that since the launch of 8 win7 appears top heavy, while before(right after clean install) it was lean and mean and ran better than X32 for like 2years. Thought was my machine too, installed crap or so, but I now believe it's in the updates.. Had similar experiences with XP at the time of 7 launch on some low spec laptops(crippled to crawling speed).

As you might have figured out by now: Yes, I'm an conspiracy theorist. ;-)
Nevertheless, heard some customers of Dell saying the same thing so. Coincidence? I think not my dear Watson.

On the plus side you can run 7 x32 in the free VMware Player on top of X64 so you can test both OS-es, plus Win10's free upgrade is lurking round the corner(July 29th), which has some quite low minimal specs. Just press the Get Windows 10 icon in the system tray to reserve your copy, it will then download itself as a win update over time so that it's ready at lauch date.

Still need to see how will work out on my system. lol. I'd backup prior to that though, given MS's track record of ffin up.
Thinking of getting a cheap SSD to speed things up. It apparently makes all the difference in the world and it still has space in the DVD bay area as under 7 the DVD stopped functioning(common issue), so I installed a SATA cradle in the bay there.

Good luck.


Ploppy(Posted 2015) [#57]
I kind of agree. I have had about 250 updates to apply all in all. Just waiting for the machine to find which ones are available takes half an hour minimum, and it all slows it down. Then with the installation of vs2010 and vs2013 (I need both for HW), my machine is almost inoperable. I'm working on it, but tempted to use another windows on my pc at the moment - a top storey one...


Ian Thompson(Posted 2015) [#58]
I've not used this but I've heard good things about it. Its basically an easy to use chip and motherboard driver database, that detects missing or outdated drivers. It's pretty big though, a 12gig download.

http://drp.su/

Maybe it can help?


Ploppy(Posted 2015) [#59]
Thanks Ian for your help. I have a optic fibre adsl line so very fast download speeds. I'll give it a shot, I've nothing 2 lose.


Rick Nasher(Posted 2015) [#60]
BTW(if you're not already): Once your install is finalized, first thing to do is create an image, so next time install won't be so painstaking.
Oh andah: Driver install software may sound nice, but I get an Russian vid on their site and usually when I hear Russian I always get a bit alerted(these guys are pretty skilled with limited means and can homebrew the world if you know what I mean) Unless you like to do Russian roulette.. :-)


Ploppy(Posted 2015) [#61]
Yep, the Russians are very talented, some can even code directly in asm (for amazing 4k demos and such). They must have binary in their blood, I think. I admire that kind of natural talent, although I do agree with you that some of thier programming can be used for unclear objectives that makes me wary also.

I currently have my eyes on a new pc, I have been playing around with the idea for a few months now but so far I have resisted the temptation to buy it. A nice 8GB system with a 3.9GHZ 4 core processor, would put an end to all my memory woes for a long time. Just trying to find the courage to click 'buy', but I'll probably decide to do so soon enough as compiling in general is just taking too long on my present machine and in 64-bit it is just unbearable.


Flanker512(Posted 2015) [#62]
Hi Ploppy, I've tried Hardwired and Hybrid, that looks pretty awesome ! I particulary liked the PhysX samples, and commands like SurfaceWireframe.

However I think I've got an issue with DX11, and I can't find answers in other threads.

If I try "dx11_test.bb", it says "too many parameters" on the command "dxUseDirectX11 True". If I remove the line it runs, but pretty sure it's in dx9 mode.

I can't run the "maze.bb" too, or if I disable "dxUseDirectX11 True" it runs but black screen and messed up fps.

When I print "dxGetVersion()", it gives "1.0.1456.0". I have the same problem if I use Hybrid instead of Blitz3d and I can't compile in 64 bits too.

Do you know what I am doing wrong ?

Here my computer specs :
Win 8.1 64 bits
CPU Intel I7-3770 (4 cores, 8 threads)
Graphics HD-7950 3go (supports DirectX 11)
16Gb of memory
Dxdiag says "DirectX 11", but I don't know the exact version.

It should run isn't it ?


Flanker512(Posted 2015) [#63]
Oh, I forgot, it says Dx11Present = 0...


Ploppy(Posted 2015) [#64]
Hello Flanker512,

Yes, I did recently change dxUseDirectX11's syntax, I forgot to tell anyone about it. This command no longer takes any parameters, just use this command to switch to Dx11 mode. I decided to go this way to help bringing in Dx12 much easier, when I get that far. This is why I have now created dxUseDirectX9 and dxUseDirectX12. The directx12 mode of course does not work for the moment, I am still waiting for it to come out, like everyone else. However, I am laying down some basic foundations for it in hardwire's code so that integrating Dx12 into it, when it does finally come out, will become a relatively simple process. The default dx mode for a hardwired/hybrid program is Directx9.

I am in the process of recoding some of my diretx 11 routines, so some stuff does not presently work, sorry about this technical hitch.

As for as the dxGetVersion() problem, the returned output is correct. This command will give you the current runtime version for hardwired, not directx.

The 64-bit bit mode is a very fresh addition to hybrid. It is on standby, and for the moment does not work either. There are some initialisation bugs to iron out, but for the moment my pc is a bit sick so I can't work on hardwired to fix it.

Thanks Flanker for your interest in my project. It will in time become more stable and complete, but I still have some way to go. I have already been working on it for a year and a half, I can see myself spending the same amount of time on it again to reach some level of completion (if I don't go mad beforehand ;D)


Flanker512(Posted 2015) [#65]
Thanks for the answer. I'll follow the progress of your project, I would use it for sure !


grindalf(Posted 2015) [#66]
Question. will this make blitz more powerful? as in will it be able to handle more surfaces, polygons, entities without slowing down?


Ploppy(Posted 2015) [#67]
Do you mean making a x64 version?


Rick Nasher(Posted 2015) [#68]
Hehehe. Been away for nearly a week(purchased my old HP DV6700 an 89,- euro's 240GB Crucial BX100 SSD for it's birthday)and I can see all still rollin here, which is pretty good to know. :-)

I'm a bit baffled to hear your system sucks at 64bit so much, but probably it's your 2GB RAM in combination with Win7's massive killer updates.

I have a desktop on 2GB which literally crawls and is used for downloads only, but it's really, really old and has an AMD Athlon XP CPU in it, while my laptop is now pretty snappy again after migrating to the new SSD.

Also ordered a 2GB DIMM to replace the 1GB DIMM of the original 3GB's in my laptop and that will also make a difference and I expect it will do the same for you. Is your RAM upgradeble?


Ploppy(Posted 2015) [#69]
Unfortunately 2GB is my motherboard's limit, so no. I'll probably end up buying another soon enough, as it has been on my mind for a while now, and I'm really tempted to try out the pc GTAV as well for which my pc is far from capable. I already have it for the PS3, but the pc version is meant to be even better and the gfx are even more stunning.

Anyways, back to the subject in hand, I have been reworking on my present pc for the past few days, and things have significantly improved using 64-bit windows. I don't quite know what I did to get rid of the lag I had, but I would say that the running speed is almost the same now as it was with 32-bit windows. So it won't be long before I'll be back compiling hardwired I think. I am still very raring to continue and if can now test out my 64-bit compilations it was worth the wait for me; although very annoying to install it all.


Rick Nasher(Posted 2015) [#70]
That's good to hear. Reinstalling can be a real hassle and an ever increasing beast. Hope you created a backup image of the current state so you won't have to go through all that again. I'm also curious to see what the upcoming end of July's 'free' Win 10 upgrade will do to our systems as it'd supposed to be lighter on the resources. Not to mention the consequences for Blitz3d/Hardwired/Hybrid. Dunno what your plans are in that direction, but I expect the majority of the population(read: our target audience) to take the plunge. But if you are wary about it than I can be a guinea pig(<--scary news & very OT link) and see what the effects will be.. (Now excuse me PETA and animal-enthusiasts everywhere, but this one really deserves to get hammered!) ;-)



Ploppy(Posted 2015) [#71]
Personally, I have to say for the moment I'm not even tempted by Win10. Before installing it, I would like to see how it runs. I hate how Win8 looks and metro is a terrible addition to Windows IMO. Great for tablets no doubt, but a pc is not a tablet. If Win10 gives the option of reverting back to the original format and completely removing metro then yes I may well install it. However, from what I understand, Directx12 will only run on Win10. If this is true and I want to use directx12 in hardwired, I will unfortunately be forced to install it.


Rick Nasher(Posted 2015) [#72]
Yup. I totally agree. Seen it running on my GF new laptop/convertable and does a nice job there(for her) having a touchscreen and all but I'm not too crazy about the interface and various other aspects(and I have to support it for work..). But also has it's plusses and improvements that are actually beneficial, like lighter footprint, lower on resources and loading time. Win10 supposed to give back the startmenu/dumps the Metro tile interface when not in tablet mode or on PC's, like it should. But we'll see.


Ploppy(Posted 2015) [#73]
Well, I'm back online since yesterday and have made quite a lot of progress. That pesky resource error is gone and I get as far as being able to run parts of the compiled code. However, I can now see I will be spending time yet on the x64 version. It may take a week, maybe much more. I have so far adapted the linker code, the debugger code, and some of the compiler code. However the hard bit is going to take some research, the ASM code part. There are of course some differences between the two instruction sets and I have at the same time to discover the workings of the core assembly compiler that is used in blitz. How it ticks, so to speak. I hope I get somewhere with this, beacause it's getting difficult at the moment. I thought c++ was a pain in the ***, but ASM is a real toughie ;D Still, I soldier on....


Rick Nasher(Posted 2015) [#74]
Hmm, that sucks. Only remember it a little from the C64 years. Only for the experts. How large is the ASM code piece in fact? (to get an idea what you're up against)


Ploppy(Posted 2015) [#75]
The asm code is in fact the program code of the blitz program, not many of the processor instructions are used as most of the whole code is already precompiled in c++. Variables are assigned, some basic maths and all of the precompiled functions are called using this asm code. So the size of this assembly code very much depends on the blitz program; it is the heart of it all that gets the rest moving.


Rick Nasher(Posted 2015) [#76]
Hmm, more complicated than I thought. Hope you can pull it off. It's very low-level stuff, could be painstaking.


Ian Thompson(Posted 2015) [#77]
Any way to substitute C++ for the assembly parts? On a plus note, it would be a nod towards a distant cross-platfrom version of Blitz3D.


Ploppy(Posted 2015) [#78]
I think I probably substituted all I can already, but the main program being what it is is the part that is naturally unpredictible. Therefore, it has to be coded on the fly. This part of the code is very small in comparison with the rest but is absolutely essential of course. Any initialisation routines, api calls, management routines are all pre-written in c++ already as they are constant. The main program code (the non constant part) will basically assign a variable to a register to set parameters and then call the pre-defined routines. Returned values from these pre-defined routines will be treated equally by the main program code; either being used as a param for a funtion call to another routine or put in temporary memory storage for later use. Al this has to be in asm code really, because of its unpredictable nature. I'd love to not have to do it but if I want an x64 version I have to go down that road. I'm fairly confident I'll get it done but how long it'll take I can't say for the moment. My past experience with hardwired has shown me that since the beginning after a bit of research, trial, error and insistance I can get further than I could imagine. I know that my first release looks very different to the present version. Only time will tell- I'm just hoping I've not bitten off more than I can chew (which is possible).


Rick Nasher(Posted 2015) [#79]
Keeping fingers X-ed and hands folded. ;-)


Ploppy(Posted 2015) [#80]
In any case, I will not be touching my pc for the next 4-5 days... family visit....


Rick Nasher(Posted 2015) [#81]
Ah, enjoy that one. Gonna visit my father if all goes well for father's day.


OJay(Posted 2015) [#82]
taking the chance to chime in and express my kudos to this interesting project again! its astonishing what has been achieved thus far and i cant wait to get my hands on a refreshed b3d to dig out some old projects again!
so keep on rocking, you do have silent followers... :)

cheers!


Ploppy(Posted 2015) [#83]
Thanks for the support, very kind of you.


Ploppy(Posted 2015) [#84]
---- Still alive, still working on HW. Exclusively working on the 64-bit part for the moment, a LOT of coding and re-coding done (both in c++ and evil ASM), still more to do. I am now getting to a point where I can test x64 compiled blitz programs under certain circomstances, which for me demonstrates I'm on the path to victory...

It will still take me some time to finish this part then I will release so patience to any that are still subscribed to this project and haven't died of boredom! ;D


Flanker512(Posted 2015) [#85]
I will wait for HW ! As far as I understood, it's maybe the only current project that can save Blitz3D by extending directx compatibility in the near future.

Just a question, will it be possible for HW to handle multithreading ?


Ploppy(Posted 2015) [#86]
I have been considering that I have to admit. If it's poss, I'll do it.


Flanker512(Posted 2015) [#87]
Nice :) I don't know anything about low level language so just wondering...


Ploppy(Posted 2015) [#88]
No probs.


Rick Nasher(Posted 2015) [#89]
Thumbs up!


Zeotrope(Posted 2015) [#90]
@Ploppy. I just wanted to login (after years) and wish you all the best with this project. I have been following your progress with great interest for some time now and I must say that I am amazed how far this has come.

Keep up the great work. You have helping put B3D back on the mainstream map again. I also want to let you know that have many followers on and off of these forums.

Looking forward to what you do next. :)


Ploppy(Posted 2015) [#91]
Thanks Zeo, you're not the only one that's amazed about how far it's got. Me, I'm totally blown away that I've got this far already. Personally I have sincerely surpassed my own expectations of my own programming abilities. I guess that what passion/obsession is all about. I just hope it doesn't fizzle out. All the best, peace... ;)


ShadowTurtle(Posted 2015) [#92]
Sorry ploppy. I was out of coding codex. Sorry for that.


Ploppy(Posted 2015) [#93]
Hello ShadowTurtle,
I saw your original post before you modified, an interesting read. On your view about 'library'usage/api calls; we all have to make those to ensure compatibility and symbiosis with the resident OS. No code written for windows is 100% original. Even blitz3d used lots of api calls to directx7 - making direct calls to all the different types of gpu drivers would just be a huge and pointless task after all.

I'm very impressed that you already created a 70% complete engine similar to Blitz but didn't complete it. I myself as a blitz user would like to encourage you to complete it. I, like many others have wanted Blitz Research to release a follow up to Blitz3d for many years now. It seems that Mark is not going that way, but concentrating his forces on MonkeyX. There have been many posts on the blitz forum about the possibilty of a B3D2, and how much they would like to see it but it never came.

I know that I would have been gladly willing to pay for a Blitz3d v2 if it promised be a more up to date command set. If you have a project that does just this, it would be a great thing to have on the market, and again if it was as good as Blitz3d I would definately pay for it. I know it takes time and research, but I'm sure that there are many other Blitz users just like me that would be willing to invest in such a package if it does indeed offer the features you listed. It seems you have talent and passion for your work, so I personally hope you do release, it really would be a great addition. The more options we have as blitz users are concerned, the better.


mrbombermillzy(Posted 2015) [#94]
Hey Ploppy!

Like zeotrope above, I signed in after not posting for years (fed up of trolls) as I needed you to know you are doing some VERY important work!

Well done!Keep it up! :)

Im waiting to see if my own holy grail of features: i.e. 2D alpha and possibly rotation/scaling will be put into this project (ideally through a native command set, or perhaps through 3D command manipulation).

I would make me SO happy not having to decipher what is now called 'Direct 2D' to get my project W7/8/10 + DX11/12 compliant!

Take care Ploppy and dont let any ungrateful trolls bring you down!


ShadowTurtle(Posted 2015) [#95]
-


Ploppy(Posted 2015) [#96]
Wow, looks as though you got pretty far with it already. Good luck with the rest, I hope you manage to complete it. Would be great for blitz users.


ShadowTurtle(Posted 2015) [#97]
It seems realizing something like blitz3d 2.0 or "blitzbasic 2 for windows" with completely fresh code would just be a huge and pointless task after all. There is monkey, minib3d, blitzmax, ogre3d and so many more already finished. Extending and/or modify one of these products seems to be a more intelligent task.

I began creating my engine there was BlitzMax in development and it is now in the fourth iteration(!). The idea behind original blitzbasic was KISS (keep it super simple), stunning features and well written documentation. I would do that too. So i am developed something that mark is today develop as monkey 2 actually (he does it actually better than me).

I programmed a thing that i descripe as "Basic with Classes" with only 80 commands. These commands runs on linux, windows, macos and custom devices correctly and fast.

On top of "Basic with Classes" i began writing a game library. 2D, 3D, the sprite system is able mimic standard widgets like buttons, windows, scrolllbars etc.

In the following part of feature map you can see what is already out of beta-stage and is possibly running 400% faster with real fast hardware accelleration actually.

Actually i do nothing more develop the engine in interess for good old blitz3d devs. I do make some code public in the next time. I am not willed as troll doing furthermore compatibility with blitz3d commands and synthax.

You choosed the way of using many libraryies in the correct combination after you wrote a directx based engine with the same scheme. In the end the product is useable and this is what is important. + The results you did, ploppy, they are really advanced.

It seems i had hassled you with overargued offering teamwork too. Sorry for that.

I see here no point posting the part of the feature map.. on the other hand it is needed before i got stamped as troll that can not do low-level and high-level programming




Ploppy(Posted 2015) [#98]
@ShadowTurtle Wow, looks as though you got pretty far with it already. Good luck with the rest, I hope you manage to complete it. Would be great for blitz users. It will be good to see how your project progresses over time.


Ploppy(Posted 2015) [#99]
@mrbombermillzy - Thanks for the Support, I really do appreciate it. It seems I really do have something in the works, or at least 'so far, so good'. I'm kinda lucky at the same time to have attracted the attention of a few very loyal and patient blitz users, and for that I am grateful, it's a great motivator... :D


Ploppy(Posted 2015) [#100]

You choosed the way of using many libraryies in the correct combination after you wrote a directx based engine with the same scheme. In the end the product is useable and this is what is important. + The results you did, ploppy, they are really advanced.



@ShadowTurtle - I wish to make it clear to everyone and avoid confusion, if by 'libraries' you mean freeimage - I do not use it at all. Any image manipulation comes from my code or the shaders, and the loaders/savers are part of directx9/dx11. I do not use fmod like Blitz3d did, for I do not have a license for it - so for the moment Hybrid has no sound capabilities (but I will look into it). The only so-called 'libraries' I use (apart from directx which I consider to be a library) is physx and libvlc which are both free. All this you can of course verify if you like with dependancy walker. Other than that, the entire hardwired source is written by myself, including its resident shaders. Hybrid is a modified version of the original Blitz3d source combined with my own Hardwired static lib.


mrbombermillzy(Posted 2015) [#101]
Hey ploppy and shadowturtle...

This is all great stuff. I will have a closer look when I have to change my dll call routines.

The main problem that I had was the windows display manager in W8 completely destroying DX7 compatability. All I ever needed was the hardware acceleration of my 2d sprites, which didnt end up being a command that was ever available, seeing as you could just go the 3d surface route in B3D and BMax.

This is a great time for blitz!


ShadowTurtle(Posted 2015) [#102]
When often working alone on a long-time-project, you need to be relaxed, self-confident, and you need to be very patient. The reward for your effort
may be ahead in time, somewhere in the far-away future. Some people are impatient, they need/want/require quicker rewards and feedback,
so long-time-projects is just not for them. You can use libraries to do fast things for them ;-)

You are not 100% confident about your ideas, and you start to be doubtful about yourself and your ideas after a while. Instead givin up i started the next iteration. Btw. Mark is doin the same in some manner..

You can overcome that with using useable libraries like directx, sdl2 (see mark & monkey2) and so. Surely ploppy is using static libraries too.

The reason i do not use sdl2 is actually the sound engine. I wrote a WAV PCM sound player. It can stream directly from the harddrive. Compression is not implemented. It is bad? Technicaly probably yes.
This are the main features: Play wav´s with 17 channels (theatre halls, cinematic halls) organized to the correct boxes(!) trough tablelist. This is cool stuff to do showcase in halls :-D
So you can gain attention from real/jobable music-/sound-engineers and -creators for ya game. Btw. Windows player can not play such wav files (no joke) and audacity-soundengine etc. can not stream such files optimized. It is one of many things you will only care when working in a real game studio and doing more than some patience-game-adventuries.

This (and other) stuff is high-level stuff that must implemented firstly low-level. I do need that stuff for my product. Mark is not needing that for monkey2 (see his latest "worklog" at monkey-x.com) and can use sdl2. :-D (joke)

I began my project knowing that mark and others (GlBasic etc.) are building great stuff and bigger communities. So i need some outstanding features that unfolds in final product. So this is naturally a long-time-project.
3 Years ago i could not know that pyro will be developed. It is actually the thing i can do with my 2d sprite system too but without these cool effects.
Effects.. why i do not implement them in the renderer? I can now possibly port the TimelineFX-module for use in "Basic with classes" and my game framework (see my previous post) and integrate it.
Who is knowing wich effect-engine will come out in one year? Is it better than TimelineFX? Easier integrateable? I would need 3 months to do port the TimelineFX-Module to "basic with classes" (no joke).

Since i do a long-time-project i have the time to do wait for better things (side effect). I must have that time since this is a side-project. Mainly i do other things. Since some folks are really ignoring the best stuff from guys that are stamped as troll or something (lifetime), they would do more likely buy stuff from well known good guys. ("bad guy" is not "troll")

Thanks for reading so far.


Ploppy(Posted 2015) [#103]
@ShadowTurtle - Okay, I thought I had made it clear in my last post but apparently not. I hate having to justify myself and I don't see why I should but it could well be you are trying to devalorise my project by suggesting that my work is basically just calls to other libraries.


You can overcome that with using useable libraries like directx, sdl2 (see mark & monkey2) and so. Surely ploppy is using static libraries too



This I do not appreciate at all. I have made it clear that I use libvlc for video , physx for all physics related functions and of course directx.

Both vlc and physx are free and honestly I am glad I'm using them - these libaries are fast, highly optimised, complicated in code and would take me decades to write myself. These libraries are very respected in the developer commuinty so why on earth would I choose to write it again when they are already offering it as a tool; there is no shame in that whatsover and I admit using them freely (not that I have ever hidden the fact).

DirectX of course is of course that heart of my program, you cannot help but use this library if you wish fast access a gfx adapter on a pc - windows works like this. If you didn't use directx you would need routines to detect which and how many gfx adapters are installed on the resident pc and then use separate routines to communitate with these gfx adapters (each with thier own way of communication) by low-level port access, or by accessing the gfx adapter's driver resident in windows. A laborious, huge and pointless task. Again, not using DirectX (or OpenGL as a very good alternative) for a 3d would be counter-productive and again Dx is very respected, efficient and free. I am proud to use DirectX in hardwired (just look at the title of my threads for example), it's what brings hardwired to life. Blitz3d just the same uses DirectX, even Blitz+ uses directdraw which is part of DirectX.

This is the extent of my 'library' usage. Any other 'calls' I make are made to the resident windows routines that everyone uses (such as CreateWindow for example) to make their project function corretly within windows. I have no other libraries in hardwired, something that I had made clear in my last post. No fmod, no freeimage; Mark Sibly used these both for B3D but I couldn't use them as licence restictions held me back for incorporating them into Hybrid. If I had bought a lisence for them I would use them in Hybrid - again fmod is respected, efficient and powerful and freeimage has become very resourceful. So, since I am not using them, Hybrid presently has no sound capabilities (this will come later), and image manipulation routines (if directx doesn't offer the algorithms I need) are programmed by myself.

I do not like having to justify myself this way, but I must make this clear not just to you but to everyone about Hardwired/Hybrid. I am designing it so that users do not have any restictions of any kind, just like with Blitz3d. The fmod lisence that Blitz Research had gave them the freedom to let compiled B3D programs use fmod's routines. I do not have that lisense. I do understand that the mp3 file format has a lisence too so when I do start putting together a sound module for Hybrid/Hardwired it will most likely not incoporate mp3 so again not to resrict the final user of my product. I will however include .wav and .flac routines.

ShadowTurtle, I was hoping you were not going down the same road as the last time, it seems not. But the road you're now taking is going in a similar direction. Your recent post suggest that I extensively use libraries for HW/HY. I have made it clear in which capacity I use api calls and how far this goes. I have now also explained how the usage and any outside routine do not affect the final users' rights in any way. If I didn't create Hardwired with the final intention of giving freedom of usa to the final user what would the point be in creating HW? - no one could publish anything.

It is important for me that Hardwired remains with the same freedom it has always offered and I will continue to program it thusly. Hardwired is written entirely by me and algorthims that are not part of DX, Vlc or Physx come from my own research, creativity and time. Suggesting anything else is suggesting that...


1> Users do not have the freedom to use thier own compilation as they wish and would be bound by license restrictions
2> That I effectively 'steal' from other people's work, pretending it is my own
3> That I have take the lazy approach to programming and instead of trying to streamline my work to achieve efficieny and stability I would rather 'pad-it-out' with outside library calls.


I have worked very very hard on Hardwired since the beginning and I do not like at all any insinuation about its creation so this is why I am spending time writing this long post. You have made your point in your recent posts (I have saved them on my hard drive, you have a tendancy of changing your posts afterwards), but since you elaborate on your point I cannot help but sense you wish to sully the name of hardwired. This brings me to the conclusion you still have some issue with it somewhere. If you think I am going to 'prove myself' by showing my source to you in order to show you that I do not use libraries, let's get real! You can't out-psych me that way. My source reamins my property I and am not willing to show or share it.

Your project itself seems very interesting, but further info about it would be appreciated on another thread. This thread is for Hardwired/Hybrid. My project is not at all 'in competition' with your project in any way so please do not try to take Hw as a threat of any kind to the longevity of your project. The are two completely different things.

You have mentioned the fact you would like to avoid being labelled a 'troll' in your last two posts. Please try to prove this. For me again, after a short time, your presence is becoming quite heavy and something I wish to avoid. I will not tolerate insinuations about Hardwired or my progromming of this kind. I have devoted much time, research and effort to my project with no gain but personal achievement. If you do not desist making false suppositions about my work, ShadowTurtle I will not hesitate to contact a mediator. Last time I had to do so, you even had the honour of receiving a warning from Mark Sibly himself for a thread you opened. It's very rare that Mark makes his presence known on the forum, he has better things to do that that - so it must have been because he felt he needed to do so.


ShadowTurtle(Posted 2015) [#104]
I do now stop writing such things.

I would not attack you.

I think using static libraries is not stealing. I had not know that you use no static libs (so far).
I had think you wrote about the used dynamic libs (so far) without mention the static libs (you use no static lib). Big sorry.

You are using libraries you wrote you do use <- dynamic libs (some) and static libs (none of them).

The possibility to do extend the own work with (static/dynamic) libraries is some sort of freedom i think too.

I stop writing more about "basic with classes" in this forum.
Sorry.

It will be good to see how your project progresses over time.

Hey ploppy and shadowturtle...

This is all great stuff.



Steve Elliott(Posted 2015) [#105]
Why don't you start your own thread ShadowTurtle? Instead of upsetting Ploppy with your troll behavior on his thread!


ShadowTurtle(Posted 2015) [#106]
Steve: I stop writing more about that in this forum. I created 2 project posts that belongs to my project in this forum (and topic). 1 Post was a answer of a project question. Someone wrote "It will be good to see how your project progresses over time." and i created a definitive statement (the mentioned one posting). I had not created a extra topic since i had think the thing is close and i would do answer the question "It will be good to see how your project progresses over time."

In the first post(?) i wrote mainly another thing but not mainly about my project. I mentioned it only as descriptive part.

Is now all escalate since the last message of ploppy? I would not do that. Sorry. Please read my previous post too. I am sorry to the dynamic and static libs story too.


OJay(Posted 2015) [#107]
regarding audio playback: you might want to look at SDL mixer: http://www.libsdl.org/projects/SDL_mixer/docs/index.html its free (zlib licensed) and actually part of a bigger library that allows even more stuff (like video playback and several input device abstractions): https://www.libsdl.org


Ploppy(Posted 2015) [#108]
Thanks OJay, I'll look into it.


ShadowTurtle(Posted 2015) [#109]
-


Rick Nasher(Posted 2015) [#110]
Indeed no need to re-invent the wheel(in C++), but I'm sure people here are getting Ploppy's point of keeping the int/ext libraries to a minimum required. I took a quick glance at SDL Mixer's docs to see what media types are supported and appears is doing what we Blitzers like, but I'm lacking the expertise to judge it's potential.

http://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.html#SEC55

Mix_Music *Mix_LoadMUS(const char *file)

file Name of music file to use.
Load music file to use. This can load WAVE, MOD, MIDI, OGG, MP3, FLAC, and any file that you use a command to play with.


Sounds yummy, but.. then I jumped back to:
http://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.html#SEC2

2. Getting Started
This assumes you have gotten SDL_mixer and installed it on your system. SDL_mixer has an INSTALL document in the source distribution to help you get it compiled and installed. Generally, installation consists of:

./configure
make
make install

SDL_mixer supports playing music and sound samples from the following formats:
- WAVE/RIFF (.wav)
- AIFF (.aiff)
- VOC (.voc)
- MOD (.mod .xm .s3m .669 .it .med and more) requiring libmikmod on system
- MIDI (.mid) using timidity or native midi hardware
- OggVorbis (.ogg) requiring ogg/vorbis libraries on system
- MP3 (.mp3) requiring SMPEG or MAD library on system
- FLAC (.flac) requiring the FLAC library on system - also any command-line player, which is not mixed by SDL_mixer...

You may also want to look at some demonstration code which may be downloaded from:
http://www.jonatkins.org/SDL_mixer/

2.1 Includes The include files to use for SDL_mixer
2.2 Compiling Using the SDL_mixer library and header file.


- It appears MP3/OGG playback requires more additional libraries on the system or is that a wrong assumption? Are these on installed by default on Windows?
- Also forgive me my ignorance, but wouldn't libvlc(of which I'm a fan and is in there anyway) allow playback of MP3/OGG files? For I can actually play them using VLC plain out of the box.


OJay(Posted 2015) [#111]
SMPEG is licensed under LGPL which allows dynamic linking with non LGPL licensed software and by the looks of it its free, but also aged...MAD seems to be more active but requires a commercial license for any non GPL software...

VLC is using libSDL as well, so you would require the same additional libraries as pure SDL, but by the looks of it, it seems to have something included already: https://wiki.videolan.org/MP3_audio/ havent found out what though...guess one would have to dig deeper in its core :)


Ploppy(Posted 2015) [#112]
Sound isn't an issue if one uses Hardwired of course, since B3d has sound routines as part of it. However I would like to find something good for Hybrid. I'm in no rush for the moment, as I have so much else to do already (still on 64-bit part at the moment). My personal favourite for a all round sound library is bass from un4seen. I created my other project 'chipmunk' using bass and bass is just great. Unfortunately, to include it in Hybrid I would need a license. Secondly, bass has not been released in static lib format. Fmod has similar restrictions but would also be great to use.

Ideally I would prefer to include a sound module as a static library. I can of course opt for dll usage but this in my opinion half-defeats the purpose of compiling to one exe. I consider sound routines to be important enough to be included in any compiled exe file for ease of access.

I have thought of using vlc for sound, and it is possible of course, but I still have the same static lib problem. Also, libvlc is a whole package, so to include it would mean to include the entireity of libvlc (including video) which is rather large in size. This again is not very flexible or viable; although again it is good. I decided however to use libvlc for video playback because a) IMO nothing beats vlc for video playback b) To program it myself would be impossible for me. Because of the size of libvlc and because of the fact it is so good I decided to waive my own rule of not using dll's. The same goes for physx because of its complexity, size and power. However incorporating commands that then depend on dll's rather than internal calls for me renders these commands virtually optional. It requires the user to include the dll with the exe in order for it to work. When I can, I will try to avoid using dll's so that the accesibility is not too lost and is part of the compiled exe. This is what Mark achieved with b3d and b+, in which a static fmod library is included for sound playback.


RemiD(Posted 2015) [#113]

It requires the user to include the dll with the exe in order for it to work.


Xors3d required the user to include some dlls with the exe. That's not a problem...


Ploppy(Posted 2015) [#114]
I have thought about including perhaps a command where you can choose a sound system.

UseBass
UseFmod

...for example. These commands would reside at the beginning of the code and would inform Hybrid to use an external audio lib of choice for all following audio commands. Like I said, just an idea.


Brucey(Posted 2015) [#115]
When I can, I will try to avoid using dll's so that the accesibility is not too lost and is part of the compiled exe.

Accessibility for whom? The developer? The end-user?

Assuming your game ships with an installer, the end-user doesn't care what stuff comes with it. If you ship your game on Steam, the end-user doesn't care what stuff comes with it.
If you ship your game in a zip file, again the user doesn't really care what they find in the zip file, as long as there's an exe to run...

The developer shouldn't care either. Unless you are intending playing with COM dlls, you just stick the dlls in the same folder as the exe, and all is well.

Any developer that has issues with extra DLLS that they need to include with their game to support feature X I suppose is just lacking experience in the real world where an app tends to ship with loads of "helper stuff".

Not using a library for the sole reason that it is only available as a DLL seems a tad foolish :-)

:o)


Ploppy(Posted 2015) [#116]
That's a fair point.


mrbombermillzy(Posted 2015) [#117]
Im on my tablet at the moment, which is painfully slow, so I cant really check, but didnt B3D upgrade its soundsystem to fmod at some point. What was it using before that?


Ploppy(Posted 2015) [#118]
Just to let you all know that in some respect I have had a stroke of luck today. Notsomuch with the developement of hardwired, but it will definately help indirectly with its developement in any case. I passed by a store that was closing it's doors definitively to move to another commercial area, and it was having a clearance sale. One computer left on sale with a 20% discounted price on it - I asked out of curiositity if I would walk away with the pc on the spot for a 50% discount. To my amazement, the salesman answered me yes.

So, I am now the proud owner of a acer predator 3.4Ghz pc, doted with 16GB of ram, 3TB of storage space and a nvidia geforce card. Instead of it's 1300€ price label, I got it for 650€; it hurts financially but I should be okay for years now. All-in-all, a nice upgrade from my previous pc, and I really needed to upgrade as compiling hardwired with my previous pc was becoming very slow; as my 2GB ram was just about too much to handle for visual studio. Yay, now I have to transfer all my files....


OldNESJunkie(Posted 2015) [#119]
Congratulations on the great deal Ploppy!!! Transferring your files can be easier if you use windows easy transfer utility. Look into that if you can, makes things a 'little' less painless when moving to a new pc.


Ian Thompson(Posted 2015) [#120]
Congrats Ploppy, sounds like a nice PC and well done with the deal you got.


Rick Nasher(Posted 2015) [#121]
Sounds like a real power beast. Enjoy dude.


Ploppy(Posted 2015) [#122]
Will do. System disk is ssd drive. I'm not used to things going so fast...


Steve Elliott(Posted 2015) [#123]
Aw a well deserved break mate - getting that deal and now having a real system to develop on :)


markcw(Posted 2015) [#124]
Great to hear that Ploppy power will continue. Good luck.


Zethrax(Posted 2015) [#125]
In regards to the problem of adding audio to Hardwired, below is some Blitzmax code for an OpenAL library I was working on to to add 3D positional and non-positional sound to MiniB3D. Feel free to do whatever you want with it.

The library isn't complete. Before I lost interest in finishing this I was working on adding support for 'virtual sounds' to deal with situations where more sound channels than the hardware could manage were created, and where long-playing sounds needed to be managed when the player moved in and out of cull distance. Those bits still need to be finished.

This lib is intended to work with the OpenAl functions provided in the Blitzmax OpenAl module, so it would probably need to be adapted to work without that support from Blitzmax.

The official Creative Labs OpenAL site is: http://openal.org/
This site is pretty bare bones and has been 'coming (back) soon' for a long while.

OpenAL Soft seems to be the recommended alternative to the Creative Labs version of OpenAL. It's probably better to focus on that version.

The main site for OpenAL Soft is at:-
http://kcat.strangesoft.net/openal.html

EDIT: Although the read-me file for OpenAL Soft seems to indicate that the Creative Labs OpenAL redistributable is still required, so that seems a bit silly.


The code below is in the public domain.




RemiD(Posted 2015) [#126]
@Zethrax>>You seem alive and fully functional. Good ! Welcome back. :)


Ploppy(Posted 2015) [#127]
Cheers Zethrax, I'll definately look into that...


Ploppy(Posted 2015) [#128]
Back on the scene with my spanking new pc. Am resisting the temptation to play games, and am continuing with HW. I have just added a new game controller module to hardwired, it is complete and I have tested with my ps3 gamepad - works like a dream. 64-bit is still not operable for the moment, so don't expect to run anything in 64-bit mode quite yet.

New worklog entry


Ploppy(Posted 2015) [#129]
I have just uploaded a newer version - now some DX11 functions are back... see Hybrid examples (such as maze.hb) for an example....


markcw(Posted 2015) [#130]
Hey Ploppy, sorry for the ignorance but what is better about dx11 over dx9?


RemiD(Posted 2015) [#131]

http://www.nvidia.com/object/tessellation.html

What makes me laugh is that the game "urban chaos" (1999) already used something similar, which can be described as a variable level of details ("lod"), in this old game, you can see that the far away meshes are low details textured meshes, and the near meshes are high details textured meshes. Try the demo you will see what i mean.
It is not done the same way but the results are similar.


markcw(Posted 2015) [#132]
Oooh, displacement mapping looks UGLY. Sorry, but really is that necessary? Ploppy?


Zeotrope(Posted 2015) [#133]
@munch. What do you mean ugly? The illustration above is just that. It illustrates the detail you can obtain by DX11 displacement mapping. It simply adds a lot more detail with no further polygon overheads. It can take a basic model and apply a displacement map (fundamentally an Image) and thus add a huge amount of detail to an otherwise flat surface.


markcw(Posted 2015) [#134]
@Zeotrope, okay sorry, I'm just not on that hardware yet.


markcw(Posted 2015) [#135]
I'm not up to date on this stuff sorry.


Ploppy(Posted 2015) [#136]
Besides, that's not the only improvement within dx11. There is also for example the fact it can compile shaders using up to version 5 of the Hlsl language. In dx9, it will compile up to version 3. In v5 there are more commands/operations available and a much greater number of registers; all this meaning much more choice and flexibility in shader programming. With dx11 you can also multi-thread your shaders, therefore increasing performance and making use of multi-core processors.


col(Posted 2015) [#137]

With dx11 you can also multi-thread your shaders, therefore increasing performance and making use of multi-core processors.



What do you mean with this statement? Care to elaborate?


Ploppy(Posted 2015) [#138]
Sure, check this out, under 'performance enhancements'.


col(Posted 2015) [#139]
Ahh I see. When you said 'multi-thread' your shaders I was curious at to what that actually meant.

FYI
All the real rendering calls that actually go the gpu are still done on the main thread. The other threads are used to generate what is called a command list. A command list is pretty much a recorded sequence of the d3d11 calls that are made on the thread. They are optimised at the driver level, but the command lists still have to be 'played back' on the main thread in order for the gpu to actually do the real rendering. It does offer a speed increase but probably not the same increase that you may be expecting.

Another ( probably pointless ) bonus with d3d11 is dynamic shaders, that is that you can code your shaders in an oo style and piece them together at runtime, a pretty cool feature.

[edit]
Just thought I'd mention that resources, as in your textures, buffers, states and stuff can be all created on any thread, without the need for any command list like approach mentioned above, which is another nice little addition.
[/edit]


Ploppy(Posted 2015) [#140]
I agree. For the moment my runtime code is all done on one thread. But I think that later (perhaps pretty soon), I will add thread manipulator commands to Hybrid so that users can use multi threading if that is thier wish.


Yue(Posted 2015) [#141]
Hi, Windows 7 AVG Alert Virus :(





BlitzSupport(Posted 2015) [#142]
I'd say "false positive" from AVG... this is what I get on VirusTotal:

https://www.virustotal.com/en/file/5f255bfd7306eb9b1c7f82a3705d058aea39f181a7ce4c2ea793993d67da8da6/analysis/1437670574/

(Note that AVG passes, along with all the others!)


SabataRH(Posted 2015) [#143]
Been away for along time, imagine my surprise returning and seeing this project all grown up. :()

Many, many, many congratulations Ploppy. keep it rolling :)


Flanker512(Posted 2015) [#144]
Nice one Ploppy, I've been able to run the maze example in dx11 this time. Nice computer you got there too !


Rick Nasher(Posted 2015) [#145]
Cliff's style: "Everybody's on a summer holiday, no more updates for a.. week or 2.." ?

;-)


Ploppy(Posted 2015) [#146]
A week or 2000 more like, I can't say when the next is coming out but I am working on it. Maybe not at full hog at the moment being summer and all, but I try devote at least 1/2 an hour to it every day. At the moment I am working on improving my text rendering routines so it uses the gfx adapter much more therefore improving speed greatly - similar to fastext. I have also just finished improving the entity management system, I have added world classification for entities so that entities can be grouped together in 'worlds'. You can then choose which world you wish to control with SelectWorld from a world created using CreateWorld and then RenderWorld as usual. I have also added a RenderWorlds command if more that one world is assigned to a window. I'll explain better when I release next time...


Zethrax(Posted 2015) [#147]
Good to hear this is still in development. I'm looking forward to doing something with it on BlitzMax when it's a bit more stable.


Yue(Posted 2015) [#148]
:)


Rick Nasher(Posted 2015) [#149]
Thanks for the update. These sound like exiting improvements. FastText and Selective World updating. So one could create different areas and when not in or near them rendering would stop, saving rendering time do I understand the idea behind this correctly? Ah, you said you'll explain, so will wait for that, no worries.


Ploppy(Posted 2015) [#150]
Rick, it's funny you 'called' - I feel I'm not too far from a new release in the next few days. Almost done with the text routine (dx9 side), and it's looking really really good, a real breakthrough and matches fastext's speed. I'm getting great fps, and I can even rotate and/or scale text in realtime with no loss in speed. Rotation/scaling can work on the whole line AND each individual letter if so desired. I have also added a optional shadow and outline routine too so the user can quickly easily render a good and clear looking text. If I continue going at the pace I am going today, I'll have something soon. Stay tuned...


Ploppy(Posted 2015) [#151]
A quick example, I did this quick so colour scheme on text is not great but you get the idea...





Rick Nasher(Posted 2015) [#152]
Hey that sounds/looks pretty good. Eliminated yet another add-on necessity. :-)


JanDK(Posted 2015) [#153]
Wow! - looks amazing, you have really come a long way. I'm always excited when logging on to this post to follow the progress.


Rick Nasher(Posted 2015) [#154]
Updated Hardwired/Hybrid info text with additional FAQ's, links and added the donation/facebook buttons.


Guy Fawkes(Posted 2015) [#155]
Can you please make it so that it can compile the code into HTML5 / WebGL?


Ploppy(Posted 2015) [#156]
That's a heck of an undertaking. I'd love to, same goes for android, ios and all that - but it would add a good few years onto the developement of my project, alas. Sorry, but I fear I'm having enough headaches with directx and hlsl already. :)


JanDK(Posted 2015) [#157]
I see what you mean Guy (good to have ideas for future extensions), and It would be really nice! But again, it also would be AMAZING JUST to get the Blitz3D/Hybrid finnished/working in a solid version. I'm really, really looking forward to making some cool games, using shadows, glow and more complex lightning.


Ploppy(Posted 2015) [#158]
At the moment I am reworking the directx 11 shaders, bringing in specular lighting and fog - basically bringing it in line with the dx9 fixed function pipeline. With shaders, of course, the option to configure them in any way you wish will be part of hardwired and fully controlable; but it still needs a good default shader.

I have made quite a lot of changes here and there recently to hw. Once it is of a stable state I'll release an update.


JanDK(Posted 2015) [#159]
I'm just smiling :-) I really hope you stick with it to the (happy) end, I'm sure many of us will be (and already are) very appreciative for your hard work.


Ploppy(Posted 2015) [#160]
I really hope so too.


Rick Nasher(Posted 2015) [#161]
Looking forward to it.


Volturna(Posted 2015) [#162]
First of all thank you for this excellent work! I have been waiting for this for a long time.

I am making some moves with Harwired and i noticed my keyboard changes every symbol ~!@#$%^&*()_+ after i run it. Have to restart windos so it will be set to normal.

Anyone else noticed this?


Rick Nasher(Posted 2015) [#163]
Not able to test just yet, reinstalling all in Win10 which has DX11.1 installed as default apparently, at least on my system.

@Ploppy:
- Is it possible to setup Hybrid in such a way, that it doesn't require DX9.0C to be installed for those who do not need it? For instance by an ENV variable or prefs in the IDE?

In that fashion Win10 upgraders, which I expect to be a lot of people as long as system specs will allow it, do not need to install it separately anymore.


Ploppy(Posted 2015) [#164]
Wow, I didn't realise that dx9 wasn't included in Win10. Does that mean that Blitz3d doesn't work too, since it is dx7 dependant?


Ploppy(Posted 2015) [#165]
...still working on it, every day...

I'm actually reworking a lot of the shader handling system, as well as the default shaders for dx11. The HLSL language can be touchy at times, and precision is required almost always in order to get a good compilation of the shader code together. And since I am creating shaders for dx11 that imitate the fuctionality of dx9 (with all its complexity), this all takes time. I need to create the default shaders for dx11 that correctly emulate dx9 to ensure compatibility between the two modes and of course the way that Blitz commands functions. However, although with the standard blitz commands using dx9 or dx11 will not make much difference in the long run, the additional custom shader module will make all the difference. Once up and running I will include commands, exclusive only to dx11 mode that make the most of hull shaders and tesselations.


Yue(Posted 2015) [#166]
It is always a pleasure to watch as the project progresses. :)


Rick Nasher(Posted 2015) [#167]
Blitz3d working straight away somehow and as it appears(didn't verify) runs faster under Win10 DX11.1, Hardwired however, isn't working instantly. Need to install DX9 first I presume, but never mind as I just discovered another piece of SW(City Car Driving) that needed DX9 for under DX11 it was literally crawling on my system, so no tossing it over the neighbor's fence yet I guess.


Ploppy(Posted 2015) [#168]
....still no update, but things are going well.


I am still working on the shader system - I have never gone so in-depth before, but it is important to do so and so far I am happy with the results. I have almost finished with the shader constants module, and it is becoming very versatile and powerful. This module will give the user the ability to fully configure shader constants within the blitz program and modify them on the fly when needed. My routines have been highly optimised and are giving me very fast results.

What I am particularly happy about at the moment is what I am presently working on. I have created a way of being able to incorporate hlsl shader code directly into the main program code. Hlsl shader code is insterted into main program by inserting it directly after a new 'Script' statement, and at the end of the hlsl code, the statement End Script immediately follows. An example...

Graphics3D 800,600,32,2
Cam=CreateCamera()
Cube=CreateCube()
vs=RecallShader("vshader")
EntityShader cube,vs
Renderworld
Flip
End

Script vshader("vs_main","vs_3_0",0)
/////////////
// GLOBALS //
/////////////
cbuffer MatrixBuffer
{
    matrix worldMatrix;
    matrix viewMatrix;
    matrix projectionMatrix;
};
//////////////
// TYPEDEFS //
//////////////
struct VertexInputType
{
    float4 position : POSITION;
    float4 color : COLOR;
};

struct PixelInputType
{
    float4 position : SV_POSITION;
    float4 color : COLOR;
};
////////////////////////////////////////////////////////////////////////////////
// Vertex Shader
////////////////////////////////////////////////////////////////////////////////
PixelInputType ColorVertexShader(VertexInputType input)
{
    PixelInputType output;
    

    // Change the position vector to be 4 units for proper matrix calculations.
    input.position.w = 1.0f;

    // Calculate the position of the vertex against the world, view, and projection matrices.
    output.position = mul(input.position, worldMatrix);
    output.position = mul(output.position, viewMatrix);
    output.position = mul(output.position, projectionMatrix);
    
    // Store the input color for the pixel shader to use.
    output.color = input.color;
    
    return output;
}
End Script


The construct of the script command is similar to the 'Function' command, its code is defined between the Script statement and the End Script statement. On the first line directly after this Script command is a user-defined unique identifier, this identifier can be later used in the code to 'recall' the compiled version of the shader. The three bracketed parameters that follow designate the entry point of the hlsl code (the function that is called in the shader when it is used), the version and type of the shader, and optional flags. The lines that follow these parameters make up the hlsl code to compile.

This is really taking form, and I will let you know more about it when I do release. In any case my aim is to be able to 'precompile' any included hlsl code at the moment of compiling a hybrid program. This compiled code will be incorporated into the .exe file. The script itself will not be included. In this way, shaders will not have to be 'loaded' as such and compilled at run time since they will be already precompiled at the moment of execution, making for a much better flow and overall execution of the final program. Like I said, I'll let you know more when I can, but it should be quite soon I think (and hope)....

Must dash, just thought I'd share this news with you....


Rick Nasher(Posted 2015) [#169]
This (again) is a very cool, exciting and well thought through addition. Good job, thanks for sharing.

In the case of very large programs, to keep things tidy, will it also be possible to put the HLSL script lines into an include file, such as for instance "hlsl_Scrpt1.hb"? Just like we would with regular functions or can it only be run from the main program?


Ploppy(Posted 2015) [#170]
Absolutely. As long as the code appears in the main program.


Ian Thompson(Posted 2015) [#171]
No game code precompiles for shaders, nice!


BlitzSupport(Posted 2015) [#172]
Nice one!


Rick Nasher(Posted 2015) [#173]
Pretty cool.


JanDK(Posted 2015) [#174]
Very cool!


3DRCzy(Posted 2015) [#175]
Can't wait :), awesome work!


OJay(Posted 2015) [#176]
good stuff! but...why "Script" and not just "Shader" (what it actually is ^^)?


Rick Nasher(Posted 2015) [#177]
Well, it's is a script right? Or: "HLSL" - "End HLSL"? ;-)


Ploppy(Posted 2015) [#178]
Well, I don't know. I guess that I felt like I had to differentiate it from a shader. Technically it is a shader, but in an uncompiled form. The shader is an object that is used to control how a gfx adapter treats vertices and pixels, one one can be compiled from asm code and from hlsl. Calling the hlsl a script and not a shader I feel helps one to understand that the script alone has to undergo a 'transformation' in order to become an operable shader.

I suppose I could use shader instead of script, but I'm a little divded on the matter...


Rick Nasher(Posted 2015) [#179]
How about: ShaderScript. lol Very descriptive, says it all.
But not that important. If it works it works, and that's what counts right?


Ploppy(Posted 2015) [#180]
New thread available!