123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|642|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> So I found some old blitz code...

Mon, 18 Mar 2013, 14:51
waroffice
I found some backups of my RPG game in Blitz3D, ranging from 2005 to 2002!

Its all in 2D code, how much of a pain is it to convert it to 3d?

Should I start again and use it as a reference?

How do you even work Blitz3D it has been 7 years?

whats a sprite again?
Mon, 18 Mar 2013, 15:18
Jayenkai
shouldn't be too hard to go from B2D to B3D, and in fact B3D should just run the code as-is.
If you want to switch to using 2D-in-3D sprites, you'll need to get something decent working first, then do a simple replace of DrawImage to NewCommand. .. Assuming new command uses the same parameters!

Shouldn't be too tricky. Maybe..!

-=-=-
''Load, Next List!''
Mon, 18 Mar 2013, 15:31
waroffice
Well I gave it a go and it runs ok, but gets 24 fps on an i5 2500k 8gb ram and ATI 7770!!

not sure I understand the terminology to quickly convert the code from 2d to "2d in 3d"

my brain hurts
Mon, 18 Mar 2013, 15:39
Jayenkai
Yeah, my recent AGameAWeek Gold nostalgia trip has revealed a lot of old Blitz2D/3D games are running at about half the framerate they should be, on modern systems. Stupid PC architecture!!

This may or may not be useful.. It's been a long long time since I worked with that code!!

-=-=-
''Load, Next List!''
Tue, 19 Mar 2013, 01:09
Dabz

Stupid PC architecture!!


Depends on what version of Windows it is running on too... I think on Vista+ DirectX7 is emulated, so, from your app, to your hardware, there's a bit of wangling going on, which could slow it down too. But, DirectX7 is deader then a betamax player with a corded remote.

In fact, all of BRL "Blitz" titles are mostly emulated now if your running them on a brand new X64 windows machine, DirectX7 is emulated, and on 64bit Windows, the 86bit code is emulated under WOW64, I say emulated, but, it's a layer between your 32bit app and the 64bit OS... I probably think of it as a Windows version of Wine, Windows-On-Windows64 is the proper name I think.

This is exactly why I'm stopping using BlitzMax, it isnt future proofed at all, the Linux side went the way of the fairies when the most popular downloaded distro became 64bit, people unsafely assume that all newish Window x64 OS's is safe because it can run 32bit apps, but, some of their server software doesnt, and theres no guarantee WOW64 will be there in the future on the desktop versions. And when it comes to OS X, Apple couldnt give a flying bollock about backwards compatibility.

My advice WarOffice matey is use something else before you get going, Blitz is now too far out of the loop for it to be relied on, and start building your code base up in something else... Heck, your better off using Monkey like Jay and Co. because the language is Blitz-like, which your used too (In a sense), it isnt really tied to hardware like Blitz of old, Mark is actively developing it (To the dismay of me and other BlitzMax users, lol)... And you can really get going in that for free since the demo is HTML5 and I dont think it has a time limit on it!

And dont forget GLBasic, that's an old skool BASIC language that the author really really goes the extra mile in terms of support... And out of both, is still my prefered multi-platform building tool, so, maybe have a peek at that as well, not sure what it's like in terms of the x86/x64 setup mind, but, I'm confident that if there are problems in terms of that in the now not so distant future, then, Gernot will indeed sort it!

My 2p

Dabz



-=-=-
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 8Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit
Tue, 19 Mar 2013, 03:52
waroffice
Thanks Dabz, I'm sure I have asked this before and no-one really answered.

Looking at the code last night I not feeling it.

I did start a book on C++ programming and got about half way through before something else distracted me. I should really start that again but I'm so far out the loop I don't think I could do anything useful with it.

I monkey later on and see if I can get anything out of it.

Loom was good until it decided to spawn a load of consoles and killed my machine.

GLBasic, you say? will Google it later
Tue, 19 Mar 2013, 03:56
Jayenkai
GLBasic's actually quite nice.. I paid for it before finding out it didn't do Audio Pitching, and as has become wonderfully apparent over the past week, No Audio Pitching = No Lovely Pseudo-Random Music! (As well as sfx that all sound crappily identical)
It's a shame, really, because up until that point I was actually having quite a fun time with GLBasic.
If you can ignore the lack of audio pitch, it's alright, and can do lots of targets, just like Monkey.

-=-=-
''Load, Next List!''
Tue, 19 Mar 2013, 04:07
Dabz
I like C++, in actively developing it for the backend of my project, it uses 99% standard C++, so, effectively, i can just build it on anything that has a port of GCC (well, G++), but, you really want to do yourself a favour and work with something that does the grunt, like monkey and glbasic, no point in chaining yourself to one platform, then the hassle of porting it to another

And if you do build something that looks viable to sell... Your good to go because both products have apps in all the major stores, New Star Soccer is written in monkey and that won a bafta and beat the likes of FIFA!!!

-=-=-
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 8Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit
Tue, 19 Mar 2013, 04:18
Dabz
Oh, and just to note... Monkey compiles to a systems native language so to speak... Using the GLFW target compiles to C++, whereas its Android target compiles to Java.

GLBasic compiles all the source to C++ (Apart from its HTML5 target, which is obviously Javascript), in theory, say, the Android target in GLBasic could be perceived as being faster then monkeys, in reality though, its not, the only real thing about monkey is that you will have to take optimizations on board (sprite atlass, prebuild lists, keep the GC away from critical game code etc etc)

Our very own Mr Rockford is a moderator at the GLBasic support forum, and probably knows more about it as a whole then me, so, for any queries, i imagine he'll fill you in accordingly!

Dabz

-=-=-
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 8Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit
Tue, 19 Mar 2013, 04:41
rockford
Yeah. GLBasic is a really great programming language that offers more output formats than pretty much any other language (except C, C++). You code once, then compile for a number of handheld and desktop formats, including Windows, Mac OSX, iOS, Android, Wiz, GP2X, Caanoo, Pandora etc. etc. etc. Obviously, due to Apple being money-grabbing fucktards you need a Mac to fully compile for iOS devices (but that's true whichever language you use).

GLBasic uses a BASIC style syntax which is not too dissimilar to Blitz (I went from Blitz3D to BlitzMax and then eventually to GLBasic without any problems). Obviously it's more versatile and much, much faster than BASIC. It also has a very good forum and Gernot (GLBasic's coder) visits and updates regularly - although this is reducing in frequency due to his other commitments).

As Jay said, the sound aspect of GLBasic is slightly lacking (pretty much only in the pitch dept though). It plays .MP3, .OGG, .WAV and .MOD natively.

GLBasic does allow you to use inline C++ code and .DLLs so really you can slot a different sound engine in quite easily. Gernot has hinted that a new sound engine may be included at some point, but that's in the future.

My recent competition winning game, AquaVenture was coded in GLBasic.

As were all of these games shown in my Facebook photos - HERE


Tue, 19 Mar 2013, 05:39
waroffice
GLBasic looks sweet.

Before I take the plunge, can I do 2D programs that are fast in the free version?

The feature list suggests sprites and whatnot are 2D but I thought I would check first.
Tue, 19 Mar 2013, 05:55
Jayenkai
Indeed
^ That's as far as I got through my framework.

Things you'll see.
1. It uses the same "Three scales of images" that my current Monkey framework uses. Upon changing resolution, it reloads everything. Lovely! (Hit an F-Key, most of them change resolutions)

2. The screen is chock full of sprites. These aren't rotated or scaled, but the engine can cope with them. scaling and rotation is essentially "free", so a framerate stat is pretty much as-is, unless you're scaling to insane sizes.

3. There are four onscreen buttons. They're not very noticable, but they're there! They're used to test the audio commands.. It was at this point that I went "Hmm.. Where's the pitch command?", and it's been left like this ever since.

I'd include the sourcecode, but I can't make head-nor-tails of the folder. There's bits and pieces everywhere!! AARGH!!!

-=-=-
''Load, Next List!''
Tue, 19 Mar 2013, 05:56
Dabz
The glbasic demo pretty much allows you to build for the desktop, and the ios, android etc etc are only in the premium version.

For 2D sprites, i would recommend you look at polyvectors... I haven't got an example at hand, but you can think of them as quads with textures on... And their FAST!

Dabz

-=-=-
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 8Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit
Tue, 19 Mar 2013, 06:27
waroffice
Even on my rubbish work laptop the framerate sticks at 60fps.

went up to 1080p res and was fine.

Time to get downloading GLBasic
Tue, 19 Mar 2013, 08:00
9572AD
Aye, the GLBasic poly "sprites" are nice for free-scaling and distortion in addition to rotation. Do they do point colors as well, or am I remembering that from Blitz3D?

(Oh, use the 5-point model rather than the 4-point if you're doing much distortion as it comes out far better)


-=-=-
All the raw, animal magnetism of a rutabaga.
Tue, 19 Mar 2013, 08:15
Dabz

fucktards


My new favourite word! \o/

Dabz

-=-=-
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 8Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit
Tue, 19 Mar 2013, 08:39
rockford
Yep, GLBasic POLYVECTORs can do point to point colours and deformations etc. Be aware though - they are not always faster than normal sprites - it very much depends on the machine you are writing for and it's GFX card (remember they are 3D planes really) and what you are doing with them.

I'd stick with sprites for the time-being, as you can still scale, rotate and alpha them in real-time.


Tue, 19 Mar 2013, 09:20
Dabz
Ah, i also thought polyvectors were where its at... Cannot remember where i picked that up (Qube maybe)... Learn something new every day

Dabz

-=-=-
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 8Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit
Tue, 19 Mar 2013, 09:29
rockford
The difference between sprites and POLYVECTORs can be quite significant if you choose the wrong format for the wrong machine.
Tue, 19 Mar 2013, 09:31
Jayenkai
Best bet is to write yourself a little benchmarker. Get it to run through a bunch of stuff, and then run it on everything you can get your hands on.
That's pretty much the only way you'll know for sure.

-=-=-
''Load, Next List!''
Tue, 19 Mar 2013, 09:33
rockford
Indeed. Write once code is all fair and good, but you have to remember that every machine is different. I'm fairly lucky in that I own all the handheld devices I want to develop for, so can test on all of them. That's real fun, I can tell you...

Thankfully, I'm not doing anything Android at the moment, as I'd never be able to have every version to test with!
Wed, 20 Mar 2013, 07:09
waroffice
Tried GLBasic on my work laptop, I couldn't compile anything even when ran as an administrator it said it could't find the project file.

Will give it a go tonight, looks straight forward so far.
Wed, 27 Mar 2013, 18:42
Jayenkai
Topical!
It was two years ago, today, that I tweeted this!!



-=-=-
''Load, Next List!''
Thu, 28 Mar 2013, 07:17
JL235
I don't believe the emulation it is quite as extreme as Dabz says. For example WoW64 essentially handles switching the CPU from 64-bit, back to 32-bit mode, and back to 64-bit, and other changes which are required to ensure 64/32 work along side each other. I believe it only does emulation on Itanium. 32-bit apps are certainly not virtualized or emulated on x64 Windows.

Stuff using DirectX 7 is also still run on the graphics card. It's emulated, so it still works with the newer driver model that came in with Vista. Performance is only really going to be affected, by the fact that newer versions of DirectX have brought in features to improve performance, which you won't be taking advantage of.

WoW64 and the DirectX 7 stuff is more like a compatibility layer, than emulation. However I fully agree with Dabz; stuff still using it is horribly out of date.