micro(A) Interpreter

Started by Aurel [banned], March 28, 2020, 11:31:14

Previous topic - Next topic

Aurel [banned]

#135
W
(Y)

round157

Quote from: Aurel on May 08, 2021, 18:45:16
WOW... ;)
That will take time .
Simply because i need to add some core functions which i forget to add...shame on me  :D
for example i need to add logic operator inside IF expr OR ,AND it is inside WHILE
also comparison work currently with numeric variables/numbers not with strings
sprites?? main thing for 2d games..
if you have something specific let me know?

Hello, suggestion: adding essential features to let your users to make classic 2d games in micro(A). (Tetris, Breakout, etc.)


zelda64bit

Quote from: Aurel on May 08, 2021, 18:45:16
WOW... ;)
That will take time .
if you have something specific let me know?

Loading sprites, sound / music, object-oriented programming or something similar, and many examples of the language and that each example has no more than 20 lines of code to make it easier for beginners to study.

zelda64bit

Quote from: round157 on May 08, 2021, 23:24:14
Quote from: Aurel on May 08, 2021, 18:45:16
WOW... ;)
That will take time .
Simply because i need to add some core functions which i forget to add...shame on me  :D
for example i need to add logic operator inside IF expr OR ,AND it is inside WHILE
also comparison work currently with numeric variables/numbers not with strings
sprites?? main thing for 2d games..
if you have something specific let me know?

Hello, suggestion: adding essential features to let your users to make classic 2d games in micro(A). (Tetris, Breakout, etc.)

Yes, I agree with that.

round157

Quote from: zelda64bit on May 09, 2021, 14:27:27
Quote from: round157 on May 08, 2021, 23:24:14
Quote from: Aurel on May 08, 2021, 18:45:16
WOW... ;)
That will take time .
Simply because i need to add some core functions which i forget to add...shame on me  :D
for example i need to add logic operator inside IF expr OR ,AND it is inside WHILE
also comparison work currently with numeric variables/numbers not with strings
sprites?? main thing for 2d games..
if you have something specific let me know?

Hello, suggestion: adding essential features to let your users to make classic 2d games in micro(A). (Tetris, Breakout, etc.)

Yes, I agree with that.

micro(A) should have a bright future. :)

Aurel [banned]

#140
T :o
(Y)

zelda64bit

Quote from: Aurel on May 09, 2021, 18:37:08
Thank you guys
But some proposed things probably will never happened.
why ? ...not because i don't know ..just because break whole concept of
minimal or minimalistic language .
Another thing micro(A) is just a token interpreter and as such complex structure like UDT or OOP
would slow down execution very much.
Things like sprites are ok to have and some sounds too but nothing big using external library
and then depend on them if something goes wrong with them.
I don't have in plan to turn micro(A) into just another game language.
We have them already a lot.  :)

Only procedural programming !!, I will have to get used to it ... because I have only used object-oriented programming, although in gamemaker it is visual. I have never used pointers either and I don't know how they are used. :)

round157

Quote from: Aurel on May 09, 2021, 18:37:08

Things like sprites are ok to have and some sounds too but nothing big using external library
and then depend on them if something goes wrong with them.
I don't have in plan to turn micro(A) into just another game language.
We have them already a lot.  :)

My opinion: add features to micro(A) as you want but also try to avoid making your loyal users disappointed.:)

zelda64bit

I have a question.
In bliztmax to create an object I use classes, then I add them to a list and when I want to delete it I remove them from the list.
With procedural programming, how would it be done, how do I create an object and how do I delete it with micro (a).

Midimaster

#144
also in BlitzMax there is no need to handle the objects inside the TYPE like a class. You can do the procedural approach also. Only define a type and use it like a variable:
Code (BlitzMax) Select
SuperStrict

Type TEnemy
Field xPos:Int,yPos:Int
End Type


Type TShot
Field x:Int,y:Int, xdir:Int,ydir:Int
End Type

Global ShotList:TList = New TList

Global Monsters:TEnemy[10]

Global Me:TEnemy=New TEnemy

For Local i%=0 To 9
Monsters[i]=New TEnemy
Next

Repeat
If MouseHit(0) Then fire
Until AppTerminate()


Function Fire()
Local loc:TShot=New TShot
loc.x=Me.Xpos
loc.y=Me.ypos

ShotList.addlast loc
End Function 


Function CheckShots()
For Local loc:TShot = EachIn ShotList
  If loc.y<0 Then ShotList.remove loc
Next
End Function



Here you see three different possibilities:

Me is a single variable of Type Enemy

Monsters is an array of Type Enemy

ShotList is an list contains elements of Type Enemy. but it is outside any class.

...back from Egypt

Aurel [banned]

#145
 :'(
(Y)

Aurel [banned]

#146
 :P
(Y)

zelda64bit

Quote from: Midimaster on May 10, 2021, 12:09:10
also in BlitzMax there is no need to handle the objects inside the TYPE like a class. You can do the procedural approach also. Only define a type and use it like a variable:
Code (BlitzMax) Select
SuperStrict

Type TEnemy
Field xPos:Int,yPos:Int
End Type


Type TShot
Field x:Int,y:Int, xdir:Int,ydir:Int
End Type

Global ShotList:TList = New TList

Global Monsters:TEnemy[10]

Global Me:TEnemy=New TEnemy

For Local i%=0 To 9
Monsters[i]=New TEnemy
Next

Repeat
If MouseHit(0) Then fire
Until AppTerminate()


Function Fire()
Local loc:TShot=New TShot
loc.x=Me.Xpos
loc.y=Me.ypos

ShotList.addlast loc
End Function 


Function CheckShots()
For Local loc:TShot = EachIn ShotList
  If loc.y<0 Then ShotList.remove loc
Next
End Function



Here you see three different possibilities:

Me is a single variable of Type Enemy

Monsters is an array of Type Enemy

ShotList is an list contains elements of Type Enemy. but it is outside any class.

What happens is that in micro (A) there is no TList. I would like to know if in bliztmax you can delete an object without using TList.

zelda64bit

Quote from: Aurel on May 10, 2021, 15:16:54
QuoteWith procedural programming, how would it be done, how do I create an object and how do I delete it with micro(A)

zelda64
there is no object in micro(A),currently there is no sprites
In procedural programming your object( you probably mean graphic object called sprite )
is created by loading image
then add this image a variable handler like
s = LoadImage "mySprite.bmp"
and other function must be added ..so sorry currently nothing.

Let's put it another way: I load a sprite and display it and give it movement with the keys, then load another sprite and make the two collide.
How do I delete one of the two sprites?

Aurel [banned]

#149
 :P
(Y)