Search found 254 matches

by jalih
Wed Oct 09, 2019 10:56 am
Forum: Tutorials
Topic: Very simple Exit-the-maze game
Replies: 4
Views: 355

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: 633

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...
by jalih
Fri Sep 27, 2019 7:51 pm
Forum: General programming
Topic: Anyone done script system that is written to a file?
Replies: 14
Views: 633

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

A little update... I did some code cleanup... Bugala, did you look at the code? It should easily do everything you need! Updated parser project @INCLUDE "./parser/parser.hws" ; Define some keysym constants Const #printstr = 100 Const #addsym = 101 Const #endsym = 102 ; New Parser object that we will...
by jalih
Thu Sep 26, 2019 5:37 pm
Forum: General programming
Topic: Anyone done script system that is written to a file?
Replies: 14
Views: 633

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

Modified my example and updated sample project ... @INCLUDE "./parser/parser.hws" Const #printstr = 100 Const #addsym = 101 Const #endsym = 102 Script = Parser:new() Function Script:printstr_stmt() self:getsym() self:expect(#lparen) self:expect(#litstrsym) DebugPrint(self:litstr()) self:expect(#rpar...
by jalih
Thu Sep 26, 2019 4:56 pm
Forum: General programming
Topic: Anyone done script system that is written to a file?
Replies: 14
Views: 633

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

@jalih, yes I would like to take a look at that. Maybe I can use parts of it for my own parser. Below is a small example on how to use scanner and parser helper module. Notice that when you define keywords and keysyms, "" and #idsym must be at the last index. @INCLUDE "./parser/parser.hws" Const #p...
by jalih
Wed Sep 25, 2019 2:25 pm
Forum: General programming
Topic: Anyone done script system that is written to a file?
Replies: 14
Views: 633

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

I dont need to figure out these problems myself, as I have no interest in figuring them out anyway, I just want to get my text file into a table in such way I can use them. Trust me, that stuff is worth figuring out! Very rewarding and fun stuff! I have ported a simple toy interpreter by Ed Davis t...
by jalih
Mon Sep 23, 2019 5:56 pm
Forum: Tutorials
Topic: Speed testing - for n to x compared to foreach and if elseif else comparison
Replies: 5
Views: 435

Re: Speed testing - for n to x compared to foreach and if elseif else comparison

Bugala wrote:
Fri Sep 20, 2019 4:04 pm
Meaning that FOREACH is clearly faster than FOR n=1 to x
Try using

Code: Select all

for local n=1 to x
and speed is probably about the same...
by jalih
Wed Apr 17, 2019 8:41 pm
Forum: Off topic
Topic: Don't waste hours on micro-optimizing, just choose better algorithm
Replies: 1
Views: 913

Don't waste hours on micro-optimizing, just choose better algorithm

I stumbled upon coding challenge on Rasberry Pi forums about calculating fibonacci number with million digits. I chose to use 8th programming language as it directly supports big numbers (I am lazy!). My first version was simply naive iterative version of fibonacci, it took 2.8 hours to complete, bu...
by jalih
Mon Apr 01, 2019 10:45 am
Forum: Tutorials
Topic: Let's build a Dungeon Crawler with Hollywood-MAL!
Replies: 20
Views: 3685

Re: Let's build a Dungeon Crawler with Hollywood-MAL!

Hi Allanon, Sounds like really interesting and fun project! I nowadays program mostly in 8th programming language which is like Forth on stereoids but have been thinking about fixing my old game framework for Hollywood. The 8th programming language is not really that well suited for games (lack of h...
by jalih
Tue Mar 06, 2018 6:18 pm
Forum: GL Galore
Topic: GL Galore rocks!
Replies: 18
Views: 9192

Re: GL Galore rocks!

This small demo with only one moving sprite (the cat) should have more fps. Seems to be an issue of the framework, because for example HollyMan has several moving objects/sprites and runs really smooth with around 20%-24% cpu usage. Ok, the demo has a scrolling playfield but if it doesn't scrolls i...