Cobra
Miscellaneous Forums/General Discussion/Cobra
So has anyone here tried out Cobra yet? I didn`t realise it had already been released until today. How does it compare to the almighty Blitz?
Jason.
Probably best not to discuss it here - here's some more info though.
http://en.wikipedia.org/wiki/Cobra_%28programming_language%29
I tested it. I didn't like the syntax.
Gave it a quick look - seemed more structurally rigid than Blitz, which might be a good thing. The (beta) 3D module has been released to the beta/pro users now so I guess I'll be looking again soonish.
I love Blitz too much to switch anyway, just curious...
Jason.
Thing is if ION2d is released (A non accelerated 2d engine), there are probably enough BMax users willing to jump at it, cos it would seriously drop the min requirments for BMax.
Then if ION3D is released, it looks promising enough to become a defacto replacement to the promised "Max3D"
How close ION2d is to being a viable product is vauge, with Graham using it as a hook quite a long time ago, then (as is expected), consentrating on the main Cobra users.
If you use BMax, its probably worth adding the cobra site to your favourites and going to look every now and then.
H&K's right. The ION 2d and 3d engines will be released after the 3d module comes out of beta. Yes Cobra is more structured as Sledge said, because Cobra is based on Pascal - not BASIC.
Pure2d, Cobra2d and Cobra3d modules are out. The Cobra3d Module is currently in beta testing and I believe Graham is then working on documentation after any bugs are ironed out - then the ION Engines for BlitzMax and PureBASIC.
Define how it has more structure. Atm that statement doesn't mean anything to me.
Cobra is promised to have unicode support, I really hope it will happen..
Pascal and C are more structurally rigid than BASIC - I don't think that needs to be explained Chroma - unless you've only ever used BASIC ofcourse. Gabriel has just given an example I see (which is correct).
Anyway, I'll leave Graham to make any more comments if he wants too.
Define how it has more structure. Atm that statement doesn't mean anything to me.
In Pascal, you have to declare variables in blocks before the code sections that use them. You can't just create a new variable in the middle of a code section. I think this is the case with Cobra too.
In Pascal, you have to declare variables in blocks before the code sections that use them. You can't just create a new variable in the middle of a code section. I think this is the case with Cobra too.
That's a good thing. I think the only reason blitz doesnt enforce such things is because it's also aimed at complete novices, which is fine, I guess.
I'd much prefer being able to introduce a variable as close as possible to the code where it's being used.
Rather, I'd prefer to have the freedom to do so. If you preferred, you could still declare them in the beginning of a block (just like in Blitz). I"m not knocking Cobra, but I just can't stand language decisions that are essentially arbitrary and ultimately reduce the expressiveness of a language.
ScultureOfSoul - isn't this close enough? ;-)
procedure LoadPak
var
Index,NewSprite,BaseSprite,ZOrder,PrevZOrder : integer
pak : Element
begin
pak := OpenPak...
Like I said, it's not a huge issue and it's not always an issue, but all the same, if I had my preference, I'd have the freedom to put it wherever. That doesn't mean I wouldn't use Cobra if it's the right tool for the job. :)
Well, you dont have to declare them at all in blitz, unlike something like C.
I prefer the C way, personally - blitz has made me lax back into some pretty lazy coding practices which untimately only end up in me trying to track down silly bugs etc. I need a programming language to crack the whip and keep me in line. :)
Pascal and C are more structurally rigid than BASIC - I don't think that needs to be explained Chroma
Why doesn't it need to be explained? If I knew what was meant by it then I wouldn't have asked.
But since someone was kind enough to give me an example, I do understand what it means now.
Also, I don't see a huge beneficial impact from this "more structured" angle. Maybe a matter of preference? Maybe something old dinosaur Pascal coders get off on? :P
Not declaring variables in blocks before the code sections that use them might be aimed at novice users but it doesn't affect the power or capability of the language. Moot point? Definitely.
Not declaring blah blah might be aimed at novice users but it doesn't affect the power or capability of the language. Moot point?
No, it doesnt affect the capability of the language itself, but it's not a moot point. Without a structured discipline, us weak humans are prone to make mistakes that result in shoddy, bugged code. It can be quite easy to tie yourself in knots if the language you're using is too 'forgiving'. :)
Well considering the phenomenal games being made with BMax, I'd have to say that Cobra being slightly more "structured" doesn't mean much. I guess that's what I was trying to say from the beginning and where my moot point statement originated from.
Well considering the phenomenal games being made with BMax, I'd have to say that Cobra being slightly more "structured" doesn't mean much.
The kind of people who finish notable games in Max/BB/B+/B3D are, by default, the percentage who can organise themselves just fine. A more structured language is never going to mean much to users in that bracket, but it doesn't mean that others wouldn't benefit. You're discounting all the failed projects you don't see, even though it's the fact that you don't see them which is of the most significance.
Ah, bmax is a different kettle of fish. I havent looked at bmax or cobra, TBH. However, I do know that bmax allows users to enforce more 'structure' to code, if so desired. I'll bet that most bmax devs that have released finished, working apps have chosen to enforce this, during development.
Then if ION3D is released, it looks promising enough to become a defacto replacement to the promised "Max3D"
No offense or disrespect to anyone, but I would think that anyone who hasn't already switched to another 3D solution, isn't going to. They are going to wait for BlitzMax.
No offense or disrespect to anyone, but I would think that anyone who hasn't already switched to another 3D solution, isn't going to. They are going to wait for BlitzMax.
Personally I'm quite happy plodding along with 2D stuff for now.
I'm not waiting for Max3D, though. If I wanted to do 3D right now... I dunno... I wouldn't wait for Max3D but I'd certainly shop around for a 'here and now' solution.
I'm not waiting for Max3D, though. If I wanted to do 3D right now... I dunno... I wouldn't wait for Max3D but I'd certainly shop around for a 'here and now' solution.
Pity other folk don't take heed of this statement. Then again, Gfk is someone that actually finishes games, so it's not surprising others won't listen, I guess. :P
I would think that anyone who hasn't already switched to another 3D solution, isn't going to. They are going to wait for BlitzMax
Well.... I have selected Irrlicht, which I find easy to use, even without the IB3D wrapper, but I probably am going to get ION2D, for the lower specs, and if ION3D meshes well with that, then I might move over.
I take your point though, and I agree most ppl should be now already be using an alternative, or still waiting for Max3D
You're discounting all the failed projects you don't see, even though it's the fact that you don't see them which is of the most significance.
I doubt a lot of failed projects are due to any lack of language structure. It's mostly to do lack of focus, motivation, determination, funds, etc etc.
Personally I'm quite happy plodding along with 2D stuff for now.
I agree totally.
No offense or disrespect to anyone, but I would think that anyone who hasn't already switched to another 3D solution, isn't going to. They are going to wait for BlitzMax.
Is it even on its way still?
It's all speculation at best but I'd be will to bet on my statement about why projects don't get finished over yours.
What's this either/or business? These are all factors that compound one another to produce failure, surely.
Sledge, I rewrote my post before you posted that. There's must be some serious edit lag on this forum?
On a different note, I snapped my right ankle 90 degrees to the left last night (rolled it) playing basketball. It kinda sucks. :(
It's mostly to do lack of focus, motivation, determination, funds, etc etc.
Predictably, I agree. But note this: Imagine (
imagine!) I write sloppy code, then when it's getting hard to manage I refactor it, then I carry on. If I lack focus, motivation or determination then the code does not get refactored and the project grinds to a halt, because refactoring is a bind. Now if I couldn't write messy code in the first place...
I snapped my right ankle 90 degrees to the left last night (rolled it) playing basketball.
*Ouch* That'll keep you at your keyboard.
Personally, I am terribly, terribly excited at the thought of Cobra3D. Won't stop me using Blitz3D - but I will buy Cobra3D and use it too.
I've got Cobra - but never really used it much - I just want the 3D to play with.
I don't do Cobra posts here, out of respect for Mark/Blitzresearch.
But as people will be reading this, one thing to add is that you can remove most of the pre-definition of variables with a compiler switch (not widely publicised! tho as yet), allowing a lot of code to be done in a 'blitzy' sort of way, but it still ends up required for more advanced variable features like making them static, or pre-initialised to a value, which in programming terms can give a good structure to functions, by introducing a known 'start state'.
advanced variable features like making them static, or pre-initialised to a value, which in programming terms can give a good structure to functions,
Aren't you just talking about this:
Method rubADuck:Int(ducks:Int = 5, rubs:Int = 99)
If rubbing(ducks, rubs) Return true
Return False
EndMethod
Cause we can do that already.
If its pascal then it will be somewhere between Bmax and C++ i assume (for structure similarity, not for how good it is :O - not commenting on that cos i dont really know)
I used to like turbo pascal, its what i started programming on a pc with. Its like C power and structure without all the bollox (ie. 1000s of errors for a missing bracket).
Cause we can do that already. - Drew
You missed the point, Graham was just saying if you're using Blitz3d/Blitz Plus which don't require defining of variables (I know Max can require this) you can switch to something more familiar - which I think is a bad move (don't give access to that compiler switch Graham).
I agree with Dan.
Sorry Graham/BRL, I know we shouldn't comment on Cobra here and I did try to refer people to another site. But questions were asked and mis-understandings needed to be corrected I felt - and ofcourse Graham is producing 2d and 3d engines for BlitzMax at a later date which people here might like to know about.
I dont think it a bad Idea have a little internal setting to not require defining variables. As long as you dont tell or explain to anyone how to use it.
Then whenever begginers ask just say
"Im sorry, but if you are not advanced enough to know how to use this setting, your not good enough yet to be told how to use it"
Bit like saying you car is capapble of 900HP but its limited to 600.
Anyway, I think Steve if right, I cannot see any usful reason, NOT TO, force variable declareing as standard. (BMax could have done with Strict being standard, and a new Keyword CASUAL)
Just for the record, I wasn't saying I desire the ability to use a variable that hasn't been declared. That path leads to madness!
I was just saying, I don't like being forced to declare variables at the top of a code block. It's not a huge deal, just a preference, as I mentioned.
Another 2D engine...
I thought Cobra was a .Net Python-ish language.
Or at least I thought there was one in development. (Martin Fowler talks about it once in awhile on his website)
Cobra3D might be coming as soon as May.
I'm predicting a stampede of Blitzers to Large over there and snaffle it - even if it means they carry on using Blitz.
Cobra3D has lots of 'built-in' stuff - Cobra water (you can do things like simulate raindrops hitting water - ie ripples) - built-in blur - trail effects - customisable 3D trees - more built-in primitives than the usual cube, sphere, cone - skybox - might have particles too - shadows - stuff, more stuff, etc.
So much excitement to take in - I swear on the eve of its release I won't have a dry night.
I swear on the eve of its release I won't have a dry night
Well I recommend you have a night in a tumble dryer,on full heat, with extra spin!
Either that or 'Cobra3D has lots of 'built-in' stuff - Cobra water (you can do things like simulate raindrops hitting water - ie ripples) - built-in blur - trail effects - customisable 3D trees - more built-in primitives than the usual cube, sphere, cone - skybox - might have particles too - shadows - stuff, more stuff, etc
Great, but erm... what media comes with it?
Dabz
..media should be done by artist??
Shame about SqueakyDucks web site - its a complete mess.
I presume there is no Mac version...
You all have to answer my questionnaire thing:
http://www.squeakyduck.co.uk/forum/index.php?topic=385.0I'm making notes.
The great thing about the Cobra site is it is a bit like the Blitzcoder one in the way that you can keep tabs on people easier - see what they are getting up to.
I thought Cobra was a .Net Python-ish language.
I think you're confusing it with
CORBA - Common Object Request Broker Architecture.
So much excitement to take in - I swear on the eve of its release I won't have a dry night.
Remember to get one of those rubber blankets to cover the mattress.