Re: LLVM discussion

2014-10-17 Thread AudioGames . net Forum — Developers room : visualstudio via Audiogames-reflector


  


Re: LLVM discussion

ok!, thanks ethin, i'll release it as a C++ librarymy goal is to avoid memory leeks and you've helped me a loti have dlib c++ library and i've forgot about that!thanks

URL: http://forum.audiogames.net/viewtopic.php?pid=192353#p192353




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-17 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: LLVM discussion

Actually, if I developed a compiler, I'd not use C++.  My understanding is that he wants to use C++ for the engine, but maybe I'm misunderstanding something.  Still, nothing says you can't develop the compiler in another language or, as is actually very common, in the language that the compiler compiles (really).Now, to be quite frank, perhaps even blunt.  Visualstudio, it's abundantly clear that you don't understand your problem.  I know what an executable is, and the method I posted does *exactly* what you need.  The things you are suggesting take a project that is very, very simple and make it very, very complicated.  I think that I'm not alone when I say that you don't seem to understand your problem at all, and most of your posts don't seem to be replying to what other people say.  I think that your English is too poor for us to have such a technical conversation.  I'd strongly recommen
 d looking for a forum of programmers speaking your native tongue and asking there.  I've given you solutions.  You're choosing to ignore them.If you are dead set on a compiler that you write yourself, please understand that you are in the realm of the so-caled "learning project".  That is, it will be a project that no one is going to be able to use for a very long time if ever, and it will simply serve as a stepping stone to let you contribute to other compilers.  I'm sorry if this isn't what you want to hear, but it is a fact.  If you were experienced enough to write a commercial-grade compiler by yourself, you would certainly not be asking this question and it's extremely doubtful you'd be asking here.

URL: http://forum.audiogames.net/viewtopic.php?pid=192326#p192326




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-17 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: LLVM discussion

Hmmm, visualstudio. I'm not getting you now. This doesn't make any sense. It is very difficult and very uncommon for someone to develop a compiler in another language other than C/C++. There is a way to avoid memory leaks and other memory-related issues, however! Check out the Dlib C++ Library and the memory_manager class from that library. There is also the memory_manager_global and the memory_manager_stateless classes that you may use.

URL: http://forum.audiogames.net/viewtopic.php?pid=192285#p192285




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-16 Thread AudioGames . net Forum — Developers room : visualstudio via Audiogames-reflector


  


Re: LLVM discussion

i want to avoid use of C++ because of pointers and memory leeksbecause of that i've started this topic to develop an executable compiler for my enginefirstly, executables are not something that you are thinkingin the start, they have a headervariables and simbles most be resolved in there locationsit has a footer at the endit has a main entrypoint in the header witch mentions what function should be called when the application startsyour functions and classes must be copyed into executable or a DLL and the executable can call themsecondly, i havent found anythink for COFF, for elf, i have libelf witch loads and edits elf executables

URL: http://forum.audiogames.net/viewtopic.php?pid=192247#p192247




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-16 Thread AudioGames . net Forum — Developers room : Manu via Audiogames-reflector


  


Re: LLVM discussion

Yes, I read that, he wants to avoid C++, but I continue to think that he thought to C++ without knowing that. Good luck!

URL: http://forum.audiogames.net/viewtopic.php?pid=192237#p192237




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-15 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: LLVM discussion

No one has said anything about C++.  In fact, this entire thread has been about how to *not* be C++.  I'm not sure where this particular conceptual leap came from.  I would not write an audiogame in C++ under most circumstances: there is nothing there that I can't get elsewhere, and elsewhere is simpler by far.  Goodbye, manual memory management.  Goodbye, falling back to C apis and raw pointers for half the world.  Yeah, you can write wrappers...but why?  Why would you subject yourself to such mortal agony?

URL: http://forum.audiogames.net/viewtopic.php?pid=192154#p192154




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-15 Thread AudioGames . net Forum — Developers room : Manu via Audiogames-reflector


  


Re: LLVM discussion

I think he wants to make some wrappers for C++, for instance a “sound” class to play sounds, like that found in BGT. Also other functions and classes, easier to use. He wants to have an editor, or something like this where users to write code using his classes and functions, after, that code to be compiled.I think this is his thought. Yes, this kind of classes would be useful for many users, I remember my first app in C++ with Wind32.dll, too many lines for a simple task, even just for a blank window. Maybe some users will prefer to have a game in C++, if they would have a function like: “createMainWindow(“My Game”)”; a sound class with methods like: load()play(), playWait() etc. If you do first these wrappers, we will test them with Visual C++ Express for instance, we want just to include your files and we will test all these classes and functions. Finally, the code will be compiled, of course, but just for now, let’s use an existing compiler, give use some useful classes for Audio games.In future, a solution would be to create your editor for C++, where in menu to be found classes for audio games. After the code is written, the code can be compiled through command line, some commands sent by your editor.

URL: http://forum.audiogames.net/viewtopic.php?pid=192132#p192132




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-15 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: LLVM discussion

Well, actually, there's two questions going on here.  I have covered the second one, but I'll repeat it one more time.Writing a compiler? You don't have the experience for doing that quickly.  None of us really do.But two points:First, there is no functional advantage to actually putting the script into an executable.  The user will barely notice.  It is still just as easily hackable.  Putting the script outside the executable as a file and distributing as a zip that you extract is 100% okay, and you're going to have to do that anyway.  The user will want to distribute sounds, after all.Second, you can do so easily by requiring the end user to install a C compiler.  Write the executable to run the script from a base64-encoded string literal, but intentionally leave out that literal.  When packing the program, package the scripts into the base64 string by inserting the base64-encoded representation 
 of the file at the appropriate place in the source file.  I believe I said something like this before.  Problem solved, no framework required, the end.  Given the amount of effort needed to modify an already-compiled executable, it's not worth doing so for those users who can't bear to distribute the bytecode as a file--i.e. none.But if you're dead set on this, pull out Google and find something.  I'm sure someone has written a library to modify a compiled executable.  But we can't help you.  None of us have done it to my knowledge; I don't think any of us would.  The gains are truly and simply not worth it.  But you can, if you want, and I certainly can't stop you.  Just use a cheap trick and stop there.  I promise no one will notice except for you.

URL: http://forum.audiogames.net/viewtopic.php?pid=192129#p192129




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-15 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: LLVM discussion

Damn it, visualstudio! This is getting wayy out of hand! We've told you again and again that you cannot create executables from simple scripts yet! Your not experienced enough to do that! Unless, of course, you are able to turn the entire script, line by line, into assembly language, which then can be assembled by a compiler! As Camlorn said, we've nailed the nail into the board until it fell out the other side trying to help you out with this. You need to ask a computer expert in your local country if you really need to understand it. If you keep asking the same question over and over in different ways, your going to annoy us so much that we're going to need to close this thread! All I've seen on this damn thread is you asking "How do I make a compiler?" or, "How do I make executables with a programming language?" when we've told you, time and time again, that you shouldn't make a compiler o
 r try to make executables yet! Sure, mz is the systems-compliant executable format, but stop trying to build executables out of other executables unless you know what your doing! This is a very dangerous road your going down, visualstudio. Not on the forum, but on your computer. An executable ahs to be a perfectly made one, with no errors that the processor can find. A program should only have logic ones at most. If the processor faults on another computer, the owner of said computer is going to find a way to contact you and start complaining about it, and there's nothing that you can do because you don't know assembly language. Can you just lay off the "make a compiler" thesis until you're actually ready for it? If you don't, one of these days I'm going to get so angry at you that I'll get banned myself, and I don't want to be banned again. And if I am banned, this time, it'll be a legit reason to ban me, unlike the other time, whic
 h wasn't true at all, and in fact was of someones bad observation techniques. Taht someone, I will not name.

URL: http://forum.audiogames.net/viewtopic.php?pid=192126#p192126




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-15 Thread AudioGames . net Forum — Developers room : visualstudio via Audiogames-reflector


  


Re: LLVM discussion

i have to mention i can run the script!, but i want to create executables from it!what framework can i use that add's executable header, resolve simbles, etci'm not saying to do my project, the problem is you are thinking rong, you say write a script witch your application load's it!, but if you've read the topic, i've said how to create an executable for the script file that is compiled into bytecode?again, i've developed that part that can run the script, but now, i want to implement it's compiler that turns the scripts into executable file in windows, *.exe

URL: http://forum.audiogames.net/viewtopic.php?pid=192123#p192123




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-15 Thread AudioGames . net Forum — Developers room : stewie via Audiogames-reflector


  


Re: LLVM discussion

I'm pretty sure you can find open source solutions that have already done this entire process as well. I honestly don't really think it's a language issue, since he seems to understand terminology. repeatedly stating that as the issue and forcing compliance really isn't the way to go here. I'd recommend the lupa package for python as a starting point, or angelscript. Python can also be embedded (though I don't really know enough to verify if it'd work). Are you aiming for any particular language type?

URL: http://forum.audiogames.net/viewtopic.php?pid=192116#p192116




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-15 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: LLVM discussion

All right look.  This is the absolute last time I'm going to lay this out.1.  Get an interpreter tat someone else has written.  Lua, Angelscript, whatever.  It doesn't matter.  otice that I don't care if it's a JIT or not-the important part is that you didn't write it.2. Write a program using this library.  This program looks for main.script in the directory of itself, loads it, and calls-say-main in the script.  This program will not top 300 lines and probably won't top 100.3. Put this program in the same directory as the project and launch it.For bonus points, use a batch file to launch the program that loads the script.  This enables you to use the program with multiple files-i.e. you don't have to bundle projects to run it.  The total code size of this project is 400 lines tops, including the launcher scripts.  You will not be able to out-do BGT in any meaningful way: b
 y the time you do, you might as well have jsut used C++ or Java or something directly.  THe only way to answer this question more precisely is to give you the code; at that point, I've done your entire project for you.I am now self-banning from this thread.  We've hammered the nail into the board and kept hammering until it fell out the other side.  I'm not sure why there is still a problem here.  I'd really suggest that, if you still don't understand, you find someone who knows your language to explain it.

URL: http://forum.audiogames.net/viewtopic.php?pid=192114#p192114




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-15 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: LLVM discussion

All right look.  This is the absolute last time I'm going to lay this out.1.  Get an interpreter tat someone else has written.  Lua, Angelscript, whatever.  It doesn't matter.  otice that I don't care if it's a JIT or not-the important part is that you didn't write it.2. Write a program using this library.  This program looks for main.script in the directory of itself, loads it, and calls-ay-main in the script.  This program will not top 300 lines and probably won't top 100.3. Put this program in the same directory as the project and launch it.For bonus points, use a batch file to launch the program that loads the script.  This enables you to use the program with multiple files-i.e. you don't have to bunle projects to run it.  The total code size of this project is 400 lines tops, including the launcher scripts.  You will not be able to out-do BGT in any meaningful way: by 
 the time you do, you might as well have jsut used C++ or Java or something directly.I am now self-banning from this thread.  We've hammered the nail into the board and kept hammering until it fell out the other side.  I'm not sure why there is still a problem here.  I'd really suggest that, if you still don't understand, you find someone who knows your language to explain it.

URL: http://forum.audiogames.net/viewtopic.php?pid=192114#p192114




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-15 Thread AudioGames . net Forum — Developers room : visualstudio via Audiogames-reflector


  


Re: LLVM discussion

i'm saying this, but dont know how can i create executables like thisi'm thinking about main entrypoint, and functions and classes that i want to add to this applicationJIT compiler is just compiles the script code into bytecode, but it doesnt add executable header, main entrypoint, doesnt resolve simbles

URL: http://forum.audiogames.net/viewtopic.php?pid=192111#p192111




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-15 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: LLVM discussion

It's probably just the template exe for redistribution.  Kinda guessing in the dark, but given the name and that you're reorting that it's an exe file internally, this doesn't seem too far-fetched.  Copy the exe to whatever is distributed or append the bytecode or whatever, and then rename it to mygame.exe.But again, just a guess in the dark.

URL: http://forum.audiogames.net/viewtopic.php?pid=192108#p192108




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-14 Thread AudioGames . net Forum — Developers room : visualstudio via Audiogames-reflector


  


Re: LLVM discussion

ok, but some applications that uses AngelScript isnt using this file!open it with a text editor, and you'll see that it start's with mz witch is the start of exe files!

URL: http://forum.audiogames.net/viewtopic.php?pid=192071#p192071




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-14 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: LLVM discussion

Exec.bin is an angelscript necessity. BGT requires it to operate properly.

URL: http://forum.audiogames.net/viewtopic.php?pid=192057#p192057




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-14 Thread AudioGames . net Forum — Developers room : visualstudio via Audiogames-reflector


  


Re: LLVM discussion

ok, but it didnt translate it correctlyi know what you are mentioning in your posts, but i've asked about exec.bin in bgt's main directorydont need to translate everything for me

URL: http://forum.audiogames.net/viewtopic.php?pid=192044#p192044




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-14 Thread AudioGames . net Forum — Developers room : stewie via Audiogames-reflector


  


Re: LLVM discussion

A Google translation might not be entirely accurate.

URL: http://forum.audiogames.net/viewtopic.php?pid=192043#p192043




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-14 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: LLVM discussion

OK, then, visualstudio, I'll speak in your native language, then, since you don't seam to understand what we're trying to tell you.آیا یک کامپایلر را ندارد. در عوض، یک مترجم با استفاده از جاوا با ابزار دیگر برای تشخیص زبان (ANTLR.) هنگامی که شما کشف کردن مکانیک از ANTLR، تلاش برای را  کامپایلر، اما می توانم کپی کردن از کسی میکنم. سعی کنید و گسترش مترجم خود را. اگر شما موفق به ساخت یک مترجم، من شما را راهنمایی در ساخت یک کامپایلر را. OK؟

URL: http://forum.audiogames.net/viewtopic.php?pid=192041#p192041




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-14 Thread AudioGames . net Forum — Developers room : visualstudio via Audiogames-reflector


  


Re: LLVM discussion

firstly, english is not my first languagemy first language is persionsecondly, witch framework do you recommend for compiler?or maybe, i'll release it as a C++ librarybut what is the exec.bin in bgt's main directory?

URL: http://forum.audiogames.net/viewtopic.php?pid=192018#p192018




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-11 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: LLVM discussion

Might I suggest making a game first?There's two problems here.The first is the language barrier: I can't tell if you don't know what's going on because I'm not sure if I'm understanding your posts or if you're understanding mine.  If English isn't your first language, I'd strongly suggest looking for someone who speaks yours fluently to explain this.  It's possible that you know more programming than I think and that the language barrier is what's preventing this from going anywhere.The second is that I think you're biting off more than you can chew.  I've already told you the easiest way: use someone else's.  If you don't get why after rereading everything, there's nothing more I can say, but this can be done in 100 lines or less via Angelscript or similar.  Literally no one writes their own interpreters anymore.  We all just use something someone else h
 as written.You seem to be asking about elementary programming concepts now.  What have you done before?  What is your background?  if you've not released a mid-sized to large game, I'd not suggest trying to make a system for others to develop them.  Certainly, by the time you've done so, you won't have these questions anymore.  Use BGT, release a game around the complexity of Shades of Doom or BK3, and then revisit this project.

URL: http://forum.audiogames.net/viewtopic.php?pid=191826#p191826




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-11 Thread AudioGames . net Forum — Developers room : visualstudio via Audiogames-reflector


  


Re: LLVM discussion

thanks, i want recommendation!but the question is, how to create an interpretor?i've asked somewhere, they said to you need to compile your functions and classes with a C++ compiler to binary, and then link it with script bytecode!, but how to do that!, what about main entrypoint?

URL: http://forum.audiogames.net/viewtopic.php?pid=191822#p191822




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-11 Thread AudioGames . net Forum — Developers room : stewie via Audiogames-reflector


  


Re: LLVM discussion

I personally wouldn't say that. If you have a sincere need to use llvm and you have to knowledge to do so, then go ahead use it. We're not forcing you to use a particular piece of software here, we're just giving recommendations despite any appearances given. Llvm has it's uses, creating an interpreter for a scripting language has it's uses. the goal here is to weigh the advantages and disadvantages of using llvm and a  script interpreter, following the path that will lead to a finished piece of software.

URL: http://forum.audiogames.net/viewtopic.php?pid=191771#p191771




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-10 Thread AudioGames . net Forum — Developers room : visualstudio via Audiogames-reflector


  


Re: LLVM discussion

ok!, i dont use it!, i'll make an interpreter for that!, understanded

URL: http://forum.audiogames.net/viewtopic.php?pid=191725#p191725




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-10 Thread AudioGames . net Forum — Developers room : visualstudio via Audiogames-reflector


  


Re: LLVM discussion

ok!, i dont use it!, i'll make an interproter for that!, understanded

URL: http://forum.audiogames.net/viewtopic.php?pid=191724#p191724




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-10 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: LLVM discussion

Visualstudio, are you not understanding us, or something? Because right now your making this discussion a very difficult one. Do we have to speak in your native to understand? r do we need to close this topic. I'm going to give you an answer that you most certainly understand: Don't use LLVM. Clear?

URL: http://forum.audiogames.net/viewtopic.php?pid=191694#p191694




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-05 Thread AudioGames . net Forum — Developers room : visualstudio via Audiogames-reflector


  


Re: LLVM discussion

i havent say give code to me!why you are thinking like that?i've started a discussion and you are not required to reply!, isnt it?

URL: http://forum.audiogames.net/viewtopic.php?pid=191306#p191306




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-01 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: LLVM discussion

I have already told you.  Over and over. I'm not repeating myself again.  You use someone else's, you don't make one.  Please see the proceeding posts wherein I detailed your options completely, including advantages and disadvantages.  Go find a language you like.  Read the manual for it.  Figure it out.  If you can't get from here to there, a total program size of about 0 to 100 lines, you won't be able to finish the project.  I gave you options that require no programming, and I'm pretty sure I even spelled out which they were.The only thing that is left is for me to do half your project for you and give you code.  For those who know me on these forums, it's rare that I have nothing left to say.  And yet, somehow, it has happened.  There is nothing left I can add.  Nothing.

URL: http://forum.audiogames.net/viewtopic.php?pid=190908#p190908




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-01 Thread AudioGames . net Forum — Developers room : visualstudio via Audiogames-reflector


  


Re: LLVM discussion

so, if LLVM isnt good, what do you recommend?how to make an interpreter?this thread is started, for just 1 reason that i've mentioned

URL: http://forum.audiogames.net/viewtopic.php?pid=190904#p190904




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-01 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: LLVM discussion

You are in a different universe.  I've said what should be said, and I've done it several different ways.is there a language barrier here?  The things you're saying you want to use are so far from the project that you want to do that I honestly fail to understand.  Inline assembly has nothing to do with making a BGT clone.  LLVM has nothing to do with making a BGT clone.  If the goal is to learn LLVM, then go learn LLVm.  But if that's the case, I have no idea why this thread was started.So I kind of give up now.

URL: http://forum.audiogames.net/viewtopic.php?pid=190895#p190895




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-10-01 Thread AudioGames . net Forum — Developers room : visualstudio via Audiogames-reflector


  


Re: LLVM discussion

instead of using nasm, we can use inline assembly in C++but, how to create an interpretor for that?i'm learning LLVM!if i want to use lua, i can use LLVM_lua for thisbut i havent found anything for AngelScripti know assembly and that's not have so much problems, but when the project becomes bigger and bigger, it'll be harder than to use assembly for thatC++'s inline assembly is better i think, because you can mix C++ and assembly together

URL: http://forum.audiogames.net/viewtopic.php?pid=190891#p190891




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-09-30 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: LLVM discussion

I think there is an issue of nomenclature here.  When you say compiler, I think you mean packaging system: you don't care if it's machine code or whatever, it just needs to run on the target machine.  This is a very significant difference.  The actual term compiler heavily implies that you're developing a programming language, that the final output is machine code, and that you're not allowing execution of the program without this machine code.The answer to how to go about this depends on the approach you choose.  If you don't embed (this is what I recommend, truly) then you use whatever the language you pick provides.  If you do, you write a small stub executable that goes and loads the code of the script.  That is, it looks for a specific file in the same directory as itself, say main.sourcecode.  The total source for a very basic loader like this will be well under a hundred lines, but supporting modules and encr
 ypption may take more.  Adding sound and the like will also add to this source; most embedded scripting languages allow you to register arbitrary functions.But seriously, don't.  Use a programming language that's not embedded.  Pick one with some good game libraries.  The language provides everything you're about to code.  What you're doing here is transforming an embedded scripting language into a non-embedded language, nothing more.  You don't actually gain much if anything.  And you lose all the libraries and make everyone have to wait on someone to add them to the core engine itself.  Which is horridly painful.As for LLVM and assembly.  I don't see the point of even discussing assembly examples here, mostly because I'm 99.99% sure that no one on this thread including myself is able to fully understand them.  Using raw assembly code itself is not something that is done anymore on desk
 top platforms for the most part.  It is also incredibly specific to the combination of assembler and operating system in use.  People do not learn assembly, they learn "an assembly": the one I know best is MC68k, but I'll be learning MSP430 this semester.What LLVM itself does, and the only thing it does, is gives you a bunch of libraries and tools for working with "LLVM Intermediate Representation".  It's somewhere between assembly and the lowest-level language that's not assembly you can think of (you passed C on your fall from the heights of easy to use.  LLVM IR is lower even than C.).  it's also cross-platform and cross-architecture.  If you can get your program as far as LLVM IR, it will go the rest of the way.  But this requires 75% or more of a compiler, and that 75% includes much of the hard bits.  While LLVm does some optimizing (actually quite a lot), you will probably still need to do so
 me yourself.  Also, the benefits are much, much less for a language without type declarations: the overhead code needed at runtime is astronomical and can't easily be optimized out.  You end up with a system that's not nearly as good as a compiler for a statically typed language and has all the disadvantages of being compiled in the first place.  The Pypy people are where you have to look these days to find out about writing a JIT for such languages, and I'm not sure that a traditional compiler is possible.  Those that do exist have an overwhelming tendency to rely on the interpreter (i.e. the systems for python actually link Python and call the functions in it for everything).  The reasons dynamic languages are so incredibly hard are way beyond the scope of this thread.  Way, way beyond; we can't see them with a telescope.

URL: http://forum.audiogames.net/viewtopic.php?pid=190863#p190863




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-09-30 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: LLVM discussion

@visualstudio, I do not recommend you make a compiler at all. For now, just have an interpreter. A compiler isn't actually needed yet. Wait until your very good with assembly language, machine language (I know, but its required to assemble a game into direct machine code without use of an already available assembler), or, if you are able to use assembly, find a good assembler (I recommend NASM), and then use that instead. Simply have your interpreter translate the game into assembly language and have NASM assemble it. Below, I have an example hello world program in NASM:This is a Hello world program for the DOS operating system.section .textorg 0x100; semicolons are comments and ignored. 0x100 is 256 in our decimal system.    mov    ah, 0x9    mov    dx, hello    int    0x21    mov    ax, 0x4c00    int    0x21section .data
 hello:    db 'Hello, world!', 13, 10, '$'An example of a similar program for Microsoft Windows:global _mainextern _MessageBoxA@16extern _ExitProcess@4section code use32 class=code_main:    push    dword 0      ; UINT uType = MB_OK    push    dword title  ; LPCSTR lpCaption    push    dword banner ; LPCSTR lpText    push    dword 0      ; HWND hWnd = NULL    call    _MessageBoxA@16    push    dword 0      ; UINT uExitCode    call    _ExitProcess@4section data use32 class=data    banner:    db 'Hello, world!', 0    title:    db 'Hello', 0An equivalent program for Linux:global _startsectio
 n .text_start:    mov    eax, 4 ; write    mov    ebx, 1 ; stdout    mov    ecx, msg    mov    edx, msg.len    int    0x80   ; write(stdout, msg, strlen(msg));    mov    eax, 1 ; exit    mov    ebx, 0    int    0x80   ; exit(0)section .datamsg:    db    "Hello, world!", 10.len:    equ    $ - msgFor X64 processors:section .textorg 0x100    mov    ah, 0x9    mov    dx, hello    int    0x21    mov    ax, 0x4c00    int    0x21section .datahello:    db 'Hello, world!', 13, 10, '$'An example of a
  similar program for Microsoft Windows:global _mainextern _MessageBoxA@16extern _ExitProcess@4section code use32 class=code_main:    push    dword 0      ; UINT uType = MB_OK    push    dword title  ; LPCSTR lpCaption    push    dword banner ; LPCSTR lpText    push    dword 0      ; HWND hWnd = NULL    call    _MessageBoxA@16    push    dword 0      ; UINT uExitCode    call    _ExitProcess@4section data use32 class=data    banner:    db 'Hello, world!', 0    title:    db 'Hello', 0An equivalent program for Linux:global _startsection .text_start:    mov    rax, 4 ; write    mov&nbs
 p;   rbx, 1 ; stdout    mov    rcx, msg    mov    rdx, msg.len    int    0x80   ; write(stdout, msg, strlen(msg));    mov    rax, 1 ; exit    mov    rbx, 0    int    0x80   ; exit(0)section .datamsg:    db    "Hello, world!", 10.len:    equ    $ - msgI know, it looks complicated, but its actually quite easy. Of course, after the assembly is done, have the program link it with ld or some other linker. Do not try and design your own linker!

URL: http://forum.audiogames.net/viewtopic.php?pid=190845#p190845




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-09-30 Thread AudioGames . net Forum — Developers room : visualstudio via Audiogames-reflector


  


Re: LLVM discussion

ok, if i want to embed a scripting language, how to create an executable compiler for that?working with LLVM requires you to have knowledge with processors and some other things that no need to talk aboutbut for making a compiler, what do you recommend?

URL: http://forum.audiogames.net/viewtopic.php?pid=190807#p190807




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-09-29 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: LLVM discussion

I'm not saying use Python.  I'm not sure why so many blind people are against Python, but there are plenty of other languages that are just as good as it.  My list of packages applies to Python, but was merely an illustrative example: similar lists can be compiled with almost no effort for any of the top 20 programming languages in the world.  Even PHP has realtime audio output (yes, really.  It's disturbing).  I also said to explicitly not use C++ because even experienced coders hate it.I am saying don't use LLVM.  I'm not sure how you're thinking you can somehow get LuaJIT and LLVM in the same project-not only are they not really compatible, the JIT in LuaJIT means that it's just-in-time compiling.  So LLVm isn't part of it, because you've got a just-in-time compiler.Distributing a single executable and having a compiler are not synonymous.  Just use some basic encryption.  Real
 ly.So since you want an opinion, don't use LLVm.  Not only don't use LLVm, put LLVM inside a big fortified fortress with giant hazard signs on it.  I think that you probably aren't clear as to what LLVM is for.  LLVm is the nuclear bomb for your project.  If you go down the LLVm road, we'll maybe see you in a few years with a project.  If you pick an embedded scripting language, we'll see you in a couple months.  If you just do what I said and pick some language that already exists with a full-fledged compilation and distribution system, you can have the libraries you need installed in an hour with identical functionality as the other two approaches.  If you still need to make it more newbie friendly, write simpler libraries on top of those-you can do one a day, easily, which gives you a project in a few weeks but also gives you something useful and ready and able to be used in a real game in a couple hours.  It 
 also lets the user add literally anything that you don't provide because someone outside this community has already written it and all they have to do is install it.  I'd be willing to bet a very large sum of money that a library exists for every possible Audiogame-related development task that anyone cares to name.  This is especially true of C++, C#, and Java.if someone has a truly good reason for disagreeing with me, say so.  But this kind of thing is close enough to fact that I'm hesitating to say "my opinion" at all here.  The only reason *not* to go down the road of preparing a list of preexisting libraries and bundling them together as a super-library package is to learn something.  Literally the only reason.  Sighted people use exactly the same stuff as you, so you've got a pool of programming talent that's probably 10 times larger than the one on this forum.  And they've already done your p
 roject.  Completely.  There's nothing left.

URL: http://forum.audiogames.net/viewtopic.php?pid=190774#p190774




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-09-29 Thread AudioGames . net Forum — Developers room : visualstudio via Audiogames-reflector


  


Re: LLVM discussion

well,about python, i'm not using itand i cant say so much about itC++ is two hard, and i want to make the life easyerbut i lisson to all of the ideas, and then i'll implement itmaybe, i'll use luajit and LLVM

URL: http://forum.audiogames.net/viewtopic.php?pid=190759#p190759




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-09-29 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: LLVM discussion

That this sounds like BGT, and I don't see why you wouldn't just use that.In terms of 3D audio, I'm pretty sure I'm the only person on the block for anything under $10k, and it's not ready.  It's close enough to ready that you can get it running, but it's not ready.As for actually doing this, there's not much point unless it's more than a scripting language with easy libraries.  In that case, just develop the easy libraries and don't even worry about the rest: whether I have to do "import magic_audiogame_engine", "using magic_audiogame_engine", etc, isn't a big deal.  And it avoids a ton of stuff.My current methodology is what I call library-driven development.  I develop libraries as I develop projects.  The intent is that they're separable: audiogame_engine is the core part of any game (use pyglet, it's deprecated because I didn't know pyglet exist
 ed) but really it's also half the code to a space invaders.  Once you've got 10 or so of these handling everything you need, you've done it.  Just release them all separately, or as an installer that installs them all, or whatever.Python is a bit hard to distribute, but if you're going to develop the distribution component for people that doesn't matter so much.  Ironically, C++ is probably the easiest: statically link the runtime and all the libraries in, and you're done.  You don't even need an installer.  In the middle is something like LuaJit, Angelscript, etc: you don't have some of the distribution complexities of Python, but you do have to develop the entire host environment (so not really a fair trade-off).  I'm not saying that C++ is really on the table: C++ is a horrible thing for new and old coders alike.In python, adding the following things to your mixing pot gives a full game engine.
   No coding is required, save perhaps for distributing.  Pyglet (graphics, sound), pickle (built-in and can serialize anything), SQLAlchemy (talk to databases), requests (talk to web servers, i.e. scoreboards or update checking), any of several astar implementations (pathfinding), either PyBox2D or PyODE (the former is better. Solves the collision checking problem), and maybe blist (faster containers in a profound way i can't go into via a parenthetical note).  What might be left is writing easier wrapers on top of these, but I can't think of a game that needs something that list of Python packages doesn't offer.  Other languages have similar and equally effective combinations-the fact that I can't tell you what c# needs means simply that you need to Google, for example.If we want to talk about the Unity road, we get to talk about inventing interfaces that don't even exist yet.  I don't think you're talking about that
 , but feel free to correct me.

URL: http://forum.audiogames.net/viewtopic.php?pid=190752#p190752




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-09-29 Thread AudioGames . net Forum — Developers room : visualstudio via Audiogames-reflector


  


Re: LLVM discussion

well,@camlorn, +1 for your poststhis is a discussion and i want to know what other people are saying@ethin, first of all, for developping a compiler, you must know about processorsyou must know the differences between x86 and x64then, you have to know about what type of object file you needelf for linux, machO for macOSX, COFF for windowsthen, you need a parser that maybe is your scripting languageAngelScript, lua, pong, or something similaror you have to implement your ownnot?@camlorn, i want to develop a game engine with easy to use API and flexibility, as well as 3D sound supporti've created this topic for recommendation and discussion about what scripting language to use, (i'm currently using AngelScript), but maybe i'll change to lua with luajitnow, i want to know, what is your idea

URL: http://forum.audiogames.net/viewtopic.php?pid=190732#p190732




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-09-28 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: LLVM discussion

I was considering flex and bison when making my compiler comments.  I do not know anyone who doesn't use those or a similar tool these days; there are advantages to recursive descent parsers, but they're a lot more work to write.  Flex and bison probably aren't even the best thing on the block these days: compilers can be written in hgher-level languages, and there's a lot of other options.  This is because those tools aren't just for copilers, even if that is their most common association.  If you're trying to write a compiler without them, you've gone from hard to hell-in-life, or something we don't have an adjective for.Even with flex and bison (or similar), the top companies in the world recruit the top computer science people in the world, pay them huge quantities of money, and throw them at a compiler.  5 or 6 years later, it's worth using.I'll be completely honest.  You can get a com
 piler, in the sense of compiling hello world.  This can happen around the same time you're ready to make your first audiogame.  yay, you say!  It compiles.  But your work is only 1% done, because you're probably not anywhere near doing error messages right (VC++ has somewhere around a thousand), you're going to need an optimizer (usually a grad-level compiler course), reimplement all the tools (ever wanted to know everything about your processor?  yeah, thought not.  Too bad you need to implement a good debugger...).  You'll be refactoring like crazy: you can compile the print statement, but even adding the function restructures the entire internals of the compiler, and hello there Mr. Class, fiend of the extra 3 weeks of recoding things.  Or you could spend 4 or 5 hours learning to embed a scripting language or something of the like (I'm almost sure you can find a compiler for some language or other as a library. 
 ; No telling which language, though).  Quality compilers are hard.  Really, really, bone-crunchingly hard.  And that's not even talking about language design--if you're just copying another language, then use the other language; otherwise, you need to invent your own and most things that you can think of can and have already been done for you.In terms of code in general?  Comments are nice for new programmers, but the need of them lessens with programming skill; most big code-bases don't have them nearly as much as one would expect.  The best thing you can do is establish and stick to style guidelines  What you choose doesn't matter so much as being consistent: I should be able to tell if x is a function, variable, or whatever by lookinga t how you styled its name.  personally (C++), I use underscores and lower case for global and class variables, camelcase with capital first letter for types, underscores and all-caps for 
 constants defined with macros, and camelcase with lower-case first letter for functions.  I follow them draconically.And here's the biggest one.  The game engine is not the place for a new coder to contribute.  The game engine must contain the best of the best in terms of features and code quality; it's not one game, it's hundreds, and any flaws are going to affect orders of magnitude more people.  This is probably the hardest part of the whole thing.I can be more focused once you give me what I'm asking for: a description of why Mr. Bob Smith cares.

URL: http://forum.audiogames.net/viewtopic.php?pid=190706#p190706




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-09-28 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: LLVM discussion

@visualstudio, one thing that you should use is Flex and Bison. Since a compiler requires you learn assembly language, I do not recommend it for a beginner. Try flex and bison. See how that goes.@camlorn, I love your analogy of the situation. +1 for that.@visualstudio, also, if you want it open source, you'd better comment everything that you feel should be commented, and comment them well, because if you don't comment anything, your permanently, effortlessly, screwed. Take this situation into account:You've just got home from work and your ready to program. You take a while to think up an idea. When you find one that sounds nice, you start the design phase. You think and plan it out, like a professional would, and then you start coding. You don't add any comments; comments aren't needed, after all, are they? You think, No. I'll know what this means later. Now, unless you have an excellent memory like I do, this isn't going to w
 ork. But you keep coding all knight, then compile and link the newly created program with out any errors or warnings. You've done everything correct. Your program should execute fine, right?No. A couple months later, you get a bug report from a user. Remember, this is a solo project; no one else is helping you out. You go back into the code and... bang! Your browsing through it and have no idea what this or that does, So you can't fix anything.Because you didn't add any comments, your mind went blank when you next saw the code. Make sure to always use comments. They will help you in the long run. As I once read, "clever programs work nice, but you can make a mess out of them. Commented programs, although a little more verbose, can help you succeed in the long run." Make sure you comment functions, variables that you think a normal user wouldn't understand, and others. Also, make variables human readable. For instance, instead of soundpointx,
  use sound_point_x instead. It will help your users a lot if you do that.

URL: http://forum.audiogames.net/viewtopic.php?pid=190701#p190701




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Re: LLVM discussion

2014-09-28 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: LLVM discussion

A home-brew compiler isn't the answer: if you're looking for community contributions, then a compiler is too complex.  Not to mention the fact that it's going to be ugly and hard to understand, at least unless it's something you've done before.  Most worthwhile contributions aren't going to be done via the engine, they're going to be done in the engine.  This is an important point to think about.But you've still not answered the question.  I can provide at least 50 different definitions for game, varying mostly according to  supported gameplay features, and at least  3 different definitions for engine.  In order to discuss this we need more.let me put it another way.  Bare with me on this, because it's important.  Accuracy to reality is not the point: I know that, by the definition of community contributions, it's intended to be free.  But we're visiting fantasy lan
 d for a moment.You are the CEO of a company and you've just developed your amazing and commercial audiogame engine.  Bob Smith comes along and asks you "Why should I buy this? I've already got x, y, and z".  What do you tell him?  What does your engine, now that it is finished in some sense, let our imaginary consumer do?  Your goal is not to portray your company's values or your personal opinions.  Your goal is to tell Bob why he cares.Once we know why Bob cares, we can talk about how to get you to that point.  This is not something unique to this thread.  Other people do this.  Libaudioverse did it, though less explicitly: I knew from Camlorn_audio what people wanted and couldn't get, and I knew what I wanted and couldn't get.  I did not do this for Camlorn_audio, and now I've got several thousand lines of abandoned code.  Before I even wrote a single line of code for Libaudiovers
 e, I had answered the question as to how my imaginary Bob Smith would program with it, and what it would let him do that he couldn't do elsewhere.  This particular idea is not unique to me: imagining the imaginary customer is a pretty standard thing, even at places like Microsoft.And don't make the mistake of thinking that your engine is free.  It's not. It might not cost money nor get you anything, but it's going to cost Bob time and effort to learn it and transition from what he used to use.  And so in this sense Bob had to pay.Saying "community contributions are good" and "lets people make games" is broad.  So broad that assembly language fits in some sense.  With those two statements together, you could use literally anything.  Because of the nature of your project, you need not be concerned with being friendly to other programmers from the community: any programmer who can't learn more than o
 ne language is probably not at the point of being able to write robust, reusable code for other game developers.And, to be honest, your project won't get far without more definition.  If I say anything goes, then everything goes.  And the project collapses from its own weight and complexity.  The input library has 10 special cases for everything from card to rhythm to first-person shooters, all in different coding styles and uncommented.  Saying what your project is also says what it is not and, from that base, lets you know what you can and must exclude.

URL: http://forum.audiogames.net/viewtopic.php?pid=190684#p190684




___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector