Search found 12 matches
- Sun Feb 26, 2023 4:55 pm
- Forum: Game Programming
- Topic: When to call SpriteWidth() and SpriteHeight() ?
- Replies: 4
- Views: 12458
Re: When to call SpriteWidth() and SpriteHeight() ?
Thanks for the reply, the Sprite example in the Doc does not use Load() to load anything. Its just some load counter: Procedure Loading(Type, Filename$) Static NbLoadedElements NbLoadedElements+1 If NbLoadedElements = 1 ; Finished the loading of all images and sounds, we can start the applications F...
- Sun Feb 26, 2023 3:24 pm
- Forum: Game Programming
- Topic: When to call SpriteWidth() and SpriteHeight() ?
- Replies: 4
- Views: 12458
When to call SpriteWidth() and SpriteHeight() ?
When and where can i request the size of an sprite? What i tried: EnableExplicit Global s.i Procedure.i Load() FlipBuffers() EndProcedure Procedure.i Update() ClearScreen($333344) DisplayTransparentSprite(s,0,0) FlipBuffers() EndProcedure Procedure.i Render() If OpenWindow(0,0,0,256,256,#Null$,#PB_W...
- Sun Feb 26, 2023 9:48 am
- Forum: Coding Questions
- Topic: Transparency with Sprites and 2D Drawing?
- Replies: 0
- Views: 8532
Transparency with Sprites and 2D Drawing?
Is there a way to get transparency working with 2D Drawing on Sprites (with alpha channel) ?
- Sat Feb 25, 2023 7:25 pm
- Forum: Coding Questions
- Topic: How to use pointers?
- Replies: 1
- Views: 887
How to use pointers?
What am i missing?
Code (return values via pointers):
Code (return values via pointers):
Code: Select all
EnableExplicit
Procedure.i Mouse(*X.Float,*Y.Float)
*X\f = 123.0
*Y\f = 456.0
ProcedureReturn #Null
EndProcedure
Procedure.i Main()
Protected x.f
Protected y.f
Mouse(@x,@y)
Debug x
Debug y
EndProcedure
Main()
- Sat Feb 25, 2023 7:23 pm
- Forum: Coding Questions
- Topic: How to use interfaces?
- Replies: 4
- Views: 1252
Re: How to use interfaces?
Thanks for the reply.
- Sat Feb 25, 2023 1:45 pm
- Forum: Coding Questions
- Topic: How to use interfaces?
- Replies: 4
- Views: 1252
Re: How to use interfaces?
I mainly use PB so i guess its just different.
Datasection example:
Datasection example:
Code: Select all
Debug ?label;<- does not exist
DataSection
label:
EndDataSection
- Sat Feb 25, 2023 10:25 am
- Forum: Coding Questions
- Topic: How to use interfaces?
- Replies: 4
- Views: 1252
How to use interfaces?
I need some oop for a game so i naturally tried to use interfaces for objects just like in PB. Seems like its not possible... how would i solve this problem? Btw. labes in the datasection did not work, thats why i moved the vtable into a struct. What i tried: EnableExplicit Structure DUMMY *vt value...
- Mon Sep 18, 2017 5:05 pm
- Forum: Coding Questions
- Topic: [Help] Converting code from PureBasic!
- Replies: 7
- Views: 3735
Re: [Help] Converting code from PureBasic!
Try using AllocateStructure instead of AllocateMemory - by the looks of it, the latter is only to be used with Poke and Peek, whilst the former is for structures. ... Also dont forget that structures in SpiderBasic are actually functions, with added code in. I suspect what is happening, is although...
- Sun Sep 17, 2017 11:19 am
- Forum: Coding Questions
- Topic: [Possible Bug ] Pointers & Structures
- Replies: 2
- Views: 2489
[Possible Bug ] Pointers & Structures
Maybe its just me - but there could be a bug !
Testcode (SpiderBasic 2.10 - Demo):
http://forums.spiderbasic.com/viewtopic ... 1282#p4439
Testcode (SpiderBasic 2.10 - Demo):
http://forums.spiderbasic.com/viewtopic ... 1282#p4439
- Sun Sep 17, 2017 11:13 am
- Forum: Coding Questions
- Topic: [Help] Converting code from PureBasic!
- Replies: 7
- Views: 3735
Re: [Help] Converting code from PureBasic!
Thanks for your reply.falsam wrote:I think there is a bug with the pointers of structures.
....
I just saw it when i had posted my suspicion about a possible bug,
If that is the case SpiderBasic is not safe to use - ill only continue my endeavour once this issue is resolved.