Re: suggestions on how to deal with destruction of a class?

2015-03-05 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

What about fmodex and/or bass libraries?

URL: http://forum.audiogames.net/viewtopic.php?pid=207503#p207503




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

Re: suggestions on how to deal with destruction of a class?

2015-03-05 Thread AudioGames . net Forum — Developers room : Dranelement via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

So, Im a little confused about how dictionaries in bgt work. do I just assign the value to a handle of whatever enemy? or, something else.

URL: http://forum.audiogames.net/viewtopic.php?pid=207523#p207523




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

Re: suggestions on how to deal with destruction of a class?

2015-03-05 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

The idea is this: its an enemy base class, but some things are going to want to cast down the tree. That is, if a piece of code knows that enemy 53 is actually a tank and needs to do tank things to it, itll cast the enemy class. In C++ this is done through pointers; in java theres dedicated operators; in Python you just treat it like a tank and it is.For the most part inheritance should do the trick. The fictitious tank can mostly if not completely live inside the things the tank class overrides. But avoiding the above completely is nearly impossible. BGT almost certainly has a way to do it, but I dont know what that way is.

URL: http://forum.audiogames.net/viewtopic.php?pid=207531#p207531




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

Re: suggestions on how to deal with destruction of a class?

2015-03-05 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

@camlorn : a 3D sound lib is available for BGT, using FMODEx wrappers  its still in debug but its working!For BGT casts, you can cast a handle using : MyChildClass@ castedObj = castMyChildClass(NonCastedReference); it returns null if the cast is impossible For arrays and all, creating a SuperClass@ array lets you storing SuperClass or a subclass object references 

URL: http://forum.audiogames.net/viewtopic.php?pid=207534#p207534




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

Re: suggestions on how to deal with destruction of a class?

2015-03-05 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

@Dranelement:yes. The id is the key, the enemy is the value.@Genroa:Unless something has majorly changed in the last 6 months, no. You have to write chunks of code in C just to get most libraries to fit BGTs pitiful DLL support. No callback functions, no structs, no pointers to pointers. You cant even call enough of the Windows API to open a Window and put a button in it, forget audio stuff that wants to call your code from a background thread via a callback function and stuff. The number of C libraries you can effectively talk to completely is pathetic.now, maybe its been completed and is less lame, and someone feel free to correct me if thats the case. But I looked into it for Libaudioverse and actually do have BGTs manual installed, and thats what it says.

URL: http://forum.audiogames.net/viewtopic.php?pid=207525#p207525




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

Re: suggestions on how to deal with destruction of a class?

2015-03-05 Thread AudioGames . net Forum — Developers room : Dranelement via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Ah, okay. Ill see if I can find the angelscript docs and figure it out. My regret at choosing bgt is growing very fast, though... 

URL: http://forum.audiogames.net/viewtopic.php?pid=207529#p207529




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

Re: suggestions on how to deal with destruction of a class?

2015-03-05 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

@camlorn : a 3D sound lib is available for BGT, using FMODEx wrappers  its still in debug but its working! How, will you tell me, because it uses a lot of structures? In fact, you only keep the reference of the structure and give it. You never give the structure as a parameter. And for things where it is an obligation, dlls have been coded to manage them For BGT casts, you can cast a handle using : MyChildClass@ castedObj = castMyChildClass(NonCastedReference); it returns null if the cast is impossible For arrays and all, creating a SuperClass@ array lets you storing SuperClass or a subclass object references 

URL: http://forum.audiogames.net/viewtopic.php?pid=207534#p207534




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

Re: suggestions on how to deal with destruction of a class?

2015-03-05 Thread AudioGames . net Forum — Developers room : Dranelement via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Ah, thanks. So then, how would I effect the enemy via the dictionary? From what I understand from the helpfile, Id have to create a generic enemy, then do something like enemies.get(key, enemy);Where enemy is a handle to the generic enemy, that will be populated with the properties of the dictionary entry? Sorry about all the questions again, and thanks very much for the help!

URL: http://forum.audiogames.net/viewtopic.php?pid=207526#p207526




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

Re: suggestions on how to deal with destruction of a class?

2015-03-05 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Ah, thanks. So then, how would I effect the enemy via the dictionary? From what I understand from the helpfile, Id have to create a generic enemy, then do something like enemies.get(key, enemy);Where enemy is a handle to the generic enemy, that will be populated with the properties of the dictionary entry? Sorry about all the questions again, and thanks very much for the help!Yeah, pretty much.Class casting in Angelscript is kinda cumbersome, but I dont think it should matter in this case, especially if you only put enemies in this dictionary.

URL: http://forum.audiogames.net/viewtopic.php?pid=207532#p207532




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

Re: suggestions on how to deal with destruction of a class?

2015-03-05 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Grr. Youve just moved into Angelscript specific territory and consequently are beyond where I can help. Thats the basic idea, but I dont know how Angelscript type casting and polymorphism stuff works well enough to help you finish it.

URL: http://forum.audiogames.net/viewtopic.php?pid=207528#p207528




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

Re: suggestions on how to deal with destruction of a class?

2015-03-05 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

@camlorn : a 3D sound lib is available for BGT, using FMODEx wrappers  its still in debug but its working!

URL: http://forum.audiogames.net/viewtopic.php?pid=207534#p207534




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

Re: suggestions on how to deal with destruction of a class?

2015-03-05 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

I know how one can go about getting libraries which do not work with the BGT FFI to work with the BGT FFI. I have seen the library in question. I am almost certain this is a specific example where someone wrapped FMODEx with a C layer that lets it talk to BGT, but its possible FMODEx is simple enough if you forgo some features. Also, FMODEx is missing HRTF, or so says the internet; when this particular library came on my radar, I checked.Even if FMODEx doesnt require the intermediate layer, half the things you might want do. If you really want to spend time writing C libraries to call other C libraries so they can be used from BGT, fine. But know this is not necessary in most other languages, and youre still not going to be able to hit the ones that need to use callbacks, i.e. every scripting language ever.

URL: http://forum.audiogames.net/viewtopic.php?pid=207538#p207538




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

Re: suggestions on how to deal with destruction of a class?

2015-03-05 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Libaudioverse isnt a base. Libaudioverse isnt even really aimed at audiogames specifically. Libaudioverse equivalents exists in exactly two forms currently. One is GPL with no option for dual licensing, available only in Python, and with major speed issues. I worked with the other for a year: OpenAL. And you can arguably use it. But does it ever have problems.believe me, Id not be doing Libaudioverse if something both reasonable and for less than $5000 or so existed. The last thing I want to do is duplicate tech.But I suppose my point here is that not only are we trying to make basic game classes, were duplicating stuff that you can just get libraries for. And by the time youre done, youve made BGT as complicated as it would be if youd done it in something else, but its still BGT so you cant really bring other stuff in if you want it.

URL: http://forum.audiogames.net/viewtopic.php?pid=207502#p207502




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

Re: suggestions on how to deal with destruction of a class?

2015-03-05 Thread AudioGames . net Forum — Developers room : Alan via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Hi there,I fully agree, Genroa. A lot of people cannot develop cause they are reinventing the wheel again and again.Hum, curious, Camlorn saying we dont need more basis... But he is developing another audio library. Wait, wait, I see an incoming 500 words long post about what is and what is not a base...I mean any technology which make game developing easier, .We dont need new languages, absolutely not, but audio libraries and game classes and game components made for audiogames design may accelerate game creation exponentially.Most game engines (virtually all of them) are made with visual design in mind, so they are hard to deal with.Some use ides in witch you build a game project (like Unity), some use complex classes that make difficult to separate audio from graffical elements (like irrlicht/Irrklang).Templates, classes and engines are just what many developers are waiting for.Unfortunatelly, audio was not
  the most important part of a traditional game (take a look at any review of any new generation console, a lot of information about its graffical capabilities, nothing about sound). Designing visual games is easier than ever, but the audio part remains almost the same.Pygame, for example, has not 3d audio at all. And yes, you can add another library, or create your own, but Id like to add only a library to my projects and get out-of-the-box game classes, game components, math methods, high level audio management, physics, user input, etc, etc.Mainstream industry has its own priorities, and each audiogame developer writes code for his own use, so, yes, we need more bases and more sharing.Alternatively, we need an slave army of camlorn clones to solve all our questions, but I think we are nearer to the first option... lol!Just my opinion.

URL: http://forum.audiogames.net/viewtopic.php?pid=207472#p207472




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

Re: suggestions on how to deal with destruction of a class?

2015-03-05 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

This is exaclty what im trying to do with my own projects : providing ready-to-use classes like characters, weapons and items, all working together with a big Game class. I dont think it will remove the easy part from BGT, but it may give more power to developers to create games focusing on the creative part more than on the functional part 

URL: http://forum.audiogames.net/viewtopic.php?pid=207484#p207484




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Youre reinventing spatial hashes. This is part of why I try to convince people not to use BGT in the long run, though unfortunately theres nothing thats quite so easy on day one.

URL: http://forum.audiogames.net/viewtopic.php?pid=207392#p207392




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

I am currently trying something : if an enemy is on the case x=3 y=2, I store its reference in a dictionary with the key 3;2. If something is in front of your weapon, you can instantly know it. And you remove the reference and store it with an other key when the enemy moves 

URL: http://forum.audiogames.net/viewtopic.php?pid=207383#p207383




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

BGT isnt really bad, this isnt what I say. But:- sounds and some basic stuff is done, but nothing else- oriented object programation is so basic you have to use AngelScript syntax to do even basic things in OOP BGT (remember how to convert a class into another, casting a superclass or doing the java instanceof ? You can do it in BGT, but you have to use AngelScript)- you basically have to create any tool you may want to use (and thats why Im making a game engine, because just starting with basic classes and saying hey I will make a multiplayer shooting game from nothing! is nearly impossible  )

URL: http://forum.audiogames.net/viewtopic.php?pid=207399#p207399




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Exactly camlorn. But I started my engine project in BGT... But Im sure that one day I will port my project on another language. Everything is to create in BGT.

URL: http://forum.audiogames.net/viewtopic.php?pid=207396#p207396




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : Dranelement via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

yes. Im coming to that realization far too late, unfortunately. If this werent a school project Id probably just recode in c++, or some other programming language. It feels like Im at that point though where its easier to just deal with it, and Ive learned my lesson now, so Ill remember to not do that next time.

URL: http://forum.audiogames.net/viewtopic.php?pid=207397#p207397




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

BGT isnt really bad, this isnt what I say. But:- sounds and some basic stuff is done, but nothing else- oriented object programation is so basic you have to use AngelScript syntax to do even basic things in OOP BGT- you basically have to create any tool you may want to use (and thats why Im making a game engine, because just starting with basic classes and saying hey I will make a multiplayer shooting game from nothing! is nearly impossible  )

URL: http://forum.audiogames.net/viewtopic.php?pid=207399#p207399




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

BGT isnt really bad, this isnt what I say. But:- sounds and some basic stuff is done, but no more class- oriented object programation is so basic you have to use AngelScript syntax to do even basic things in OOP BGT- you basically have to create any tool you may want to use (and thats why Im making a game engine, because just starting with basic classes and saying hey I will make a multiplayer shooting game from nothing! is nearly impossible  )

URL: http://forum.audiogames.net/viewtopic.php?pid=207399#p207399




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

If you think you need threads, I shudder to know what your engine will look like. Most non-3D games use exactly 1 thread only. Many giant webservers use exactly 1 thread only. Threads solve nothing in terms of complexity. Threads solve exactly one problem: I cant make this run on only one core. We have had the threading conversation before on this forum.Im not going to comment as to your like or dislike for Python. Thats a preference. And as for why we dont do much Audiogame development in java? Swing accessibility sucks. Theres a 200 MB runtime that everyone has to go install separately, or which has to be bundled with every single game. Talking to C/C++ is hard without external libraries like JNA. The sound situation sucks worse than anywhere Ive seen. Redistributing runs into all sorts of really strange issues, at least according to CAE_Jones. So, yeah, 
 not worth it.

URL: http://forum.audiogames.net/viewtopic.php?pid=207423#p207423




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

I am currently only programing in C, Java and BGT. If I port my engine in Java, this will be a new thing, it has never been done before in Java I dont know what everyone have with Java; the standart library is so huge that this kind of project doesnt need any extern lib except for physics, its object concepts are very developed, etc.I believe ticking is a must have in games, along with threads (please give me threads in BGT :( ). Every modern game engines uses ticks, you cant make a non blocking architecture only with hundreds of threads xD

URL: http://forum.audiogames.net/viewtopic.php?pid=207418#p207418




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

I dont follow what youre trying to say. Bgts programming language is Angelscript, the FFI is not developed enough to let you talk to anything complicated, and therefore, yes, everything you do is Angelscript. Unless you want to write an interpreter for a language of your own design. By hand.I dont know what your engine is trying to do, nor is it the topic of this thread. But you will never, ever get away from needing Angelscript, and there is almost certainly no reason to port. I can get pubsub frameworks, physics simulation, sound, database and network serialization, and an input handling framework just by installing some Python packages. If I go to C++, I give up the easy serialization and the fact that the language doesnt have you constantly scratching your head in puzzlement or punching something in annoyance for like 50 different game math, physics, and collision options. The reason that people use 
 BGT is that all of the existing frameworks require you to use ticking and not explicitly wait on things, but as soon as youve gone there youve started rewriting things that you can just install as libraries in other languages. Just wait until you get to needing something like behavior trees or an actually powerful implementation of astar (which does way more than pathfinding on your game map, if you want it to).Sorry, I know my annoyance is showing.

URL: http://forum.audiogames.net/viewtopic.php?pid=207407#p207407




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : Dranelement via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

I understand where youre coming from. I already am running into some of these problems, especially in regards to the physics and astar. The implementation in bgt requires a 2d array, which my game doesnt use. Ill probably have to throw together something for that, too.Well, like I said. lesson learned. 

URL: http://forum.audiogames.net/viewtopic.php?pid=207410#p207410




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

I am currently only programing in C, Java and BGT. If I port my engine in Java, this will be a new thing, it has never been done before in Java I dont know what everyone have with Java; the standart library is so huge that this kind of project doesnt need any extern lib except for physics, its object concepts are very developed, etc.I believe ticking is a must have in games, along with threads (please give me threads in BGT :( ). Every modern game engines uses ticks, you cant make a non blocking architecture only with hundreds of threads xDOh, and I have been forced to learn python during my studies, I hate it and for me it is a dead language  (but its just what I think)

URL: http://forum.audiogames.net/viewtopic.php?pid=207418#p207418




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Java as no need to use the swing dinosaur or any GUI for audiogames 

URL: http://forum.audiogames.net/viewtopic.php?pid=207431#p207431




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

No, it doesnt. I am merely listing all the problems with Java. If many blind people were using the language for hobby programming, then wed probably see audiogames in it.

URL: http://forum.audiogames.net/viewtopic.php?pid=207436#p207436




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

I will change that! *epic voice and all* seriously, we really need more bases for audiogames, everyone is inventing the wheel again everywhere

URL: http://forum.audiogames.net/viewtopic.php?pid=207440#p207440




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : Dranelement via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Itshard to say. I think, for me, even though doing this has been incredibly annoying, Ive also learned a lot from it, which is always a good thing.

URL: http://forum.audiogames.net/viewtopic.php?pid=207444#p207444




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Learning is always good. And there is something to be said for duplicating existing technology specifically to learn about it.But we dont need more bases for audiogames. We need people to realize that these bases already exist. If you build an engine in BGT, thats fine, but itll be just as complicated to use as if I left for a mainstream language; the ease and beginner friendliness of BGT are then completely lost. So I dont get it. Just find a mainstream language that doesnt make distributing completely impossible or require ridiculously large dependencies and use it.As a bonus, this can give you nice things like cross-platform support, GUI libraries, the list goes on and on. Maybe Im too far divorced from new programmer to see it anymore and should just give up trying to understand.

URL: http://forum.audiogames.net/viewtopic.php?pid=207451#p207451




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : Dranelement via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

So, Ive been looking into dictionaries, and they do seem like they are what I need. Im confused on a few points still, though.First, how can I go through the entire dictionary to check for things? For example:When I fire the weapon, a method on the weapon class is called, which goes through my array of wall objects, and stores any that intersect with the line segment created by my weapons fire. I then want to go through all the enemies, and store the points of any that intersect. I already have a function for this, its going through all the enemies then performing the required actions on the right one that Im having a bit of trouble with.Thanks for all the great suggestions, though. This is my first real big project, and its exciting when stuff finally starts to happen. 

URL: http://forum.audiogames.net/viewtopic.php?pid=207349#p207349




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Youre better off arranging the keys in your dictionary so you dont have to iterate through all of them, but if you really need to, use the get_keys method.

URL: http://forum.audiogames.net/viewtopic.php?pid=207350#p207350




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

Re: suggestions on how to deal with destruction of a class?

2015-03-04 Thread AudioGames . net Forum — Developers room : Dranelement via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

How exactly would that work? I need to check all the enemies on the level to see if they intersect with the weapon. Get keys seems like it will do what I need, though. Thanks.

URL: http://forum.audiogames.net/viewtopic.php?pid=207355#p207355




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

Re: suggestions on how to deal with destruction of a class?

2015-03-02 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Yeah. To use an analogy, if its a mud, the keys are the room vnums and the values are the room objects. You can convert ints to strings, so problem solved.I personally give everything in my games a globally unique id these days. Im not sure if BGT has a UUID generator, but if it doesnt you can just increment an integer somewhere. You can then look these up by that id instead of referencing them. Weak references (for those who know what they are) or any solution that relies on the GC to do the right thing at the right time is probably not what you want. Gcs are very nice things to have, but you give up other guarantees about object lifetime; even when the object is removed from the array or whatever and nothing references it, theres no guarantee itll actually be collected unless the BGT manual somewhere says that there is.

URL: http://forum.audiogames.net/viewtopic.php?pid=207061#p207061




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

Re: suggestions on how to deal with destruction of a class?

2015-03-02 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

For my projects I used a generated ID solution. I generate a unique ID for each object or I use a name attribute. Then I store the reference as the value. (because unfortunately BGT dictionaries only accept strings as key  )The BGT help.chm contains all the informations you may need to know about BGT dictionaries 

URL: http://forum.audiogames.net/viewtopic.php?pid=207021#p207021




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

Re: suggestions on how to deal with destruction of a class?

2015-03-02 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

For my projects I used a generated ID solution. I generate a unique ID for each object or I use a name attribute. Then I store the reference as the value. (because unfortunately BGT dictionaries only accept strings as key  )

URL: http://forum.audiogames.net/viewtopic.php?pid=207021#p207021




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

Re: suggestions on how to deal with destruction of a class?

2015-03-02 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

I have no idea how this works, but there is a way to run the GC explicitly (garbage_collect()).

URL: http://forum.audiogames.net/viewtopic.php?pid=207086#p207086




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

Re: suggestions on how to deal with destruction of a class?

2015-03-02 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

I will still maintain until the end of time that you should never, ever rely on its behavior.

URL: http://forum.audiogames.net/viewtopic.php?pid=207099#p207099




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

Re: suggestions on how to deal with destruction of a class?

2015-03-02 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

I think garbage_collect() has to be called sometimes if you send a lot of objects to destruction and create a lot of other objects. To clean the memory more often than BGT would 

URL: http://forum.audiogames.net/viewtopic.php?pid=207096#p207096




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

Re: suggestions on how to deal with destruction of a class?

2015-03-01 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Exactly, a dictionary can be a good solution to store ennemies and manage them without order!  I think this way if you erase the reference in the dictionary the object will just be garbage collected and so you have your solution. Arrays are only good to do things on the hole selection of objects which are inside it, you cant really use index to manage them

URL: http://forum.audiogames.net/viewtopic.php?pid=206895#p206895




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

Re: suggestions on how to deal with destruction of a class?

2015-03-01 Thread AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Exactly, a dictionary can be a good solution to store ennemies and manage them without order!  I think this way if you erase the reference in the dictionary the object will just be garbage collected and so you have your solution. But arrays are only good to do things on the hole selection of objects which are inside it, you cant really use index to manage them

URL: http://forum.audiogames.net/viewtopic.php?pid=206895#p206895




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

Re: suggestions on how to deal with destruction of a class?

2015-03-01 Thread AudioGames . net Forum — Developers room : Alan via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Hi!I didnt know BGT has dictionaries. Just curious, Genroa and Camlorn, what do you want to store in each dictionary value? Key = object refference, and value? Do you mean an unique id generated when creating a new instance of an enemy?Thanks.

URL: http://forum.audiogames.net/viewtopic.php?pid=207008#p207008




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

Re: suggestions on how to deal with destruction of a class?

2015-03-01 Thread AudioGames . net Forum — Developers room : Dranelement via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Hi guys, thanks very much for the advice! Ive never really looked into dictionaries, but Im beginning to think that I should. 

URL: http://forum.audiogames.net/viewtopic.php?pid=206924#p206924




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

Re: suggestions on how to deal with destruction of a class?

2015-03-01 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

I use them for everything. Theyre usually better than arrays when it comes to hold a big collection of stuff.the interesting thing is this. BGT is using hashtables. Asking Is this in the dictionary is a question which completes in something close to constant time. In English, whether theres 1, 10, 1000, or 10 items in the dictionary, is x in the dictionary will complete in about the same amount of time. So too will deletion (you dont have to shift the items). Your ram will run out before it gets even a millionth as slow as the equivalent array.The upshot is that if youre looking for a place to make your game a hundred thousand times faster at best, dictionaries can probably do that. The only time theyre bad is when you need to iterate over everything in your game in a specific order. You almost never need to iterate over everything in your game in a spe
 cific order. Dictionaries and their little brother sets are one of the primary reasons I say that your hypothetical doesnt exist yet speed problem is probably algorithmic and switching languages is probably not necessary, at least when such threads come up.

URL: http://forum.audiogames.net/viewtopic.php?pid=206936#p206936




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

Re: suggestions on how to deal with destruction of a class?

2015-02-28 Thread AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

You can only remove dead enemies from outside the class. That said, its pretty simple:for (uint i=0; ienemies.length(); i++) {
  enemies[i].step();
  if(enemies[i].health=0) {
enemies.remove_at(i);
i--;
  }
}

URL: http://forum.audiogames.net/viewtopic.php?pid=206741#p206741




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

Re: suggestions on how to deal with destruction of a class?

2015-02-28 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Okay. I now see the logical error in my assumption that this can be inside the class. Id suggest using a dictionary of unique enemy ids to enemies so that each enemy can remove itself without affecting the position of other enemies, as letting instances which exist in an array know about which slot they are will increase bookkeeping a lot.

URL: http://forum.audiogames.net/viewtopic.php?pid=206815#p206815




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

Re: suggestions on how to deal with destruction of a class?

2015-02-28 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Are you saying that BGT only allows the removal of array elements from outside the instance representing that element? Im not sure why the code cant be abstracted into the enemies themselves, provided that they know what slot they are in the array. I know it doesnt matter in terms of functionality, but Im curious why youre saying its impossible.

URL: http://forum.audiogames.net/viewtopic.php?pid=206775#p206775




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

Re: suggestions on how to deal with destruction of a class?

2015-02-27 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

You have to put the enemy class in a central location from which it could be removed. Ideas for this include an array of enemy objects or, perhaps better, a dictionary of enemy objects. Depending on how complicated the rest of your game is, you may need to then program defensively: nothing is ever allowed to hold on to this object and must look it up from the central location. This is most commonly done by giving the object a unique id which can never be reused, even after the objects death. In truth, most game-related queries are things like all enemies in this region and thus cant be cached anyway.the problem with strong references in complicated setups is that you might end up with weird zombie ghost enemies of crashing. A central lookup at least reminds you hey, this might fail. Its the approach Im currently using anyway. Im hard pressed to think of a better one. Such mi
 ght exist, somewhere, so maybe look to see what the sighted game programmers are doing.

URL: http://forum.audiogames.net/viewtopic.php?pid=206659#p206659




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

Re: suggestions on how to deal with destruction of a class?

2015-02-27 Thread AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Hi,Im having a similar problem in BGT. I managed to get shooting in my game, but when you fire at the enemy, it gives a runtime error:A runtime error occurred.File: C:\Users\EthinP\Documents\troop3\includes\enemy.bgtOn line: 33In function: void enemy::die()Description: Too large array sizeThe stack trace is:Call stack size: 6File: C:\Users\EthinP\Documents\troop3\includes\enemy.bgtLine: 34 (2)Function: void enemy::die()File: C:\Users\EthinP\Documents\troop3\includes\enemy.bgtLine: 23 (3)Function: void enemy::hit(int)File: C:\Users\EthinP\Documents\troop3\troop3.bgtLine: 287 (1)Function: void gameloop(level@, int)File: C:\Users\EthinP\Documents\troop3\troop3.bgtLine: 107 (1)Function: void difficulty_menu(bool = false, bool = false)File: C:\Users\EthinP\Documents\troop3\troop3.bgtLine: 56 (1)Function: void main_menu()File: C:\Use
 rs\EthinP\Documents\troop3\troop3.bgtLine: 26 (1)Function: void main()(The call stack gave it away. Its troop 3.)The code of the top entry, which Im assuming is the issue, is:enemy@[] enemies;//basic enemy class. Subclasses can be written later to expand and give different enemies different functions.//The level class must also be included for the methods in this class to work.class enemy {  int health, speed=250, ex=0, ey=100, cycle=1;  string soundpath;  double[] enemies;  timer movetimer; enemy(level @lvl, int h, string s, int sp) {this.health = h;this.soundpath=s;this.speed = sp;spool.destroy_all();int maxpos = lvl.maxPosition;this.ex = random (0, maxpos); &
 nbsp; }  enemy() {//no default constructor allowed.  }  void hit(int d) {this.health=this.health-d;if(this.health=0) {this.die();}else{spool.play_1d (this.soundpath+hit.ogg, x, ex, false, false);}  }void die (){spool.play_1d (this.soundpath+die.ogg, x, ex, false, false);enemies.resize (enemies.length() - 1);}void move(){if(this.cycle==2){this.ey=this.ey-5;this.cycle=1;}else{this.cycle=2;}spool.play_extended_1d(this.soundpath+move.ogg, x, ex, 0, 0, false, 0, 0, 100, ey+50, 
 false);}}void destroy_all_enemies(){enemies.resize(0);}Please remember that this is only an include. It does not include the required include files. the main source code does that.Can anyone help?

URL: http://forum.audiogames.net/viewtopic.php?pid=206671#p206671




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

Re: suggestions on how to deal with destruction of a class?

2015-02-27 Thread AudioGames . net Forum — Developers room : Alan via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Hi there,So, do you mean you determine if an enemy is dead seting its position vector = null?Id recommend another aproach: store all enemies in an array of enemy references, this way, you can easyly iterate the whole array and perform updating, and you can dispose with:Enemies[2] = null;The main game class for your game is a good place to include array members to regiser and unregister enemies, players, etc.Hope Ive understood your question.

URL: http://forum.audiogames.net/viewtopic.php?pid=206630#p206630




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

Re: suggestions on how to deal with destruction of a class?

2015-02-27 Thread AudioGames . net Forum — Developers room : keyIsFull via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

I dont understand what the difficult is if you meant that by putting the coordinates in class methods, the methods just returned the coordinates. If you still have a 2d array of enemies in your level class, you can just get the methods to return the proper x and y coordinates, as though they were just plain old properties as before.

URL: http://forum.audiogames.net/viewtopic.php?pid=206618#p206618




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

Re: suggestions on how to deal with destruction of a class?

2015-02-27 Thread AudioGames . net Forum — Developers room : Dranelement via Audiogames-reflector


  


Re: suggestions on how to deal with destruction of a class?

Sorry. I meant properties. And, they werent quite properties before. I had an x and a y value, but they just moved on the 2d array. So I could just go level.enemies[this.x][this.y]=null;Or something like that. Now, because enemies are just in a 1d array, I cant do this, which is my problem.

URL: http://forum.audiogames.net/viewtopic.php?pid=206620#p206620




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