Community
Message Board

Chat room - users
Game Over
( 394431 downloads)
Work In Progress
( 523201 downloads)
Links

Code Exchange
Downloads
Tutorials
Add to Favourites

Submit news

DIV ARENA FORUMS
Not logged in [Login - Register]
Go To Bottom

Printable Version  
Author: Subject: Using floats in div programs
Vortigano
DIV Regular
***




Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline


[*] posted on 8-5-2019 at 09:48 AM
Using floats in div programs


Hi, I have this floating point DLL that could be useful to someone. Maybe I think DomCook might be interested to experiment a bit. It needs some adjustments and has few functions implemented, but it could be improved and expanded. Then I could make some example of use.


Youtube(fixed) https://youtu.be/Ax2jkyOrsyI

[Edited on 8-5-2019 by Vortigano]
View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 386
Registered: 4-3-2016
Member Is Offline


[*] posted on 8-5-2019 at 12:31 PM


Impressive.
I'm looking forward to seeing some more examples.

By the way it's just Dom really or Dominic if you like typing.
I haven't got around to figuring out if I can change my user name. I quite like the idea of calling myself "Tumbleweed".
View user's profile View All Posts By User
Vortigano
DIV Regular
***




Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline


[*] posted on 8-5-2019 at 01:51 PM


Hahaha, for a while i was called "Dr Kleiner" and other pseudonyms ... but I became known as Vortigano playing MOBA games, so I preferred to leave it so that someone who looks for me can find me. In the end, the name takes its value according to our achievements and good deeds.
I fixed the youtube link because a server problem. :thumbup:
View user's profile View All Posts By User
MikeDX
DIV Nerd
*********


Avatar


Posts: 8388607
Registered: 25-2-2016
Member Is Offline


[*] posted on 9-5-2019 at 01:02 AM


you guys make me wish i had more time to work on div 😍
View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 386
Registered: 4-3-2016
Member Is Offline


[*] posted on 9-5-2019 at 03:22 AM


Make the time. That's an order.
View user's profile View All Posts By User
MikeDX
DIV Nerd
*********


Avatar


Posts: 8388607
Registered: 25-2-2016
Member Is Offline


[*] posted on 9-5-2019 at 08:02 AM


i shall see that i do Dom
View user's profile View All Posts By User
Vortigano
DIV Regular
***




Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline


[*] posted on 9-5-2019 at 05:10 PM


Quote: Originally posted by dom cook  
Make the time. That's an order.

dom cook I've sent a u2u msg.
I wanted to tell you about the functions that the dll had:
addfloat(in_a, in_b, out_c);
subfloat(in_a, in_b, out_c);
divfloat(in_a, in_b, out_c);
mulfloat(in_a, in_b, out_c);
float_to_int, sin_float, cos_float.
Then I stopped when I was writing a parser to put "4*10 ^ -5" and things like that... but if you find it useful, I would try to continue it.

[Edited on 9-5-2019 by Vortigano]
View user's profile View All Posts By User
Vortigano
DIV Regular
***




Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline


[*] posted on 9-5-2019 at 06:45 PM


Sorry for the untidiness, but here you have a quick example.
I forgot to mention the sha-256 of the DLL
6E1B1CEB93FC61CD3EF86F447E2F4A9BACC0F79A1B424746932B342F5ACA1FCE

Attachment: float_test.PRG (2kB)
This file has been downloaded 744 times

Attachment: float.dll (320kB)
This file has been downloaded 792 times

[Edited on 9-5-2019 by Vortigano]
View user's profile View All Posts By User
Vortigano
DIV Regular
***




Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline


[*] posted on 9-5-2019 at 07:16 PM



https://youtu.be/R1nH69AVjO8

Code adapted for the video:
Attachment: float_test.PRG (2kB)
This file has been downloaded 772 times
View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 386
Registered: 4-3-2016
Member Is Offline


[*] posted on 9-5-2019 at 07:30 PM


I have a problem. I don't think DIV likes the import command. Does the .dll need to be in a specific folder?
View user's profile View All Posts By User
Vortigano
DIV Regular
***




Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline


[*] posted on 9-5-2019 at 07:40 PM


Quote: Originally posted by dom cook  
I have a problem. I don't think DIV likes the import command. Does the .dll need to be in a specific folder?


A cictec update broke the dll system ... I used a previous compilation of the cictec update since I started writing dlls, and I think it was removed from the server. So I think I should upload the previous update of cictec.
This means that nobody could use any dll that I have built :/
View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 386
Registered: 4-3-2016
Member Is Offline


[*] posted on 9-5-2019 at 07:49 PM


Highly frustrating.
View user's profile View All Posts By User
Vortigano
DIV Regular
***




Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline


[*] posted on 9-5-2019 at 07:53 PM


this is the cictec update that works fine with dll DIVDX-windows-18.04.26 the file exceed the forum file size limit.
View user's profile View All Posts By User
Vortigano
DIV Regular
***




Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline


[*] posted on 9-5-2019 at 07:55 PM


Here's the link:
https://drive.google.com/open?id=1gSgubvTLpIVHnnQtQREITLjTZT...
View user's profile View All Posts By User
Vortigano
DIV Regular
***




Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline


[*] posted on 9-5-2019 at 11:24 PM


This example uses cosine sine and float_to_int ().
Remember that the trigonometric calculations are in radians, they are not in degrees. ^u^)/

Attachment: float_test2.PRG (4kB)
This file has been downloaded 769 times

[Edited on 9-5-2019 by Vortigano]
View user's profile View All Posts By User
Vortigano
DIV Regular
***




Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline


[*] posted on 23-5-2019 at 07:42 PM


I'm working on the parser in c... is going to ruin my brain, but I love it.
When I learn to analyze variables in a string and fix some bugs I will mix it with the divdx dll.

Blank line to exit, accept "+ - / * ^".
Exponents only positive integers for now.

Attachment: para dll v0.1.exe (11kB)
This file has been downloaded 799 times
View user's profile View All Posts By User
MikeDX
DIV Nerd
*********


Avatar


Posts: 8388607
Registered: 25-2-2016
Member Is Offline


[*] posted on 23-5-2019 at 09:42 PM


Vortigano I think we should discuss this. There is no reason why we could not include this in the main DIV core. That is how mode8 started (as a DLL), and how the original div2 netplay began - there are even hints of this in the original source still today!

Is the dll source available? Could you share it with me privately if you don't want to publically share it so we can consider if DIV could benefit from it being included in the main tree.

View user's profile View All Posts By User
Vortigano
DIV Regular
***




Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline


[*] posted on 24-5-2019 at 12:36 AM


Quote: Originally posted by MikeDX  
Vortigano I think we should discuss this. There is no reason why we could not include this in the main DIV core. That is how mode8 started (as a DLL), and how the original div2 netplay began - there are even hints of this in the original source still today!

Is the dll source available? Could you share it with me privately if you don't want to publically share it so we can consider if DIV could benefit from it being included in the main tree.



For now I'm not interested in making it public, but I can give you a copy of the source code when I adjust some things. Maybe you could improve the parser as I have very little experience with C (less than 1 year) and programming in general. I only have strong experience with microchip RISC assembler. I wish someone could first use it for something and then consider publishing the source code... that would make me happy.
View user's profile View All Posts By User
Vortigano
DIV Regular
***




Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline


[*] posted on 26-5-2019 at 05:23 PM


I think what could be added would be inside the div-core a definition for float of 4bytes that I suppose would not break the alignment of the int32_t memory.
This way we could simply declare and define a DIV variable as "float var_x = 0.05;".
View user's profile View All Posts By User

  Go To Top

Powered by XMB
XMB Forum Software © 2001-2012 The XMB Group
[Queries: 18]