Search found 262 matches

by jalih
Thu Jan 07, 2021 8:04 am
Forum: General programming
Topic: Any way to have Function save its Args for later use?
Replies: 17
Views: 664

Re: Any way to have Function save its Args for later use?

so that is why I am using local, not otherwise interested in using local. And this is only way I have so far figured out how to achieve this. But question is, will n[1]() and n[2]() keep printing "hello" and "world" or might garbage collection or something affect them after thousand other lines may...
by jalih
Thu Jan 07, 2021 8:00 am
Forum: General programming
Topic: Any way to have Function save its Args for later use?
Replies: 17
Views: 664

Re: Any way to have Function save its Args for later use?

@jalih can I have a look at your code, for that is basically the same that I am aiming at here. Sorry for a late reply... My code is written in 8th, Forth like programming language. It can be a bit hard to follow, If you don't have experience with stack based concanative programming languages. Here...
by jalih
Sun Dec 27, 2020 9:13 pm
Forum: General programming
Topic: Any way to have Function save its Args for later use?
Replies: 17
Views: 664

Re: Any way to have Function save its Args for later use?

Easy so far, but problem comes that I cant initiate each step at same time, or even one after another, but things happen first. Like when that one movement is happening, there is moving animation. And problem with that is that once again the moving animation is not happening alone, but all other th...
by jalih
Sat Dec 26, 2020 12:48 pm
Forum: General programming
Topic: Any way to have Function save its Args for later use?
Replies: 17
Views: 664

Re: Any way to have Function save its Args for later use?

Movelist kind of thing is basically my plan B. This is bit complex way of doing it, but it also has its benefits, especially the point that it lives quite independently from everything else and is somewhat flexible. Trust me, it's a nightmare! If you want to use OOP, why not just make move function...
by jalih
Mon Dec 21, 2020 7:13 pm
Forum: General programming
Topic: Any way to have Function save its Args for later use?
Replies: 17
Views: 664

Re: Any way to have Function save its Args for later use?

Bugala wrote:
Mon Dec 21, 2020 5:34 pm
I can use a different solution for this, but this would seem like the current best idea I have to solve the problem.
Sounds horribly complex! Why not just manage simple move list for object?
by jalih
Mon Dec 21, 2020 7:04 pm
Forum: General programming
Topic: Can I self = NIL somehow in OOP?
Replies: 8
Views: 299

Re: Can I self = NIL somehow in OOP?

Bugala wrote:
Mon Dec 21, 2020 5:14 pm
disappointment. That in this example case, it both times debugprints number 3, when I am hoping that the second time it would give me an error of both a as well as a.test not existing.
Why not just use?:

Code: Select all

a = Nil
instead of:

Code: Select all

a:Destroyer()
by jalih
Fri Dec 18, 2020 11:44 am
Forum: General programming
Topic: How to make a wrapper of same named function/command?
Replies: 4
Views: 282

Re: How to make a wrapper of same named function/command?

Function func(var) DebugPrint(var) EndFunction debug1 = func Function func(var) DebugPrint("func("..var..")") debug1(var) EndFunction func("test") This one works as expected. Or rather bit unexpected, since I would have actually expected this to end into infinite recursion, but it actually doesn't,...
by jalih
Sat Dec 05, 2020 4:49 pm
Forum: Newbie questions
Topic: Where to find scrolling background examples?
Replies: 9
Views: 967

Re: Where to find scrolling background examples?

Here is an early christmas present... Download tilemap sample and start scrolling those tilemaps... ;) test.hws - Shows how to setup draw object, load tilemap data, setup viewport object and how to draw and move tilemap. maped.hws - Simple tilemap editor. Load tiles image, setup tilemap and paint ti...
by jalih
Wed Oct 09, 2019 10:56 am
Forum: Tutorials
Topic: Very simple Exit-the-maze game
Replies: 4
Views: 2582

Re: Very simple Exit-the-maze game

For smooth movement I did choose to use only 1 pixel movement per cylcle, and I notice that using vwait() in this example will limit the character maximum speed a bit to much for my liking. I will follow your advice, but I probably will use something like Wait(5, #Milliseconds) instead of vwait(). ...
by jalih
Sat Sep 28, 2019 11:50 am
Forum: General programming
Topic: Anyone done script system that is written to a file?
Replies: 14
Views: 4291

Re: Anyone done script system that is written to a file?

Yes I took a look at your code and it was useful look. I decided to take for my current script system a different approach, mainly because in your script system there was need to having defined each command as keywords for it to recognise them, and this was problematic for the GOTO idea I was havin...