The MASM Forum

Projects => Game Development => Topic started by: HSE on December 16, 2019, 07:46:43 AM

Title: StarGate project
Post by: HSE on December 16, 2019, 07:46:43 AM
Hi all!

The idea was to develop a new progress control, but don't look very well in small scale.

In the way, I added some routines to ObjAsm's Pixelmap like FloodFill, lens, flare, and circles with smooth edge. Still I have to clean the code, wich still is 32 bits but inside the framework for dual bitness.

I draw only the superior chevron, the others are rotations and copy of that chevron. I'm using qWord's routine (http://masm32.com/board/index.php?topic=3075.msg31917#msg31917), but you can see that it's not perfect.

Regards. HSE

Later: without debugging system, and without leaks.
Title: Re: StarGate project
Post by: Biterider on December 16, 2019, 09:10:01 AM
Hi HSE
It runs perfectly here.   :thumbsup:
It seems to be the debug version, since it launches the DC.
I think a way to get a better result is to draw the rotated chevrons with a higher resolution on an auxiliary pixelmap and then draw them on the target at a sub-pixel level.

Biterider
Title: Re: StarGate project
Post by: HSE on December 16, 2019, 09:19:24 AM
Thanks Biterider!

DC is alway open here  :biggrin:

There is some problems, but it's just a test.
Title: Re: StarGate project
Post by: jj2007 on December 16, 2019, 09:41:43 AM
It runs and shows a stargate, but cpu usage is 100% for the core of the process, and it's unresponsive :sad:
Title: Re: StarGate project
Post by: HSE on December 16, 2019, 09:44:59 AM
Hi JJ!

87 kb file?

Title: Re: StarGate project
Post by: jj2007 on December 16, 2019, 11:31:37 AM
89088 bytes
Title: Re: StarGate project
Post by: HSE on December 18, 2019, 06:01:07 AM
Some functions like lens, circle and ring posted here , in ObjAsm subforum (http://masm32.com/board/index.php?topic=8232.new#new)
Title: Re: StarGate project
Post by: HSE on December 29, 2019, 09:04:37 AM
Hi all!

Modifying some functions, a circle progress bar following Fearless control (http://masm32.com/board/index.php?topic=3059.0) can be made.

This is maked setting pixels in a bitmap, not Gdi+ at all.

There is a color gradient drawing the arc (a little elemental)

Regards. HSE

(new improved binary in later post (http://masm32.com/board/index.php?topic=8228.msg90463#msg90463))
Title: Re: StarGate project
Post by: Biterider on December 29, 2019, 08:57:57 PM
Hi Hector
Looks very professional  :thumbsup:
I noticed that the copyright string in the application properties is not resolved (%BUILD_YEAR).

Biterider
Title: Re: StarGate project
Post by: caballero on December 29, 2019, 10:34:37 PM
That's nice  :thumbsup:
Title: Re: StarGate project
Post by: HSE on December 30, 2019, 03:15:14 AM
Thanks, is in progress  :thumbsup:
Title: Re: StarGate project
Post by: HSE on December 31, 2019, 02:11:08 AM
An update of binary with improved resizing to ellipse, and smooth arc extremes.

Just to explain a little: I'm trying not to use GDI+ because Wine I have don't support GDI+. If your Win program is "GDI+ free" have a good chance to run correctly in other OS.

Regards. HSE
Title: Re: StarGate project
Post by: Biterider on December 31, 2019, 03:42:15 AM
Hi HSE
SG2 works fine here. The application properties are OK now  :thumbsup:
Biterider
Title: Re: StarGate project
Post by: daydreamer on December 31, 2019, 04:46:37 AM
An update of binary with improved resizing to ellipse, and smooth arc extremes.

Just to explain a little: I'm trying not to use GDI+ because Wine I have don't support GDI+. If your Win program is "GDI+ free" have a good chance to run correctly in other OS.
the previous version started all over with from 0% when maximizing,this works better with continue from previous percentage :thumbsup:


Title: Re: StarGate project
Post by: HSE on December 31, 2019, 07:11:38 AM
works fine here
this works better

Thanks for test demo app :thumbsup:
Title: Re: StarGate project
Post by: jj2007 on December 31, 2019, 08:35:56 AM
Works fine now, although cpu usage is still somewhat high: 7%, which means 28% of one core :thumbsup:
Title: Re: StarGate project
Post by: HSE on December 31, 2019, 10:17:39 AM
Hi JJ!

Still don't work so well like Fearless control but is improving every time  :biggrin:

The idea it's not optimization, but removing duplicates is going to make drawing faster.

Thanks.
Title: Re: StarGate project
Post by: daydreamer on December 31, 2019, 09:41:59 PM
Hi JJ!

Still don't work so well like Fearless control but is improving every time  :biggrin:

The idea it's not optimization, but removing duplicates is going to make drawing faster.

Thanks.
but cpu based drawing,isnt that normally gets high cpu usage?
also isnt the next step to evolve it to a rotating stargate,like in SG-1 tvshow?
Title: Re: StarGate project
Post by: HSE on January 01, 2020, 06:24:39 AM
also isnt the next step to evolve it to a rotating stargate,like in SG-1 tvshow?

That was an idea, but don't look nice if control is small.

Beside, if the gate open, we don't know what is on the other side!  :biggrin: :biggrin: :biggrin:
Title: Re: StarGate project
Post by: Siekmanski on January 01, 2020, 07:06:13 AM
Aren't you curious what's behind the other side?  :biggrin:
Title: Re: StarGate project
Post by: daydreamer on January 01, 2020, 09:20:38 AM
also isnt the next step to evolve it to a rotating stargate,like in SG-1 tvshow?

That was an idea, but don't look nice if control is small.

Beside, if the gate open, we don't know what is on the other side!  :biggrin: :biggrin: :biggrin:
only have got start of that web version,goto random .html page
Title: Re: StarGate project
Post by: daydreamer on January 10, 2020, 01:10:46 PM
Aren't you curious what's behind the other side?  :biggrin:
here is one of my interpretation of Worlds
Haven
name files L+number ,you can have random generator so you load random .jpg and fade in or your choice of fx or compress jpg more to smaller file size,also possible export meshes

Title: Re: StarGate project
Post by: jj2007 on January 10, 2020, 07:09:17 PM
No code in that archive, Daydreamer, just a jpg :sad:
Title: Re: StarGate project
Post by: HSE on July 10, 2020, 07:13:42 AM
No concentration for something better!   :biggrin:

Chevrons still need antialiased borders.
Title: Re: StarGate project
Post by: Biterider on July 11, 2020, 03:45:49 PM
 :thumbsup:
Title: Re: StarGate project
Post by: daydreamer on July 12, 2020, 02:19:52 AM
No concentration for something better!   :biggrin:

Chevrons still need antialiased borders.
nice :thumbsup:,but isnt that easily solved with antialias code
Title: Re: StarGate project
Post by: HSE on July 12, 2020, 03:06:42 AM
nice :thumbsup:,but isnt that easily solved with antialias code
Yesterday I found an algorithm, but it's coded in very very C++  :biggrin:
Title: Re: StarGate project
Post by: simplejack on August 11, 2020, 10:28:45 PM
Thanks for sharing, this is a very useful information. Can you share the code to us so we can also use the new progress control.
Title: Re: StarGate project
Post by: HSE on August 11, 2020, 11:36:02 PM
Can you share the code to us so we can also use the new progress control.

Still in development.  :thumbsup:

It's a little slow. In real applications I'm using Fearless' Circlebar Control (http://masm32.com/board/index.php?topic=3059.0)