|
Paniolo posted:Structuring code is as much or more a factor of the organization of the team working on it than the function of the code itself, so you may want to keep that in mind when you take a look at some existing projects. Things that are best practices for a large team working on a reusable engine are not necessarily going to be a very good idea for a hobby project with one or two coders.
|
# ? Jul 3, 2012 22:04 |
|
|
# ? May 28, 2024 12:49 |
|
duck monster posted:Are you doing this in qbasic? Because if so, that is wonderfully anachronistic and awesome. It's QB64 there, which is QuickBASIC 4.5 ported to Windows so the language is identicle. It was originally running in DOS QuickBASIC 4.5 until I ran out of RAM and got sad. edit: you can see the development history at https://www.manfightdragon.com.au
|
# ? Jul 3, 2012 23:35 |
|
roomforthetuna posted:Basically, my question is what's the best way syntactically to do component-based design in Actionscript3? It's a loving mess internally, but it's a nice convenient interface externally. It's frustrating that there's not some sort of standard object for this behavior in more languages. I realize Unity and Stencyl are both based around approximately that structure.
|
# ? Jul 4, 2012 02:01 |
|
Mug posted:It's QB64 there, which is QuickBASIC 4.5 ported to Windows so the language is identicle. It was originally running in DOS QuickBASIC 4.5 until I ran out of RAM and got sad. If my grandfather was alive, he'd shake your hand. He went to the grave 5 years ago (nearly 90years old) still convinced that "All this structured and object oriented garbage" was a fad and people would return to the TRUE languages of computing, Fortran and basic (preferably on a VMS mainframe). I believe he also said something to the effect of "Only drat queers affect a LISP" in regards to functional programming. Yeah, dude was pretty old school, but he was still hacking away on his ancient old lovingly maintained 486 with qbasic (or was it an even older variant, I forget) right to the end. Admittedly he did think visual basic was "useful" although he grumbled that nobody could possibly ever organize their code properly without line numbers lol. Old scientists where cut from a different (read "stubborn") cloth back then.
|
# ? Jul 4, 2012 07:18 |
|
OneEightHundred posted:It's also a function of what your game needs to do. Things like saves, out-of-scope objects (i.e. almost everything in a sandbox), level transitions vs. stream-in, multiplayer, physics, and your lighting model all have severe effects on how the rest of your game will be designed. Even reusable engines have to nail some of those aspects down before they can do much. Yeah I am aware of that. I have narrowed down the scope pretty well (its a 2D SHMUP-ish concept) and I don't plan on doing everything from the ground up (I'm looking into using a write-once-publish-anywhere game engine such as Corona that publishes to Android/iOS - I'd consider Unity too but the Android/iOS + basic license plugins end up being quite expensive for an "experiment".). Looking at something like id Tech for inspiration is a bit out of scope since lots of things are heavily decoupled (client/server architecture/VMs/etc).
|
# ? Jul 4, 2012 08:53 |
|
duck monster posted:If my grandfather was alive, he'd shake your hand. He went to the grave 5 years ago (nearly 90years old) still convinced that "All this structured and object oriented garbage" was a fad and people would return to the TRUE languages of computing, Fortran and basic (preferably on a VMS mainframe). Just wrote the following line of code IF PopupBox.AnimationProgress > 0 AND PopupBox.AnimationProgress < 1 THEN PopupBox.AnimationProgress = PopupBox.AnimationProgress + .075 ELSE IF PopupBox.AnimationProgress > 1 THEN PopupBox.AnimationProgress = 1 Channelling your granddaddy over here. edit: Which causes this nice little popup dialogue to unfurl in a nice smooth motion. The hovering popup box is actually 11 "Cubes" that all smoothly pop out the top of an object when you click on it and build a dialogue box. Now I have to actually build a GUI onto them. Going to be fun trying to make an isometric windows interface on the face of it. Mug fucked around with this message at 15:50 on Jul 4, 2012 |
# ? Jul 4, 2012 15:47 |
|
Hah, that's cute.
|
# ? Jul 4, 2012 16:17 |
|
duck monster posted:If my grandfather was alive, he'd shake your hand. He went to the grave 5 years ago (nearly 90years old) still convinced that "All this structured and object oriented garbage" was a fad and people would return to the TRUE languages of computing, Fortran and basic (preferably on a VMS mainframe). To be fair, I'm sure most of us will eventually be crankily touting how C++ is good enough for everyone, and how all of these drat "interpreted" languages are turning out a generation of lazy, good-for-nothing script kiddies that won't know what to do if memory-related problems appear. "JIT, more like JITNT" we'll say with a wry, a knowing smirk, snapping our suspenders and turning back to a Star Trek TNG rerun.
|
# ? Jul 4, 2012 17:15 |
|
Pfft, interpreted languages. By the time I'm 90 years old I suspect kids will program with voice commands. Except it won't be programming, it'll be "computer, make a program that illustrates the knight's tour" and the AI will run a google search, find whatever libraries or code is necessary, and execute it on the fly. It'll be like that chick on Bones who somehow manages to come up with elaborate mystery-solving algorithms during commercial breaks, but without the commercial breaks.
|
# ? Jul 4, 2012 22:56 |
|
Mug posted:Just wrote the following line of code He'd probably wonder what this dot syntax nonsense about, and wheres the drat line number son. I remember him once utterly guffawing about the folly of an article in Amstrad Action where a guy wrote a clock on the computer without a single goto, all using gosubs. "The hoops this guy went through to just bloat the drat stack! Doesnt he understand memory at all????? What if he got recursion going? Memory'd all run out and then lord knows what would happen!!!!". And then wondered out loud whether my grandmother would approve an amstrad perched beside the bed to make alarm sounds in the morning. "Nothing wrong with my alarm radio!". e: He wasn't really as stuborn as I make it out. He was pretty useful when I was learning Pascal in high school, and for all his dislike of structured, he understood it very well, and according to one of his old workmates, the big old PDP where he worked that ran Unix, he actually coded some instrument monitoring stuff (he worked in the chemistry field) in C , apparently quite effectively. Anyway, sorry abou derailing with the grandpa chat. I just enjoy talking about the old man that first taught me to code. e2: And my grandma can STIll kick my rear end on galaga. e2: quote:The "dot syntax" is just a TYPE, you can use TYPEs in QBasic 1.1 and above. duck monster fucked around with this message at 06:20 on Jul 5, 2012 |
# ? Jul 5, 2012 02:50 |
|
The "dot syntax" is just a TYPE, you can use TYPEs in QBasic 1.1 and above. Obviously you couldn't use them on the Amstrad though, hah. My first PC was an Amstrad CPC464. I'm not actually that old, my family was just poor.
|
# ? Jul 5, 2012 03:39 |
|
quiggy posted:That appears to have fixed the exception problem, thanks. Yeah, I decided to give this a try since I'm also considering writing a roguelike to kill some time. For me at least, it seems to be dying inside initRoot(). Not throwing an exception or anything, just killing the process. Not sure what's going on there. Looks like the .net bindings haven't been updated in two years, so maybe the unmanaged libtcod build its using has a bug. chglcu fucked around with this message at 03:59 on Jul 5, 2012 |
# ? Jul 5, 2012 03:56 |
|
Just a wild shot in the dark, but, main is missing [STAThread]. This can cause problems if using Windows.Form... But I'm not familiar enough with libtcod to say if that is the case here. Also another thing it could be is you may not have the appropriate visual studio c++ runtime version installed. Make sure you have the same c++ runtime the library was compiled with. xgalaxy fucked around with this message at 04:10 on Jul 5, 2012 |
# ? Jul 5, 2012 04:01 |
|
Actually, just found it. Have to call TCODConsole.setCustomFont before initRoot, apparently. I don't think [STAThread] is required, since this is just a managed wrapper around a library using SDL, which underneath will be using Win32. On a somewhat unrelated note, it would be really nice if managed wrapper authors would make their wrappers use the .net framework naming conventions. Having mixes of different styles drives me crazy. Edit: Looks like part of the problem is that the managed wrapper distribution doesn't come with the terminal.png font, which libtcod expects to be available as a fallback. Bringing in that file from the normal libtcod distribution allows the call to setCustomFont to be skipped. chglcu fucked around with this message at 04:19 on Jul 5, 2012 |
# ? Jul 5, 2012 04:12 |
|
prolecat posted:Actually, just found it. Have to call TCODConsole.setCustomFont before initRoot, apparently. I don't think [STAThread] is required, since this is just a managed wrapper around a library using SDL, which underneath will be using Win32. My god you've figured it out. Thank you very much, I was starting to think that I was going crazy.
|
# ? Jul 5, 2012 04:44 |
|
quiggy posted:My god you've figured it out. Thank you very much, I was starting to think that I was going crazy. No problem. Looks like libtcod will actually output an error message about not being able to load terminal.png if its missing, but I wasn't seeing it since I had my project set as a Windows application instead of console. Might be helpful to set up an output redirector to get those messages into the debug window if the library's standard error handling is to output and die.
|
# ? Jul 5, 2012 05:35 |
|
Kind of at a fork in my design, and could use some input. What I'm working on is a procedural platformer (and not a Cloudberry Kingdom bot run thing, I mean platforming that feels good to navigate and explore). On the one hand, I could try for more heavy procedural obstruction design. Lots of platforms at varying heights/spacings, with some attempt to quantify what makes a level "hard" or "easy" or "smooth" or "janky". This does give me theoretically infinite variation, but I feel like short of spending years on it, it will also invariably feel samey. The variety possible is limited by the codebase, and the kind of codebase it would take for true variety would be a spaghetti nightmare. I mean look at Cloudberry... he spent 2+ years on that, and while yes it looks fun for a very specific kind of gamer, those levels become a samey "hold right and time your jumps" thing almost instantly. On the other hand, I could just embrace my Wang tileset code, and focus instead on making a variety of tiles. Hundreds of tiles, each with different obstruction types, and each with different sub-obstructions that are themselves Wang-spawned. Things like "I design this house with 3 rooms, this with 4, this with 8, etc, and then those rooms are spawned from a set of room types, and the lamps in those room come from a set of lamps, and any furniture in those rooms comes from..." Furthermore, when I do platforms in these, I could still make them semi-procedural, and wiggle them a bit to change up the jumping, or add or remove platforms at times - but within controllable parameters that keep all generated levels fun and distinct. Right now, I'm leaning toward #2. I think it will let me inject character into the zones that would otherwise be missing, and the time spent per any one tile will be minimal. It's also roughly the approach that Spelunky uses, and I know that works (I just have to go a bit more designed, since I don't have the luxury of players using bombs et al to fix otherwise unsolvable levels). ... but can anyone make a compelling case for #1? To the best of my knowledge, even rougelikes use something closer to #2 (make a hallway, now add some rooms, and those rooms can be...). Shalinor fucked around with this message at 17:21 on Jul 5, 2012 |
# ? Jul 5, 2012 17:16 |
|
Shalinor posted:Kind of at a fork in my design, and could use some input. What I'm working on is a procedural platformer (and not a Cloudberry Kingdom bot run thing, I mean platforming that feels good to navigate and explore). In my experience, areas that you want to feel "natural" (outdoorsy) tend to benefit more from technique #1, whereas areas tend to feel more "indoor" when done with technique #2. Like you said, to some extent it's a flase dichotomy, since you can combine both procedural and wang-tile-style areas. I think you're more likely to get the feel you want (metroidvaniay?) with a wang tile approach.
|
# ? Jul 5, 2012 17:45 |
|
From my experience working with a friend on an unfinished procedural platformer that used #1 last year, I don't think it could ever result in something with good, satisfying variety, or anything even close to what a person could design. He actually made a fairly granular variety of heights/spacing, which could result in some wild areas, but the overall effect was repetitive. The code is pretty simple, but maybe you're right that better variety would've required something more complicated. Maybe part of the problem was requiring everything to be solvable, I'm not sure. That said, I like Spelunky, but also find it's levels to be rather samey.
|
# ? Jul 5, 2012 17:52 |
|
Shalinor posted:... but can anyone make a compelling case for #1? To the best of my knowledge, even rougelikes use something closer to #2 (make a hallway, now add some rooms, and those rooms can be...). The big problem with any automated generation is that platformer challenges are very specific and technical. This isn't like a roguelike where the exact room shape and object placement probably doesn't matter THAT much, placement of environment details and objects are everything in a platformer. Most challenges are based on doing things like forcing the player to deal with an enemy in a narrow movement area, or doing something predictably and then throwing them off with a slight variant (i.e. almost every floating platform segment). It's very hard to produce that procedurally, and very hard to staple together prefabs of it without beign repetitive. The only exception I can think of is something like Metroid, where the environment is more maze-like and platform challenges are more for content gating than they are maneuverability challenges, and enemy challenges come more from the small movement area than specific geometry. OneEightHundred fucked around with this message at 22:26 on Jul 5, 2012 |
# ? Jul 5, 2012 19:17 |
I'm curious about whether or not a certain kind of tool exists. I have a spritesheet with actors in various poses and stages of motion. I'd like the tool to be able to load this sprite sheet, then let me add various 'states'. For each state, I'd like to be able to add an arbitrary number of frames to form an animation, then save these animations to a text file.code:
|
|
# ? Jul 8, 2012 21:26 |
|
I just made my own, dunno if a good one exists already. Took me like 2 days in QBasic and I'm not very good at this kind of thing.
|
# ? Jul 8, 2012 23:34 |
|
Why would you use QBasic?
|
# ? Jul 8, 2012 23:51 |
|
Orzo posted:Why would you use QBasic? Why wouldn't you use QBasic?
|
# ? Jul 9, 2012 00:08 |
|
Orzo posted:Why would you use QBasic? You're one of those GW-Basic elitists, hunh?
|
# ? Jul 9, 2012 00:48 |
|
Internet Janitor posted:You're one of those GW-Basic elitists, hunh? If we're being honest, Applesoft BASIC is clearly the best basic.
|
# ? Jul 9, 2012 01:32 |
|
Unormal posted:If we're being honest, Applesoft BASIC is clearly the best basic.
|
# ? Jul 9, 2012 01:56 |
|
Strange things continue to be afoot in the land of BASIC...like this crazy thing that makes the reasonable assumption that you want to leverage DX11 and such for sheer unbridled power~ http://www.nuclearglory.com/products/nb/ NuclearBASIC Also I guess PureBASIC is still chugging on along, though there was supposed to be some kinda weird deal with The Game Creators on something...
|
# ? Jul 9, 2012 02:34 |
|
So going back to a project I worked on during the school year, it has one major bug left that I could never fix (due to spending all of my time working on a more important game project). So it is a racing game, and the bug is that when I hit the wall at a certain angle, I stop completely. The angle is somewhere in the neighborhood of 45 degrees when comparing the direction of the front of the car to the wall. At steeper angles and shallower angles, it works properly, changing your speed based on the angle of collision. Anyone ever run into something similar? I'm fairly sure my math is right, but whatever. EDIT: Welp, the last version of the code on my computer must be missing some important updates and I lost perforce access after graduation The Glumslinger fucked around with this message at 03:25 on Jul 9, 2012 |
# ? Jul 9, 2012 03:05 |
|
Jo posted:Spritesheet animation tool I don't know if one exists, I just made my own using C# and XNA. It's solid, I can create animations with it just fine. It's not completely finished, though. I think it basically explains the type of tool you're looking for? Unless I'm mistaken. Bocom fucked around with this message at 05:12 on Jul 9, 2012 |
# ? Jul 9, 2012 05:08 |
Bocom posted:I don't know if one exists, I just made my own using C# and XNA. That's perfect. Is it shared somewhere?
|
|
# ? Jul 9, 2012 06:04 |
|
Jo posted:I'm curious about whether or not a certain kind of tool exists. I have a spritesheet with actors in various poses and stages of motion. I'd like the tool to be able to load this sprite sheet, then let me add various 'states'. For each state, I'd like to be able to add an arbitrary number of frames to form an animation, then save these animations to a text file. It's probably not what you're looking for but I use an app called Sprite Something on my iPad for this and I think it's fantastic. I think it used to be just a pixel editor but now it does sprite sheets, animations, and tile maps as well. It exports to csv, animated GIF, and some other stuff including Flixel scripts. It's pretty awesome.
|
# ? Jul 9, 2012 06:31 |
|
I am not familiar with other languages, but why would you use a tool like that in XNA when all you have to do is import a spritesheet and loop through the frames? I am genuinely curious because I feel like there is something simple I am missing.
|
# ? Jul 9, 2012 12:46 |
|
TJChap2840 posted:I am not familiar with other languages, but why would you use a tool like that in XNA when all you have to do is import a spritesheet and loop through the frames? I've never used XNA, but you usually need to customize the information you store about a "Character" beyond more than just the sheet of frames it uses, so you'd consider building a character file. I have a massive sheet of animation frames that feature all the frames of animation for all the genders and races of my characters at all different states, and then I create a "Sprite Bank" which explains what frame is "North Facing Female African Firing Weapon" and so on. Then I have a "Campaign File" which features (among a ton of other things) what "Sprite Bank" each in-game creature uses.
|
# ? Jul 9, 2012 12:49 |
|
Mug posted:I've never used XNA, but you usually need to customize the information you store about a "Character" beyond more than just the sheet of frames it uses, so you'd consider building a character file. So, it's basically used to keep large projects organized? The small projects I mess around with don't really require that much, but I can definitely see more complete projects getting out of hand. Also, is what you explained something you just came up with? The more I read this thread, the more I feel inadequate because most of you speak as if some of this stuff is common knowledge.
|
# ? Jul 9, 2012 14:01 |
|
TJChap2840 posted:So, it's basically used to keep large projects organized? The small projects I mess around with don't really require that much, but I can definitely see more complete projects getting out of hand. It's just something I came up with. I start out hard coding things, then as scale increases I make things more dynamic, and then I make a tool to create the dynamics in a pretty graphical way.
|
# ? Jul 9, 2012 14:09 |
TJChap2840 posted:I am not familiar with other languages, but why would you use a tool like that in XNA when all you have to do is import a spritesheet and loop through the frames? Not all of my animation frames are the same size. I have multiple animations on one page.
|
|
# ? Jul 9, 2012 18:00 |
|
I've been learning a shitload while working on my game, which is great, but on the same token, I now know that a lot of code that I wrote earlier in the project works really should have be handled differently, as this was my first major game project in c++ and Allegro 5. I want to go back and rewrite a lot of it, like how I parse in game data/map information, but at the same time, I don't want to spend a lot of time working on something that later on, I'll have to redo anyway when I discover an even better way of doing it. Edit: To rephrase this better, would it be better for me to go back and change non optimal, but working, code. Or would it be better to keep on working on new sections and optimize everything once it is all functionally complete. Deki fucked around with this message at 20:31 on Jul 9, 2012 |
# ? Jul 9, 2012 20:11 |
|
Deki posted:I've been learning a shitload while working on my game, which is great, but on the same token, I now know that a lot of code that I wrote earlier in the project works really should have be handled differently, as this was my first major game project in c++ and Allegro 5. I want to go back and rewrite a lot of it, like how I parse in game data/map information, but at the same time, I don't want to spend a lot of time working on something that later on, I'll have to redo anyway when I discover an even better way of doing it. Keep moving. There is always something that can be done better. If you get stuck on trying to 'do it right' you will never get anything done.
|
# ? Jul 9, 2012 20:42 |
|
|
# ? May 28, 2024 12:49 |
|
Only optimize when you find performance problems. Programmers loooove to get hung up on writing perfect code, but it's pretty rare that they actually need to. Note that this doesn't justify writing terrible code. Your basic flow still needs to be well thought out or else you'll make refactoring a lot more difficult.
|
# ? Jul 9, 2012 20:51 |