Search found 743 matches

by Bugala
Wed Jun 19, 2019 10:20 am
Forum: General programming
Topic: can i store functions attributes to use them later?
Replies: 0
Views: 4

can i store functions attributes to use them later?

Here is a piece of test code that does do what I want basically: functable = {} Function func1 (a, b) DebugPrint(a) DebugPrint(b) EndFunction InsertItem(functable, {func=func1, attributes={5, 4} }) functable[0].func(functable[0].attributes[0], functable[0].attributes[1]) What I am trying to do, is t...
by Bugala
Tue Jun 18, 2019 11:34 am
Forum: General programming
Topic: Best way to do lots of moving things on screen?
Replies: 14
Views: 227

Re: Best way to do lots of moving things on screen?

And another thing. If I understood right, Hardware brushes cannot be altered? If so, then can I make Brush a hardware brush at later point? Right now I have this system where background is drawn first to a brush, then I keep displaying this whole screen size brush every cycle, but I would like that ...
by Bugala
Tue Jun 18, 2019 11:28 am
Forum: General programming
Topic: Best way to do lots of moving things on screen?
Replies: 14
Views: 227

Re: Best way to do lots of moving things on screen?

I am need of help in getting Buttons made with RebelSDL, or by otherwords, without having layers on.

When I try to make #SIMPLEBUTTON, it complains I need a BGpic active, when i use "SelectBIPic()", it complains i need layers on.

So how do I make the buttons wihtout putting Layers on?
by Bugala
Mon Jun 17, 2019 5:48 pm
Forum: Newbie questions
Topic: Math operator to return the same value regardless if it is minus or plus.
Replies: 2
Views: 56

Re: Math operator to return the same value regardless if it is minus or plus.

ah, thanks. Didnt realise from its description that is what it meant.

@Andreas, add an example of "-2" returns "2", to make it more understandable for the one who dont fully comprehend the math language, I read the description but didnt understand it meant that.
by Bugala
Mon Jun 17, 2019 1:56 pm
Forum: Newbie questions
Topic: Math operator to return the same value regardless if it is minus or plus.
Replies: 2
Views: 56

Math operator to return the same value regardless if it is minus or plus.

I checked through math library, and at least didnt see anything that seemed like it would do following. I have this situation where there is A - B = C. However, end result is not known wether it goes to plus or minus side. However, regardless of which side it goes, it will still increase the distanc...
by Bugala
Mon Jun 17, 2019 12:24 pm
Forum: General programming
Topic: how to quickly find 10x10 map location 54?
Replies: 2
Views: 69

Re: how to quickly find 10x10 map location 54?

Thanks, I will keep that memory library in mind. Didnt notice that until you mentioned. I might need it as I am planning to make this small game where there be perhaps thousands little moving people, so checking what they each do might need even that memory library to make it fast enough. No idea ye...
by Bugala
Sun Jun 16, 2019 10:19 pm
Forum: General programming
Topic: how to quickly find 10x10 map location 54?
Replies: 2
Views: 69

how to quickly find 10x10 map location 54?

I decided to give a try for having one dimensional map data instead of my usual 2 dimensional. 2 dimensional would be: mapdata[x][y], but now mapdata is just mapdata = {1, 2, 3, 4, 5...} Suppose I have 10x10 map and i now know that location 54 is the one in question that i need to find. of course i ...
by Bugala
Sun Jun 16, 2019 2:57 pm
Forum: General programming
Topic: Best way to do lots of moving things on screen?
Replies: 14
Views: 227

Re: Best way to do lots of moving things on screen?

ah, thanks for clarifying that. Well, regardless, seems even bare hollywood is very fast actually. Faster than I expected. I was expecting it to start stumbling after couple hundred rectangles, and was expecting drawing be even slower. Oh, and reminds me, when i forgot to add the double buffer first...
by Bugala
Sun Jun 16, 2019 1:01 pm
Forum: General programming
Topic: Best way to do lots of moving things on screen?
Replies: 14
Views: 227

Re: Best way to do lots of moving things on screen?

I am truly surpised how powerful Hollywood is. I made this test code: EscapeQuit(True) @DISPLAY {Width = 1920, Height = 1080} @REQUIRE "rebelsdl" CreateBrush(1, 5, 5, #WHITE, {hardware=True}) BeginDoubleBuffer(True) ; set up a hardware double buffer StartTimer(1) SetFillStyle(#FILLCOLOR) For move=1 ...
by Bugala
Sat Jun 15, 2019 9:49 pm
Forum: General programming
Topic: Best way to do lots of moving things on screen?
Replies: 14
Views: 227

Re: Best way to do lots of moving things on screen?

There might be error in manual, on 3.1 at "ForceFullRefresh" it says "This is slower but guarantees that there will be visual artefacts because front and back buffers will always be completely in sync." I guess it should say it guarantees that there WONT BE visual artefacts? Then couple of questions...