June 25, 2018, 03:01:35 AM

Recent Posts

Pages: [1] 2 3 ... 10
General Discussion / Re: Random question about languages
« Last post by Steve Elliott on Today at 12:08:10 AM »
Personally I agree that the Global, Field and Local keywords are unnecessary.

General Discussion / Re: Random question about languages
« Last post by col on Today at 12:03:13 AM »
I think the point Xaron is trying to get across is something like

 'Why not use this'
Code: [Select]
Type TTest
  Method superduper()
    x:int = 10
    self.x = 20
    print x + "  " + self.x
  End Method
End Type
new TTest.superduper()

Personally I agree that the Global, Field and Local keywords are unnecessary, and Global should be replaced with 'Static'.

Second question: What do you like as a starting character for comments?
I use ' for a complete line comment and

'/ comment /'

for multi-line and inline comments.
BlitzMax / BlitzMax NG / Re: (FontMachine) 9MB Font fails to load in DX9 mode
« Last post by col on June 24, 2018, 11:51:50 PM »
If NG is set up the same as the legacy BMax then the actual gpu texture for the font character(s) are only created when you hit a DrawText command. If you get a crash at the point of loading the font then something else related is going on.
If you are loading a font into an existing variable name that has a font so that the old font is now up for being collected by the GC, then the GC could in turn release the textures used by that old font, that could be exposing a possible bug.

You could be doing things manually in your own code as opposed to using the BMax font commands, but the possible issues above will still apply, if this is the case what texture size is the font?.

PS. We did use to have a similar sounding issue but it was fixed - maybe there's a regression in there somewhere.

As Derron says... if you can post the font and a small demo that reproduces the issue then I'm sure the problem can be found pretty quickly.

"A Knight's War" - Retro/Strategy
Best to use Desktop browser but can be played with mobile and tablet browser as well.
No required dependencies
"A Knight's War" is a strategy game allowing players to fight as the forces of 'order' against the hordes of 'chaos'.  There are three modes of gameplay available. Campaign (1 player), 2 Player (hotseat) and Online (multiplayer). 
It is a turn based strategy which was inspired by games I played as a kid such as Defender of the Crown, Lords of Conquest, Ancient Art of War and a few others. The retro component (probably not as interpreted by anyone else here) mainly referred for me to the style of the gameplay more than the graphics (- yes I know...not what it turned out was intended by the word 'retro' ).
Help is available in the battle mode through the 'advisor' as context sensitive text displays when he is clicked on.
There was a lot of helpful feedback from Derron and IWasAdam which was integrated into this - and I wouldn't have achieved what I have achieved here without their help.
There are loads of comments I've made throughout development in the worklogs area.
Oh....if you do end up playing it then I recommend at least once sitting through the 'demo mode' that occurs after about 20-30 seconds delay at the title screen....

Note.....there is a hidden mode in the Online game that allows the AI to control your forces....it was good for debugging and I've left it in....if you were to start the game, set this mode, and leave it run - you'd probably win the campaign while away from your desktop for several hours! I'll leave it for you who are programmers to find this mode if you choose.

Derron - I know you gave me some more feedback a few days ago about changes..it's late enough in the comp that I'm happy enough with it....not making any more changes from this point on...

Need to start thinking about my next game for my own purposes.

All Media apart from music created by myself. Most graphics drawn using references of online images found or images I have in books. Music purchased from shockwave-sound.com.
Source available as it is a web page, the only source I'm not providing is the php and sql code (which is minor and only applies to the multiplayer mode)
BlitzMax / BlitzMax NG / Re: (FontMachine) 9MB Font fails to load in DX9 mode
« Last post by Derron on June 24, 2018, 11:20:37 PM »
doesn't it tell you if eg. "_texture" is null?

Is the 9MB texture maybe too big? what dimension does it have?
I never used "FontMachine" as I wrote my own BitmapFont-Class (+sprite atlas +effects like dropshadow/glow). But all in all it will do the same thing: render glyphs onto a big image sheet. So if you use a big font size (72 or so) then the resulting texture might be bigger than simple 2k*2k. Depending on that size things might fail somehow (gpu driver issues).

Can you recreate the issue with a simple sample doing nothing more than creating the graphics context (opening up the window...), loading the file and using the font in a simple cls + draw + flip loop?
With this (and the asset itself) people might be able to check it out and maybe are able to help.

BlitzMax / BlitzMax NG / Re: (FontMachine) Font fails to load in DX9 mode
« Last post by Yellownakji on June 24, 2018, 10:58:39 PM »
I'm aware Ron, but it does not really answer my question.   The error itself is a D3D9 surface failing to create... Then Blide opens the D3d9MAX2D.bmx @ line 118 (_d3d9Graphics.AutoRelease _texture)

It only does this when i attempt to load this font, in DX9 mode.
General Discussion / Re: Random question about languages
« Last post by Derron on June 24, 2018, 10:53:48 PM »
Code: BlitzMax
  1. Type TTest
  2.   Field x:int
  4.   Method superduper()
  5.     local x:int = 10
  6.     self.x = 20
  7.     print x + "  " + self.x
  8.   End Method
  9. End Type
  11. new TTest.superduper()

Without the "local" you would see "20 20" instead of "10 20" printed.

BlitzMax / BlitzMax NG / Re: Loading asset improperly?
« Last post by Derron on June 24, 2018, 10:50:26 PM »
Maybe add "Font Machine:" to your thread title ... without that little side note at the end of your thread I would not have known what you were talking about.

If compiled in debug mode you should see where exactly it fails.

Miscellaneous / Re: [bmx] SplitString by Perturbatio [ 1+ years ago ]
« Last post by Derron on June 24, 2018, 10:48:22 PM »
yes, on a token it might not be desired - which is why you could trim the values before adding to the list. But as described above (and seconded by you) the trimming of the original/raw string can lead to issues.

The OP is no longer active for many years now, so I assume he wont come here full of anger because you optimized his outdated code :-)

General Discussion / Re: Random question about languages
« Last post by Steve Elliott on June 24, 2018, 09:13:12 PM »
So here's the first question: Why do languages like BlitzBasic, Monkey, even AGK need the keyword "Local" to declare a locale variable?

Partly why I don't use those languages - unnecessarily verbose.  In C++ and my own language scope is obvious without adding extra words.
Pages: [1] 2 3 ... 10