Post your exetention ideas here.
-
Sunday, October 14, 2012 5:02 PMAnswerer
Hello.
I am making a extension and I was wondering if anyone had any ideas for what to put in it. so if you have any ideas that you want in a extension then please post them here.
Thanks!
One thing that is impossible is impossible no matter if it is proven so first.
All Replies
-
Sunday, October 14, 2012 6:53 PM
Ok, you're possibly the 251st person I annoy with that.
Create me some backbuffer!
How?
Needs an additional form.
form has to contain a picture-control
This picture is invisible = just in memory.so there will besomething like
GameWindow.Show()
Gamewindow.Hide(), Left, Width, Top, Height, Title...
then it needs 2 main-methods to manipulate it:
ClearBackBuffer(backgndcolor) 'that should erase the contents of this picture-control, the "backbuffer"
Present() - that should draw the picture wich the backbuffer contains onto the GameWindow-form.
additional it would need standard-drawing functions, but it would be enough if it had just those:
DrawFilledTriangle(X1,Y1,X2,Y2,X3,Y3,Color)
DrawLine(X1,Y1,X2,Y2,Color)
DrawText("text",ForeColor, BackColor)
[DrawTransparentText("text",Color), DrawPixel(X,Y,Color)+ all you want to]
you could add an image-list-control (alike usual imagelist, but i call it sprite) with methods:
mySprite=LoadSprite(mySpriteFilename)
' and
DrawSprite(mySprite,X,Y)
DrawTransparentSprite(mySprite,X,Y,TransparentColor)
' all drawing-methods should go directly onto the backbuffer.
RemoveSprite(mySprite)
myWidth = SpriteWidth(mySprite)
myHeight = SpriteHeight(mySprite)
[myNewSprite = CopySprite(mySprite) makes just sense if there are drawing-methods to sprites available]
and, if you already typing then, add some SoundList-Object, alike Imagelist with methods
mySound = Soundlist.LoadSound(soundfile) ' load sound into memory
soundlist.Playsound(mySound) ' play sound from memory
soundlist.StopSound(mySound)
soundlist.RemoveSound(mySound)
all together = a small basic sprite engine for easy 2dgames and a little more complex (therefor it needs DrawTriangle-method) can it be used for a simple 3d-program.Send me a message when I can test it!
if apple made a car - would it have windows?
- Edited by Rene_Miner Sunday, October 14, 2012 7:03 PM
-
Sunday, October 14, 2012 7:37 PMModerator
There is LDUtilities.PausUpdates and LDUtilities.ResumeUpdates (no refresh between these calls)- not a back buffer, but can improve flicker, especially when setting up a lot a of shapes, and LDShapes has triangle/line shape movement.
On the suggestions front the soundList is a good one, or how about a shapes collision event.
-
Sunday, October 14, 2012 8:57 PMAnswererI believe most of those features would be better in a native future Small Basic version. Especially a shape collision triggered event feature!
Click on "Propose As Answer" if some post solves your problem or "Vote As Helpful" if some post has been useful to you! (^_^)
-
Sunday, October 14, 2012 9:02 PMAnswerer
Indeed, halting/resuming screen refresh is how far we can get near what a blitter/back-buffer tries to accomplish.There is LDUtilities.PauseUpdates and LDUtilities.ResumeUpdates (no refresh between these calls)
Click on "Propose As Answer" if some post solves your problem or "Vote As Helpful" if some post has been useful to you! (^_^)
- Edited by GoToLoopEditor Sunday, October 14, 2012 9:06 PM
-
Sunday, October 14, 2012 10:44 PM
How about adding a menu-Control to GraphicsWindow and TextWindows? (the usual "File, Edit, View...")
Especially on GraphicsWindow, textwindow is not that useful since it can be used to type in. On the GraphicsWindow it would just easy allow settings/input
@GoToLoop:check "showcase" thread, maybe you like doing some benchmarking tests
if apple made a car - would it have windows?
- Edited by Rene_Miner Sunday, October 14, 2012 11:22 PM
-
Monday, October 15, 2012 1:18 AMAnswerer
Ok, you're possibly the 251st person I annoy with that.
Create me some backbuffer!
How?
Needs an additional form.
form has to contain a picture-control
This picture is invisible = just in memory.so there will besomething like
GameWindow.Show()
Gamewindow.Hide(), Left, Width, Top, Height, Title...
then it needs 2 main-methods to manipulate it:
ClearBackBuffer(backgndcolor) 'that should erase the contents of this picture-control, the "backbuffer"
Present() - that should draw the picture wich the backbuffer contains onto the GameWindow-form.
additional it would need standard-drawing functions, but it would be enough if it had just those:
DrawFilledTriangle(X1,Y1,X2,Y2,X3,Y3,Color)
DrawLine(X1,Y1,X2,Y2,Color)
DrawText("text",ForeColor, BackColor)
[DrawTransparentText("text",Color), DrawPixel(X,Y,Color)+ all you want to]
you could add an image-list-control (alike usual imagelist, but i call it sprite) with methods:
mySprite=LoadSprite(mySpriteFilename)
' and
DrawSprite(mySprite,X,Y)
DrawTransparentSprite(mySprite,X,Y,TransparentColor)
' all drawing-methods should go directly onto the backbuffer.
RemoveSprite(mySprite)
myWidth = SpriteWidth(mySprite)
myHeight = SpriteHeight(mySprite)
[myNewSprite = CopySprite(mySprite) makes just sense if there are drawing-methods to sprites available]
and, if you already typing then, add some SoundList-Object, alike Imagelist with methods
mySound = Soundlist.LoadSound(soundfile) ' load sound into memory
soundlist.Playsound(mySound) ' play sound from memory
soundlist.StopSound(mySound)
soundlist.RemoveSound(mySound)
all together = a small basic sprite engine for easy 2dgames and a little more complex (therefor it needs DrawTriangle-method) can it be used for a simple 3d-program.Send me a message when I can test it!
if apple made a car - would it have windows?
So basically another Graphics Window?One thing that is impossible is impossible no matter if it is proven so first.
-
Monday, October 15, 2012 1:21 AMAnswererHmm. I'll try that. you may have to explane that a little bit more...
One thing that is impossible is impossible no matter if it is proven so first.
-
Monday, October 15, 2012 2:13 AM
Maybe something like the below: (just pseudocode)
For i = 1 to 3 SmallBasic.CallSub("Sub"+i) EndFor Sub Sub1 TextWindow.WriteLine(1) EndSub Sub Sub2 TextWindow.WriteLine(2) EndSub Sub Sub3 TextWindow.WriteLine(3) EndSub
That would be greatly appreciated so that every time I want to add a new function to one of my programs I don't have to create a whole bunch of 'If', 'ElseIf', and 'Else' statements just to handle them.
I am a 10 year old that loves math, games, and computers. "Everyone is potentially great, you just have to turn it into kinetic greatness."
-
Monday, October 15, 2012 2:20 AM
Like that:
Menu.AddToGraphicsWindow() '(can not be removed once it was added)
myFileMenu = Menu.AddMenu("&File", isVisivble, isEnabled)
myFileLoad = Menu.AddSubMenu(myFileMenu,"&Load", isVisible, isEnabled)myFileSave = Menu.AddSubMenu(myFileMenu, "&Save", "true", "false")
Menu.AddSeperator(myFileMenu)
myFileExit = Menu.AddSubMenu(myFileMenu, "E&xit",isVisible, isEnabled)
myEditMenu = Menu.AddMenu("Edit", "true", "true")
myEditCopy = Menu.AddSubMenu(myEditMenu,"&Copy","true", "false")
myEditCut = Menu.AddSubMenu(myEditMenu,"Cu&t","true", "false")
myEditPaste = Menu.AddSubMenu(myEditMenu,"&Paste","true", "false")
myViewMenu = Menu.AddMenu("&View", "true", "true")
myFontMenu = Menu.AddSubMenu(myViewMenu, "Fonts", "true","true")
myFontToSelect[0] = Menu.AddSubMenu(myFontMenu, "Arial", "true", "true")
myFontToSelect[1] = Menu.AddSubMenu(myFontMenu, "Courier New", "true", "true")
Menu.Enable(myEditCut, "true")
Menu.Visible(myFileMenu, "true")
Menu.Checked(mySubMenu, "false")
Menu.Caption(myAbcMenu, "new caption")
did I forget something?...oh... something like
Menu.Click = OnMenuClick
Sub OnMenuClick
if Menu.LastClicked = myFileExit then
program.End()
endif
endsub
Edit: you might also add something like
Menu.AddShortCut(mySubMenu, "Q", "ctrl")
Menu.RemoveShortCut(mySubMenu)
if apple made a car - would it have windows?
- Edited by Rene_Miner Monday, October 15, 2012 2:04 PM
-
Friday, October 19, 2012 7:56 AM
Another one, could go together with the menu-stuff
Toolbar.AddToGraphisWindow(alignement, showCaptions)
'align could be top, left, bottom, right, showCaptions can be "true" or "false"
myTbButtonNew = Toolbar.AddButton("New", myImageName, Enabled, Visible)
' size of all toolbar-buttons is first added images size
myTbButtonSave = Toolbar.AddButton("Save", myImageName, "false","true")
Toolbar.AddSeparator()
myTbButtonCopy = Toolbar.AddButton("Copy", myImageName, bool, bool)
Toolbar.Enable(myTbButtonSave, "true")
Toolbar.Visible(myTbButtonName, bool)
Toolbar.Click = OnToolbarClick
Sub OnToolbarClick
if Toolbar.LastClicked() = myTbButtonXYZ then
' do xyz
endif
Endsub
- Edited by Rene_Miner Friday, October 19, 2012 7:57 AM
-
Monday, October 22, 2012 4:19 PMAnswererI will try to do these things. but since i am not very good I may not succeed
One thing that is impossible is impossible no matter if it is proven so first.

