• What Are You Working On? May 2015
    1,601 replies, posted
Finished the music! (for now at least). Here's it with the menu, I think it works quite well. Any thoughts? [media]https://www.youtube.com/watch?v=PBqbsNFxWg8&feature=youtu.be[/media] Also, recommendations for screen recorders?
I have been using relational dbs too much. All the collections of entities and objects in my game are dicts. I mean I have a dict of entities called entity_collection. It has all game-related info, e.g. position. And on the client side I have a dict of representation of entities, the dict holds objects of Shapes created by the JS engine I use (EaselJS). All in all there will soon be up to 5 dicts like this, keys everywhere being IDs. From the logical standpoint it's most efficient because I mostly do retrieving elements which is O(1) for dicts. But sometimes I feel like I forgot I am not using a database.
[QUOTE=MuffinZerg;47824312]I have been using relational dbs too much. All the collections of entities and objects in my game are dicts. I mean I have a dict of entities called entity_collection. It has all game-related info, e.g. position. And on the client side I have a dict of representation of entities, the dict holds objects of Shapes created by the JS engine I use (EaselJS). All in all there will soon be up to 5 dicts like this, keys everywhere being IDs. From the logical standpoint it's most efficient because I mostly do retrieving elements which is O(1) for dicts. But sometimes I feel like I forgot I am not using a database.[/QUOTE] Are relational dbs common for games? Also, is mySql a relational db?
[QUOTE=proboardslol;47824477]Are relational dbs common for games? Also, is mySql a relational db?[/QUOTE] yes and yes
[QUOTE=proboardslol;47824477]Are relational dbs common for games? Also, is mySql a relational db?[/QUOTE] It is, but you'd use something like UnQLite or SQLite3 for embedding, or even WhiteDB (not really relational though).
I rigged up a super-simple pathfinding method for finding the path the enemies should take. [t]http://i.imgur.com/eYDMlBS.png[/t]
[QUOTE=mastersrp;47824686]It is, but you'd use something like UnQLite or SQLite3 for embedding, or even WhiteDB (not really relational though).[/QUOTE] Isn't SQLite really awesome db though? I heard you can run it inside RAM directly
[QUOTE=proboardslol;47824477]Are relational dbs common for games? Also, is mySql a relational db?[/QUOTE] Out of interest (and unrelated to this), how come you picked Ruby?
[QUOTE=Darwin226;47824838]Out of interest (and unrelated to this), how come you picked Ruby?[/QUOTE] I wanted to pick a language outside of the C-syntax family. C syntax is so totally precise and verbose, but non-C languages can sometimes take shortcuts that, while a little more vague, are equally as powerful. Also non-typed variables can make things faster. I was thinking of Lua, because I really like how a table can hold data of different types, but I read [url=http://garry.tv/2014/08/16/i-fell-out-of-love-with-lua/]this post[/url] by garry and it made sense to me (indices start at 1? why?) edit: I started C about 8 years ago, but was never serious about it until the last 2 years, but the point is I've been using C syntax for nearly half my life now, and thought it'd be better if I expand my horizons a bit
[QUOTE=Rocket;47824885]Because Hatred is political instead of a game, while Rust is political [i]and[/i] a game. [editline]28th May 2015[/editline] There really doesn't seem to be anything more to Hatred other than "kill people." It's like a teenage revenge fantasy. Is there even any challenge?[/QUOTE] I don't think Rust is that political, but I do think that Facepunch has thrown out common notions of balance and fair gameplay. Most devs, when they might see that players are banding together and killing new players within seconds of spawning, might see this as a sign that the game is unbalanced, and maybe make it easier for new players to escape or give them better defenses. No, not facepunch. They see the horribly cruel universe of rust as a [i]mechanic[/i]. They see the horribly fucked up shit as part of the game itself. This is why I stopped playing rust. Amazing game, but I don't play videogames enough to be at the point where I'm okay with putting a few hours into the game, having it all taken away, and starting over. At that point I stop playing for several weeks and then maybe come back to it.
[QUOTE=proboardslol;47824876]I wanted to pick a language outside of the C-syntax family. C syntax is so totally precise and verbose, but non-C languages can sometimes take shortcuts that, while a little more vague, are equally as powerful. Also non-typed variables can make things faster. I was thinking of Lua, because I really like how a table can hold data of different types, but I read [url=http://garry.tv/2014/08/16/i-fell-out-of-love-with-lua/]this post[/url] by garry and it made sense to me (indices start at 1? why?)[/QUOTE] javascript is not a better language than lua by any definition, from usage nor academic standpoint languages whose arrays start at 1 count by quantity (1st datum, 2nd datum, 3rd datum), and not by representation of first byte alignment (0th position -> (1st datum) -> 1st position -> (2nd datum)) [editline]28th May 2015[/editline] also his arguments about language syntax are awful what is the difference between english and spanish? well a big one—and this goes for any language—is that we don't call things the same. if we did they'd be the same language.
[QUOTE=andrewmcwatters;47824936]javascript is not a better language than lua by any definition, from usage nor academic standpoint languages whose arrays start at 1 count by quantity (1st datum, 2nd datum, 3rd datum), and not by representation of first byte alignment (0th position -> (1st datum) -> 1st position -> (2nd datum))[/QUOTE] I'm not saying JS is any better (I don't know the first goddamned thing about JS). I'm just saying that in the years I've attempted anything with LUA (gLUA might be a bad example, but I've tried for years with gLUA), LUA has never made a lick of goddamned sense to me. It's like garry says; the syntax is different just to be different.
It's Lua? Not LUA. Pedantic? Yeah I guess, but I think that's an indicator to me of something. and so you mean like how ruby's syntax is different just to be different? or haskell's syntax is different just to be different? or...
[QUOTE=andrewmcwatters;47824979]It's Lua? Not LUA. Pedantic? Yeah I guess, but I think that's an indicator to me of something. and so you mean like how ruby's syntax is different just to be different? or haskell's syntax is different just to be different? or...[/QUOTE] I am not starting another goddamned language argument here in the C# fan club
I don't have an affinity for any particular language, having used many in a wide variety of projects makes me appreciate all of their differences, and their ecosystems. To put forth this idea that they should all behave the same is disheartening, especially to language architects, because it means they can't try anything new. I'm not intentionally trying to present any argument here, but I guess I'm inadvertently doing so by saying variety is good for software developers. [editline]28th May 2015[/editline] I find it strange that Rohans would think my post was dumb considering he authors a language. What are your thoughts on this Rohans?
[QUOTE=andrewmcwatters;47824979]It's Lua? Not LUA. Pedantic? Yeah I guess, but I think that's an indicator to me of something. and so you mean like how ruby's syntax is different just to be different? or haskell's syntax is different just to be different? or...[/QUOTE] Well I don't know how true "different to be different" is for other languages, but it definitely isn't for Haskell. Some parts of it are obviously just a choice, but most it is woven around language features to make them as convenient to use as possible. [editline]28th May 2015[/editline] [QUOTE=proboardslol;47824876]I wanted to pick a language outside of the C-syntax family. C syntax is so totally precise and verbose, but non-C languages can sometimes take shortcuts that, while a little more vague, are equally as powerful. Also non-typed variables can make things faster. I was thinking of Lua, because I really like how a table can hold data of different types, but I read [url=http://garry.tv/2014/08/16/i-fell-out-of-love-with-lua/]this post[/url] by garry and it made sense to me (indices start at 1? why?) edit: I started C about 8 years ago, but was never serious about it until the last 2 years, but the point is I've been using C syntax for nearly half my life now, and thought it'd be better if I expand my horizons a bit[/QUOTE] Cool. Ruby is interesting. Good luck.
[QUOTE=andrewmcwatters;47825004]I don't have an affinity for any particular language, having used many in a wide variety of projects makes me appreciate all of their differences, and their ecosystems. To put forth this idea that they should all behave the same is disheartening, especially to language architects, because it means they can't try anything new. I'm not intentionally trying to present any argument here, but I guess I'm inadvertently doing so by saying variety is good for software developers. [editline]28th May 2015[/editline] I find it strange that Rohans would think my post was dumb considering he authors a language. What are your thoughts on this Rohans?[/QUOTE] Sure I guess variety is good; I just think Lua is bad. I don't like it. Ruby looks nicer to me.
I find it interesting that you have issues with Lua, which has a style that feels more explicit in terms of writing code, and leaves little to figure out in terms of understanding, but like the way Ruby looks, which has far more implicit declarations and statements allowing for greater brevity at the expense of having to understand those shorthand notations. [editline]28th May 2015[/editline] Maybe it's just an aesthetics thing?
[QUOTE=andrewmcwatters;47825052]I find it interesting that you have issues with Lua, which has a style that feels more explicit in terms of writing code, and leaves little to figure out in terms of understanding, but like the way Ruby looks, which has far more implicit declarations and statements allowing for greater brevity at the expense of having to understand those shorthand notations. [editline]28th May 2015[/editline] Maybe it's just an aesthetics thing?[/QUOTE] which is exactly why I chose something like ruby; as I said before, C syntax is extremely explicit and verbose, and in the most recent standards have removed anything implicit. I've known C for 8 years and wanted something different. I learned FreeBASIC for fun, and a LOT of BASIC is implicit, but BASIC is totally useless. So I wanted a more implicit language, and ruby fit the conditions.
[QUOTE=andrewmcwatters;47825052]I find it interesting that you have issues with Lua, which has a style that feels more explicit in terms of writing code, and leaves little to figure out in terms of understanding, but like the way Ruby looks, which has far more implicit declarations and statements allowing for greater brevity at the expense of having to understand those shorthand notations. [editline]28th May 2015[/editline] Maybe it's just an aesthetics thing?[/QUOTE] You can make it plenty magic in Lua though, fun with metatables and so on. :v: But yeah, undoubtedly ruby has a lot more magic going in the background, and generally it is more encouraged to employ meta-programming when working with ruby, even for regular applications. I've always found the whole fetish programmers have for languages so weird, you wouldn't ask a carpenter which one of his tools is the "greatest", he'd just use the one he feels is most appropriate for the task at hand. Though I guess that analogy is hard to apply to programming, as [I]almost[/I] every language aspires to be some general-purpose monolith, except smaller ones made for embedding like Lua/Io etc, or well, there's plenty of exceptions, but people love to stick to what they know best.
[QUOTE=proboardslol;47825064]which is exactly why I chose something like ruby; as I said before, C syntax is extremely explicit and verbose, and in the most recent standards have removed anything implicit. I've known C for 8 years and wanted something different. I learned FreeBASIC for fun, and a LOT of BASIC is implicit, but BASIC is totally useless. So I wanted a more implicit language, and ruby fit the conditions.[/QUOTE] Have you come by any other scripting languages that are as brief as Ruby? It's the only one I know of that creates a lot of shortcuts for developers outside of transpiled ones like CoffeeScript, but then again that was inspired in parts by Ruby as well.
[QUOTE=andrewmcwatters;47825104]Have you come by any other scripting languages that are as brief as Ruby? It's the only one I know of that creates a lot of shortcuts for developers outside of transpiled ones like CoffeeScript, but then again that was inspired in parts by Ruby as well.[/QUOTE] I honestly picked ruby because I wanted to try something new. I'm not an expert in these matters.
[QUOTE=proboardslol;47825125]I honestly picked ruby because I wanted to try something new. I'm not an expert in these matters.[/QUOTE] I think it's probably the best choice for what you're looking for anyway.
[QUOTE=proboardslol;47825064]which is exactly why I chose something like ruby; as I said before, C syntax is extremely explicit and verbose, and in the most recent standards have removed anything implicit. I've known C for 8 years and wanted something different. I learned FreeBASIC for fun, and a LOT of BASIC is implicit, but BASIC is totally useless. So I wanted a more implicit language, and ruby fit the conditions.[/QUOTE] Ruby is a pretty good break from C though, it's quite far away from C and decidedly quite a bit more pragmatic. The most important thing is though it'll let you express things in quite a different way rather than how you would when writing C, like how regular for-loops are decidedly bad style in Ruby, but canon in C. (just a tiny example, but still significant) Hope you'll enjoy :v: and if you're interested in bridging the Ruby - C gap at some point, this resource might be of aid to you: [url]http://silverhammermba.github.io/emberb/c/[/url]
[QUOTE=andrewmcwatters;47824979]It's Lua? Not LUA. Pedantic? Yeah I guess, but I think that's an indicator to me of something. [/QUOTE] Let's make all permutations possible: LUA Lua lUa luA LUa LuA lUA lua
[QUOTE=Fourier;47824780]Isn't SQLite really awesome db though? I heard you can run it inside RAM directly[/QUOTE] SQLite3 is amazing. It's like THE goto relational db for anything embedded. So if you're writing a browser/game/application/service that needs to store a lot of data of the same kind, SQLite3 is amazing. Some use it as a configuration storage too. Not too fond of that. There's also fossil, a DVCS, that uses SQLite3 for repository storage. It also makes it retardedly easy to share repositories, because it has a web server built in. Don't feel like doing that? Just scrub the repository from personal information, passwords, emails, and more, and share it everywhere. You can even scrub the history from any personal information. Most browsers make use of SQLite3 too. Dropbox seems to use it to, and seemingly Windows 10 too, and other Microsoft products. [url]http://sqlite.org/famous.html[/url] It's amazing. It's also public domain. It is also hosted in a fossil repository so you can download the entire website (mostly) and view it offline, along the latest code.
[QUOTE=proboardslol;47824983]I am not starting another goddamned language argument here in the C# fan club[/QUOTE] You just kind of have weird opinions that you fail to back up, dude. Stop sharing them if you don't want people to respond.
[QUOTE=Tamschi;47823924]Use [I]/[/I] instead of [I]\[/I], no [I]/[/I] at the start of a relative path and [I]Path.Combine[/I] to attach relative paths to their base directories. Otherwise your code is far too error-prone across different operating systems and common input strings. Also use [I]using System.IO;[/I] of course, as Mega1mpact already remarked, or [I]using File = System.IO.File;[/I] (and/or similar) if there's a collision.[/QUOTE] Thanks for the input you two, I will definetly use what you said.
[QUOTE=eirexe;47826039]Thanks for the input you two, I will definetly use what you said.[/QUOTE] Path.Combine is also great because you don't have to think about things like trailing slashes. It just does the correct thing.
The product of the decision to actually finish something for once. This has a beginning middle and an end, and is a prototype. I am going to finish polishing it today and refactor all crappy lua script written in my underwear at 3 am. "'Loli Cake'" a 2d arcade style game. Loli has fallen into some sewer overgrown with vines and hates arthropods, but can Spider Bro help her have a change of heart? Only time and cake will tell. Starring Rob Schneider as MINECRAFT CAKE and Vin Diesel as the loveable Ethnic OpenGL Texture Bleed Artifact, bring the hole family, thx." [URL=http://i.imgur.com/3LN57tO.png][IMG]http://i.imgur.com/3LN57tOm.png[/IMG][/URL][URL=http://i.imgur.com/DSFpurh.png][IMG]http://i.imgur.com/DSFpurhm.png[/IMG][/URL] [URL=http://i.imgur.com/2nbFMOV.png][IMG]http://i.imgur.com/2nbFMOVm.png[/IMG][/URL][URL=http://i.imgur.com/zY4Lf4c.png][IMG]http://i.imgur.com/zY4Lf4cm.png[/IMG][/URL] [URL=http://i.imgur.com/zPJcxAX.png][IMG]http://i.imgur.com/zPJcxAXm.png[/IMG][/URL] For Windows [url]https://www.dropbox.com/s/wlc8opv85p580du/LoliCake.zip?dl=0[/url]
Sorry, you need to Log In to post a reply to this thread.