Presenting using PureBasic

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Presenting using PureBasic

Post by Kukulkan »

Hi,

I wrote a little presentation-tool using PureBasic. The special thing about are the smooth effects and the 3D capabilities. I currently created a few basic effects.

You can download the compiled version (exe, one image and slideshow-xml) here: http://www.x-beliebig.info/Download/Pres3D.zip

Simply extract all files to a folder and run the Pres3D.exe.

As I do not know if this will get a shareware tool, the sourcecode is currently not public. The complete presentation may get controlled using the slide.xml file. You can change resolution and fullscreen-mode in the first few lines. If you do not enter a screenwidth and screenheight value, the current desktop dimensions will get used.

Have fun,

Kukulkan
User avatar
Michael Vogel
Addict
Addict
Posts: 2797
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: Presenting using PureBasic

Post by Michael Vogel »

Looks quite good, beside some automatic list commands (which set a number/dot/etc. on the front) you should think to do an easy editor for placing the elements on the screen. Some other points (encrypting the xml file) could be useful as well

I wrote something like that a decade ago and was to lazy to write the editor part. The result: after using the tool for some presentations in the company I've been working that time, I didn't want to use it anymore because of the lack of a wysiwyg-editor (because of the huge number of commands for screen and object effects, object alignment, font effects etc.)

Good luck for your project!
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: Presenting using PureBasic

Post by Kukulkan »

Hi,

currently I focus on the engine. Some editor that creates the needed XML structure would be very nice... I think about making this open source. Maybe some other PB programmers are interested in doing an editor for this, if I make it open source?

What would be the benefits of encryption? If the program/editor is able to decrypt by default, there is no possible effect on this. Or do you think about presentations that can be only viewed after entering the correct password to decrypt the xml?

Currently, this are the plans:
- additional effects (starwars, image-split effects, wobble etc.)
- additional text-styles (gradients in chars)
- scrolling mousewheel together with pressed Ctrl-key should show a list of all pages to directly choose from
- automatic rescale for different resolutions
- find a cross-plattform way to make transparent 3d sprites without temporary saving and reloading each image

Kukulkan
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Presenting using PureBasic

Post by PB »

Very good app! :) I enjoyed watching it, which is rare for me. :)

> I do not know if this will get a shareware tool, the sourcecode is currently not public

You don't need to give your source away, even for a free tool.
Don't let anyone nag you into doing that. Your own code is
personal and private to you, and I hate people who demand
that others give away their code for nothing. Keep it safe!
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: Presenting using PureBasic

Post by Kukulkan »

Hi,

I just added image-splitting for some more interesting effects on images (explosion, rotating tiles etc.). Link from the first post ist actualized. The delivered demo-slide includes the new effects at the end.

Kukulkan
User avatar
Demivec
Addict
Addict
Posts: 4257
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Presenting using PureBasic

Post by Demivec »

Great app! The newest image effects seem to require a long delay before showing each new screen. Is that intended?
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: Presenting using PureBasic

Post by Kukulkan »

Hi,
The newest image effects seem to require a long delay before showing each new screen. Is that intended?
I have problems to generate Sprite3D with Aplha-Channel. As of this, I need to save each image to disk and reload it as sprite. This currently seem to be the only "no windows-api" way to get alpha-transparent chars :(

Upon this, it needs some time to compute and encode/decode the image etc... And a splitted image consists of a lot of small images. The faster the computer, the shorter the delay between the pages. I think about pre-calculation for a future release. Maybe someone finds a way to generate alpha-channel sprites directly on the fly?

Kukulkan
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Presenting using PureBasic

Post by Trond »

Maybe someone finds a way to generate alpha-channel sprites directly on the fly?
Generating the sprites is easy, the problem is that PB doesn't support drawing on them. But you can modify the memory directly.

Code: Select all

If InitSprite() = 0
  MessageRequester("Error", "Can't open screen & sprite enviroment!", 0)
  End
EndIf
InitSprite3D()

OpenWindow(0, 0, 0, 512, 384, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, 512, 384, 0, 0, 0)


CreateSprite(0, 100, 100, #PB_Sprite_AlphaBlending | #PB_Sprite_Texture)
StartDrawing(SpriteOutput(0))
  FillMemory(DrawingBuffer(), 100*100*4, RGBA(255, 0, 255, 128), #PB_Long)
StopDrawing()
CreateSprite3D(0, 0)

Repeat
  Repeat
    Event = WindowEvent()   
    Select Event
      Case #PB_Event_CloseWindow
        End
    EndSelect
  Until Event = 0

  FlipBuffers()
  ClearScreen(RGB(i, 0, 0))
  i+1
  
  Start3D()
  DisplaySprite3D(0, WindowMouseX(0), WindowMouseY(0))
  DisplaySprite3D(0, WindowMouseX(0)-50, WindowMouseY(0)-50)
  Stop3D()
  

  Delay(10)
ForEver
User avatar
Michael Vogel
Addict
Addict
Posts: 2797
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: Presenting using PureBasic

Post by Michael Vogel »

Kukulkan wrote:Maybe some other PB programmers are interested in doing an editor for this, if I make it open source?
Could be interesting to do some coding within a team
Kukulkan wrote:What would be the benefits of encryption? If the program/editor is able to decrypt by default, there is no possible effect on this. Or do you think about presentations that can be only viewed after entering the correct password to decrypt the xml?
Also an interesting idea - I thought about the integrity of forwarded presentations (by mail etc.) - nobody without permission should be able to change the content of a presentation (at least not by using the notepad). So maybe the following save options could be implemented later:

________________________

Encryption
[×] Encrypt presentation

Password check to...
[×] Edit presentation
[_] View presentation

[ Set Password ] [ Ok ]
________________________
swan
Enthusiast
Enthusiast
Posts: 225
Joined: Sat Jul 03, 2004 9:04 am
Location: Sydney Australia
Contact:

Re: Presenting using PureBasic

Post by swan »

Very nice :D
yrreti
Enthusiast
Enthusiast
Posts: 546
Joined: Tue Oct 31, 2006 4:34 am

Re: Presenting using PureBasic

Post by yrreti »

Also Kukulkan, very nice :!: and very cool effects.
But to be really useful, I agree, you really do have to make some kind of an editor.
Looking at your slide.xml file, you seem to use a standard text command block.
And a standard image command block.
So I don't think that it would be that difficult to create an editor for that part.
Just make the edit entries for each section of each block, whether for text or for
an image.

Example using a block of your code for a text block:

Code: Select all

    <text    caption="Welcome to"
             posx="0" 
             posy="-170" 
             fontname="Times New Roman" 
             fontsize="42" 
             fontstyle="512" 
             color="#303A40" 
             delay="">
             <effectin  type="standard" direction="" rotation="" misc="" />
             <effectout type="standard" direction="" rotation="" misc="" />
    </text>
Create Edit Window
Add Block order number: (or some method so that you could go back to or forward and edit a block if needed)
input caption:Welcome to
input posx:0
input posy:-170
input font:Times New Roman
input fontsize:42
input fontstyle:512
input color:#303A40
input delay:
input effectin type:standard
input direction:
input rotation:
input misc:
input effectout type:standard
input direction:
input rotation:
input misc:
save
You could also probably add a short test button to check what you just entered.

Anyway just a quick idea.
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: Presenting using PureBasic

Post by Kukulkan »

Hi,

I currently updated the ZIP file (link in the first post) and included a pdf-document that describes the slide.xml format and options. You are free to play with :D

@yrreti:
I think a WYSIWYG editor will fit much better. As there are only 2 basic elements (text and image), this should be no such big thing. The effects may get edited using a sidebar that shows parameters of the currently selected element. Additionally, a slide.xml may get created on the fly (windowed, with small example) to show the choosen effect parameters.

Kukulkan
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: Presenting using PureBasic

Post by Kukulkan »

Hi,

@Trond:
Thank you. I found a solution for this that is somewhat different (using CopyMemory()).

@all:
It does no longer need a temporary image-storage for all objects. Upon this, users with slower computers should recognice a faster reaction on page-switching. Users with fast machines possibly will not recognize any changes. The download-link in the first post is actualized.

Kukulkan
User avatar
Alireza
Enthusiast
Enthusiast
Posts: 143
Joined: Sat Aug 16, 2008 2:02 pm
Location: Iran

Re: Presenting using PureBasic

Post by Alireza »

in my option,it's great :) Thanks
PB v 5.6 :D
Yogi Yang
Enthusiast
Enthusiast
Posts: 107
Joined: Sun Dec 11, 2005 2:19 pm

Re: Presenting using PureBasic

Post by Yogi Yang »

This is just Superb! After FormulaGraphics it is the only tool that I have liked so much.

After fiddling it for a while I felt that it is also necessary to build a tool that will help in creating the XML file.

If you will open source it, it would be a very good way to learn good compact programming!

Just my 2Cents.
--
Yogi Yang
Post Reply