|
brian posted:It's to get on the course not to get a job, there's no junior designer job that would ever present a list and say 'please show 3 of the 6 things here'. Presumably they teach you an actual skill on the course although it seems somewhat unlikely given that it's for game design and is so short. Ooooooh right, I think maybe my brain wasn't applied to that entire post the way it should have been.
|
# ? Apr 7, 2011 04:58 |
|
|
# ? May 13, 2024 11:44 |
|
brian posted:It's to get on the course not to get a job, there's no junior designer job that would ever present a list and say 'please show 3 of the 6 things here'. Presumably they teach you an actual skill on the course although it seems somewhat unlikely given that it's for game design and is so short. http://www.dawsoncollege.qc.ca/continuing-education/aec-programs/video-game-level-design/video-game-level-design-courses Those are the courses. There's a 45 hour scripting class and another on 3D animation and I would put my own hours on learning code and whatnot. It's a 1320 hours program. Is that good? I just want to get started, so I need to have a decent portfolio ready in one month so I can have some basic knowledge and grow on it.
|
# ? Apr 7, 2011 05:12 |
|
Paniolo posted:http://www.youtube.com/watch?v=QZxRauOpfwo Looks great! And my jaw hit the ground because you are doing the same thing I am using the same article. It looks like you understand it better. I need help understanding in which order the dx10 shaders get called so that I can convert it to the CPU. Can you help me out?
|
# ? Apr 7, 2011 05:30 |
|
Physical posted:Looks great! And my jaw hit the ground because you are doing the same thing I am using the same article. It looks like you understand it better. I need help understanding in which order the dx10 shaders get called so that I can convert it to the CPU. Can you help me out? I do everything on the CPU, I don't use geometry shaders (using DirectX 9.) I would recommend first getting a working marching cubes implementation that just spits out positions and normals to a vertex buffer from an arbitrary density function (a good one to test is the function for a sphere.) Once that's working then you can work on a density function that samples your voxel map, and then finally you can improve you shaders to add lighting and texturing. I am not actually using any code from that article, I developed my marching cubes implementation based on this: http://paulbourke.net/geometry/polygonise/ and my voxel sampling function was entirely custom. I guess you could say I took inspiration from the GPU Gems article but I don't like their implementation since it gives you very little control over your geometry and no way of accessing it from the CPU to extract collision data.
|
# ? Apr 7, 2011 06:09 |
|
Ohh ok. Then that makes my question null. I thought that you had used the code from that article. I am interested because I am trying to wrestle with it too but my problem is that I too don't use geometry shaders because I don't have DirectX 10 or above. I have DirectX 9c and thought that If I could walk through the code (without being able to run it_ I would be able to translate it to a singular function or linear progression that could run on just a CPU. Following the code through the DX10 shaders without being able to run it just made me confused to the point where I thought that the pixel shader was getting executed first (totally wrong). So one thing that I just realized about the marching cubes algorithm and the GPU Gems article and from your screenshot is how smooth the surfaces are. At first I saw someone elses project and thought that they were just really small cubes beacuse it kind of looked like that (minecraft-ish), but reading this http://users.polytech.unice.fr/~lingrand/MarchingCubes/algo.html and having it explained in 2d with pictures helped me realize that its actually about inferring polygon data from "invisible" or "theortical" cubes that are only represented by values that represent densities at their corners. I was stuck thinking in terms of minecraft and didn't realize that this method is different. Minecraft just makes a cube for each pixel in a noise map. Marching cubes makes "smoothish" connected polygons. Is that a correct line of thinking?
|
# ? Apr 7, 2011 06:20 |
|
Gerblyn posted:Are you talking about collision detection here? I'm a bit confused how you got from this sentence to questions about pixel shaders... Blender's been a real pain in the butt, but it has been useful to, say, add bones to a model and move it around, and apply UV texture coordinates and the like. Another example would be the idea of putting a weapon in a model's hand. Conceptually it's easy enough to imagine assigning the weapon and such, but making it really work is something else. So seeing how they do that in a modeler has gone a long ways towards knowing how I should approach it in a game.
|
# ? Apr 7, 2011 06:30 |
|
Physical posted:Marching cubes makes "smoothish" connected polygons. Is that a correct line of thinking? Yeah, marching cubes is not actually a voxel algorithm, it operates on a density field. It's just relatively trivial to sample a voxel map as a density field by interpreting filled cells as some positive value and empty cells as some negative value. The GPU gems article is misleading as hell because it refers to the cubes in the marching cubes algo as voxels but really nothing in that article has anything to do with voxels as a way of representing the world. Rocko Bonaparte posted:Hah I can understand the confusion. I didn't mean to infer one directly lead to the other. I don't even necessarily imply that collision detection is particularly a thing. I am more thinking about being able to have meshes of significant complexity and detail and be able to have them interact with stuff. It's one thing in my mind to understand them all as different entities and know how to move them around and stuff, but it's something else to go that last bit and have meshes representing them doing their thing. That's where I was getting overwhelmed. Collision engines generally simplify the world into simple primitives like axis-aligned bounding boxes, spheres and cylinders. Doing collision detection against an arbitrary mesh is only needed for things like hit testing in a FPS. Even then the mesh is usually simplified into a convex hull. Paniolo fucked around with this message at 07:13 on Apr 7, 2011 |
# ? Apr 7, 2011 06:38 |
|
Paniolo posted:Yeah, marching cubes is not actually a voxel algorithm, Paniolo posted:it operates on a density field. It's just relatively trivial to sample a voxel map as a density field by interpreting filled cells as some positive value and empty cells as some negative value. Physical fucked around with this message at 07:42 on Apr 7, 2011 |
# ? Apr 7, 2011 07:13 |
|
Physical posted:What would be a voxel algorithm? The voxel rendering algorithms I'm aware of either involve raycasting/raytracing (this is what Carmack thinks the future of 3D graphics is), generating a quad for each voxel face that is next to an empty cell (Minecraft) or sampling the voxel map as a density field and using a isosurface generation algorithm like marching cubes or dual contouring. Physical posted:How is it trivial? Do you mean easy or there is no point to do it? Easy.
|
# ? Apr 7, 2011 07:22 |
|
http://en.wikipedia.org/wiki/Voxel Under computer gaming it says crysis uses voxels. Where the hell does it use voxels? Also, it says that minecraft uses polygon rendering and not actual voxels. I don't get what the difference is. What is an actual voxel? I mean besides a volumetric pixel? How would minecraft "correctly" use voxels? How could a game rely on voxels without using polygons to represent them?
|
# ? Apr 7, 2011 07:42 |
|
Physical posted:http://en.wikipedia.org/wiki/Voxel Crysis uses voxels for the terrain. Basically the distinction is that a a true voxel renderer will using marching cubes for surface extraction from the underlying voxel data. Minecraft doesn't internally represent its data as voxels, but rather as actual polygonal cubes. I guess it's a fine distinction, but minecraft doesn't need to use surface extraction because the surfaces are already polygons and there's nothing to extract. Minecraft uses cubes as units of terrain, but they aren't voxels in the sense of being volumetric pixels. Hope that makes sense.
|
# ? Apr 7, 2011 07:59 |
|
Mr.Hotkeys posted:Did you add it, in Visual Studio, to your content project? If VS doesn't know it's there, the content importer won't compile it into a texture and your program won't be able to find it. XNA can't use raw PNG files as textures, they have to be run through the content importer first. I added the file to the Content project by right clicking the folder in solution explorer and add existing item. MonsterUnderYourBed posted:You can load images from a file in XNA, it's just done a little differently, I do it in my current project so my artist can just have the compiled game + texture folders to mess around in rather than having to have VS installed. The line was in my LoadContent method but before my call to create a new sprite batch. I swapped the lines and the code builds. I'm not saying that's the solution here, but I'm happy with that. Thanks for the help.
|
# ? Apr 7, 2011 10:40 |
|
Back in the day, when I was in middle/high school, I used to gently caress around with RPG Maker 2000/2003. I had a lot of fun starting games and never finishing them and hanging out with the dudes in the RM community. These days, I'm almost out of school and I work overnights at a hotel. My job involves hours and hours of doing literally nothing, so I have started putting together a new RPG project. It is pretty drat ambitious, and I will probably never see it through but that's what I enjoy so DON'T HATE. For anyone who gives a poo poo: [don't care] It is loosely based on the mythology of the Pueblo peoples of the southwest United States, and takes place in an area similar to the four-corners region of the U.S. The story follows MODERN CONSUMER GUY as he searches for the cure to his terminal illness. In order to do so, he must unravel the secrets of several ancient cultures etc... etc... etc... [/don't care] So far, other than putting together the story and setting, all I have done is the art for the game. It is my intention to use no digitally made images for the game (except maybe text, - I haven't decided) All background images, level maps, menus, characters etc... will be hand-drawn in ink and water-colored, scanned, and thrown together in the game engine. So My Question/Request Is:Help me figure out what sort of code or game engine to use to make this thing! At this point, my coding experience amounts to making text adventures in BASIC on my T.I. 83, and working around the limitations of RM2K to make custom menu and battle systems. (I.E., ZILCH) Beyond these things, I have no idea what proper coding entails so unless there's something out there that I can learn well enough in two or three months to efficiently make an RPG, I guess I'm probably better off with a Game-Making Engine. I do know that I don't want to make it with any of the RMs or Game Maker. Firstly, The Battle and Menu systems I want to create would just be the biggest pain in the rear end to make with these tools. Also, since I am hand-drawing all of this crap, I don't want to deal with the image-size limitations of these programs. I want to make something that can run at the natural resolution of my laptop. Obviously, I don't know what the heck I'm talking about, so help me out! Set me on the right path and all that jazz...
|
# ? Apr 7, 2011 11:02 |
|
GirlBones posted:So My Question/Request Is:Help me figure out what sort of code or game engine to use to make this thing!
|
# ? Apr 7, 2011 12:03 |
|
roomforthetuna posted:That sounds like a job for Flash, to me. It has both the flexibility and simplicity you want. Is flash suitable for what I want to do graphically? My only experience with flash is stuff like the flash tub and cartoony browser games, etc...
|
# ? Apr 7, 2011 13:15 |
|
GirlBones posted:Is flash suitable for what I want to do graphically? My only experience with flash is stuff like the flash tub and cartoony browser games, etc...
|
# ? Apr 7, 2011 14:25 |
|
gwar3k1 posted:I've started following a guide to learn 2D game development and I've followed it to the letter aside from using XNA 4 when the book is targeting 3. I've spent ages Googling this problem and the only solution I can find is what I'm doing anyway which is infuriating because this is like the Hello World of the book and it refuses to work. It doesn't solve this particular problem, but if your book is targeting XNA 3 and you're using 4, you might find this helpful: http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/
|
# ? Apr 7, 2011 15:00 |
|
Paniolo posted:http://www.youtube.com/watch?v=QZxRauOpfwo I'd be interested in following this project. You should blog about it so we can all watch. Procedural content like this is so fascinating.
|
# ? Apr 7, 2011 16:54 |
|
Added texture blending - each voxel has a material assigned and the sampling function filters blending weights based on the surrounding voxels. Up to four materials per level are supported right now, and the pixel shader is definitely starting to cause some slowdown, since I'm sampling each texture 3x for the triplanar projection. Time to add visibility culling and geometry sorting! Here's a shot showing the boundaries of the voxels on the y=1 plane (the ground plane), so you get an idea of how easy pathing and collision is. And here's a birds eye view of the voxels: edit: Video with the new stuff in: http://www.youtube.com/watch?v=LeISMAg_XgA Paniolo fucked around with this message at 20:23 on Apr 7, 2011 |
# ? Apr 7, 2011 17:48 |
|
Think that could be done using hex grids and simplex noise instead of those obvious boxes?
|
# ? Apr 7, 2011 18:05 |
|
Vino posted:Think that could be done using hex grids and simplex noise instead of those obvious boxes? Definitely possible but just thinking about the sampling equations makes my head hurt.
|
# ? Apr 7, 2011 18:15 |
|
drat you are killing it. How would I get content into an XNA game that wasn't there at compile time?
|
# ? Apr 7, 2011 19:58 |
|
pastorrich posted:http://www.dawsoncollege.qc.ca/continuing-education/aec-programs/video-game-level-design/video-game-level-design-courses Well the value of any of these courses is in the skills learned and the portfolio produced as a result of it or by doing it and that course seems to be heavily themed around level design. Level design isn't really game design in the typical sense, it's more like 3D modelling but using the software for whatever engine you're using and either reusing existing assets or making a minimal amount of them yourself in a more typical 3D package, there's obviously more design that goes into it with regards to making it fun for whatever the game's mechanics are, but it's more a case of level architecture and engine specific scripting. This course definitely seems oriented around the commercial 3D engine level editors over indie/handheld 2D sort of stuff. I'd try making a level in UDK or Hammer (HL2 map editor), see if it's the thing you want to do or not and if it is then I imagine this course will be great. Just remember that you get out what you put in, you'll get a job based on your portfolio and skills demonstrated within it, not based on any degree or qualification in general.
|
# ? Apr 7, 2011 20:37 |
|
Physical posted:drat you are killing it. http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.texture2d.fromfile.aspx For models, I think you are out of luck. There are resources that talk about it, but I believe you have to have Visual Studio/XNA Game Studio installed in order for it to work.
|
# ? Apr 7, 2011 20:45 |
|
brian posted:Well the value of any of these courses is in the skills learned and the portfolio produced as a result of it or by doing it and that course seems to be heavily themed around level design. Level design isn't really game design in the typical sense, it's more like 3D modelling but using the software for whatever engine you're using and either reusing existing assets or making a minimal amount of them yourself in a more typical 3D package, there's obviously more design that goes into it with regards to making it fun for whatever the game's mechanics are, but it's more a case of level architecture and engine specific scripting. This course definitely seems oriented around the commercial 3D engine level editors over indie/handheld 2D sort of stuff. that sounds totally fair to me, there's a whole 300+ hours devoted to building an actual game with other artists to get a portfolio, and I can put some spare time hours in there too, so I should have a pretty decent portofolio to build skills on. I think one can definitely work up to game design from level design, so I feel great about picking that path. thanks for the tips man.
|
# ? Apr 8, 2011 00:16 |
|
pastorrich posted:that sounds totally fair to me, there's a whole 300+ hours devoted to building an actual game with other artists to get a portfolio, and I can put some spare time hours in there too, so I should have a pretty decent portofolio to build skills on. I think one can definitely work up to game design from level design, so I feel great about picking that path. thanks for the tips man. If you want to get an entry-level designer job, level-design and mods is really the main way forward. Designing actual games (the high-level concepts) is something you could maybe get to do after you've worked in the industry for many years, it's not something you get hired for. Just be very realistic about what you're getting into: Getting an entry-level designer job is *hard*. There's few positions available, and oceans of people after them. Especially here in Montreal . Getting into the industry as an artist or (especially) a programmer is much easier, but... then you'll be doing art/code and not design. Working your way through QA is an option yes, but 1) It really depends on the company (we hire designers from our QA guys, but I hear of companies that don't), 2) There'll still be plenty of competition, and 3) If you're working in one of the "QA sweatshops" like VMC or Bugtracker, try to get a studio QA position ASAP .
|
# ? Apr 8, 2011 01:59 |
|
HappyHippo posted:The problem is that the equation for the force of gravity has a singularity at r = 0, so the force gets huge when things get close together. There are many fancy ways to solve that, but collision detections should do the job by preventing anything from getting too close. Resistance wouldn't do much to fix it. You could try putting a hard cap on the force that's allowed but again the collision detection should do it. Sorry, but I'm having no luck with this. Besides that site being a bit hard to read, I'm having trouble reconciling what I'm getting out of it with the way I'm currently doing things: This is in Flash, and each planet has a separate velocity on the x- and y-axis (xv, yv) and each frame these are modified by any gravity acting on the planet, and then each planet's x coordinate has xv added to it and it's y coordinate has yv added to it. So now I want to detect when two planets come into contact with each other and make them collide and bounce off of each other, but I can't figure out how arrive at separate modified velocities. Should I rework everything so everything just have a speed and an angle that it's moving at? Gravity and such seems to work fine with things the way they are but this particular problem seems a lot easier to solve that way.
|
# ? Apr 8, 2011 02:08 |
|
Vinterstum posted:If you want to get an entry-level designer job, level-design and mods is really the main way forward. Designing actual games (the high-level concepts) is something you could maybe get to do after you've worked in the industry for many years, it's not something you get hired for. haha! I AM working the VMC sweatshop and I love it. That's why I'm thinking I have a good future in this industry, I'm working at mcdonalds and flipping burgers while whistling and dancing around. I think I didn't explain myself properly, I want to get a junior job as a level designer, then work my way into game design. I heard that's possible? Thanks for the good advice, and are you guys hiring by any chance? thanks man, will do. vvvvvvvv pastorrich fucked around with this message at 04:20 on Apr 8, 2011 |
# ? Apr 8, 2011 02:50 |
|
Pastorrich, you really need to cut/paste your first post in this thread into the Game Jobs Megathread to get the advice you're looking for. This thread is mostly filled with hobbyists who just program games for fun (plus a few pros). That other thread is chock full of game industry professionals who can give you much more detailed advice and some of them have likely hired (or tossed away the resumes of) people from the exact school you're looking at. Just to be clear, I'm not trying to push you out of this thread - you're more than welcome to hang around and ask all the questions you want. Rather, I'm trying to let you know that you're missing out on an AMAZING opportunity by not also posting in that other thread. Those folks really know what it takes to break into the game industry because they've done it.
|
# ? Apr 8, 2011 04:06 |
|
I don't know if this is the right thread, but since it is kind of game related, I'll try here. I'm using PHP btw. I've bolded the question for tl;dr. I've made a few classes: Object Room extends Object Player extends Object basically they are like this: code:
code:
Now I want these objects/instances to interact with different browser sessions, how do I accomplish that? Example: room.php User loads page, is assigned a player object, is moved to a new room object. Another user loads page, is assigned a player object, is moved to the existing room object and I can tell user2 that there are 2 player objects in this room. My thoughts are: I need to use a SQL DB, make a table for each class with columns matching variables. Then when an object is updated, I need to write that to the row, and same with reading variables, I need to query the DB first. If this is the right approach, should I use an ORM like Propel/Doctrine? Are there other easier ways to do this? There are thousands of browser games built on this concept, how do they do it?
|
# ? Apr 8, 2011 09:27 |
|
I'm currently working on an Advance Wars/Civilization mashup kind of thing in XNA and was wondering, what is the best way to go about scripting, like, cutscenes? Like if at the start of the mission, I just wanted to move some units around, nothing crazy complicated. Should I just be handling moving and stuff when the objects update, and then when they get to the correct position, go on to the next step? Or should I multithread and put the draw code on the other thread and have the logic for the cutscene continuously running on the other? I know this is probably going to vary a lot from game to game, but I figured situation was generic/simple enough that someone who's done anything like this before might be able to weigh in. And it's still pretty far down the line before that will ever come up, I just don't want to make any design decisions now that will back me into a corner. I can see some ways going about it, but in general I'm pretty stumped about how to do it without it becoming a huge confusing clusterfuck. And I want to keep it all in C# if that's reasonable, don't want to learn or have to deal with LUA/etc. But now I have to go write a natural number class in Java for class, so if I don't get back to you soon, thanks in advance.
|
# ? Apr 8, 2011 10:06 |
|
Mr.Hotkeys posted:I'm currently working on an Advance Wars/Civilization mashup kind of thing in XNA and was wondering, what is the best way to go about scripting, like, cutscenes? Like if at the start of the mission, I just wanted to move some units around, nothing crazy complicated. Should I just be handling moving and stuff when the objects update, and then when they get to the correct position, go on to the next step? Or should I multithread and put the draw code on the other thread and have the logic for the cutscene continuously running on the other? If your cutscenes run in engine, then it's probably a good idea to design the engine so it can be put into "Cutscene Mode". This typically involves: - Disable most user input - Hide UIs - Save a copy of the game state in memory so you can restore it later (optional, but needed if you don't want things that happen in cutscenes to effect the game world) As for the cutscene system's architecture, you typically want to have a queue of cutscene events that the system processes sequentially. So you'd have a base Event class, and you'd derive various event types from it (e.g. StartAudioStreamEvent, MoveUnitEvent, etc.). Given the fact you're making a TBS game, it's probably best to have the events start and then run until they're finished before starting the next event. So, a cutscene sequence might look like this: pre:- Enter Cutscene Mode (camera position stored, UI hidden, player control disabled) - MoveCameraEvent - Camera centers on the player's city - StartAudioStreamEvent - Cutscene music starts playing - TalkingHeadEvent - Bad guy's head appears, with a text box "I will crush you!" - TalkingHeadEvent - Good guy's head appears, with a text box "You will never defeat us!" - TalkingHeadEvent - Bad guy "Let's see how brave you are when my tanks have flattened your precious empire!" - SpawnUnitsEvent - A number of tanks appear around the player's city - TalkingHeadEvent - Good guy: "Noooooooooooo!" - Leave Cutscene Mode (camera position restored, UI shown, player control enabled) pre:<cutscene name="Baddy Attacks City"> <events> <movecamera target="City_01"/> <startaudiostream filename="dramamusic.mp3"/> <talkinghead faceid="badguyface"> I will crush you! </talkinghead> ... blah blah blah ... </events> </cutscene>
|
# ? Apr 8, 2011 12:51 |
|
Makes sense, but should I set it up so that whatever object is doing something in the cutscene does its thing continuously and split the graphics into another thread or have the object do a step towards its goal every update loop and leave the threads together? Like say an object needs to move from (0, 100) to (100, 300), should it move by some (100/n, 300/n) every time Update() is called until it gets to the right spot, or just loop in its Update() until it gets to the right spot while the graphics, on another thread, update to reflect its position? Just trying to get down the best practice, I'm mostly just doing this for academic purposes. Though I might have answered my own question, now that I think about it; having more than one object move with the latter would be a pain in the rear end. Also having to worry about objects talking over threads...nevermind, actually. I've got my answer. Thanks!
|
# ? Apr 8, 2011 13:53 |
|
Yeah, if your cutscene system can take advantage of your engine to make/move/animate things then you save yourself a lot of hassle. Depending on your requirements you may want to derive cutscene versions of core game classes, so you might make a cutscene specific type of unit that has extra functionality for doing cutsceney things like playing custom animations and stuff.
|
# ? Apr 8, 2011 14:11 |
|
zapateria posted:My thoughts are: I need to use a SQL DB, make a table for each class with columns matching variables. Then when an object is updated, I need to write that to the row, and same with reading variables, I need to query the DB first. If this is the right approach, should I use an ORM like Propel/Doctrine? Use an ORM if it will make it easier for you!
|
# ? Apr 8, 2011 15:29 |
|
Mr.Hotkeys posted:I want to keep it all in C# if that's reasonable, don't want to learn or have to deal with LUA/etc. You can load and compile C# files at runtime using the CodeDomProvider class so you can just use C# as the scripting language if you want to avoid LUA. Create a folder somewhere and fill it with Script001.cs, Script002.cs, etc files but don't add them to your VS project. Load and build each file at runtime and attach them to your game objects just like any other script. I did this about a year ago for a game jam type event, I had a ScriptManager class that handled the load/build stuff and exposed a set of methods that the scripts were allowed to use. The important bits for doing the compliling are here if you want to take a look. (Warning: this code is of game jam quality and was likely written at 2AM after a couple of beers, no idea why I thought it would be neat to use an iterator to get one item out of a collection containing one item, etc.) This might not work if you are targeting Xbox systems, I don't think they allow live compiles for security reasons.
|
# ? Apr 8, 2011 15:33 |
|
PDP-1 posted:You can load and compile C# files at runtime using the CodeDomProvider class so you can just use C# as the scripting language if you want to avoid LUA. Create a folder somewhere and fill it with Script001.cs, Script002.cs, etc files but don't add them to your VS project. Load and build each file at runtime and attach them to your game objects just like any other script. That's very cool that can be done since I'd rather make my own scripting language that compiles into bytecode any day of the week over xml (stubborn as gently caress), but what is the reason that I shouldn't compile them until runtime? So they can be easily edited? So they don't bog down compiling the main program itself? Also, I thought compiling at runtime wasn't going to be available until C# 5.0, or are they just making it easier? Gerblyn posted:Yeah, if your cutscene system can take advantage of your engine to make/move/animate things then you save yourself a lot of hassle. Depending on your requirements you may want to derive cutscene versions of core game classes, so you might make a cutscene specific type of unit that has extra functionality for doing cutsceney things like playing custom animations and stuff. Yeah I was considering having the objects have a state that determines the logic they execute (eg cutscene vs your turn vs their turn, or something like that), and have them each have a field that contains some IScript object they execute when they're in the cutscene mode. My game's not crazy complicated (or at least the unit classes shouldn't be), so I think it'd be better than way, but I'll look into doing it the other way and see which works better, thanks for the suggestion. You've been very helpful.
|
# ? Apr 8, 2011 15:58 |
|
Mr.Hotkeys posted:That's very cool that can be done since I'd rather make my own scripting language that compiles into bytecode any day of the week over xml (stubborn as gently caress), but what is the reason that I shouldn't compile them until runtime? So they can be easily edited? So they don't bog down compiling the main program itself? If you compile all your scripts at build time you have to re-build the whole project every time you make a modification to any one script. Changing a character's name from Ted to Fred requires a full re-build. Then you launch the program and navigate your character from wherever the default start location is over to Ted/Fred and test the script. It's not very interactive and your testing iterations will be slow. If you set your scripting system up to load/build at runtime you can have your game running in one window and the script open in another window. Change the character script's Name property from Ted to Fred and save the changes, then switch to the game window and trigger some kind of ReloadScripts() method. Your in-game character is still standing right next to Ted/Fred and you can try out the new script right away. Iterations are fast and easy. I don't know anything about the C# 5.0 changes, maybe they are making it simpler. I did my scripting stuff on 3.5 so I know it's definitely available in some form today.
|
# ? Apr 8, 2011 16:26 |
|
Mr.Hotkeys posted:Yeah I was considering having the objects have a state that determines the logic they execute (eg cutscene vs your turn vs their turn, or something like that), and have them each have a field that contains some IScript object they execute when they're in the cutscene mode. I'm actually writing a TBS game at the moment and the approach I've chosen for this is to have a Unit controlled by little command data structures, which instruct it to do things like "Move to X" or "Attack Y". So, instead of calling a function like: pre:unit.MoveTo(position) pre:class MoveToCommand : public UnitCommand { ... blah blah blah ... }; MoveToCommand moveCommand(position); unit.AcceptCommand(moveCommand);
|
# ? Apr 8, 2011 16:31 |
|
|
# ? May 13, 2024 11:44 |
|
BizarroAzrael posted:Sorry, but I'm having no luck with this. Besides that site being a bit hard to read, I'm having trouble reconciling what I'm getting out of it with the way I'm currently doing things: No need to rework things. First, once you have decided that two objects are colliding, find the normal and tangential vectors: code:
code:
code:
Lastly, project the new velocities back onto the x-y axis: code:
HappyHippo fucked around with this message at 17:51 on Apr 8, 2011 |
# ? Apr 8, 2011 16:58 |