Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
Other / Re: How to fu*k the Windows Defender
« Last post by BrassGear on Today at 01:24:31 pm »
Why is it necessary to use a poorly disguised vulgar cuss word when asking a question?

That is unfortunately how it often feels to deal with modern windows. :(

There's some good advice in this thread, thanks.
2
Graphics / Re: Spiral of Theodorus: Reversed n Rotate n Fills
« Last post by Roland57 on Today at 01:24:14 pm »
Thanks Roland57 for your transparent  BGRABitmap version.

I replaced the method for computing points, with another method that I find easier to understand.
3
my guess is that a pre-made game engine offers way more possibilities and can do more than just paint a screen so I assume with a game engine it can be more easy to handle your ideas and help you to do the same in less time, more robust and stable, with ready do use methods and bling bling.

You are probably correct. My expectations for the game were different when I made the decision.
4
FPC development / Re: create system unit from scratch
« Last post by Key-Real on Today at 01:14:09 pm »
OK, I can't define {$MODE FPC}
5
Third party / Re: InstallAware Using Lazarus IDE
« Last post by dbannon on Today at 01:05:38 pm »
It never passed any scrutiny. Bad software from 40 years ago is still bad software.

From their own website, https://www.installaware.com/company-overview.htm :

InstallAware Software, founded in 2003 by InstallShield alumni, is a software development company......... and is a Borland Technology Partner.

So, 40 years is a bit of a stretch. And I included the end of that paragraph just for fun !

Davo

6
FPC development / create system unit from scratch
« Last post by Key-Real on Today at 01:01:39 pm »
I looked at other implementation and the first thing all do is to include systemh.inc, so i do the same:

Code: Pascal  [Select][+][-]
  1. unit system;
  2. {$MODE FPC}
  3. interface
  4.  
  5. {$I systemh.inc}
  6.  
  7. implementation
  8. end.


but this gives me:



Compiling ./rtl/ps1/system.pp
systemh.inc(23,2) Error: Mode switch "OBJFPC" not allowed here
filerec.inc(33,17) Error: Identifier not found "THandle"
filerec.inc(33,24) Error: Error in type definition
textrec.inc(38,17) Error: Identifier not found "THandle"
textrec.inc(38,24) Error: Error in type definition
systemh.inc(867,17) Error: Identifier not found "TThreadID"
systemh.inc(867,26) Error: Error in type definition
mathh.inc(200,53) Fatal: Syntax error, ")" expected but "=" found
Fatal: Compilation aborted
7
How could any generalist game engine compete with that kind of simplicity and efficiency? The simple answer is they can't really.
How should anyone judge - we see no code?
So the only thing thats left is guessing or assuming, my guess is that a pre-made game engine offers way more possibilities and can do more than just paint a screen so I assume with a game engine it can be more easy to handle your ideas and help you to do the same in less time, more robust and stable, with ready do use methods and bling bling.
For 2D games, anything goes (even unaccelerated bitmaps, depend of course on type of game), for 3D my advise would be to watch different game engines and their features.
8
FPC development / Improvement of TFPTimerThread.Execute
« Last post by lagprogramming on Today at 12:53:29 pm »
packages/fcl-base/src/fptimer.pp has
Code: Pascal  [Select][+][-]
  1. {$ifdef Has_EventWait}
  2. procedure TFPTimerThread.Execute;
  3. var
  4.   WakeTime, StartTime: TDateTime;
  5.   WakeInterval: Integer;
  6.   Counter: int64; { use Int64 to avoid overflow with Counter*fInterval (~49 days)}
  7.   AInterval: int64;
  8.   Diff: Extended;
  9.  
  10. Const
  11.   wrSignaled = 0;
  12.   wrTimeout  = 1;
  13.   wrAbandoned= 2;
  14.   wrError    = 3;
  15.  
  16. begin
  17.   WakeInterval := MaxInt;
  18.   Counter := 1;
  19.   AInterval := fInterval;
  20.   FStartTime := Now;
  21.   while not Terminated do
  22.     begin
  23.     if GetWakeTime(AInterval,Counter,WakeInterval,WakeTime) then
  24.       Continue;
  25.     if not Terminated then
  26.       case BasicEventWaitFor(WakeInterval,fWaitEvent) of
  27.       wrTimeout:
  28.         begin
  29.         if Terminated then
  30.           Break
  31.         else
  32.           begin
  33.           try
  34.             if not Timer.UseTimerThread then
  35.               // If terminate is called while here, then the Synchronize will be
  36.               // queued while the stoptimer is being processed.
  37.               // StopTimer cannot wait until thread completion as this would deadlock
  38.               Synchronize(@Timer.Timer)  // Call user event
  39.             else
  40.               Timer.Timer;
  41.           except
  42.             // Trap errors to prevent this thread from terminating
  43.           end;
  44.           Inc(Counter);                // Next interval
  45.           end;
  46.         end;
  47.       wrSignaled:
  48.         begin
  49.         if Terminated then
  50.           Break
  51.         else
  52.           begin                      // Interval has changed
  53.           Counter := 1;              // Restart timer without creating new thread
  54.           AInterval := fInterval;
  55.           FStartTime := Now;
  56.           end;
  57.         end;
  58.       else
  59.         Break;
  60.       end
  61.     end;
  62.   BasicEventDestroy(fWaitEvent);
  63. end;
  64.  
  65. {$ELSE Has_EventWait}
  66.  
  67. procedure TFPTimerThread.Execute;
  68.  
  69. var
  70.   WakeTime, StartTime: TDateTime;
  71.   WakeInterval: Integer;
  72.   Counter: int64; { use Int64 to avoid overflow with Counter*fInterval (~49 days)}
  73.   AInterval: int64;
  74.   Diff: Extended;
  75.   S,Last: Cardinal;
  76.   RecheckTimeCounter: integer;
  77.  
  78. const
  79.   cSleepTime = 500;           // 0.5 second, better than every 5 milliseconds
  80.   cRecheckTimeCount = 120;    // Recheck clock every minute, as the sleep loop can loose time
  81.  
  82. begin
  83.   WakeInterval := MaxInt;
  84.   Counter := 1;
  85.   AInterval := fInterval;
  86.   FStartTime := Now;
  87.   while not Terminated do
  88.     begin
  89.     if GetWakeTime(AInterval,Counter,WakeInterval,WakeTime) then
  90.       Continue;
  91.     if not Terminated then
  92.       begin
  93.       RecheckTimeCounter := cRecheckTimeCount;
  94.       s := cSleepTime;
  95.       repeat
  96.         if s > WakeInterval then
  97.           s := WakeInterval;
  98.         sleep(s);
  99.         if fSignaled then            // Terminated or interval has changed
  100.           begin
  101.           if not Terminated then
  102.             begin
  103.             fSignaled := False;
  104.             Counter := 1;            // Restart timer
  105.             AInterval := fInterval;
  106.             StartTime := Now;
  107.             end;
  108.           break;                     // Need to break out of sleep loop
  109.           end;
  110.  
  111.         dec(WakeInterval,s);         // Update total wait time
  112.         dec(RecheckTimeCounter);     // Do we need to recheck current time
  113.         if (RecheckTimeCounter < 0) and (WakeInterval > 0) then
  114.           begin
  115.           Diff := (WakeTime - Now);
  116.           WakeInterval := Trunc(Diff * cMilliSecs);
  117.           RecheckTimeCounter := cRecheckTimeCount;
  118.           s := cSleepTime;
  119.           end;
  120.       until (WakeInterval<=0) or Terminated;
  121.       if WakeInterval <= 0 then
  122.         try
  123.           inc(Counter);
  124.           if not Timer.UseTimerThread then
  125.             // If terminate is called while here, then the Synchronize will be
  126.             // queued while the stoptimer is being processed.
  127.             // StopTimer cannot wait until thread completion as this would deadlock
  128.             Synchronize(@Timer.Timer)  // Call user event
  129.           else
  130.             Timer.Timer;
  131.         except
  132.           // Trap errors to prevent this thread from terminating
  133.         end;
  134.       end
  135.     end;
  136. end;
  137. {$ENDIF Has_EventWait}





Variable "Last" is declared but never used, which means it can be removed.
Looking at variable StartTime I've noticed that when Has_EventWait is defined, the variable can be removed because it's not used at all. But then I've looked at the content of the procedure when Has_EventWait is not defined. It has just a simple assignment: StartTime := Now;. When Has_EventWait is defined the equivalent line is FStartTime := Now;. It doesn't look right. Looks like a bug, a typo. Most likely should have been "FStartTime := Now;" instead of "StartTime := Now;".
Here is a patch.
9
General / Re: Assign (textfile) not compiling - sometimes.
« Last post by Thaddy on Today at 12:18:09 pm »
That does not make these things any better. It is not Pascal.
10
Other / Re: Question for people who have built commercial apps
« Last post by marcov on Today at 12:04:56 pm »
Back around 20 years ago it was common for most major software running on the PC to be payware.  Nowadays it seems people increasingly expect programs to be free or low cost.  Is there some truth in this?

I don't think it is fundamentally just an audience thing. Of course, if there are free alternatives that are equivalent, why wouldn't they go for it? But if you can get something better suited for a reasonable price, why wouldn't you just pay it also?

So, yes, the free alternatives moved, but at the same time paid software got proportionality more expensive. In the last decade even more so due to subscription fees.

The reasons for that can only be guessed, but I think that 1995-2005 was an expansion time for software. Heaps of users entered the PC market for the first time, and market share among them mostly determined your next year's revenue.

After that, software directly marketed to end users became more a replacement market, and growing market share exponentially was less of an option and direct revenue (and thus company profitability) became more important. 

All this lead to price hikes and targeting the products at more advanced users that would pay those prices. That leads to a vicious circle where your audience becomes smaller and more price hikes are required.

As we are on a Lazarus/FPC forum, one of the ultimate examples of this kind of behaviour are the products of our direct competitor, Turbo Pascal and Delphi.  Their current commercial offerings start at Eur 1500/year. This was sub Eur 100  for an eternal license (or equivalent pre euro currency) for the cheapest, commercially usable edition a good 20 years ago.

Now there has been some inflation in that period, but not 1500%, and than I'm not even taking into account perpetual vs annual fee.


Even back then many software had free versions bundled with e.g. hardware. Scanner OCR etc, entry levels of photoshop with digital cameras etc.  route planning software with GPS equiped PDA's etc.

Quote
For those who have authored payware over the years I am wondering if you find some benefit in having a free community version instead of a trial version, and a premium paid version on top of that.  Have you gotten much benefit from this, or do you find you lose a lot of potential customers to the free version?  I am figuring increase uptake of the program would offset that.

I write software professionally for over 20 years now, but never sold boxed products to end users. Always B2B "solutions".

So we have established above that if you sell perpetual licenses, the number of users buying it will naturally decrease by year per definition in a not exponentially growing market like 1995-2005. And you still have to spend marketing to get even those.

That is where the free versions come in, these are architected so that the community version only covers one common, but occasional and basic use . People requiring the full product will have other uses/requirements that only the full product satisfied.

This essentially make the free users kind of a marketing instrument. People starting/testing the free version in companies and later upgrading, people using it are members of some club or forum related to what they are doing and tell what they are using etc.

Never make the mistake that a free user is a customer lost. Most would never have been a customer anyway. You will need to carefully craft your SKUs so that this relation between free and paid remains to not cannibalise your market.

It is a fine line that requires careful balancing. One tip that I think is smart is to make some way to end the free version. (e.g. some form of activation) Not so much to be able to take them off the market, but more to force your users always using the newest version with the conditions and limitations attached to that version. Makes the balancing easier, and allows you to correct a slip up int he balancing.

And also subscriptions. I share your dislike for them, and it is often not easy for non widely established products, but if there is something in your business model that requires annual updating of software (or its data), it might be at least an additional revenue source. Even if just at modest prices (so not pay for use, but pay for data updates), and at the same time that can be a vehicle to keep the upgrade train moving a bit, also improving revenue.
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018