TOPIC_TITLE
stringlengths
4
128
CATEGORIES
stringlengths
13
48
POST
stringlengths
0
85.6k
ANSWERS
stringlengths
0
146k
Hi I'm new. Unreal best option ?
For Beginners
Hallo everyone. My name is BBCblkn and I'm new on this forum. Nice to virtually meet you 🙂. One of my biggest dreams is to make my own videogame. I love writing design as in text on how my dream game would be. Now I got no skills to create it. But who knows what life will bring. Is Unreal the best program to have fun with an experience ? Obviously I prefer a simple but capable program. Not pre designed auto drop. Why not install Unreal and roam into it and see if anything happens.My favorite games are in the genre of Fantasy, usually stone age with magic. Dota, Homm, Diablo and the odd one out is the genius Starcraft 1. But I played plenty of different games, especially when I way younger. I don't game currently at all but designing gets my creative juices flowing and is so inspiring and fun. Thanks for having me guys
BBCblkn said:My name is BBCblknI am truly sorry for you. Even Elons daughter has a better name than that.BBCblkn said:Is Unreal the best program to have fun with an experience ?Give it a try, but it's not meant for total beginners.Starting small always is a good idea. 2D is easier than 3D. You could try GameMaker, learn some programming language, learn some math, move on to more advanced engines like UE or Unity… ;There's honestly no perfect program for beginners. If I had to compare Unreal though at my skill level, I would probably pick Unity. However, It really comes down to your needs, and how much programming you want to learn. Furthermore, I would also keep in mind other engines.;@BBCblkn I'd recommend Gamemaker studio 2 as a first engine. It's easy to learn and I haven't had a problem making my game ideas in it yet.There are some good tutorials on YouTube to follow to learn it. Do note you'll be limited to 2D games with GMS2.Bit late to the post, but I hope it helps;gamechfo said:Bit late to the postTwo months late. Always consider whether you honestly believe that a question asked long in the past is still awaiting an answer. Thread locked.
How to publish a book?
GDNet Lounge;Community
Hello, So, over the holidays I finished my 1st book. Do any of yall writer types know where I can find:an editorpublisherIt's like 99% done, just need to know what to do next. Also, it's cross genre, so it doesn't necessarily fit the standard model.
You've given nowhere near enough information to get a final answer, but I can suggest next steps for you. (For background, I've worked as an author, co-author, editor, and ghostwriter on 9 books so far.)Publishing is a business deal. You need to figure out what business services you need.Do you even need a publisher? Do you need a distributor? You already mention needing an editor. Do you need marketing? Do you need retail agreements? Digital or physical? If physical, POD or offset, how many each of hard or soft, what size of print run can you afford? What business services do you need? Publishers have an awful lot of potential features of what they can provide and what those services cost.Once you know the list of services you actually need, your favorite bookstore will have books that have listings of all the major publishers and hundreds of minor publishers, along with the services they provide and the specialties they work with. Work through the listings methodically, and talk to them all until you've got a deal. You'll also want to start shopping around for a lawyer at that point, both because they have connections and because they'll be working with the contracts you'll be signing.Once you know what you need and have talked with your lawyer the first few times, you will be ready to start shopping around. It's far better if you have more money and are using the publisher as a paid service. That is, you pay them for the services they provide up front. It will cost you many thousand dollars but you'll require far fewer sales to reach profitability. It can be better to do an online plus POD service starting out if you're self funded. If they need to front any of the money there will be two phases to the deal, one phase before it's profitable and another after a threshold is reached and it's profitable. The exact terms will depend on your needs and the services they'll be providing. Before you sign with anyone, you'll need to work back and forth more than once with your lawyer to help you negotiate what's fair in the agreement. Good lawyers understand the costs of the various services and can help you get fair rates.Just like publishing games, the more you need from them the harder your pitch becomes. If you need a lot of services the more it will cost you. If you're looking for them to invest in you, front you money, and pay for the books, don't expect a lot of money from the deal, and in addition your pitch needs to be amazing and you'll be rejected many times. If you've got the money to self-publish and are only looking for retail agreements that's rather easy. ;hmmmWell Self publish might work too. I'm looking for:an editor publishing distribution for ebookNo hard cover or physical book planned at this timemaking cover art. Future Audio book production. I think that's it. I'd be willing to do physical print if needed, but I don't really want to pay for that at this time. frob said:You've given nowhere near enough information to get a final answer The issue is I don't know what questions or criteria I should be asking or looking for. ;Have you considered publishing with Packt?https://www.packtpub.com/;GeneralJist said:2. publishing distribution for ebook 3. No hard cover or physical book planned at this timeFor distribution of an ebook there are plenty of options. Amazon is the biggest with kindle direct publishing requiring little more than an html file and an image for the title. If you are comfortable with software tools you can use that same document to build/compile every other format out there. You're on the hook for everything else with the business if you go that route, but it can work well if you are marketing through your own channels.There are many ebook publishers out there targeting specific platforms and specific readers or specific genres. I mentioned publisher lists, they also include electronic-only publishers. Understand the tools they use against piracy are also helpful since otherwise anybody with access to the file can make unlimited copies.Be careful of contracts, you almost certainly want something that has a non-exclusive agreement since you've done all the work yourself already. If a publisher wants an exclusive deal they need to be putting quite a lot on the negotiating table.GeneralJist said:4. making cover art.Find an artist with the style you like and contact them. Often it's in the range of a couple hundred bucks, especially for ‘unknown’ artists when they're starting with something that wouldn't have seen the light of day otherwise. Artist friends are best, and asking around at local art schools is inexpensive.GeneralJist said:5. Future Audio book production.If you don't need it now, it's something easily done later.GeneralJist said:1. an editorThis one is the most difficult. Skilled editors are amazing. If you go with a publishing house they'll provide professional editors, at professional rates. ;taby said:Have you considered publishing with Packt?https://www.packtpub.com/hmmm 1st time hearing of them.Looks like they are more of an educational option?My book is a mix of mental health journey auto bio, and Sci Fi elements. It's not really a standard “how to” for game dev. ;so I just heard back from my 1st publisher submission.https://triggerhub.org/​And they essentially say they be willing to look at it deeper, and have extensive edits to focus on the mental health angle. but they would want me to cut a lot. From what they are hinting at, It sounds like they want to cut a lot of the Game dev and gaming journey, as they are a publisher focused on mental health.So, now I need to decide what to do.I sent them back an email saying I'm open to continued dialogue.Without knowing exactly what they want to cut, and edit, I don't know how to proceed.Also, would it be better to hold out, and find a publisher that is willing to accept most of the game dev journey, as I'm looking for a continued publisher to work with, aka accept most of the book as is. Any advice would be helpful.Thanks yall. ;GeneralJist said:Any advice would be helpful.Look into your own mind and heart.;hmmmok,So I've submitted to a few other places.We shall see.I submitted to this place called author House, and they got back to me really quick, but it looks like they want me to pay a couple thousand for a package:https://www.authorhouse.com/en/catalog/black-and-white-packages​I personally find that a bit frustrating.I mean, really, I wrote the book, I thought traditional publishers get paid from a % of sales?@frobWhat do you think?Is the above package a good deal?I was also a little put off, as it seems the person who called me didn't even read anything about my book, and asked me “so what's your book about?"beyond the above, how does this usually work? Edit: so, after a bit of basic research, it seems the above organization is a bit scamy. The hunt continues. ;You're unlikely to get a publisher deal, where the publisher pays you an advance and distributes your book to retail outlets.You'll have to self-publish, meaning you have to bear all the costs for printing, and nobody will distribute it for you. https://en.wikipedia.org/wiki/Vanity_press​
First-person terrain navigation frustum clipping problem
General and Gameplay Programming;Programming
I am trying to develop first-person terrain navigation. I am able to read a terrain and render it as well as to move around the terrain by interpolating the location of the camera every time I move around. The main problem I have is that depending on the terrain, i.e. moving on a sloping terrain, the near plane clips my view (see below). What is the best way to avoid this? Presumably, I can interpolate the heights for the bottom corners of the near plane … any help would be appreciated.
I believe this can aways be an issue. I mean if you are clipping to a near plane and that plane passes through geometry, it has to do something. That being said you technically don't have to clip to a near plane at all, however many graphics APIs require it. Another other thing to consider is once you have collision working, you can put your camera, including your near clipping plane inside a collidable object, for instance a sphere, such that this problem will never occur. If you are eventually going to make this a real first-person game, that should take care of the problem since your camera will be inside the players head. Even in a 3rd person game you can put them inside a floating sphere. ;Gnollrunner said:That being said you technically don't have to clip to a near plane at all, however many graphics APIs require it.The near clip plane is always needed, even if you use a software rasterizer. If you don't do the clipping, vertices would flip behind the camera, causing glitches way worse than what we get from clipping.mllobera said:What is the best way to avoid this? Presumably, I can interpolate the heights for the bottom corners of the near plane … any help would be appreciated.Yes, basically you want to ensure that the camera is in empty space (above the hightmap), not in solid space (below the heightmap).But in general you can not treat the camera as a simple point, because the front clip plane requires a distance larger than zero. So ideally you build a sphere around the camera which bounds the front clip rectangle of the frustum, and then you make sure the sphere is entirely in empty space, for example. In the specific case of your terrain not having too steep slopes however, it should work well enough to sample height below camera, add some ‘character height’, and place the camera there. That's pretty simple and usually good enough for terrain.It's quite a difficult problem mainly for 3rd person games in levels made from architecture. It's difficult to project the camera out of solid space in ways so the motion still feels smooth and predictable.Some games additionally fade out geometry which is too close, attempting to minimize the issue.Imo, the ‘true’ solution to the problem would be to let the clipping happen, but rendering the interior volume of the geometry as sliced by the clipping plane.That's pretty hard with modern rendering, which usually lacks a definition of solid or empty space. But it was easy to do in the days of Doom / Quake software rendering. When i did such engine, it was possible to render clipped solid walls in simple black color. This felt really robust and not glitchy, so while it does not solve all related problems, i wonder why no game ever did this. ;@undefinedJoeJ said:The near clip plane is always needed, even if you use a software rasterizer. If you don't do the clipping, vertices would flip behind the camera, causing glitches way worse than what we get from clipping.You can clip to a pyramid instead of a frustum. I used to do this many years ago on old hardware. So there is no near clipping plane. In fact you don't need a far clipping plane either.Edit: Just wanted to add as far as I know the near and far clipping planes mostly have to do with optimizing your Z resolution. If you are dealing with that in other ways, I think they aren't strictly necessary. I currently don't even deal with the far plane and let LOD solve Z-fighting issues.;Gnollrunner said:You can clip to a pyramid instead of a frustum.I see. You still have front clip. It is a point, formed indirectly as the intersection of the other other frustum planes.I've misunderstood your claim to be ‘you don't need a front clip’. But you didn't say say that. Sorry. But now i'm curious about the experience with z precision you have had. I guess it just worked? Which then would probably mean: All those painful compromises of ‘make front plane distant so you get acceptable depth precision for large scenes’, are a result of a bad convention being used by APIs?Or did you use no z-Buffer? ;@undefined My whole engine is based on aggressive LOD and culling. I don't do projection in the matrix. It's a post step. My Z coordinates are world distances. My current project does have a near clipping plane mainly because DirectX wants one, but it's not that relevant for my application.;Ah, so you use the pyramid for culling only. But for rasterization, the usual front clip plane at some distance i guess.Still an interesting question if ‘some distance’ is really needed, but i guess yes.I did some experiment about point splatting. It uses spherical projection, which is simple than planar projection:auto WorldToScreen = [&](Vec4 w){Vec4 local = camera.inverseWorld * w;if (local[2] < .1f) return (Vec3(-1)); // <- front clip at some distance of 0.1Vec3 screen = (Vec3&)local;screen[2] = length(screen); // if it was zero, i'd get NaN herescreen[0] = (1 + screen[0] / (screen[2] * camera.fov)) / 2;screen[1] = (1 + screen[1] / (screen[2] * camera.fov)) / 2;return screen;}; Planar projection would cause division by zero too, i guess.;Thanks for all your comments! I will need to investigate how to do what Gnollrunner proposed (about putting the camera inside of a sphere). ;This may be obvious, but in case it helps:Let me note that, as a first-person camera may be more likely than a third-person camera to draw very close to geometry, it likely makes some sense to have a smaller near-plane distance for the former than the latter.Now, this only ameliorates the problem, it doesn't remove it entirely: it means that the problem will still appear, but only if the player gets very close indeed to a surface. It's intended to be used in conjunction with one or another means of preventing the camera from approaching quite so near to a surface (such as the sphere-approach mentioned by others above).;Thaumaturge said:This may be obvious, but in case it helps:Let me note that, as a first-person camera may be more likely than a third-person camera to draw very close to geometry, I'm not sure that's so true. I mean in both cases you have to take care of the problem somehow. The case of a first-person camera is a bit easier because it should always be in the collision boundary of the player (sphere(s), ellipsoid, capsule etc.). As along as the near plane is also within that boundary, the problem should never occur. So if you have a 10cm radius sphere and put the camera in the back of it, that gives you maybe a 10 to 15 cm camera to near clipping plane distance to play with depending on the field of view you are going for. With a 3rd person camera, you can also get very close to terrain, in fact your camera can end up within terrain or some object if you don't do anything to solve that problem, and this will happen very often without separate camera collision. One typical way to handle this is just implement your following camera, ignoring terrain considerations. Then to figure out your camera's actual position, project a line back from the head of the avatar to the camera's ostensible position, and see if it intersects anything to get the camera's true position. In reality you should project a cylinder and not a line since your camera will need its own bounding sphere to contain the near clipping plane. In any case this means that as you move around your camera can jump forward to clear terrain and objects. I've seen this in a few MMOs. However, when you leave blocking terrain you have the option of implementing smooth movement back to the cameras desired location. If you want to get really fancy, I guess you could try to predict when your camera will need to jump forward ahead of time and try to do smooth moment forward too. Maybe you can have a second camera bounding sphere which is somewhat larger, that would trigger smooth movement, but I think you would still need a fallback camera jump routine to be safe.
Artist/level designer looking for paid work.
Old Archive;Archive
I can do 2D or 3D art and level design. I'll do texture art too.This is a picture of some of my 3D art. 2D art is one of my specialties.this is done entirely in photoshopI'm trying to save to build a new computer so I can't do free work just yet.I have PayPal for the payment, and we might be able to work out some other deals.[Edited by - 3DModelerMan on June 19, 2009 9:03:20 AM]
Sent you a pm.Cheers; I've gotten a few requests so far. I haven't decided on one of them yet, so feel free to PM me. I am really interested in working on mario style graphics.[Edited by - 3DModelerMan on May 17, 2009 8:55:42 AM]; I'm trying to save for a PC right now, so I might not be able to do free work even though some of the jobs sound fun. I will be able to after I've built my PC though. ; I'm still open for work. ; [bump]
UAC prompt [SlimDX]
Graphics and GPU Programming;Programming
Hi,I hope you can help me, my app is a CAD system programmed in C# using DirectX 9.0 (SlimDX).At the moment I use a render loop like a game during the application idle event. Two problems: on some machines when the user selects a menu command and the menu opens over the DirectX WinForm, the edges of the menu flicker with the render loop, it looks really bad. Second problem is that the users just leave my app running all day and the PC can get quite hot (I do throttle back when in the background).I want to get rid of the render loop, I only really need to render when they are drawing. In fact that was my original approach, but I have a problem with Vista, in that if the user causes the UAC prompt to be shown, when it closes my app is left with a black screen. I render in the paint event but Windows is not firing this after the UAC prompt, therefore the Form stays black, they need to do something that starts the render loop to refresh the view.So I really what to address the UAC prompt issue but am struggling to find a way to refresh the view after.If any one has any ideas I would be so gratefulThanksJulian
I suspect these problems are related to how you handle your rendering. Drawing in the paint event is generally a bad idea and could cause flicker and other undesirable render artifacts (Windows Forms will also try to paint, unless you tell it all drawing is to be handled in WM_PAINT, and even then this is not a great approach). Can you show us your render loop?The UAC issue might be related, or it might be because of a failure on your part to handle a lost device (I don't know if switching to the secure desktop causes the device to be lost, I've never actually tried it). ;Quote:Original post by jpetrieI suspect these problems are related to how you handle your rendering. Drawing in the paint event is generally a bad idea and could cause flicker and other undesirable render artifacts (Windows Forms will also try to paint, unless you tell it all drawing is to be handled in WM_PAINT, and even then this is not a great approach). Can you show us your render loop?The UAC issue might be related, or it might be because of a failure on your part to handle a lost device (I don't know if switching to the secure desktop causes the device to be lost, I've never actually tried it).jpetrie, I would love to know why painting in WM_PAINT or OnPaint is a bad thing. We are writing a similar program. Some of our painting is done in the viewport's OnPaint() method, which means our application only redraws the scene when the viewport is invalidated. Unfortunately, it does not work under Aero w/Vista - we actually disable Aero when our app begins (much like 3D Studio Max 2009).Talyrond, I don't have an answer for you but I wanted to suggest some changes that might help your rendering. We're using SlimDX and D3D9. We used to use the idle loop as well, but as you note, performance on the machine is effected even if the user is doing nothing. We changed our system to respond to OnPaint() requests in our Viewport control, which is setup to handle all drawing itself. Different actions can invalidate the viewport either immediately, or 'whenever you have time'. Furthermore, when we trap all the mouse commands for manipulation of the scene, we enter into a special operational mode - at the begining of OnMouseMove, for example, we clear a global dirty flag (in a singleton), and begin our mouse operations. If any of the operations decide they need to invalidate the viewport, they call the InvalidateViewport( bool redrawNow ) or InvalidateAllViewporets( bool redrawNow ). We cache the invalidation request instead of honouring it until the very end of OnMouseMove() - should the underlying logic have requested an immediate redraw, we simply call the viewport's Invalidate() and Update() method, which perform a synchronous redraw. If the underlying logic requested a simple invalidation, we just call Invalidate() and move on. We tie this into mouse move, button down, button up, wheel scroll, etc. The underlying code never knows if InvalidateViewport() is going to be queued or happen immediately, so its great.This has the benefit of letting the underlying logic request full immediate refreshes as many times as it wants without it having to know that they are being queued up. It also makes all the drawing respond to either true windows-notified dirty window drawing or invalidation during user interaction through mouse moves. I puzzled through this for quite awhile with a lot of iterations before this simple solution hit me.Now all I need to do is get it working with Aero.Best of luck,S. ; Thanks for the reply,I render by calling the invalidate method (from the app idle event) of my Direct3DControl that I have created.I inherit from UserControl and override the OnPaint Method: protected override void OnPaint(PaintEventArgs e) { if (!this.DesignMode && Device != null && !Device.Disposed) { Result result; if (this.DeviceIsLost) {Thread.Sleep(50);result = Device.TestCooperativeLevel();if (result == ResultCode.DeviceLost){ return;}if (result == ResultCode.DeviceNotReset){ result = ResetDevice(); if (result.IsFailure) { return; }}this.DeviceIsLost = false; } try {Device.SetRenderTarget(0, this.BackBuffer);Device.DepthStencilSurface = this.DepthStencilBuffer;Device.Clear(ClearFlags.ZBuffer, Color.White, 1.0f, 0);Device.BeginScene();base.OnPaint(e);Device.EndScene();result = this.SwapChain.Present(Present.None);if (result == ResultCode.DeviceLost){ this.DeviceIsLost = true;} } catch (Direct3D9Exception) {this.DeviceIsLost = true; } } else if (this.DesignMode && Device != null && !Device.Disposed) { Device.SetRenderTarget(0, this.BackBuffer); Device.DepthStencilSurface = this.DepthStencilBuffer; Device.Clear(ClearFlags.Target, Color.White, 1.0f, 0); this.SwapChain.Present(Present.None); } }So I hook the paint event and draw my object in the hooked method.Yes I can confirm that switching to the secure desktop does cause a lost device, but I have no problem resetting as far as I am aware. The device is only lost when the app becomes active though.I am also interested in the reason for not using the paint event. Your advice would be appreciated.I think I will take a look at the samples in the SDK, I am sure your approach is different.Sphet, thanks for the info, I will need to read your post a few times to get my head round it!CheersJulian; Rendering during paint is only bad idea because You're Not Supposed To(tm). You can certainly do it, but it's a broken methodology for games and even for non-game applications like what you guys seem to be working on, the hoops you need to jump through are annoying. Mostly though, you have to be a bit careful with what you do in the paint event and how you set up the control or you will allow Windows Forms to paint, which can cause flicker as its painting conflicts with the D3D rendering. Another problem, which may not be an issue for your type of app, is that WM_PAINT is low-priority and so will deferred in favor of other things like mouse motion or... well, pretty much any other event. This can cause stutter in your rendering, as the event is delayed, since Invalidate() just indirectly queues up a paint event.Is the cost of rendering continually, as you would in the canonical PeekMessage/ApplicationIdle loop used for D3D rendering in managed code, so high for your applications that you have a justification in all that additional code complexity? I've never worked on CAD software, so maybe it is, but.... The traditional approach is so much simpler (it sounds like you were originally using this half-way -- you had Invalidate() called from inside the idle handler... you shouldn't need to do that, you should just be able to render directly in there, let me know if you want an example of what I mean).Anyway.What's with the ~50ms sleep during the paint? That feels hackish.Are you setting the appropriate control styles on your control? You probably want UserPaint and AllPaintingInWmPaint.I don't know what you can do about the UAC issue though. Sort of by design, you don't get a lot of notice that the secure desktop switch happened. I guess you could get it indirectly via the device lost notification, but only if you are continually polling for device lost since SlimDX does not support events like MDX did (and for very good reasons). Once you got the device lost notification you could then Invalidate() at least once, which would cause a repaint. ;Quote:Original post by jpetrieRendering during paint is only bad idea because You're Not Supposed To(tm). You can certainly do it, but it's a broken methodology for games and even for non-game applications like what you guys seem to be working on, the hoops you need to jump through are annoying. Mostly though, you have to be a bit careful with what you do in the paint event and how you set up the control or you will allow Windows Forms to paint, which can cause flicker as its painting conflicts with the D3D rendering. Yes, you have to disable all the built-in form rendering, including overriding OnPaintBackground(). Make sure you set:// in constructorSetstyle(Controlstyles.AllPaintingInWmPaint, true);Setstyle(Controlstyles.UserPaint, true);/// override OnPaintBackgroundprotected override void OnPaintBackground(PaintEventArgs e){ // ... do nothing here to avoid flickering.}Quote:Original post by jpetrieAnother problem, which may not be an issue for your type of app, is that WM_PAINT is low-priority and so will deferred in favor of other things like mouse motion or... well, pretty much any other event. This can cause stutter in your rendering, as the event is delayed, since Invalidate() just indirectly queues up a paint event.Yes, this IS a problem, which is why we trap the invalidation code in our mouse handlers and force the refresh at the end of OnMouseDown, etc. It may seem like a hack, but I think it works quite cleanly.Quote:Original post by jpetrieIs the cost of rendering continually, as you would in the canonical PeekMessage/ApplicationIdle loop used for D3D rendering in managed code, so high for your applications that you have a justification in all that additional code complexity? I've never worked on CAD software, so maybe it is, but.... The traditional approach is so much simpler (it sounds like you were originally using this half-way -- you had Invalidate() called from inside the idle handler... you shouldn't need to do that, you should just be able to render directly in there, let me know if you want an example of what I mean).Our editor renders ~10.000.000 primitives when all the level art is visible. The artists tend to also have 3D Studio Max or Maya open, as well as our game running. If we run our editor in a fixed peek/app loop we cause the game to stutter and Max to run slowly. By respecting the paint notifications, our application takes 0% of the CPU when max is being used, or the game is being run.Quote:Original post by jpetrieAnyway.What's with the ~50ms sleep during the paint? That feels hackish.When the device is lost, you have to wait to restore it - but I think it should be a loop, not just a wait.Quote:Original post by jpetrieI don't know what you can do about the UAC issue though. Sort of by design, you don't get a lot of notice that the secure desktop switch happened. I guess you could get it indirectly via the device lost notification, but only if you are continually polling for device lost since SlimDX does not support events like MDX did (and for very good reasons). Once you got the device lost notification you could then Invalidate() at least once, which would cause a repaint.Also with you on that.S ; The reason I used the paint event is that before the UAC problem, I only rendered when necessary, so the paint event took care of updating the window when it was uncovered etc.So really you are suggesting to call the render method directly from the idle event? A small example just to clarify would be great. Of course I guess that I could have a problem with the smoothness of the animation when moving the mouse as the idle event will halt then.The 50ms sleep was from a Drunken Hyena example, the description was “Can't Reset yet, wait for a bit”.At the moment I set the control styles:this.Setstyle(Controlstyles.Opaque, true);The UAC prompt only causes the device lost when the app regains the focus, so that is too late, as after the prompt the app does not have the focus. The constant render loop does sort that out…Just had a quick look at the sample frame work and the paint event is hooked as well as rendering directly in the idle event, why is that?Must go, getting really tired now!Thanks for your helpJulian;Quote:When the device is lost, you have to wait to restore it - but I think it should be a loop, not just a wait.Quote:The 50ms sleep was from a Drunken Hyena example, the description was “Can't Reset yet, wait for a bit”.Hur, I'm dumb, I completely spaced on the guard for that sleep, nevermind.Quote:Our editor renders ~10.000.000 primitives when all the level art is visible. The artists tend to also have 3D Studio Max or Maya open, as well as our game running. If we run our editor in a fixed peek/app loop we cause the game to stutter and Max to run slowly. By respecting the paint notifications, our application takes 0% of the CPU when max is being used, or the game is being run.I suppose that's valid. I can't help but think there's still a way you could do this with the traditional loop, but it would probably be just as involved as what you're doing now, and really that's my primary aversion to hooking paint -- the extra code.Quote:Just had a quick look at the sample frame work and the paint event is hooked as well as rendering directly in the idle event, why is that?No idea, but it's not necessary. The framework should not be construed as a best-practices type thing -- it's getting completely rewritten right now, but even then, it's supposed to be a framework for quickly building samples that can clearly illustrate how to use SlimDX. That goal doesn't always align with doing things correctly for a production application, although in this case it's probably similar. Mike wrote the paint hooks, I'll ask him why he bothered.EDIT: Mike says this is only to handle the case when the regular render loop is paused and the window gets moved; this repaints and prevents artifacts.Quote:this.Setstyle(Controlstyles.Opaque, true);I would set the others, as described above. ; I'd like to point out that just because you're not running a render loop doesn't mean you can't wake up every so often on a timer trigger (50ms, 100ms, whatever makes you happy) and either update the view or just check that the device is still available for use. For added cleverness, you can reset the timer every time a render happens, so that you don't run it more than necessary. Just make sure to get the threading right. ; Thanks for all the advice guys.I tried rendering directly in the idle event and the menu’s still flicker.So I only render when I need to now, and introduced a time like Promit suggested to render periodically to ensure the UAC black screen is clearedCheersJulian
Seeking 3D artist and texture artist for futuristic racing game
Old Archive;Archive
Project name:Wind ChasersBrief description: The game is a 3D futuristic racing game. It's been in development for 3 weeks now, although we use codebase from older projects. The premise of the game is this: The world of the game is divided into 4 planets, and the environments match one of the 4 elements: Fire,water,earth,air. The player starts with a few money, and compete in various tournaments. In each round of the tournament, he gets to select amongst various racetracks he can sign up for. Some races will be pure driving, others will permit weapons(their nature will depend on which element is prevalent in the environment), and many times there will be traps, such as moving racetrack parts,closing walls/doors, very thin tunnels, flamethrowers,lightnings, and various such things. In the end of each race, the player will get a reward based on his position/achievements, which will help him to pay for repairing his vehicle, buying upgrades or weapons, or pay the fee to compete in more prestigious tournaments. The game will support racing against different AI opponents, split screen, or online multiplayer.Target aim: If the game turns out good(like we hope it will), we will try going shareware for a small price, and also try to promote it in various game portals like Steam or Direct2Drive.Compensation: Everyone who will provide some help for the game will be in the credits, no matter how long he spent on the team, and will get a fair split of any revenues this game will make. Technology:Target system: Windows XP/Vista/Windows 7Programming language: C#3D API: OpenGLSound API: OpenALPhysics Engine: Newton Game Dynamics(may consider switching to Havok)Artist tools: The artists can use various tools, like 3D studio,maya,blender,photoshop,gimp. Talent needed:a)We need a talented 3D artist, capable of producing quality 3D art, especially background props used in those kind of games, like futuristic buildings,bridges,tunnels,monitors. Being able to produce color,normal and specular maps along with the models will certainly big a very big plus. b)We also need a texture artist, capable of delivering high quality textures,mainly for a futuristic setting. He/she must also be able to produce specular and normal maps for these texture.We are aware that this is a small, start-up project and as such we don't demand that someone has decades of experience, but we are looking for people who will be talented, dedicated and can deliver quality work.Team structure:Currently in the team there is me(programmer), a musician/sound artist, a concept artist, and a 3D artist working on vehicles.Contacts:You can contact me by replying here, PM me or e-mail me at:mmitsop[at]yahoo.grPrevious Work by Team:Here are some videos of some previous projects of mine:">FPS Project">FPS Project">Fighter projectAdditional Info:Here is some screenshots of the game currently in progress:And a couple of videos:">Video 1">Video 2Feedback:Constructive.
Fantastic looking screens! ; Looking good so far, the idea reminds me of an old game called Zone Raiders. Best of luck with it! ; I love it, Sometimes I wish I wasn't a programmer but an artist. ; My name is Pete Marquardt. I'm a composer/sound designer who's looking for a solid project. You can find my wide-ranging portfolio at soundclick.com/otherworldaudio. If you like what you hear, send me an email at [email protected]. I noticed that you already have an audio specialist, but if you find yourselves looking for a musician or audio designer to supplement what you have, or provide another voice for your game, be sure to drop me a line.Regardless, I wish your team the best of fortune.Cheers!Pete MarquardtComposer/Sound Designersoundclick.com/[email protected] ; Pete, thanks for the interest, I sent you an e-mail.We got some people, but we still can use one 3D modeller and one concept artist. So if you think you have talent and want to join a team project, email me :) ; It looks pretty cool. It reminds me of F-Zero. It would be sweet if you added giant jumps in like they had in F-Zero and some kind of fuel management like most racing games have. ; I can't WAIT to see your new game, mikeman!Good luck with it! ; Bump: We are still looking for a good concept artist and 3D artist! ; For anyone interested, we are still looking for one good 3D modeller, that can also UV texture the models. We already have a wealth of textures(color+normal+speculars) that can be used.
Alternatives to Detours Professional
General and Gameplay Programming;Programming
Hi!I need to intercept GDI function to save painted screen to hard drive. I have tried Microsoft Detours. Everything is good, but I need 64-bit version (Detours Professional do support but it costs much). Is there any 64-bit alternatives to Detours Professional?
Easyhook.
Testers wanted
Old Archive;Archive
Team name:JVP-TeamProject name:Diamond RunnersBrief description:Starting day was 1.6.2009. Between 1.6.2009 - 18.6.2009 goal was to make atleast one playable level with few types of enemies. 19.6.2009 Game will be put online for testing. 16.7 project will be ready. Game is quite simple, you collect things (diamonds etc.) , avoid enemies and try to stay alive as long as possible.Target aim:Freeware, school project and for one competition.Compensation:No compensation.Technology:programming language: XNA artist tools: Gimp etc.sound tools: Cool Editweb pages: Expression web 2.0 and photoshopTalent needed:At the moment we need testers, as much as possible, so we could improve the game. More information on webpages or you can ask for it.Team structure:Ville: Programming gameTimo and Mika: GraphicsKimmo: SoundTiina (me): Web pages Website:Project webpagesContacts:My email [email protected] or forums or irc channel (more information on web pages) Previous Work by Team:None with this assembly. Additional Info:On webpages we have a small music player , you can listen music used in game freely. Game is available in Download section. Some art will be added in the future also. Because team is finnish and this is also a school project, many things on webpages are in finnish, if you want to know something, please ask. You can also use our irc channel to ask information or give comments.Feedback:You can give feedback about everything,game, webpages, music, art... if something is good or bad and needs improvement.
PhysX - what does "cooking" mean?
General and Gameplay Programming;Programming
What does it mean to "cook" a mesh in PhysX? I'm trying to understand the physx samples but I can't seem to find any explanation on what this term means.Also, I'm wondering about collision groups. Is the user supposed to use these for spatial division to optimize performance, or are they just intended for collision logic, e.g. filter what can collide with what?
a) "Cooking" is a simple term for preprocessing your collision meshes. PhysX needs to convert your triangle data into its own structures, computing helper data along the way. This is necessary to allow collision tests against it, but you can write the resulting data to a file and load it pre-cooked in future runs.b) To my knowledge, collision groups are for contact reports and filtering. That means that you can filter which sets of entities should collide with each other, and you can define on which of those groups you want to be notified when they collide.Bye, Thomas ;Quote:Original post by all_names_takenWhat does it mean to "cook" a mesh in PhysX? I'm trying to understand the physx samples but I can't seem to find any explanation on what this term means.It's metaphorical. They expect people to just figure it out on that basis. :)To "cook" (or "bake"; another commonly used metaphor) a meal is to take raw ingredients and prepare something out of them that is more digestible and palatable to its ultimate consumer. Thus, to "cook" mesh data is... well, the same thing. :) ; pre-process mesh data in a manner that is more adequate for the collision detection / spatial partitioning and consequently improve runtime performance.
Correct game C++ OOP impl. in main?
General and Gameplay Programming;Programming
Should it look something like this?:int SDL_main(int argc, char *argv[]){SDL_Init(SDL_INIT_EVERYTHING);// Create the game instance:game = new Game("Klingis - The Game","",640,480,0,0,0);// Run the game instance:int exitCode = game->run();// Delete the game instance:delete game;// Return the exit code:return exitCode;}Or even better/shorter:?int SDL_main(int argc, char *argv[]){SDL_Init(SDL_INIT_EVERYTHING);// Create the local game instance:static Game game("Klingis - The Game","",640,480,0,0,0);return game.run();}No need to supply the Game class code, it should be pretty self-explainary.
It really doesn't matter. ;Quote:Original post by SneftelIt really doesn't matter.But are these a good manner? I think it's very a good way especially the latter. What do you think? ; I think what he means is, it doesn't matter.But if you absolutely must choose, either put it on the stack or if on the heap, use a smart pointer to make your Game object exception safe. Back to the original point though. ;Quote:Original post by programeringQuote:Original post by SneftelIt really doesn't matter.But are these a good manner? I think it's very a good way especially the latter. What do you think?It really doesn't matter. What you have shown there is 0.01% of a complete game. And it's not an important 0.01%. Right now, you are spending more than 0.01% of your time worrying about it, and you should stop doing that. ; Do simple things.That means you just declare local variables when you can, and dynamically allocate instances of stuff when you have to. And in fact, you don't even have to give everything a name (i.e. assign it to a variable; you can just use temporaries instead in many cases).But do also be prepared for things to go wrong. RAII is a good way to do this.class SDLIniter { SDLIniter() { SDL_Init(SDL_INIT_EVERYTHING); } ~SDLIniter() { /* whatever is necessary to clean up after SDL */ }};int SDL_main(int argc, char *argv[]) { SDL_Initer initer; try { Game("Klingis - The Game","",640,480,0,0,0).run(); } catch (std::exception& e) { std::cout << e.what() << std::endl; return -1; } // implicit return 0 // and automatic SDL cleanup, whether the exception is thrown or not.}; Shorter isn't always better. It's nice at first to make your main function and game loop look pretty basic but unless you're doing all the error checking under the hood -- problems are bound to happen. ; SDL_Init can fail, too. ; Everyone who posted in this thread needs to read about the bike shed. ;Quote:Everyone who posted in this thread needs to read about the bike shed.Nice. I hear like 10 hallway discussions a day at work with this written all over it.
What's up with luaopen_io() not working?
For Beginners
I am trying to get LUA working and i've used the debugger to find out that when i call the line luaopen_io(LuaVM); the program quits with a 0x1 code (instead of 0x0) just after the call. If i comment out the line, the program exits normally except luaL_loadstring() does nothing, even when i put in a string of LUA commands "a = 1 + 1;\nprint( \"1 + 1: \" .. a);\n"Can anyone tell me how to fix this luaopen_io() function.btw: i used this line beforehand to get a value into LuaVM.lua_State* luaVM = lua_open();I am using LUA 5.1 and Microsoft Visual CPP 2008 Express Edition. I put the libraries and headers from LUA into MVCPPEE's library folder and include folder respectively and added them to the linker. But that's not really the problem (i think) because the other luaopen_XXX() functions work fine enough.THX for any useful help!
Lua FAQQuote:My application used to work, but I updated it to Lua 5.1 and it now crashes during initialization (OR: Why do I get a "no calling environment" error?)The state initialization procedure changed between Lua 5.0 and Lua 5.1. It is now necessary to lua_call the various luaopen_* functions. Previously, these were simply called with a normal C call, but doing so now will cause a crash (or the above mentioned error) during the initialization of the io library. The easiest way to initialize a lua_State is to use luaL_openlibs() which is defined in the file linit.c, or to copy the code from that file, modifying the list of libraries to initialize according to your needs.
[solved] output gets "corrupted" when window size changes
Graphics and GPU Programming;Programming
Edit: Please see my second post, the problem described here is already solvedSo... I have this app using multiple target windows to render into using D3D9.Of course, I ran into the usual "how to handle resizing windows" problem and found a post saying that I could just create a back buffer with the desktop's size and use viewports afterwards. Since this meant I got around doing a device reset each and every time a window gets resized, I went that route.But, I am confused:My calls to Clear and Present were changed accordingly and work fine. I tested this by clearing only half of the target windows but presenting the full rectangle, resulting in half the windows being the color I cleared to and the other half getting that nice D3D debug flicker. So, I expect that area to be covered and I'm rather certain that that stuff is set up correctly, i.e. I'm not just presenting areas of the backbuffer that don't contain anything.Additionally, my test scene is definitely okay. Before changing to using viewports it rendered fine, which means that the vertex and index buffers were okay, the camera returned correct view and projection matrices etc... I assume this is the same now, as I haven't changed a thing in that regard.The problem now is: I don't see a thing anymore. The D3D debug runtimes don't give any errors and the only warnings I get are redundant render states, so nothing to worry about for now.Do I have to take the D3DVIEWPORT9 into account for the view and projection transform I use in my shaders in any way? I looked in D3D docs and found no further information about the usage of viewports...[Edited by - matches81 on June 19, 2009 8:34:52 AM]
Once again, a stupid oversight ruins the day.I forgot to change the depth stencil buffer's size accordingly. My initial problem is solved, I guess, so I'm renaming the thread, too.However, I have a new problem.At startup, I'm back to getting the results I want, i.e. something like this:http://s2.imgimg.de/uploads/Good4efea5f5jpg.jpgBut, as soon as I resize the window, this happens:http://s2.imgimg.de/uploads/Bad19524750jpg.jpgSorry, I seem unable to get any kind of image posted :(Anyway:This is the exact same problem I had with my previous implementation that created a backbuffer with the size of the client window. It seems that some portions of the window are just not updated. The portions that aren't updated change when changing the window's size and remain constant between size changes.Any clues?Edit: Again, stupid oversight. I set the Z-value to clear to in the Clear call, but forgot to add the D3DCLEAR_ZBUFFER flag... Feel free to delete this thread entirely, as it just comes down to being blind due to hours of programming.[Edited by - matches81 on June 19, 2009 8:13:38 AM]
Skinning Problem
General and Gameplay Programming;Programming
hi All,I have loaded the Skinning information from a Collada file. i am doing the proper transformation etc, and when my skin is bound to the skeleton. its like 3 times bigger then the skeleton. what could be the possible cause? i am also normalizing the weights. if i draw the Model in bind pose its the same like the skeleton.. the same size. but when i bind it to the skeleton. it gets bigger... also when i apply animations to the skeleton the skeleton also gets bigger... any ideas..The following is the skinning calculations that i am doing/*The skinning calculation for each vertex v in a bind shape isfor i to n v += {[(v * BSM) * IBMi * JMi] * JW}• n: The number of joints that influence vertex v• BSM: Bind-shape matrix• IBMi: Inverse bind-pose matrix of joint i• JMi: Transformation matrix of joint i• JW: Weight of the influence of joint i on vertex v*/Although the question looks really vague but hopefully there is something common that i am doing wrong here..Thanks in advance for any replies..
Ok i have found the cause... I was adding the Non-Transformed Vertex with the Transformed-Skinned vertex..But my Skeleton problem still exists...When i apply the keyframe data to the skin it gets bigger.. although it animates properly..
Float to Float4, Float4 to Float Problems
Graphics and GPU Programming;Programming
Hi allIm testing this code i found in this forum to encode some floats to a single float value and viceversa. float4 FloatToFloat4( float rawValue ){float4 packFactors = float4( 256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0);float4 bitMask = float4(1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0);float4 packedValue = float4(frac(packFactors*rawValue));packedValue -= packedValue.xxyz * bitMask;return packedValue;}float Float4ToFloat(float4 encodedValue){float4 unpackFactors = float4( 1.0 / (256.0 * 256.0 * 256.0), 1.0 / (256.0 * 256.0), 1.0 / 256.0, 1.0 );return dot(encodedValue,unpackFactors);}I tryed to encode float4(150.0f,100.0f,50.0f,25.0f) and the results when i try to decode the single float is float4(0.0f,159.0f,100.0f,204.0f)Ofcourse something wrong is happening, but i dont know what, even this, i dont know if i can use this code to encode float4 -> float -> float4. Im trying to pack values from material specular (power, exponent, fresnel_min, fresnel_max) to a 32bits float value, and then unpack it again on a post process.Knows you a better way to achive this ? or i need to pass each value on a color channel in a Render Target ?Thanks for your time and help :)LLORENS
Your trying to pack 128bits of data into 32bits...Looking at it, it seems this is will pack 4 8bit normalized floats.Try numbers like 1.0 0.75 0.5 0.25.You'll still get some errors cause a float only has 24bits of precission. ; Hi Ibasa, and thx for your answer.I tested float4(1.0f,0.75f,0.5f,0.25f) and the result is float4(0.0f,191.0f,128.0f,191.0f);It's strange, but i cant get it working, i dont know if precision is making these to fail or what...Any ideas? Or any other methodology to pack some float values in a 32bits Render Target channel ?Thx in advance :)LLORENS
Please delete
Old Archive;Archive
delete[Edited by - HondaDarrell on June 18, 2009 5:24:31 PM]
Please use the template, found in the stickies section. Thanks!Nathan ; Duplicate post.
[C#] I'm looking for a more efficient way of removing items from a list
General and Gameplay Programming;Programming
Hi guys,Currently I have a list of stored Quads that must have their Index_ properties changed when an Quad is removed from 2 other Dictionaries (Vertex & Index).The problem is while this method works, it is far from efficient as it has to iterate through the same list containing all Quads each time a Quad is removed: public void RemoveQuad(IQuad quad) { int iI = quad.Index_Indices; int iV = quad.Index_Vertices; this.vertices_Dictionary[this.effect_Type].RemoveRange(quad.Index_Vertices, GameConstants.QUAD_NUMBER_OF_VERTICES); this.indices_Dictionary[this.effect_Type].RemoveRange(quad.Index_Indices, GameConstants.QUAD_NUMBER_OF_INDICES); // Because a Quad has been removed foreach (IQuad quad_Stored in quad_List) { if (quad_Stored.Index_Vertices > iV) {quad_Stored.Index_Vertices -= GameConstants.QUAD_NUMBER_OF_VERTICES;quad_Stored.Index_Indices = (quad_Stored.Index_Vertices / GameConstants.QUAD_NUMBER_OF_VERTICES) * 6; } }...As you can see when removing the current Quad (based on the current Quad's Index_Vertices & Index_Indices properties) from the two Dictionaries the remaining Quads must have their Index_ properties updated so they point to the right place in the Dictionaries.The problem is that the foreach iteration is being called every time a Quad is removed, this is far from ideal.How could I go about only having to reorganize all the Quad.Index_Vertices/Indices once after all Quads have been removed. I can't figure out a good way since the Quads would not be deleted in any particular order.Thank you.
Navigation mesh
Artificial Intelligence;Programming
Hi there, I'm making a relatively simple point and click adventure game, and could do with some help to get my navigation grid working well. To show an example of what is the problem, the example below shows a simple grid, and how my program plots the route (not sure how to make image URLs work on this).http://img221.imageshack.us/img221/1022/path.gifhttp://img196.imageshack.us/img196/4117/pathactual.gifThe way it works is that the game knows A connects to B, and B connects to C. Its a simple node-graph, and the first stage of path finding is to plot the node path needed to reach the point. For example, the start point is on A, the end on C. Through a crude depth first search, it would know that the shortest route is A-B-C. From that, the actual coordinates are worked out.So, waypoint A is the nearest point on the line between A and B. From there, the nearest point on line B-C, and finally the endpoint itself. Whilst this approach does work, its not ideal, and can end up with some very daff routes coming out. The ideal approach would get this route:http://img268.imageshack.us/img268/7122/pathideal.gifCan anyone point me to an algorithm of sorts to plot a better route? Or alternatively, is there an efficient way of determining if a line remains within the mesh (i.e. a function that would return false for a line between the first and last point, but true for the second and last point).
It sounds like you already know that there are more direct ways than a depth-first search to find the shortest path to the goal node, so I won't elaborate on that.As for smoothing the path, there are a few options. One approach uses line-of-sight tests (this seems to be what you have in mind), which will often give decent (although not always optimal) results. How best to perform the line-of-sight tests depends on a few different factors, such as the size of the grid, and whether grid cells are always fully blocked or unblocked. (An approach that's quite efficient is 2DDDA. If your grid is relatively small though, you might be able to get away with multiple segment-box tests, perhaps accelerated by broad-phase culling.)The most accurate path-smoothing algorithm that I'm aware of is the 'funnel' or 'string-pulling' algorithm. It's a bit tricky to implement (especially if you want to take the radius of the agent into account), but will always return the optimal path from one point to another. ; Thanks for the reply, I'll have a look at the algorithms you suggested, although I will point out that I'm not using a true grid, but a mesh of polygons - apologies as this definitely wasn't clear from the diagrams.That said, I think your suggestions will be useful, thank you :) ;Quote:Thanks for the reply, I'll have a look at the algorithms you suggested, although I will point out that I'm not using a true grid, but a mesh of polygons - apologies as this definitely wasn't clear from the diagrams.Yes, what I posted earlier applies to navigation meshes as well, for the most part (except for the part about 2DDDA and segment-box tests).I just finished implementing a navigation mesh-based pathfinding system with path smoothing, so if you need any more information or get stuck on anything, feel free to post back and I'll try to help further if I can.
Multi-pass Multitexturing and Shadow Maps
Graphics and GPU Programming;Programming
#1:When you run out of texture units you just make another pass with the remaining texture units in slots 0 up.In order to get the fragment that resulted from the previous pass you have to change the blending modes.But shadow-mapping requires blending modes to be set a certain way.Will this not interfere with your shadow-maps?#2:The fragment from the first pass may be altered before the second pass begins, for example by having transparent objects on top of it (can be fixed by drawing transparent objects in a completely separate set of passes, which needs to be done with shadow-mapping anyway) or via fog.What is the solution, particularly with fog, which has no solution?L. Spiro
You could reserve a place for the shadowMap and just make sure you never override it so it can be applied in pass 2,3...n again:<PASS1> color.rgb = (tex1 + tex2 + tex3) * tex4(shadowMap)Enable Additive Blending, apply 3 other textures for unit1,2,3.<PASS2> color.rgb = (tex1 + tex2 + tex3) * tex4(shadowMap)..and so onIf the textures need to multiplied with each other it gets a little bit more difficult. But you can still apply the shadowMap afterwards though:<PASS1> color.rgb = (tex1 * tex2 * tex3);Enable Multiply Blending, apply 3 other textures for unit1,2,3.<PASS2> color.rgb = (tex1 * tex2 * tex3);..and so onFinally multiply the whole thing with the shadowMap, also with Multiply Blending enabled: color.rgb = tex4(shadowMap)It's an extra pass, but you can use more textures for each pass now, and the individual shaders are simpler/faster. I would take a look into Deferred Rendering for this kind of stuff. That will also bring your second issue. Transparency is a headache. But do transparent objects always need many lights/texture? Glass, fences, grass, foliage... As transparent stuff is already pretty expensive on itself, it might be wise to force everything into 1 pass when it comes to transparent stuff. First render all opaque stuff with as many passes and tricks you like, then add the transparent surfaces on top with somewhat simpler shaders.Greetings,Rick; By the way I am not using shaders.Using my existing setup as an example:I have 4 slots [0..3]. Shadow map goes into slot 3 always.#1: The render-queue overrides prevent the objects from being able to put texture into a slot filled with a shadow-map. Thus the objects need to know how many slots are available to them and they can break their render data into multiple passes if they have not enough.#2: When all of the objects have submitted their render data to the render queue, the max texture unit used is tracked and if (for example) only slots 0 and 1 are used by objects, slot 2 can be filled with another shadow map if there are any.#3: But when the objects need more texture units than are available, they have to submit 2 (or more) sets of render data.Here are the problems I plan to counter and the questions I have from your post:#1: Quote:If the textures need to multiplied with each other it gets a little bit more difficult. But you can still apply the shadowMap afterwards though:This requires multiple render targets?I really want to avoid deferred shading if possible; I prefer anti-aliasing.#2: When the render queue sees a set of render states that have been split among several passes, it can disable fog for all but the last pass. That should handle fog correctly yes?#3: I currently make the render-queue system handle multiple passes by finishing the current pass entirely and then going back to handle any remaining render states (for as many iterations as needed).These techniques seem easier to implement if I were to get to an item in the render queue and handle all of its passes at once before moving on.Both methods would require only one alternative render target, but finishing the whole pass may improve speed since the object may later get overwritten by another (though unlikely since my opaque objects are sorted near-to-far) which would avoid calculations during the following passes.Are there any other reasons for going one way or the other that I have not considered?#4: As for my original question, what I meant was this:Testing the alpha on the shadow-map texture requires these alpha settings:CFnd::SetAlphaTest( true );CFnd::SetAlphaFunc( LSG_AC_GEQUAL, static_cast<LSGREAL>(0.9) );Making a second pass (with or without deferred shading) requires these alpha settings:CFnd::SetAlphaTest( true );CFnd::SetBlendFunc( LSG_BM_ZERO, LSG_BM_SRC_COLOR );Won’t the blend function mess up any texture units other than the first, including the shadow-map texture?L. Spiro ; No Multiple Render Targets or Deferred rendering required. Just do what you are already doing, except that you make all 4 slots available and put the shadowMap in a final pass. 1. disable blending2. render object X with texture 1,2,3,43. activate multiply-blending4. render object X again with texture 5,6,7,8...until all textures are done...5. render object X again only with the shadowMap applied, and eventually fogIt's the same as multiplying many textures into 1 big shader. You can insert the fog in one of the passes as well (I would use the shadow pass).As for the sorting, you don't have to sort opaque objecst at all. I would just render them completely first. You can sort on textures though. Don't forget that switching the texture units alot is also an impact on your performance. If you want to sort on texture(set), you must first render all objects with pass1, then all objects with pass2, and so on.It's nice to have your alpha objects sorted on depth. Apply transparency and render them on top of the opaque result (which is 100% finished by that time). If you plan to use many transparent objects (Grass quads for example), its still wise to sort on material here as well. Or make a few groups (grass, glass, objects, foliage, static mesh...) and sort inside these groups on depth. It might deliver artifacts, but you gain speed. On the other hand if you don't use objects with the same texture lots of times, sorting on material is probably a waste.Alpha problems... Not sure what the functions do. Does it completely hide pixels if their alpha value is lower than 0.9 (black/white)? Or do fade in/out from 100% to 0% transparency? In the first case it's pretty simple. Blend function don't mess up textures, they just tell how to draw the upcoming pixels onto the previous('background') ones. Just do the same trick again as first. Transparent pixels won't alter the background, because their alpha value is 0. However, that only works if the alpha values are the same on all textures. For example, if you render a metal fence with 1 texture, the background pixels between the wires won't get touched as your fence texture should have alpha 0 pixels there. But if you use a shadowMap in the second pass, it should have exactly the same alpha values, otherwise it also darkens the background pixels, and the fog will multiply itself again with background pixels that already had fog.Like I said, transparency is tricky stuff. First try if you can render them just in 1 pass, always (thus maximum 3 textures). If that is really not possible, make sure to pass 1 of the textures that has the alpha info together with the shadowMap so you can mask the shadowMap... Although that only works with shaders. Fixed pipeline multitexturing won't do that for you I guess. I don't know if shaders are an option in your case, otherwise I would really try to use them. They make life a whole lot easier when it comes to this kind of stuff :)BTW, have you considered atlas textures? Instead of switching between textures alot, you put a large set of textures into 1 big texture and adjust the texture coordinates to pick it out. It doesn't work for tiles surfaces though. In that case you need 3D textures or texture array's, but probably you can't use them without shaders... (maybe 3D textures though)... The atlas texture doesn't reduce texture slots in your case, but it can speed up the whole thing since you only need 1 (or a few) textures = far less switching. With shaders you can even tell to pick all textures from the same slot so you only need 1 slot for a whole bunch of textures.Rick ; Thank you for all of your feedback.I sort on depth with opaque objects to improve early-out on the Z buffer. Drawing the near objects first fills the screen with objects that block other objects and this saves me about 10 FPS (out of 200 at the time). I sort on a per-object basis with a fast depth calculator so it is really worth the gain. Alpha object are sorted at a finer (per-sub-object) grain.As for texture-coordinate sorting, I sort by no texture, then 1 texture, then 2, etc. I may in the future advance this to actually take the current texture status and put matches up at the front of the queue, so the last texture + slots drawn on the previous frame would be the first drawn on the next frame, which would normally swap the object order every other frame. Unfortunately I will probably not get around to it because drawing the alpha last almost always leaves it in a state where the last texture used in the previous pass is not used on opaque objects at all.I don’t know about this new plan.I think I need the shadow texture in on every pass actually, after having thought about it a lot.I originally thought that would screw up the result, but actually consider this:If I draw passes 0-3 without a separate render target (which I think I can not use in FFP OpenGL anyway) the result will be written to the frame buffer already before the shadow occlusion test. This is fine on the ambient pass, which draws dim lighting and does no shadow-occlusion tests. But on the next render phase I draw everything again using alpha compare (taken from the shadow texture) to avoid blitting fragments in shadowed areas. Without the shadowed occlusion test, shadowed areas would be re-rendered with everything done on pass 1 (instead of remaining dark).It seems intensive, but I think I need to do the shadow test on every pass.The first pass will occlude the fragments, leaving the frame buffer dark and unmodified there. Next pass will pick up that dark pixel and continue working on it (which is when I originally assumed the final result would be wrong) but actually that fragment will just be occluded by the shadow-map again, and again the frame buffer remains unscathed. Only at the edges of the shadows will there be slight problem areas, but it seems a small price to pay for the gained flexibility.Feedback is still welcome. I would especially like to have verification for this idea, as I may easily have overlooked something. I am juggling other tasks on this engine so my thoughts on how to do this particular part are always interrupted and incomplete.L. Spiro ; What kind of shadowMapping are you using? Rendering from a light point of view and applying a depth map on the objects/world?If you include the shadow in each pass, be carefull not too multiply shadow with shadow multiple times. The more passes you get, the darker the result will be. Unless its a pure black/white shadow, in that case it doesn't matter if its used 1 or more times. By the way, the approach above doesn't use multiple render targets, just the default framebuffer. Each pass multiplies itself with the previous result(background pixels).Greetz
[web] Browser based mmo tutorial
General and Gameplay Programming;Programming
I have a MMO tutorial series I am making that shows how to create a web browser game using PHP and MYSQL. Its a simple online battle game but should get beginners started off in the right direction. The videos completed so far are located here. http://indie-resource.com/forums/viewforum.php?f=27You do not have to be a member to watch the videos. Its just easier for me to post them all in one forums than have them spread out. I usually post about 2 vids a week. Thanks
Looks interesting. Thanks for sharing this with people. ; Nice one :)
Finding games, must be wrong - Virtual PC
Networking and Multiplayer;Programming
Hey there,my network engine has the capability to look for other servers. It worked - I thought. But when I create a server and trying to find it with a client under Virtual PC - it doesnt find it. But other games can find each other.I'll write how it works:when a client wants to find a host, sends an UPD packetUPDSocket:= socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP);SNDBUF:=0;TCPNODELAY:=1;BROADCAST:=1;setsockopt(UPDsocket,SOL_SOCKET,SO_SNDBUF,PChar(@SNDBUF),sizeof(SNDBUF));setsockopt(UPDsocket,SOL_SOCKET,TCP_NODELAY,PChar(@TCPNODELAY),sizeof(TCPNODELAY))setsockopt(UPDsocket,SOL_SOCKET,SO_BROADCAST,PChar(@BROADCAST),sizeof(BROADCAST))hostaddr.sin_family:=AF_INET;hostaddr.sin_port :=htons(45555);hostaddr.sin_addr.s_addr:=inet_addr(PChar('255.255.255.255'));.... adding more plus identification string to "buffer" ....//ask all maschines sendto (UPDsocket,buffer.Memory^,buffer.Size, 0,@hostaddr,sizeof(hostaddr));and then it starts a thread to watch the incoming packets: sniffer:= socket(AF_INET, SOCK_RAW, IPPROTO_UDP); FillChar (Dest, SizeOf(Dest), 0); dest.sin_addr.S_un_b.s_b1:= my; dest.sin_addr.S_un_b.s_b2:= ip dest.sin_addr.S_un_b.s_b3:= add dest.sin_addr.S_un_b.s_b4:= res; dest.sin_family:= AF_INET; dest.sin_port := 0; bind(sniffer, @dest,sizeof(dest)) j:= 1; WSAIoctl(sniffer, IOC_IN or IOC_VENDOR or 1, @j,4, nil, 0, LPDWORD(@_in),nil, nil)the thread itself: while not Terminated do begin mangobyte:= recvfrom (sniffer,p^,SNIFFERPUFFERSIZE,0,From,FromLen); //Eat as much as u can if (mangobyte > 0) then begin M.Write (p^, mangobyte); M.Position:= 28; // now comes the packed data end; end;but it doesnt seems to get any data.The server also creates a thread like that and watching the incoming UDP packets, so it can answer for this enumerating request.But when the server and client connect directly, by IP - they works perfectly.
You're not checking errors. TCP_NODELAY is an illegal option for a UDP socket. While probably not your current problem, it's a bad habit to not check errors.It may be that Virtual PC does not support the proper broadcast mode for the network interface. Or it may be that Virtual PC sets up a networking mode that doesn't forward broadcasts (such as virtual NAT). Given that it works for "real" machines, I would look at VirtualPC configuration problems.; Or try it on a decent VM like VMWare or VirtualBox (my personal favorite) ;Quote:Original post by AAAOr try it on a decent VM like VMWare or VirtualBox (my personal favorite)Yeah I haven't used VirtualPC since discovering VirtualBox!VirtualBox seems to have less problems across the wide variety of Os's I use it with including Windows LOL.Latest versions even have preliminary Opengl 3D support.; Just throwing this out here.... But, you do have network connectivity between your local PC and Virtual PC (and on the same subnet) I take it?
problem changing windowed/fullscreen mode, setting window style
General and Gameplay Programming;Programming
Hi,I'm developing a 2d game engine with directx and cpp language. By pressing the F2 key the player can switch between fullscreen and windowed mode. I correctly use the TestCooperativeLevel and device Reset, releasing and reacquiring all textures but i have a problem when i change the window style:The code, after device reset and objects reallocation is as follow:if(this-&gt;full_screen_mode){ ::SetWindowLongPtr(this-&gt;hWnd, GWL_EXstyle, 0); ::SetWindowLongPtr(this-&gt;hWnd, GWL_style, WS_EX_TOPMOST | WS_VISIBLE | WS_POPUP);}else{ ::SetWindowLongPtr(this-&gt;hWnd, GWL_EXstyle, 256); ::SetWindowLongPtr(this-&gt;hWnd, GWL_style, WS_OVERLAPPEDWINDOW);}::SetWindowPos(this-&gt;hWnd, NULL, CW_USEDEFAULT, CW_USEDEFAULT, this-&gt;Get_screen_width(),this-&gt;Get_screen_height(), SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED | SWP_SHOWWINDOW);Starting in windowed mode i send to a text file the GWL_style and GWL_EXstyle by using getWindowLong, the value of GWL_EXstyle is 256. After switching to full screen mode i find the correct value for GWL_style but the value 8 for GWL_EXstyle in place of 0. Then, switching to windowed mode again i find the GWL_style with the correct value but the GWL_EXstyle with value 264 (=256 + 8 (00001000 binary coded)) in place of 256. Why are my settings ignored by windows? A collateral effect is that the fps in windowed mode drops from 60fps to 34fps and my window remains always on top and if i press ALT-TAB my window loose focus but the other windows remains behind itThank you for your help[Edited by - fabry on June 16, 2009 9:27:53 AM]
Topic has been reposted in DirectX and XNA forum.
Calling all New Zealand Java/J2ME developers!
Your Announcements;Community
If you're an up-and-coming J2ME developer (or a Java developer interested in J2ME) and the opportunity to work on mobile game projects that have a good possibility of landing on an international distribution platform appeals to you, please hit us up through the About page on our website at pixelati.com.What we're offering:- an opportunity - not a guarantee of distribution but a greater possibility of it than if you go it alone.- autonomy - if you've got the greatest game idea in the world, we'd love to see you create it! We're offering the possibility of distributing/presenting it, not forcing you to work on something we've created. However, if you prefer the luxury of not having to worry about story/idea, gameplay and art assets, we can help there too : ).- support, help, art, ideas - we (and our partners) would support and help you as best we can. Good art goes a long way to selling an idea - we may be able to help by providing art (from accomplished industry talent) if we like your idea or providing an idea, along with the art (and even a prototype in some cases) for you to develop.Caveats:- you need to be in it for the love : ). Generally speaking, you can't make a lot of money out of mobile games; what this opportunity could provide you is a chance to at least work on something that could have a little bit more profile than you'll get developing on your own. Hence, we're looking for keen developers who are hungry for an opportunity to get their art out to a larger audience.- the possibility of getting onto a good distribution platform is still dependent on the quality of the end product; the opportunity is there but it's up to you to take it, by putting your best foot forward and creating something that deserves to be out there : ).Please contact us if this opportunity interests you - we'd love to meet (in person or via Skype) and discuss where you're at and provide more information from our end. Looking forward to hearing from you! : )(Contact us via the mail on our About page at www.pixelati.com)[Edited by - damiencaine on June 19, 2009 5:49:48 PM]
really need help compiling
For Beginners
I've got some problem with my headers linking together properly and compiling in the correct order. My compiler keeps informing me that classes are undeclared, and it essentially creates an error every time I attempt to use an object of the class.I'm just going to attach the program, hopefully someone will be generous enough to help me figure out what's going wrong. There really aren't too many lines... it's just separated into a bunch of different files.The main problem is that the program is considering both the Ball and Point classes undeclared... so every time I use or create a Ball or Point type, I receive an error.I excluded main because it's sort of irrelevant until I get all these classes sorted out.Thank you very much if you're willing to take the time to help me.The order of files goes as follows:Point.hPoint.cppBall.hBall.cppVelocity.hVelocity.cppPlayerBall.hPlayerBall.cppConstants.h[source lang=cpp]//Point.h//#pragma once#include <vector>#include "PlayerBall.h"class Ball; //placed in the Point.h file here to account for cyclical dependency//No definition included////Point.h//class Point { public: Point (int x =0, int y = 0); ~Point (); //accessor methods inline int Distance (Ball Ball_1, Ball Ball_2); //player Ball and other Ball can collide and two other Balls can collide inline int Distance (Ball Ball_1, PlayerBall Ball_2); void SetX ( int x ) { itsX = x; } void SetY ( int y ) { itsY = y; } int GetX() const { return itsX; } int GetY() const { return itsY; } private: int itsX; int itsY;};//Point.cpp//#include "Point.h"#include "Ball.h" //cyclical dependency accounted for#include "PlayerBall.h"#include <vector>#include <math.h>Point::Point (int x, int y) //deault x and y set to 0{itsX = x;itsY = y;}Point::~Point(void){}//use the pythagorean theorum to determine the distance between two points.//used to determine whether or not two Balls have collidedinline int Point::Distance (Ball Ball_1, Ball Ball_2){ return sqrt( ((Ball_2.itsPosition.GetX() - Ball_1.itsPosition.GetX()) * (Ball_2.itsPosition.GetX() - Ball_1.itsPosition.GetX())) + ((Ball_2.itsPosition.GetY() - Ball_1.itsPosition.GetY()) * (Ball_2.itsPosition.GetY() - Ball_1.itsPosition.GetY())) );}inline int Point::Distance(Ball Ball_1, PlayerBall Ball_2) //the class is PlayerBall{return sqrt( ((Ball_2.itsPosition.GetX() - Ball_1.itsPosition.GetX()) * (Ball_2.itsPosition.GetX() - Ball_1.itsPosition.GetX())) + ((Ball_2.itsPosition.GetY() - Ball_1.itsPosition.GetY()) * (Ball_2.itsPosition.GetY() - Ball_1.itsPosition.GetY())) );}//Ball.h//#pragma once#include "Point.h" //because Ball is a composition#include "Velocity.h"#include <vector>class Point;class Ball { public: Ball(int, int); ~Ball(); void WallCollision (); void ApplyForce (); //accessor methods void SetExistence (bool truth) { itsExistence = truth; } int GetExistence () const { return itsExistence; } private: Point itsPosition; Velocity itsVelocity; bool itsExistence;};//Ball.cpp//#include <vector>#include "Ball.h"#include "point.h"#include "Constants.h"void Ball::WallCollision() //tests to see if a ball crashes into a wall and changes velocity if true{if (itsPosition.GetX + 5 == RIGHT ) { itsVelocity.SetX ( - itsPosition.GetX ); }if (itsPosition.GetX - 5 == LEFT ) { itsVelocity.SetX ( - itsPosition.GetX ); }if (itsPosition.GetY + 5 == TOP ) { itsVelocity.SetY ( - itsPosition.GetY ); }if (itsPosition.GetY - 5 == BOTTOM) { itsVelocity.SetY ( - itsPosition.GetY ); }}Ball::Ball (int x, int y){itsPosition.SetX ( x ); itsPosition.SetY ( y );}Ball::~Ball(){}//Velcoity.h//#pragma onceclass Velocity{public:Velocity(int x = 0, int y = 0);~Velocity(); //accessor methods void SetX ( int x ) { itsX = x; } void SetY ( int y ) { itsY = y; } int GetX() const { return itsX; } int GetY() const { return itsY; }private: int itsX; int itsY;};//Velocity.cpp//#include "Velocity.h"Velocity::Velocity(int x, int y){itsX = x;itsY = y;}Velocity::~Velocity(void){}//PlayerBall.h//#pragma once#include "Ball.h"class PlayerBall : public Ball{public:PlayerBall();~PlayerBall(); //get input from the mouse using SDL functions private: //add any needed variables for SDL functions to execute.};//PlayerBall.cpp//#include "PlayerBall.h"PlayerBall::PlayerBall(){}PlayerBall::~PlayerBall(){}///Constants.h//////Constants that define the boundaries of the window///These are used in the Ball class and are essentially considered points.///the addition of the absolute value of these ranges equals the size of the windowsconst int LEFT = 0;const int RIGHT = 640;const int TOP = 0;const int BOTTOM = 480;//constants that define the window size in SDLconst int SCREEN_WIDTH = 640;const int SCREEN_HEIGHT = 480;const int SCREEN_BPP = 32;EDIT: error messages included... I'm not really sure how to include all of the lines because they aren't exactly listed... It does tell you files and functions, though, and since the files are too big and are named, it shouldn't be terribly difficult to navigate.///////////A LOT of error messages//////////////I think they are mostly all caused by the same thing, however.1>Ball.cpp1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\playerball.h(5) : error C2504: 'Ball' : base class undefined1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.cpp(10) : error C3867: 'Point::GetX': function call missing argument list; use '&Point::GetX' to create a pointer to member1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.cpp(10) : error C2296: '+' : illegal, left operand has type 'int (__thiscall Point::* )(void) const'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.cpp(10) : error C2276: '-' : illegal operation on bound member function expression1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.cpp(11) : error C3867: 'Point::GetX': function call missing argument list; use '&Point::GetX' to create a pointer to member1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.cpp(11) : error C2296: '-' : illegal, left operand has type 'int (__thiscall Point::* )(void) const'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.cpp(11) : error C2276: '-' : illegal operation on bound member function expression1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.cpp(12) : error C3867: 'Point::GetY': function call missing argument list; use '&Point::GetY' to create a pointer to member1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.cpp(12) : error C2296: '+' : illegal, left operand has type 'int (__thiscall Point::* )(void) const'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.cpp(12) : error C2276: '-' : illegal operation on bound member function expression1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.cpp(13) : error C3867: 'Point::GetY': function call missing argument list; use '&Point::GetY' to create a pointer to member1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.cpp(13) : error C2296: '-' : illegal, left operand has type 'int (__thiscall Point::* )(void) const'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.cpp(13) : error C2276: '-' : illegal operation on bound member function expression1>PlayerBall.cpp1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.h(18) : error C2061: syntax error : identifier 'PlayerBall'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\playerball.cpp(4) : error C2512: 'Ball' : no appropriate default constructor available1>Point.cpp1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(24) : error C2079: 'Ball::itsPosition' uses undefined class 'Point'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(21) : error C2248: 'Ball::itsPosition' : cannot access private member declared in class 'Ball'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(24) : see declaration of 'Ball::itsPosition'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(11) : see declaration of 'Ball'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(21) : error C2228: left of '.GetX' must have class/struct/union1> type is 'int'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(21) : error C2248: 'Ball::itsPosition' : cannot access private member declared in class 'Ball'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(24) : see declaration of 'Ball::itsPosition'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(11) : see declaration of 'Ball'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(21) : error C2228: left of '.GetX' must have class/struct/union1> type is 'int'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(21) : error C2248: 'Ball::itsPosition' : cannot access private member declared in class 'Ball'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(24) : see declaration of 'Ball::itsPosition'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(11) : see declaration of 'Ball'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(21) : error C2228: left of '.GetX' must have class/struct/union1> type is 'int'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(21) : error C2248: 'Ball::itsPosition' : cannot access private member declared in class 'Ball'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(24) : see declaration of 'Ball::itsPosition'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(11) : see declaration of 'Ball'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(21) : error C2228: left of '.GetX' must have class/struct/union1> type is 'int'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(21) : error C2248: 'Ball::itsPosition' : cannot access private member declared in class 'Ball'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(24) : see declaration of 'Ball::itsPosition'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(11) : see declaration of 'Ball'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(21) : error C2228: left of '.GetY' must have class/struct/union1> type is 'int'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(21) : error C2248: 'Ball::itsPosition' : cannot access private member declared in class 'Ball'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(24) : see declaration of 'Ball::itsPosition'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(11) : see declaration of 'Ball'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(21) : error C2228: left of '.GetY' must have class/struct/union1> type is 'int'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(21) : error C2248: 'Ball::itsPosition' : cannot access private member declared in class 'Ball'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(24) : see declaration of 'Ball::itsPosition'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(11) : see declaration of 'Ball'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(21) : error C2228: left of '.GetY' must have class/struct/union1> type is 'int'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(21) : error C2248: 'Ball::itsPosition' : cannot access private member declared in class 'Ball'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(24) : see declaration of 'Ball::itsPosition'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(11) : see declaration of 'Ball'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(21) : error C2228: left of '.GetY' must have class/struct/union1> type is 'int'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(26) : error C2248: 'Ball::itsPosition' : cannot access private member declared in class 'Ball'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(24) : see declaration of 'Ball::itsPosition'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(11) : see declaration of 'Ball'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(26) : error C2228: left of '.GetX' must have class/struct/union1> type is 'int'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(26) : error C2248: 'Ball::itsPosition' : cannot access private member declared in class 'Ball'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(24) : see declaration of 'Ball::itsPosition'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(11) : see declaration of 'Ball'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(26) : error C2228: left of '.GetX' must have class/struct/union1> type is 'int'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(26) : error C2248: 'Ball::itsPosition' : cannot access private member declared in class 'Ball'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(24) : see declaration of 'Ball::itsPosition'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(11) : see declaration of 'Ball'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(26) : error C2228: left of '.GetX' must have class/struct/union1> type is 'int'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(26) : error C2248: 'Ball::itsPosition' : cannot access private member declared in class 'Ball'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(24) : see declaration of 'Ball::itsPosition'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(11) : see declaration of 'Ball'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(26) : error C2228: left of '.GetX' must have class/struct/union1> type is 'int'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(26) : error C2248: 'Ball::itsPosition' : cannot access private member declared in class 'Ball'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(24) : see declaration of 'Ball::itsPosition'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(11) : see declaration of 'Ball'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(26) : error C2228: left of '.GetY' must have class/struct/union1> type is 'int'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(26) : error C2248: 'Ball::itsPosition' : cannot access private member declared in class 'Ball'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(24) : see declaration of 'Ball::itsPosition'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(11) : see declaration of 'Ball'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(26) : error C2228: left of '.GetY' must have class/struct/union1> type is 'int'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(26) : error C2248: 'Ball::itsPosition' : cannot access private member declared in class 'Ball'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(24) : see declaration of 'Ball::itsPosition'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(11) : see declaration of 'Ball'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(26) : error C2228: left of '.GetY' must have class/struct/union1> type is 'int'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(26) : error C2248: 'Ball::itsPosition' : cannot access private member declared in class 'Ball'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(24) : see declaration of 'Ball::itsPosition'1> c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.h(11) : see declaration of 'Ball'1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\point.cpp(26) : error C2228: left of '.GetY' must have class/struct/union1> type is 'int'[Edited by - zoner7 on June 18, 2009 8:52:32 PM]
Post exact error messages include what lines they occur on. ; Everything stems from the first error, I think:1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\playerball.h(5) : error C2504: 'Ball' : base class undefined ; Point.h doesn't need to #include playerball.h. Just use a forward declaration for the class. ; Easy, you fail at forward declarations. A forward declaration will only get you a reference not an object so your distance function is illegal. Second why in the heck does point calculate the distance between two balls? It really shouldn't know about them. The C++ FAQ's take on the matter;Quote:Original post by stonemetalEasy, you fail at forward declarations. A forward declaration will only get you a reference not an object so your distance function is illegal. No, you only need a forward declaration to declare a function that takes a class object by value.; Alrighty. I think I fixed the issue. I made a forward declaration of class PlayerBall in Point.h and solved my problem. There is only one problem left.The compiler is telling me "1>Ball.cpp1>c:\users\nick\documents\visual studio 2008\projects\collision game\collision game\ball.cpp(10) : error C2276: '-' : illegal operation on bound member function expression"Here is the Ball.cpp file... slightly modified version of the above one.I've got a feeling that I'm trying to illegally access some part of my class. Not quite sure.[source lang=cplusplus]//Ball.cpp//#include <vector>#include "Ball.h"#include "point.h"#include "Constants.h"void Ball::WallCollision() //tests to see if a ball crashes into a wall and changes velocity if true{if (itsPosition.GetX() + 5 == RIGHT ) { itsVelocity.SetX ( - itsPosition.GetX ); }if (itsPosition.GetX() - 5 == LEFT ) { itsVelocity.SetX ( - itsPosition.GetX ); }if (itsPosition.GetY() + 5 == TOP ) { itsVelocity.SetY ( - itsPosition.GetY ); }if (itsPosition.GetY() - 5 == BOTTOM) { itsVelocity.SetY ( - itsPosition.GetY ); }}Ball::Ball (int x, int y){itsPosition.SetX ( x ); itsPosition.SetY ( y );}Ball::~Ball(){}; You're missing the () in your function calls. Ex:itsPosition.GetXshould beitsPosition.GetX()
I am new to game development, can you give me some suggestions?
For Beginners
I am new to game development, can you give me some suggestions?I use C++(VS2008)I am a programmer for client.could you suggest some books for me , I am a beginner.
I'm still a new-ish programmer myself (compared to some of these other gentlemen), but I can say this:1) It's better to make 3 small games that you actually finish, then 1 large game that you never complete. Finish what you start. The final 10% of the game, takes 50% of the work; don't drop the project when you hit that final bit.2) If you are really really new, don't worry about doing things 'right', just worry about getting your projects done. If/when you have been programming for over a year, then start to worry if you are doing things correctly or sloppily.3) While writing pieces of code that are hard to read can be fun; it's actually poor work. Hard to read code comes from poor programmers. Make your code as easy to read as possible, even if nobody but you will ever see it. If this means commenting your code, then comment it.4) Find people that you can show your work to, even if they don't understand how it works, to help encourage you by their kind words.5) Post your code when your projects are finished, and ask for criticism. Don't be hurt by the hundreds of things people will tell you you are doing wrong, just learn what you can from their suggestions, and start your next project.6) Keep a list (like in notepad) of things you need to do on your project. Each time you finish one of those things, move it to a different list, so you can see your 'completed' features grow as the project goes on.7) Whenever you have difficulty; try searching GameDev's archives first, search Google second, then try posting on GameDev.net. Don't ask for help, when the answer is two seconds away by a quick search. But if you can't find it by searching, then don't hesitate to post.8) Never leave your project unworked on, for longer than 24 hours, if the code isn't compilable. Your code must always be able compile, before you take an extended break. Keep backups of your code, each day, and if you must take an extended break, roll your code back to a compilable version before that break.9) (this is somewhat in contradiction to #1) Failure is an option, when you are learning from your failures. If you bite off more than you can chew, sometimes the best option is the scrap the project. You cannot let this become a habit. Finish your projects whenever and however possible; but some times, you need to cancel them.; thank you for your suggestions, I will keep working, learn step by step. ; All I can suggest is start basic with console apps and set targets with small applications and move on from there.Good luck. The road is certainly paved with people who have given up so stick at it ;)
delete please, "blank"
General and Gameplay Programming;Programming
i found what i needed, thanks.[Edited by - softsoldier on June 19, 2009 3:02:12 AM]
The more appropriate word that I suggest you change your title to would be "online mentor". [wink] I think this post would be better received if you made that change as right now it's a bit, awkward. Good luck learning though! ; In future DON'T delete your post content when you are done with it, and it would be helpful if, having got an answer, you gave some details about it.This is not a question and answer forum, it is a discussion forum and past questions and answers are useful to all our members; deleting them after the fact is both selfish and annoying for those who took the time to answer you. ; understood but this was just me asking for a mentor. didnt find it helpfull for others unless they gave me a place for mentors thats why i asked to be deleted ;Quote:Original post by phantomIn future we would request that you do not delete your post content when you are done with it...Fixed :) A user is entitled to delete their content, so giving a order is not constructive; although I agree with the content of your post.
[solved]C++ template for generic linked list
General and Gameplay Programming;Programming
Hi, I was trying to make a generic linked list with template because I'm using linked list a lot in my project.Here's the problem I encounteredThis is what I ended up with while debugging#include "funcs/list.h"#include <iostream>using namespace std;struct testNode{int value;testNode* next;};int main(){ test.read_config("NPC.txt"); test.print();*/ testNode* Test; Test->value = 5; list<testNode> testlist; return 0;}This is my test cppand this is my declarationand I commented out everything in the implementation of the class.template<class object>class list{ public: object* head; object* previous; object* next; /*int del(object *Node); int add(object *newNode); //list<object>* retrieve(object key);*/};It is strange because when I compile and run, I get this "has encountered an error and must be closed down error"BUT, if I just take out one of the object* the program would actually finish without any errors.I simply cannot understand what is going on here.Could anyone help me with this?If it helps, I'm using Code::Blocks as my IDE.Thanks in advance[Edited by - polarboy on June 18, 2009 10:48:56 PM]
Use [ source ] instead of if you want the box ;)<br><br>If you're getting "has encountered an error and must be closed down error", try running a debug build from the IDE, then when it crashes it should show you the line that is causing the crash.<br><br>Also, if you want a templated linked list, why not just use std::list?; Where do you instantiate your Test node? I don't see a malloc() or a new statement... ; Ah, thanks for the tip, I thought it was for some reason, no idea why,haha<br><br>anyways, I used cout to determine that it happens at list&lt;testNode&gt; testlist;<br><br>I looked into std::list<br>but the amount of information overwhelmed me,lol<br>I guess I'm just lazy, but it's something that I don't really have any clue of, for things as simple to implement as a linked list, I prefer to write my own implementation, because that way, i know exactly what's going &#111;n<br><br>; If you're lazy, why don't you just use std::list? [wink]Seriously. In most cases (and ESPECIALLY with the C++ standard library) learning to use an API is going to be much easier than writing it. Also, the Standard Library codebase is very mature, and for the vast majority (if not all) cases, you can trust it not only to be safer, but more robust and faster than your own code. The only conceivable reason I could see NOT using std::list when you need a linked list is when you're learning to code your own linked list. Any other reason does not apply except in special cases. What special case do you have thrust upon you? ;Quote:Original post by Oberon_CommandWhere do you instantiate your Test node? I don't see a malloc() or a new statement...Ah, good point, that was dumb of me ; Learning how standard containers work by writing your own is a terrific way to learn. If you intend to get into programming as a profession, especially in games, you will find that STL is not allowed (or, more correctly, has been reimplemented). Either way, I think that understanding the underlying principles of STL will make you a better programmer along the way. ;Quote:Original post by argonautLearning how standard containers work by writing your own is a terrific way to learn. If you intend to get into programming as a profession, especially in games, you will find that STL is not allowed (or, more correctly, has been reimplemented). Either way, I think that understanding the underlying principles of STL will make you a better programmer along the way.haha, thanks, that wasn't really the reason why I want to write my own list thoughI wanted to write my own with template was for two reasons:1) This is my first time using templates2) I had bad experiences stuff other people wrote, and took me a long long time looking for documentation and error codes, so I'd prefer to write my own thing and know exactly what's going on rather than relying on what other people has done.Besides, I get a lot of flexibility this way, right now, I don't know what special feature I want to add, but I'm anticipating for some, in which case, i can inherit the class and do whatever I want to it. ; If you're doing this to practice template use, why don't you template the nodes themselves as well as the list? E.g.:template<typename T>class Node { T value; Node* next;};template<typename T>class List { Node<T>* first; //...};That way your list will be able to work with any data type without you having to declare a node type for that type. ;Quote:Original post by Oberon_CommandIf you're doing this to practice template use, why don't you template the nodes themselves as well as the list? E.g.:*** Source Snippet Removed ***That way your list will be able to work with any data type without you having to declare a node type for that type.oh yeah, good point, I didn't really think about that
Trouble linking AMD Core Math Library with VS2008 & Ifort v11
General and Gameplay Programming;Programming
I'm trying to use the fastsinf and fastexpf routines of ACML in some existing fortran code that I am compiling under Windows XP with Visual Studio 2008 and Intel fortran v11.0 build 20080930.My steps: 1. Download the ifort release of ACML 2. Replace an exp call with fastexpf 3. Under project properties -> linker -> input -> additional dependencies and add to it c:\AMD\acml4.2.0\ifort32_mp\lib\libacml_mp_dll.lib, which is where the library is located.However, upon build, it says that there is an unresolved external symbol _FASTEXPF in my function.I am primarily a C++ coder, so I am familiar with linking problems with that language, however I"m a bit new to Fortran, so perhaps I am missing something simple. Would appreciate any insight into this.//editI should also note that I have tried all the library variants, _mp and otherwise, static and shared. All result in the same error. I am also compiling with /Qopenmp so that shouldn't be the problem
The problem is this, from the documentationThe routines take advantage of the AMD64 architecture for performance, and so are currently only available with 64-bit versions of ACMLI'm compiling for x86 ; I do not think they provide any 32-bit fast transcendental. May be you should make an ACML helpdesk request(http://developer.amd.com/support/KnowledgeBase/pages/HelpdeskTicketForm.aspx?Category=1&subCategory=3) or post it to their forum(http://forums.amd.com/devforum/categories.cfm?catid=217&entercat=y).
[PSP homebrew] RedHoody 2, Alpha 1.0
Your Announcements;Community
Hi! My Name is Alexandre Salvatore, I am a french student in Interactive Design and also a true 2D retro video games. This is in this way I produced Redhoody 2, a PSP homebrew game where you can Jolt your PSP for real! The game is in production and should be finish in September/October, but there is a demonstration version available online. I actually post it on the GameDev.net to share my creation and get advices of professionnals. To use the game just place the following folder in the Game directory of your memory stick. This Game has been test on the Custom firmware 3.90 M33**About the Game**RedHoody was left for dead after his final fight against the Big Bad Wolf. Racoons stole his heart and replaced it by a robotic heart. But RedHoody is not dead and its makes sense than his barely indestructible heart will back! She will need to jolt his body to keep running his fake heart and stay in condition (of course, this game is a total parody of Crank II High Voltage).This demonstration is an Alpha version, just to show the concept. There just one screen and no scrolling, but it s enough to play. The game using the Euphoria LUA Player V.2 ( big thank for the V.4 which will allow me to make scrolling!).I am also French so do not hesitate to notice me my awful fault of English. Alessandro**How to**Press X to firePlug you PSP s battery cable to reload your voltage in case of emergencyTry to take the more bonuses you can, hoping than your life or your jolt lines don t touch the zero!**Bugs**-Many bug of collision ^^-Some time the game crash**For the next versions**-There will be a complete level-Work on the collision (especially for the bonus)-Bloody animations-An interactive introduction-A boss**You can also download the game here**redhoodyII_alpha_1.0.rar**Seen on**pspgen.com (France)dcemu.co.uk (United Kingdom)blogs.yahoo.co.jp (Japan)If you want to put a news on my video game please JUST put my real name (alexandre salvatore) and my web site (indexed.free.fr)Thanks, Alexandre.[Edited by - Alexandre Salvatore on June 19, 2009 4:57:57 AM]
Can a scene graph be stored in XML format?
General and Gameplay Programming;Programming
Can a scene graph be stored in XML format?Well, actually, can I store any hierarchy structure (nodes, files, whatever) using xml format?Thanks.
Yes. In fact, representing hierachical structures is one of the few things XML is good for [smile] ;Quote:Original post by mrbastardYes. In fact, representing hierachical structures is one of the few things XML is good for [smile]Heh, seconded. XML is very over-used these days, and that while it's pretty bulky...but you can in fact store pretty much anything in XML format if you so please. ; See Horde3D for an example. ;Quote:Original post by CadetUmferSee Horde3D for an example.Really useful link, thanks a lot. ; Collada is another example.
Who would be interested in the game squares?
Game Design and Theory;Game Design
Who is interested in playing the game 'squares' on a mobile device if I was to make a decent, fully interactive one?
Just played it for the first time. (On albinoblacksheep.com, game was Squares2).Thoughts:- You control the game with the mouse; I can't see mobile phone control affording fast-paced, fine control like a mouse does.- The music had a good amount of bass, of which any cellphone is probably not capable (short of vibrating the phone's speaker into oblivion).If you can find some way around those, you would definitely have a decent game on your hands (pun intended)!Good luck!; (I also just played it for the first time too, on the same site)Would you control the square with a touch screen? That would probably be highly annoying- your finger would get in the way and you won't be able to see the screen.I think the game might work if you have a directional stick for controlling the square. Some phones have those. But I don't think that game could possibly work on, say, the iPhone. ; The game would work just fine with a stylus. A stylus is slim and only obscures a small fraction of the space that a fat finger does. Does the iphone allow a stylus?I'd actually recommend that you look into some simple audio processing. Let people use their own mp3s as background music, and spawn squares in time with the music. Flash the background different colors, let some squares streak lights across the screen, and make liberal use of edge highlighting to give some of that Rez feel.
GPL for dummies?
Games Business and Law;Business
Anyone know of a good, simplified (yet thorough) explanation of the GPL? The legalese kills my brain...More specifically, how does it apply to server-side code? For example, say I write a PHP web app and license it under the GPL. Does letting people access it through a website count as "distributing" or "conveying" it (and as such, require me to distribute the backend code)?
That's the main quirk of the GPL when it comes to networking. Suppose there's a board licensed under the GPL. If you deal with the source code directly (e.g. you're a maintainer), then the GPL applies for you. If you only use it as a client (e.g. you just are a member that uses the board interface), then the GPL does not apply to you. To get members be required to have those rights, the license should be AGPL (Affero GPL), not GPL.Of course, you may want to recheck somewhere else, but that's how I'd understand it. You could e-mail the FSF asking about it as well, but they probably will tell you to use the AGPL and give the source code to everybody, regardless of what you actually want to do =P ;Quote:Original post by Sik_the_hedgehogIf you only use it as a client (e.g. you just are a member that uses the board interface), then the GPL does not apply to you.Roughly speaking, the client's browser does not download the source code (which would constitute distribution), instead it downloads HTML code generated by the GPL code - and the GPL only covers the program source code, not the program output.As always, IANAL [wink] ;Quote:Original post by krezMore specifically, how does it apply to server-side code? For example, say I write a PHP web app and license it under the GPL.If you've licensed it under GPL, then you're required to make the code available. To whit: why did you license it under GPL in the first place?Here's the question you should be asking: if you're writing a web application and happen to use a GPL component, are you required to distribute your own code once you make your application public? The answer is yes. By linking to, incorporating or in any way creating a derivative product from a GPL component, your derivative (your web application) falls under the GPL. And everything that falls under the GPL must have its code available on request.If you are writing original code, avoid the GPL unless you fully understand its ramifications and agree with the ideological position it embodies. If you simply wish to make your code "open source" and available for others to use, look at the BSD, MIT and APL licenses first. ;IANALQuote:Original post by OluseyiIf you are writing original code, avoid the GPL unless you fully understand its ramifications and agree with the ideological position it embodies. If you simply wish to make your code "open source" and available for others to use, look at the BSD, MIT and APL licenses first.The GPL is not only ideologist (the same can btw also be said about MIT, et al.). Instead, if you don't want your sourcecode to be used in other projects that don't open their sources for free use (i.e. proprietary software) or in projects that make actual money (alongside with other code) with your code, without giving you back anything, then the GPL or another copyleft license, can be useful, too.That [copyleft license] it is only useful in ideology based environment is BS. The reason why I use it is exactly what I described: If I spend my precious spare time to code up something (read: when I am doing unpaid work), then I don't want others to profit from my benevolent coding without giving back any of the profit they made (may it be money, knowledge, or whatever) with the help of my unpaid work. If I want to profit if my software is ever used, and want others to contribute back (e.g. the changes the made to my software, which is highly welcome), then MIT, common BSD, and the like, are not the right thing; instead, "Copyleft" + Dual Licensing works better.If I want to give away my work for free after spending, maybe, man-years on it, and don't care what others do with it or how they profit from it, or if others claim it is their work, then maybe MIT etc. is the way.For my part: nothing to do with being ideologist.edit: To give an example of a project that was being idealistic about MIT license, but later switched to GPL:Quote:http://en.wikipedia.org/wiki/Wine_(software)#Other_versions_of_WineTransGaming Technologies produces the proprietary Cedega software. Formerly known as WineX, Cedega represents a fork from the last MIT-licensed version of Wine in 2002. Much like Crossover Games, TransGaming's Cedega is targeted towards running Windows computer games and is sold using a subscription business model.That perfectly conforms to my (and thousands of others spare time coders) reasoning.[Edited by - phresnel on June 17, 2009 12:57:40 AM];Quote:Original post by OluseyiIf you've licensed it under GPL, then you're required to make the code available.I thought you only had to make the code available if you distributed the licensed work.e.g. if I use a GPL library to make a tool, then my tool is GPL. If I only ever use the tool privately, I don't release binaries of it (even if I distribute it's output files) then I don't have to release the code either.If I'm right about this, then a private web-app would be much the same as my hypothetical tool, assuming the binaries are kept private and only it's output is distributed. ;IANALQuote:Original post by HodgmanQuote:Original post by OluseyiIf you've licensed it under GPL, then you're required to make the code available.I thought you only had to make the code available if you distributed the licensed work.Yes. You could also purely distribute on ordinary CD-ROMS, via computer shops and the like. Then you don't even have to give away your work for free or via the internet, and must only include the sourcecode on the CD-ROM (it's about distributing the sourcecode in appropriate form, and if you only distribute via CD-ROM, then that's appropriate).I like the analogy to buying a car: Nobody gives away a car for free (though they are allowed to, and except maybe for some TV shows :D), and anybody who buys the car has the right to tweak it (maybe as a virtual penis enlargement), to resell it, and to learn about the inner workings of your car. And if you decide to give away your car, you can't forbid that the new owner [uses,tweaks,learns from,resells] the car.Quote:e.g. if I use a GPL library to make a tool, then my tool is GPL. If I only ever use the tool privately, I don't release binaries of it (even if I distribute it's output files) then I don't have to release the code either.Yes. But consider also that for libraries there is the LGPL.[Edited by - phresnel on June 17, 2009 12:04:02 AM];Quote:Original post by phresnelThe GPL is not only ideologist...I never said the GPL was the only ideologically motivated license. Don't refute claims that weren't made.Quote:Instead, if you don't want your sourcecode to be used in other projects that don't open their sources for free use (i.e. proprietary software) or in projects that make actual money (alongside with other code) with your code, without giving you back anything, then the GPL or another copyleft license, can be useful, too.Which is an ideological motivation. If you want to give your code away for free, why must you compel others to do so, too? Particularly for someone who is unclear about whether he has to open his sources - suggesting that he doesn't already subscribe to the motivation of "ensuring openness" - this is a nonsensical discussion.Quote:That [copyleft license] it is only useful in ideology based environment is BS.I never said Copyleft (in fact, I never referred to Copyleft, only to the GPL since the OP's question was explicitly about GPL) was useful only in ideologically-based environments. I said not to use the GPL unless its ideology was clearly understood and agreed with. Again, don't refute claims that weren't made.Quote:Original post by HodgmanQuote:Original post by OluseyiIf you've licensed it under GPL, then you're required to make the code available.I thought you only had to make the code available if you distributed the licensed work.In the specific example, he was publishing the web application. That counts as distribution. If the web app is only privately used, then he doesn't have to make the code available. If the web app is publicly accessible, though, even if users only receive non-code data as the output, then he is obligated to provide the source code if asked.Quote:Original post by phresnelYou could also purely distribute on ordinary CD-ROMS, via computer shops and the like. Then you don't even have to give away your work for free or via the internet, and must only include the sourcecode on the CD-ROM (it's about distributing the sourcecode in appropriate form, and if you only distribute via CD-ROM, then that's appropriate).That's not entirely correct. You don't have to include the source on the program CD-ROM, but you must make the code available on CD-ROM if a someone orders it, for which you are permitted to charge the cost of distribution. ; The Free Software licensing quiz is very, very good. ;Quote:Original post by OluseyiQuote:Original post by HodgmanQuote:Original post by OluseyiIf you've licensed it under GPL, then you're required to make the code available.I thought you only had to make the code available if you distributed the licensed work.In the specific example, he was publishing the web application. That counts as distribution. If the web app is only privately used, then he doesn't have to make the code available. If the web app is publicly accessible, though, even if users only receive non-code data as the output, then he is obligated to provide the source code if asked.What if instead of publishing it to a web-server (where the general public can use the application) it was hosted on a private server. However, another non-GPL public web application is given exclusive access to the private GPL app.This way the GPLed server is "in your own home" so to speak, but it's output is distributed by a separate public application.What if this public server doesn't directly talk to the private GPL server, but requires human data-entry to connect the two? What level of connection counts as distribution of the GPL code?
AI Steering Tutorial
Artificial Intelligence;Programming
In an effort to give something back to the forum, I've created a bit of a tutorial on how to control an AI's steering. This is nothing revolutionary, but I had a tough time making it work, so I figured maybe others could benefit from my experience.The problem I had is trying to create an AI for a guided missile. I couldn't figure out how to get the missile to turn to face the target. I had the math for turning, but I didn't have the math to figure out how much steering force to apply at any particular time to make it so the missile would turn exactly to the target, without stopping too soon or turning too far. Over the years I had some "good enough" solutions in place, that either wiggled a bit or turned a bit slower then optimal or whatever. Now I have something that looks actually correct.This tutorial assumes you already have a physics engine in place, you're generally comfortable with the equations of motion, and you don't mind a little math. I hope someone out there finds it useful:http://riftspace.net/riftdev/2009/06/ai-steering-solution.htmlComments and discussion are welcome. The clock is now ticking to see how long it will take someone to point out that there's a MUCH easier solution and I'm a dunce for going about it the hard way...
Networking Design For RPG/Action Game
Networking and Multiplayer;Programming
Hey!I'm about to make a game. It's supposed to be similar to DotA, the Warcraft 3 custom map. For those of you who don't know what DotA is: You have one character, your hero, as opposed to an army of units like in regular Warcraft 3, and you go around killing stuff. It's 5on5, multiplayer only. There are some NPCs on the map too, like maybe 50 or 100.I've been thinking about what kind of design I should use for the networking part, and I was hoping you could give me some advice.So, I want to be able to play with at least 10 players simultaneously, maybe up to 20, I mean why not? In addition (and I'm not sure about this feature of the game design yet) I want there to be neutral monsters, up to about 50 total (not depending on the number of players).The central part of the game is the player vs player combat. If you have played DotA, I kind of want it a little bit more like a fighting game, i.e. a little bit quicker moves, maybe even hitboxes, etc. But there is still going to be like side effects, buffs and stuff. If you haven't played DotA, think of my game as a mix between an RPG (like World of Warcraft) and a fighting game.DotA obviously uses the same control scheme and network design that Warcraft 3 uses, but I was thinking that maybe I want to, for example, move my the hero with the keyboard instead of the mouse. But I think that that will make delay in the movement more noticeable. In an RTS where you use the mouse to move units, 200 ms delay isn't that bad. But when you control your character with the keyboard, like in an FPS, I think 200 ms delay in your own movement would feel terrible.At first I thought of kind of a lock-step design, where the client sends his commands to the server, the server broadcasts them (and arbitrates important descisions) and, when the client gets his own commands back, it would not see any difference between his own or other's commands, and just change his model of the game accordingly. I would use TCP in this case, I think.But, moving towards a fighting game, especially controlling the character with the keyboard, I think this will feel laggy. Maybe there needs to be instant response to your own input, like in an FPS.The reason I didn't wanna use the FPS style (which I guess is just sending a lot of updates with UDP all the time) is that with the 50 monsters, this might be a little much. Also, because of some side effects of spells/moves, certain pieces of information is very important (so UDP might cause problems).So what about a middle ground, using TCP but allowing your character to move instantly in your own model of the game world. I thought about this a bit, but it seems that it can cause some problems. For example, I run forward in my own model, but in reality, the servers model, I might get blocked by another player, that in my model is not at the same position due to the delay between me and the server. But if the server is supposed to be the arbiter in important decisions, the server might suddenly tell me that "Hey, you can't go there!" and I must warp/snap back.One may think that it isn't so important that I warp back, and that the server is more forgiving. But that would mean that if there is a big delay between me and the server, other players might not be able to block me because of my lag, and that sounds wrong.Well, that's about everything that I've thought about so far. It is not based on any experience but only on what I've read and understood so far, and I realize that I may be wrong. It feels a little bit overwhelming right now, partly because I'm not really sure about exactly what kind of gameplay experience I want. However, if you want to give me advice or comments I would highly appreciate it.[Edited by - tufflax on June 18, 2009 3:46:03 AM]
there are several ways to do this sort of thing. 1) The Warcraft 3 way. Use a deterministic engine, and a lock-step mechanism. http://www.gamasutra.com/features/20010322/terrano_01.htm2) FPS system. update entire game state via unreliable updates, client side prediction and lag compensation for accuracy. 3) WoW / Guild Wars. maybe TCP/IP event-based and messages, using waypoint updates for NPC navigation, maybe UDP updates for player movement and fast response. 1) works with RTS mechanics, very little bandwidth required, determinism being the key. Problems with latency, which you can hide behind some client-side smoke screens. Client-side prediction for stuff like direct input movement is hard. Join in progress problematic, replays easy and small in size. Creating, maintaining and debugging deterministic engine a lot of work (out-of-sync will diverge very quickly, and there is no way back). Also suffers from cross-platform problems (floating point implementations at the CPU level, all platform must agree to the same floating point standard).2) Scales bad with the number of units to update, big bandwidth, quite complex to implement. Usually works through delta-compression mechanisms. Good precision and instant response, lots of literature, doesn't need perfect determinism (although it helps for client-side prediction). You can also tune updates for each entities, depending on their visibility from a player, to reduce bandwidth. 3) Middle of the road, I suppose. More complex, poor accuracy (entities usually 'lock' on targets and waypoints).I'm not sure what Diablo III uses, but my guess is, you want something similar. I would think they use an hybrid system.[Edited by - oliii on June 18, 2009 2:21:48 PM]; Thank you!Yes, Diablo must do something similar... hmm. ; Just a note, I'm pretty sure WoW only uses a single tcp socket however in that style of RPG the delays don't really matter. W3 uses UDP i'm pretty sure.Good luck,Gnoll
What books did developer read for game development in the 1990s?
For Beginners
I want to make a game But I wonder how game developers worked in the 1990s, how they made games, how they learning before the Internet became as widespread as it is today. etc.how do they know how to build game mechanics as character ability power up system?how they know to reverse engineering game competitor company.what book I should read?
As far as I know (not being a programmer myself), books on the subject started appearing in the early 2000s. Up to that point, it was “learn by doing” and tips from one another. ;The first book that came to mind was Tricks of the Game-Programming Gurus: Lamothe, Andre, Ratcliff, John, Tyler, Denise: 9780672305078: Amazon.com: Books, which was geared toward beginners/students/amateurs. There were others, but that's the best selling pre-2000. After that point in time, game development became a hot topic in the book publishing world. Even GameDev.net has a series - Beginning Game Programming: A GameDev.net Collection (Course Technology Cengage Learning): 9781598638059: Computer Science Books @ Amazon.com.Otherwise, in the professional realm a lot was “learn by doing” as Tom said, or through word of mouth on early Usenet/IRC/websites (pre-GameDev.net in 1999 - see About GameDev.net). ;Computers in that era didn't have an OS like we have today. The machine booted, and you were dropped in a command shell or in an interactive BASIC interpreter. You basically programmed directly at the metal. Video memory was directly accessible, by writing in a known address range you could make pixels appear at the screen in various colors. The “OS” had a corner in the memory too for its data, but nothing prevented you from poking around there. Lua, Python, C#, C++ didn't exist, ANSI-C was just invented (K&R book about that was in 1989 iirc). Assembly language of course did exist (with books) and was used.Monthly computer magazines were published for all types of home computers. Tips and tricks were exchanged in that way, also program listings were printed in those magazines that you could then enter at your own computer. Studying those listings, and trying things for yourself is how you learned. There was also technical documentation about the computer.If you want to enjoy that stuff, today there is a retro-computing movement, that lives in that era, except with slight more modern hardware but still no OS, etc.;Alberth said:Computers in that era didn't have an OS like we have today.In the 1990s there was MSDOS, Several versions of Windows, and of MacOS. And that's not all the operating systems of the nineties, most likely.Like Linux, for instance.;Tom Sloper said:Alberth said:Computers in that era didn't have an OS like we have today.In the 1990s there was MSDOS, Several versions of Windows, and of MacOS. And that's not all the operating systems of the nineties, most likely.Like Linux, for instance.Yep. There were things like Windows 95, Win 98, and at the time I was still using a Commodore Amiga (AmigaOS) .To deal with the original question “what game dev books was I reading in the 90s?” Back in that era, one of my favorites was : The Black Art of 3D Game Programming by André LaMothe. ;Abrash was the guy who did the Windows NT graphics subsystem and worked on Quake.https://www.drdobbs.com/parallel/graphics-programming-black-book/184404919 ;There are a couple of" history of video games" books, that track the rise of the medium and genre.Just google for them. ;GeneralJist said:There are a couple of" history of video games" booksThat's not what the OP is looking for.;Thanks all
Choosing a career in AI programmer?
Games Career Development;Business
Hello everyone, my name is Ramon Diaz; I am currently studying Game development and programming at SNHU. I have taken the initiative to learn about a professional career in AI programming. I have a lot of gaps in my development in the short term. I have blueprint experience with AI but not enough to choose a career in this profession. I would like to know how I can be competitive leaving the university in 5 months after finishing my studies. I am looking for knowledge from all of you who have been in the industry for years.
Entry level? Know your algorithms, it will help you at interviews. If you have made demos it can help you get jobs, but the market is wide open right now and should be relatively easy to find work for the foreseeable future. Overall, it reads like you are on the right path. When you graduate and start looking for work, be open to any positions rather than just an AI specialty. Once you have a job it is easier to transition into whatever specialty you prefer.;Thank you. ;I would like to know how I can be competitive leaving the university in 5 months after finishing my studies.Talk about last minute. Create AI projects? Or A game with character behaviors? Pathfinding examples. Crowd movements. Anything really. Learn how navigation meshes work.;@dpadam450 Character Behavior is what I doing in the project at this moment. Everything related to AI programming.;@dpadam450 Is it the same when learning C++ in AI as visual scripting Blueprint? If I were to make a demo, what kind of programming should I focus on my attention? ;@frob It is important to have a portfolio? ;Not for programming. You will need to show you know how to do the work, but it is usually some interview questions and writing some code of their choice. If you have something you want to share with them, you can do it if you want. Having done fancy demos can sometimes help get interviews, and can help show your interest and abilities, but it is generally not needed. It does not hurt, unless you do it badly and therefore becomes a cautionary warning. Build it if you want. I have interviewed and hired bunches of programmers without portfolios. ;I'm studying AI at the moment, in terms of statistical learning. I've learned so much about AI over the past few weeks. Check out: https://hastie.su.domains/ISLR2/ISLRv2_website.pdf​andMachine Learning with R: Expert techniques for predictive modeling, 3rd Edition
Newbie desperate for advice!
Games Business and Law;Business
Hi allI'm new to the game development community and need some advice.I've created 2 educational games with a simple idea but are sufficiently challenging for all ages. These could be played on pcs or phones.Is it worth patenting any parts of the games?What would be the best way to monetize?How should I market the games?
hendrix7 said:I'm new to the game development communityReally? Your profile shows that you've been a member here since 2004, and your last activity was in 2007, asking about raycasting.hendrix7 said:Is it worth patenting any parts of the games?Probably not. Expensive and there will be hurdles, and possible lawsuits after the patent is granted (if it is).hendrix7 said:What would be the best way to monetize? How should I market the games?There are several threads here in the Business and Law forum about that. While you wait for more replies from the community, you can read up on those previous answers to those questions. Mainly, “you should have thought about that before you finished your games.” (You wouldn't be “desperate” now.) Good luck with your sales!;@hendrix7 Filing for a patent can be expensive, and you need to document the solution and how it separates from anything else. I have developed software that solved problems in a way that no other software does, but there is only a very small portion of that that can actually be patented. Even though you can file an application yourself, I would recommend hiring an experienced IP attorney. This too is very expensive, though, so you are best off doing this if this idea can provide millions in income. If it can't, then it's actually not that harmful if anybody copies it.You could look at registering trademarks, design and other parts of the games. This is cheaper, but it will protect you brand more than your idea or solution.Again, if this is something that could turn a real profit, it might be worth looking into. If not, it's a very costly waste of time.As for marketing - my day job is actually creating videos and commercials etc., so naturally that's the first thing that comes to mind.Make videos for social media or other platforms where your target audience is likely to see it. Oh, and you need to define a target audience. Know where they are, what they respond to, what their struggles are and how your product will solve their problems, enhance their life experience or in other ways contribute positively to their life.There are several other ways to do this, but the list exceeds my level of expertise in the area.;patenting is costly, and time intensive. As said above, it depends on a lot if it's worth it. ;@hendrix7 Nothing is worth patenting unless you're willing and able to defend your patent. There is no patent police; you're responsible for finding and prosecuting infrigement.What you're patenting has to be novel and non-obvious to a person skilled in the art. You called your idea ‘simple’ which makes me wonder if it's obvious or already in use.;@Tom Sloper Thanks TomI have been programming for a while but not games until now.Thanks for getting back and your advice, particularly patents.;@scott8 Thanks for your reply.I see. The play of the game utilises basic maths skills so I'm guessing it'll be difficult to identify anything that's unique. I suppose, in a similar way, it would be difficult to patent something like ‘Wordle’. Am I right?
Hi I'm new. Unreal best option ?
For Beginners
Hallo everyone. My name is BBCblkn and I'm new on this forum. Nice to virtually meet you 🙂. One of my biggest dreams is to make my own videogame. I love writing design as in text on how my dream game would be. Now I got no skills to create it. But who knows what life will bring. Is Unreal the best program to have fun with an experience ? Obviously I prefer a simple but capable program. Not pre designed auto drop. Why not install Unreal and roam into it and see if anything happens.My favorite games are in the genre of Fantasy, usually stone age with magic. Dota, Homm, Diablo and the odd one out is the genius Starcraft 1. But I played plenty of different games, especially when I way younger. I don't game currently at all but designing gets my creative juices flowing and is so inspiring and fun. Thanks for having me guys
BBCblkn said:My name is BBCblknI am truly sorry for you. Even Elons daughter has a better name than that.BBCblkn said:Is Unreal the best program to have fun with an experience ?Give it a try, but it's not meant for total beginners.Starting small always is a good idea. 2D is easier than 3D. You could try GameMaker, learn some programming language, learn some math, move on to more advanced engines like UE or Unity… ;There's honestly no perfect program for beginners. If I had to compare Unreal though at my skill level, I would probably pick Unity. However, It really comes down to your needs, and how much programming you want to learn. Furthermore, I would also keep in mind other engines.;@BBCblkn I'd recommend Gamemaker studio 2 as a first engine. It's easy to learn and I haven't had a problem making my game ideas in it yet.There are some good tutorials on YouTube to follow to learn it. Do note you'll be limited to 2D games with GMS2.Bit late to the post, but I hope it helps;gamechfo said:Bit late to the postTwo months late. Always consider whether you honestly believe that a question asked long in the past is still awaiting an answer. Thread locked.
How to publish a book?
GDNet Lounge;Community
Hello, So, over the holidays I finished my 1st book. Do any of yall writer types know where I can find:an editorpublisherIt's like 99% done, just need to know what to do next. Also, it's cross genre, so it doesn't necessarily fit the standard model.
You've given nowhere near enough information to get a final answer, but I can suggest next steps for you. (For background, I've worked as an author, co-author, editor, and ghostwriter on 9 books so far.)Publishing is a business deal. You need to figure out what business services you need.Do you even need a publisher? Do you need a distributor? You already mention needing an editor. Do you need marketing? Do you need retail agreements? Digital or physical? If physical, POD or offset, how many each of hard or soft, what size of print run can you afford? What business services do you need? Publishers have an awful lot of potential features of what they can provide and what those services cost.Once you know the list of services you actually need, your favorite bookstore will have books that have listings of all the major publishers and hundreds of minor publishers, along with the services they provide and the specialties they work with. Work through the listings methodically, and talk to them all until you've got a deal. You'll also want to start shopping around for a lawyer at that point, both because they have connections and because they'll be working with the contracts you'll be signing.Once you know what you need and have talked with your lawyer the first few times, you will be ready to start shopping around. It's far better if you have more money and are using the publisher as a paid service. That is, you pay them for the services they provide up front. It will cost you many thousand dollars but you'll require far fewer sales to reach profitability. It can be better to do an online plus POD service starting out if you're self funded. If they need to front any of the money there will be two phases to the deal, one phase before it's profitable and another after a threshold is reached and it's profitable. The exact terms will depend on your needs and the services they'll be providing. Before you sign with anyone, you'll need to work back and forth more than once with your lawyer to help you negotiate what's fair in the agreement. Good lawyers understand the costs of the various services and can help you get fair rates.Just like publishing games, the more you need from them the harder your pitch becomes. If you need a lot of services the more it will cost you. If you're looking for them to invest in you, front you money, and pay for the books, don't expect a lot of money from the deal, and in addition your pitch needs to be amazing and you'll be rejected many times. If you've got the money to self-publish and are only looking for retail agreements that's rather easy. ;hmmmWell Self publish might work too. I'm looking for:an editor publishing distribution for ebookNo hard cover or physical book planned at this timemaking cover art. Future Audio book production. I think that's it. I'd be willing to do physical print if needed, but I don't really want to pay for that at this time. frob said:You've given nowhere near enough information to get a final answer The issue is I don't know what questions or criteria I should be asking or looking for. ;Have you considered publishing with Packt?https://www.packtpub.com/;GeneralJist said:2. publishing distribution for ebook 3. No hard cover or physical book planned at this timeFor distribution of an ebook there are plenty of options. Amazon is the biggest with kindle direct publishing requiring little more than an html file and an image for the title. If you are comfortable with software tools you can use that same document to build/compile every other format out there. You're on the hook for everything else with the business if you go that route, but it can work well if you are marketing through your own channels.There are many ebook publishers out there targeting specific platforms and specific readers or specific genres. I mentioned publisher lists, they also include electronic-only publishers. Understand the tools they use against piracy are also helpful since otherwise anybody with access to the file can make unlimited copies.Be careful of contracts, you almost certainly want something that has a non-exclusive agreement since you've done all the work yourself already. If a publisher wants an exclusive deal they need to be putting quite a lot on the negotiating table.GeneralJist said:4. making cover art.Find an artist with the style you like and contact them. Often it's in the range of a couple hundred bucks, especially for ‘unknown’ artists when they're starting with something that wouldn't have seen the light of day otherwise. Artist friends are best, and asking around at local art schools is inexpensive.GeneralJist said:5. Future Audio book production.If you don't need it now, it's something easily done later.GeneralJist said:1. an editorThis one is the most difficult. Skilled editors are amazing. If you go with a publishing house they'll provide professional editors, at professional rates. ;taby said:Have you considered publishing with Packt?https://www.packtpub.com/hmmm 1st time hearing of them.Looks like they are more of an educational option?My book is a mix of mental health journey auto bio, and Sci Fi elements. It's not really a standard “how to” for game dev. ;so I just heard back from my 1st publisher submission.https://triggerhub.org/​And they essentially say they be willing to look at it deeper, and have extensive edits to focus on the mental health angle. but they would want me to cut a lot. From what they are hinting at, It sounds like they want to cut a lot of the Game dev and gaming journey, as they are a publisher focused on mental health.So, now I need to decide what to do.I sent them back an email saying I'm open to continued dialogue.Without knowing exactly what they want to cut, and edit, I don't know how to proceed.Also, would it be better to hold out, and find a publisher that is willing to accept most of the game dev journey, as I'm looking for a continued publisher to work with, aka accept most of the book as is. Any advice would be helpful.Thanks yall. ;GeneralJist said:Any advice would be helpful.Look into your own mind and heart.;hmmmok,So I've submitted to a few other places.We shall see.I submitted to this place called author House, and they got back to me really quick, but it looks like they want me to pay a couple thousand for a package:https://www.authorhouse.com/en/catalog/black-and-white-packages​I personally find that a bit frustrating.I mean, really, I wrote the book, I thought traditional publishers get paid from a % of sales?@frobWhat do you think?Is the above package a good deal?I was also a little put off, as it seems the person who called me didn't even read anything about my book, and asked me “so what's your book about?"beyond the above, how does this usually work? Edit: so, after a bit of basic research, it seems the above organization is a bit scamy. The hunt continues. ;You're unlikely to get a publisher deal, where the publisher pays you an advance and distributes your book to retail outlets.You'll have to self-publish, meaning you have to bear all the costs for printing, and nobody will distribute it for you. https://en.wikipedia.org/wiki/Vanity_press​
First-person terrain navigation frustum clipping problem
General and Gameplay Programming;Programming
I am trying to develop first-person terrain navigation. I am able to read a terrain and render it as well as to move around the terrain by interpolating the location of the camera every time I move around. The main problem I have is that depending on the terrain, i.e. moving on a sloping terrain, the near plane clips my view (see below). What is the best way to avoid this? Presumably, I can interpolate the heights for the bottom corners of the near plane … any help would be appreciated.
I believe this can aways be an issue. I mean if you are clipping to a near plane and that plane passes through geometry, it has to do something. That being said you technically don't have to clip to a near plane at all, however many graphics APIs require it. Another other thing to consider is once you have collision working, you can put your camera, including your near clipping plane inside a collidable object, for instance a sphere, such that this problem will never occur. If you are eventually going to make this a real first-person game, that should take care of the problem since your camera will be inside the players head. Even in a 3rd person game you can put them inside a floating sphere. ;Gnollrunner said:That being said you technically don't have to clip to a near plane at all, however many graphics APIs require it.The near clip plane is always needed, even if you use a software rasterizer. If you don't do the clipping, vertices would flip behind the camera, causing glitches way worse than what we get from clipping.mllobera said:What is the best way to avoid this? Presumably, I can interpolate the heights for the bottom corners of the near plane … any help would be appreciated.Yes, basically you want to ensure that the camera is in empty space (above the hightmap), not in solid space (below the heightmap).But in general you can not treat the camera as a simple point, because the front clip plane requires a distance larger than zero. So ideally you build a sphere around the camera which bounds the front clip rectangle of the frustum, and then you make sure the sphere is entirely in empty space, for example. In the specific case of your terrain not having too steep slopes however, it should work well enough to sample height below camera, add some ‘character height’, and place the camera there. That's pretty simple and usually good enough for terrain.It's quite a difficult problem mainly for 3rd person games in levels made from architecture. It's difficult to project the camera out of solid space in ways so the motion still feels smooth and predictable.Some games additionally fade out geometry which is too close, attempting to minimize the issue.Imo, the ‘true’ solution to the problem would be to let the clipping happen, but rendering the interior volume of the geometry as sliced by the clipping plane.That's pretty hard with modern rendering, which usually lacks a definition of solid or empty space. But it was easy to do in the days of Doom / Quake software rendering. When i did such engine, it was possible to render clipped solid walls in simple black color. This felt really robust and not glitchy, so while it does not solve all related problems, i wonder why no game ever did this. ;@undefinedJoeJ said:The near clip plane is always needed, even if you use a software rasterizer. If you don't do the clipping, vertices would flip behind the camera, causing glitches way worse than what we get from clipping.You can clip to a pyramid instead of a frustum. I used to do this many years ago on old hardware. So there is no near clipping plane. In fact you don't need a far clipping plane either.Edit: Just wanted to add as far as I know the near and far clipping planes mostly have to do with optimizing your Z resolution. If you are dealing with that in other ways, I think they aren't strictly necessary. I currently don't even deal with the far plane and let LOD solve Z-fighting issues.;Gnollrunner said:You can clip to a pyramid instead of a frustum.I see. You still have front clip. It is a point, formed indirectly as the intersection of the other other frustum planes.I've misunderstood your claim to be ‘you don't need a front clip’. But you didn't say say that. Sorry. But now i'm curious about the experience with z precision you have had. I guess it just worked? Which then would probably mean: All those painful compromises of ‘make front plane distant so you get acceptable depth precision for large scenes’, are a result of a bad convention being used by APIs?Or did you use no z-Buffer? ;@undefined My whole engine is based on aggressive LOD and culling. I don't do projection in the matrix. It's a post step. My Z coordinates are world distances. My current project does have a near clipping plane mainly because DirectX wants one, but it's not that relevant for my application.;Ah, so you use the pyramid for culling only. But for rasterization, the usual front clip plane at some distance i guess.Still an interesting question if ‘some distance’ is really needed, but i guess yes.I did some experiment about point splatting. It uses spherical projection, which is simple than planar projection:auto WorldToScreen = [&](Vec4 w){Vec4 local = camera.inverseWorld * w;if (local[2] < .1f) return (Vec3(-1)); // <- front clip at some distance of 0.1Vec3 screen = (Vec3&)local;screen[2] = length(screen); // if it was zero, i'd get NaN herescreen[0] = (1 + screen[0] / (screen[2] * camera.fov)) / 2;screen[1] = (1 + screen[1] / (screen[2] * camera.fov)) / 2;return screen;}; Planar projection would cause division by zero too, i guess.;Thanks for all your comments! I will need to investigate how to do what Gnollrunner proposed (about putting the camera inside of a sphere). ;This may be obvious, but in case it helps:Let me note that, as a first-person camera may be more likely than a third-person camera to draw very close to geometry, it likely makes some sense to have a smaller near-plane distance for the former than the latter.Now, this only ameliorates the problem, it doesn't remove it entirely: it means that the problem will still appear, but only if the player gets very close indeed to a surface. It's intended to be used in conjunction with one or another means of preventing the camera from approaching quite so near to a surface (such as the sphere-approach mentioned by others above).;Thaumaturge said:This may be obvious, but in case it helps:Let me note that, as a first-person camera may be more likely than a third-person camera to draw very close to geometry, I'm not sure that's so true. I mean in both cases you have to take care of the problem somehow. The case of a first-person camera is a bit easier because it should always be in the collision boundary of the player (sphere(s), ellipsoid, capsule etc.). As along as the near plane is also within that boundary, the problem should never occur. So if you have a 10cm radius sphere and put the camera in the back of it, that gives you maybe a 10 to 15 cm camera to near clipping plane distance to play with depending on the field of view you are going for. With a 3rd person camera, you can also get very close to terrain, in fact your camera can end up within terrain or some object if you don't do anything to solve that problem, and this will happen very often without separate camera collision. One typical way to handle this is just implement your following camera, ignoring terrain considerations. Then to figure out your camera's actual position, project a line back from the head of the avatar to the camera's ostensible position, and see if it intersects anything to get the camera's true position. In reality you should project a cylinder and not a line since your camera will need its own bounding sphere to contain the near clipping plane. In any case this means that as you move around your camera can jump forward to clear terrain and objects. I've seen this in a few MMOs. However, when you leave blocking terrain you have the option of implementing smooth movement back to the cameras desired location. If you want to get really fancy, I guess you could try to predict when your camera will need to jump forward ahead of time and try to do smooth moment forward too. Maybe you can have a second camera bounding sphere which is somewhat larger, that would trigger smooth movement, but I think you would still need a fallback camera jump routine to be safe.
X file issue
2D and 3D Art;Visual Arts
Hi I'm a student-programmer so I hope you don't take offense with me being here. My problem is uniquely artsy though. I'm experiencing a terrible offset in my game engine when I use skinned meshes. It increases in size the further the model gets from a point (not quite the origin, seems a little further down the z-axis). So this has the effect of making the model appear offset from where it should be.Now I'm torn between it being an engine-error, or a modelling error. I found one skinned-mesh .x file (bones_all.x in example on http://www.toymaker.info/Games/html/load_x_hierarchy.html) where the engine works fine: the model appears where it should.But any models I make (and export via kwxport exporter in max) suffer this offset problem. And then several other models I've tried also suffer this (such as tiny.x from the DX SDK).For example:xof 0303txt 0032template KeyValuePair { <26e6b1c3-3d4d-4a1d-a437-b33668ffa1c2> STRING key; STRING value;}template Frame { <3d82ab46-62da-11cf-ab39-0020af71e433> [...]}template Matrix4x4 { <f6f23f45-7686-11cf-8f52-0040333594a3> array FLOAT matrix[16];}template FrameTransformMatrix { <f6f23f41-7686-11cf-8f52-0040333594a3> Matrix4x4 frameMatrix;}template ObjectMatrixComment { <95a48e28-7ef4-4419-a16a-ba9dbdf0d2bc> Matrix4x4 objectMatrix;}template Vector { <3d82ab5e-62da-11cf-ab39-0020af71e433> FLOAT x; FLOAT y; FLOAT z;}template MeshFace { <3d82ab5f-62da-11cf-ab39-0020af71e433> DWORD nFaceVertexIndices; array DWORD faceVertexIndices[nFaceVertexIndices];}template Mesh { <3d82ab44-62da-11cf-ab39-0020af71e433> DWORD nVertices; array Vector vertices[nVertices]; DWORD nFaces; array MeshFace faces[nFaces]; [...]}template MeshNormals { <f6f23f43-7686-11cf-8f52-0040333594a3> DWORD nNormals; array Vector normals[nNormals]; DWORD nFaceNormals; array MeshFace faceNormals[nFaceNormals];}template Coords2d { <f6f23f44-7686-11cf-8f52-0040333594a3> FLOAT u; FLOAT v;}template MeshTextureCoords { <f6f23f40-7686-11cf-8f52-0040333594a3> DWORD nTextureCoords; array Coords2d textureCoords[nTextureCoords];}template XSkinMeshHeader { <3cf169ce-ff7c-44ab-93c0-f78f62d172e2> WORD nMaxSkinWeightsPerVertex; WORD nMaxSkinWeightsPerFace; WORD nBones;}template SkinWeights { <6f0d123b-bad2-4167-a0d0-80224f25fabb> STRING transformNodeName; DWORD nWeights; array DWORD vertexIndices[nWeights]; array FLOAT weights[nWeights]; Matrix4x4 matrixOffset;}template ColorRGBA { <35ff44e0-6c7c-11cf-8f52-0040333594a3> FLOAT red; FLOAT green; FLOAT blue; FLOAT alpha;}template ColorRGB { <d3e16e81-7835-11cf-8f52-0040333594a3> FLOAT red; FLOAT green; FLOAT blue;}template Material { <3d82ab4d-62da-11cf-ab39-0020af71e433> ColorRGBA faceColor; FLOAT power; ColorRGB specularColor; ColorRGB emissiveColor; [...]}template MeshMaterialList { <f6f23f42-7686-11cf-8f52-0040333594a3> DWORD nMaterials; DWORD nFaceIndexes; array DWORD faceIndexes[nFaceIndexes]; [Material <3d82ab4d-62da-11cf-ab39-0020af71e433>]}template TextureFilename { <a42790e1-7810-11cf-8f52-0040333594a3> STRING filename;}template AnimTicksPerSecond { <9e415a43-7ba6-4a73-8743-b73d47e88476> DWORD AnimTicksPerSecond;}template Animation { <3d82ab4f-62da-11cf-ab39-0020af71e433> [...]}template AnimationSet { <3d82ab50-62da-11cf-ab39-0020af71e433> [Animation <3d82ab4f-62da-11cf-ab39-0020af71e433>]}template AnimationOptions { <e2bf56c0-840f-11cf-8f52-0040333594a3> DWORD openclosed; DWORD positionquality;}template FloatKeys { <10dd46a9-775b-11cf-8f52-0040333594a3> DWORD nValues; array FLOAT values[nValues];}template TimedFloatKeys { <f406b180-7b3b-11cf-8f52-0040333594a3> DWORD time; FloatKeys tfkeys;}template AnimationKey { <10dd46a8-775b-11cf-8f52-0040333594a3> DWORD keyType; DWORD nKeys; array TimedFloatKeys keys[nKeys];}KeyValuePair { "Date"; "2009-06-17 20:19:21";}KeyValuePair { "File"; "";}KeyValuePair { "User"; "DoDo";}KeyValuePair { "CoreTime"; "0";}Frame Box01 { FrameTransformMatrix relative { 0.000000,0.000000,0.000000,0.000000,0.000000,0.00000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000;; } ObjectMatrixComment object { 0.0000000,0.000000,0.000000,0.000000,0.000000,0.0000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000;; } Mesh mesh_Box01 { 24; -0.532122;0.000000;-0.532122;, -0.532122;0.000000;0.532122;, 0.532122;0.000000;0.532122;, 0.532122;0.000000;-0.532122;, -0.532122;2.837986;-0.532122;, 0.532122;2.837986;-0.532122;, 0.532122;2.837986;0.532122;, -0.532122;2.837986;0.532122;, -0.532122;0.000000;-0.532122;, 0.532122;0.000000;-0.532122;, 0.532122;2.837986;-0.532122;, -0.532122;2.837986;-0.532122;, 0.532122;0.000000;-0.532122;, 0.532122;0.000000;0.532122;, 0.532122;2.837986;0.532122;, 0.532122;2.837986;-0.532122;, 0.532122;0.000000;0.532122;, -0.532122;0.000000;0.532122;, -0.532122;2.837986;0.532122;, 0.532122;2.837986;0.532122;, -0.532122;0.000000;0.532122;, -0.532122;0.000000;-0.532122;, -0.532122;2.837986;-0.532122;, -0.532122;2.837986;0.532122;; 12; 3;0,2,1;, 3;2,0,3;, 3;4,6,5;, 3;6,4,7;, 3;8,10,9;, 3;10,8,11;, 3;12,14,13;, 3;14,12,15;, 3;16,18,17;, 3;18,16,19;, 3;20,22,21;, 3;22,20,23;; MeshNormals normals { 24; 0.000000;-1.000000;0.000000;, 0.000000;-1.000000;0.000000;, 0.000000;-1.000000;0.000000;, 0.000000;-1.000000;0.000000;, 0.000000;1.000000;0.000000;, 0.000000;1.000000;0.000000;, 0.000000;1.000000;0.000000;, 0.000000;1.000000;0.000000;, 0.000000;0.000000;-1.000000;, 0.000000;0.000000;-1.000000;, 0.000000;0.000000;-1.000000;, 0.000000;0.000000;-1.000000;, 1.000000;0.000000;0.000000;, 1.000000;0.000000;0.000000;, 1.000000;0.000000;0.000000;, 1.000000;0.000000;0.000000;, 0.000000;0.000000;1.000000;, 0.000000;0.000000;1.000000;, 0.000000;0.000000;1.000000;, 0.000000;0.000000;1.000000;, -1.000000;0.000000;0.000000;, -1.000000;0.000000;0.000000;, -1.000000;0.000000;0.000000;, -1.000000;0.000000;0.000000;; 12; 3;0,2,1;, 3;2,0,3;, 3;4,6,5;, 3;6,4,7;, 3;8,10,9;, 3;10,8,11;, 3;12,14,13;, 3;14,12,15;, 3;16,18,17;, 3;18,16,19;, 3;20,22,21;, 3;22,20,23;; } MeshTextureCoords tc0 { 24; 1.000000;1.000000;, 1.000000;0.000000;, 0.000000;0.000000;, 0.000000;1.000000;, 0.000000;1.000000;, 1.000000;1.000000;, 1.000000;0.000000;, 0.000000;0.000000;, 0.000000;1.000000;, 1.000000;1.000000;, 1.000000;0.000000;, 0.000000;0.000000;, 0.000000;1.000000;, 1.000000;1.000000;, 1.000000;0.000000;, 0.000000;0.000000;, 0.000000;1.000000;, 1.000000;1.000000;, 1.000000;0.000000;, 0.000000;0.000000;, 0.000000;1.000000;, 1.000000;1.000000;, 1.000000;0.000000;, 0.000000;0.000000;; } XSkinMeshHeader { 1; 0; 2; } SkinWeights W-Bone01 { "Bone01"; 12; 0, 8, 21, 3, 9, 12, 1, 17, 20, 2, 13, 16; 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000; -0.015624,-0.000002,-0.999878,0.000000,0.999878,-0.000000,-0.015624,0.000000,0.000000,-1.000000,0.000002,0.000000,-0.011325,0.000000,0.009593,1.000000;; } SkinWeights W-Bone04 { "Bone04"; 12; 4, 11, 22, 5, 10, 15, 7, 18, 23, 6, 14, 19; 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000; 0.000253,0.000000,-1.000000,0.000000,1.000000,-0.000000,0.000253,0.000000,-0.000000,-1.000000,-0.000000,0.000000,-2.814689,-0.000000,-0.009066,1.000000;; } MeshMaterialList mtls { 1; 12; 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; Material _01___Default { 0.588235;0.588235;0.588235;1.000000;; 9.999999; 0.900000;0.900000;0.900000;; 0.000000;0.000000;0.000000;; TextureFilename Diffuse {"C:\\Documents and Settings\\DoDo\\My Documents\\Visual Studio Projects\\DirectXSamples\\Attempt1\\metal_mangledpaint-01_df_.dds"; } } } }}Frame Bone01 { FrameTransformMatrix relative { -0.015624,0.999878,0.000000,0.000000,-0.000002,-0.000000,-1.000000,0.000000,-0.999878,-0.015624,0.000002,0.000000,0.009415,0.011474,-0.000000,1.000000;; } ObjectMatrixComment object { 0.999994,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,-0.000000,-0.000000,1.000000;; } Frame Bone02 { FrameTransformMatrix relative { 0.999878,-0.000000,-0.015625,0.000000,-0.000000,1.000000,-0.000002,0.000000,0.015625,0.000002,0.999878,0.000000,1.150150,0.000000,-0.000000,1.000000;; } ObjectMatrixComment object { 1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,-0.000000,-0.000000,1.000000,0.000000,-0.000000,-0.000000,0.000000,1.000000;; } Frame Bone03 { FrameTransformMatrix relative { 1.000000,0.000000,-0.000252,0.000000,-0.000000,1.000000,-0.000000,0.000000,0.000252,0.000000,1.000000,0.000000,0.862520,0.000000,0.000000,1.000000;; } ObjectMatrixComment object { 1.000000,-0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,-0.000000,1.000000,0.000000,0.000000,-0.000000,0.000000,1.000000;; } Frame Bone04 { FrameTransformMatrix relative {1.000000,-0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,-0.000000,1.000000,0.000000,0.790688,0.000000,0.000000,1.000000;; } ObjectMatrixComment object {1.000000,-0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,-0.000000,1.000000,0.000000,-0.000000,-0.000000,0.000000,1.000000;; } } } }}AnimTicksPerSecond fps { 4800;}AnimationSet IdleShake { Animation Anim-IdleShake-Box01 { { Box01 } AnimationOptions { 1; 0; } AnimationKey rot { 0; 1; 0;4;1.000000,0.000000,0.000000,0.000000;;; } AnimationKey scale { 1; 1; 0;3;1.000000,1.000000,1.000000;;; } AnimationKey pos { 2; 1; 0;3;0.000000,0.000000,0.000000;;; } } Animation Anim-IdleShake-Bone01 { { Bone01 } AnimationOptions { 1; 0; } AnimationKey rot { 0; 1; 0;4;0.496079,0.496078,0.503890,-0.503891;;; } AnimationKey scale { 1; 1; 0;3;1.000000,1.000000,1.000000;;; } AnimationKey pos { 2; 1; 0;3;0.009415,0.011474,-0.000000;;; } } Animation Anim-IdleShake-Bone02 { { Bone02 } AnimationOptions { 1; 0; } AnimationKey rot { 0; 26; 0;4;0.999969,0.000001,-0.007813,-0.000000;;, 800;4;0.999969,0.000001,-0.007813,-0.000000;;, 960;4;0.999702,-0.000180,-0.007811,-0.023143;;, 1120;4;0.996903,-0.000610,-0.007789,-0.078257;;, 1280;4;0.989589,-0.001122,-0.007731,-0.143712;;, 1440;4;0.980154,-0.001547,-0.007658,-0.198084;;, 1600;4;0.975307,-0.001723,-0.007620,-0.220715;;, 1760;4;0.978604,-0.001605,-0.007646,-0.205604;;, 1920;4;0.986371,-0.001283,-0.007706,-0.164352;;, 2080;4;0.994645,-0.000804,-0.007771,-0.103052;;, 2240;4;0.999574,-0.000219,-0.007810,-0.028110;;, 2400;4;0.998531,0.000420,-0.007801,0.053612;;, 2560;4;0.990818,0.001056,-0.007741,0.134975;;, 2720;4;0.977893,0.001634,-0.007640,0.208959;;, 2880;4;0.963103,0.002103,-0.007525,0.269021;;, 3040;4;0.950964,0.002417,-0.007430,0.309204;;, 3200;4;0.946068,0.002531,-0.007392,0.323875;;, 3360;4;0.956819,0.002271,-0.007476,0.290581;;, 3520;4;0.977707,0.001640,-0.007639,0.209828;;, 3680;4;0.993724,0.000873,-0.007764,0.111582;;, 3840;4;0.999567,0.000223,-0.007810,0.028376;;, 4000;4;0.999948,-0.000051,-0.007812,-0.006609;;, 4160;4;0.999952,-0.000045,-0.007813,-0.005921;;, 4320;4;0.999960,-0.000032,-0.007813,-0.004282;;, 4480;4;0.999967,-0.000017,-0.007813,-0.002326;;, 4640;4;0.999969,-0.000004,-0.007813,-0.000687;;; } AnimationKey scale { 1; 1; 0;3;1.000000,1.000000,1.000000;;; } AnimationKey pos { 2; 1; 0;3;1.150150,0.000000,-0.000000;;; } } Animation Anim-IdleShake-Bone03 { { Bone03 } AnimationOptions { 1; 0; } AnimationKey rot { 0; 26; 0;4;1.000000,0.000000,-0.000126,-0.000000;;, 800;4;1.000000,0.000000,-0.000126,-0.000000;;, 960;4;0.999654,-0.000003,-0.000126,-0.026316;;, 1120;4;0.996035,-0.000011,-0.000125,-0.088962;;, 1280;4;0.986584,-0.000021,-0.000124,-0.163255;;, 1440;4;0.974402,-0.000028,-0.000123,-0.224812;;, 1600;4;0.968149,-0.000032,-0.000122,-0.250376;;, 1760;4;0.970774,-0.000030,-0.000122,-0.239996;;, 1920;4;0.977338,-0.000027,-0.000123,-0.211685;;, 2080;4;0.985505,-0.000021,-0.000124,-0.169645;;, 2240;4;0.992991,-0.000015,-0.000125,-0.118186;;, 2400;4;0.998087,-0.000008,-0.000126,-0.061828;;, 2560;4;0.999986,-0.000001,-0.000126,-0.005271;;, 2720;4;0.998908,0.000006,-0.000126,0.046718;;, 2880;4;0.995992,0.000011,-0.000125,0.089445;;, 3040;4;0.992972,0.000015,-0.000125,0.118349;;, 3200;4;0.991648,0.000016,-0.000125,0.128974;;, 3360;4;0.993090,0.000015,-0.000125,0.117359;;, 3520;4;0.996005,0.000011,-0.000125,0.089295;;, 3680;4;0.998486,0.000007,-0.000126,0.055002;;, 3840;4;0.999692,0.000003,-0.000126,0.024820;;, 4000;4;0.999958,0.000001,-0.000126,0.009136;;, 4160;4;0.999987,0.000001,-0.000126,0.005001;;, 4320;4;0.999997,0.000000,-0.000126,0.002337;;, 4480;4;1.000000,0.000000,-0.000126,0.000827;;, 4640;4;1.000000,0.000000,-0.000126,0.000154;;; } AnimationKey scale { 1; 1; 0;3;1.000000,1.000000,1.000000;;; } AnimationKey pos { 2; 1; 0;3;0.862520,0.000000,0.000000;;; } } Animation Anim-IdleShake-Bone04 { { Bone04 } AnimationOptions { 1; 0; } AnimationKey rot { 0; 1; 0;4;1.000000,-0.000000,-0.000000,0.000000;;; } AnimationKey scale { 1; 1; 0;3;1.000000,1.000000,1.000000;;; } AnimationKey pos { 2; 1; 0;3;0.790688,0.000000,0.000000;;; } }}which is just a simple dancing block suffers the offset.So the bones_all.x file indicates it is not my engine... but tiny.x makes me feel like it is.I was wondering if anybody here can offer any help in depth, or rather at the least, whether anybody can send me some skinned-mesh .x files that they know have rendered correctly in a game they use.I thank you for your time and any assistance you can give.Matt K.
There's many a source for .x models. The DirectX SDK has quite a few, our you might want to check out Assimp's repository of test files. The latter one also has a working skinning engine in place and provides source with it, albeit a bit mixed up.Oh, and please put a download link to your model file. There's no need to paste 20+ pages of text into your posting. ; Thanks for the direction Schrompf. Apologies for the many pages of code, I was in a rush and half expected some automated script to crop the code into a scroll-barred box.I'm out of town for the next couple of days, after which I will check out Assimps repository of files and update with my results.God speed.
Tricky Combat Design - Long Post
Game Design and Theory;Game Design
This is my first post on GameDev.net but I read as many posts and their replies as I can in regards to subjects I find interesting. I've never really needed to reply to a post either because I'm also taking in new information from the thread or by the time I finish reading, anything I could say has been said. I only tell you this because I don't want anyone to think I'm attempting to use or take advantage of the support I may get from this thread/GameDev.net, Thankyou in advance.I've finally started to get deep into the design of a combat system I've always wished to play and I'm now getting my thoughts sidetracked by other factors in my games design. I'm hoping to get a little help by identifying problems or being told of similar games that I might be able to test or look into that have a common style or goal.e.g. Rakion (http://rakion.softnyx.net/) F2P -> Micro creditsI'll give a rough guide of the relationships the game features have on each other that play a role in the combat system so you can get a basic understanding without hopefully forcing your train of thought down a certain track.Attributes make up Finite Resources.Attacks are specific to what Weapon/Magic Type you have ready.Character Skills progress with practice/use unlocking extra abilities/attacks/spells overtime as well as Talent Points at specific milestones e.g. every 50 Skill points. They can then be added to the unlocked features within a skill to grant extra bonuses.I'll also try to give an example of how I see the style of the game playing out as its important to why some things might just not work.Main portal is a 3rd Person View quite close behind the character.Combat will be all Manual, each strike, active blocking and aiming so there isn't any Auto-Target function.I'll stop now with the details before this gets any longer. So what I'm really looking for is:Games with a similar style of combatSkills or Attacks that you think won't work with this systemAny problems you foresee or know of within combat gamesAny ideas in general to help build upon this systemAgain thankyou in advance and I'm sorry if anything is still too vague but please post your questions and I'll be sure to answer them as best I can.
This idea dosn't particularily impress me, because it's the blueprint for Many recent games already released. It has the makings of a good action-RPG combat system and character development, but I'm afraid it'll be very similar to other games of its genre. Give it a twist!Making a manual combat system like the one you're describing can be challenging to pull off well. The Witcher (3rd person) made a pretty good combat system. I found it a little confusing sometimes, and frustrating, but I think you should take a look at it. Oblivion (1st/3rd person) also has a really good combat system, which is mostly manual. ; Age of Conan did a combat system that relied on keypress sequences and timings. There was some good but lost potential, and some bad but present aggrivations.The press-a-sequence idea could have been interesting if each press led to several possible other keypresses, so that there was a tree of choices. But instead, they were linear strings of timed presses -- something to be keyboard macro'ed. And that's what happened: Those with keyboard macros could fight, those without just stood there with stalled sequences, trying again and getting killed. It generated significant animosity towards using gamer keyboards, which is counter-productive to a healthy market. ; I know how unimpressive the system sounds and reading back over my original post I can see how hard it is to imagine what I have in mind. So I'll continue by add more details and explaining the differences between the comparisons.The Witcher is a game that falls into the same pitfall most other combat games do, the animations mean next to nothing besides looking good. My game design focuses on accuracy being a check on a hit box within the player and if hit the damage is figured out depending on what state they are in be it either attacking, blocking, parrying etc. Another major difference from the Witcher to what I have planned is that I'll use a fixed 3rd person camera with no cursor on the screen, the mouse movement becomes your way of looking around and aiming. A "look" mode is being implemented and will be toggled to by holding in Left-Ctrl for example which brings the cursor up on screen for specific targeting/looking at things but players won't be able to use most attacks or movements in this mode.I love Morrowind and bought Oblivion before I even owned an xbox360 but the combat system in the game is one I don't think very highly of. Its basically impossible to die within the game because of it and the limited attacks within melee make it more of a hack'n'slash rather then the technical fighter I hope for. I love the stories and fun side quests but the combat to me was something I wish I could skip most times, more so as you become a higher level.I followed the creation of AoC for such a long time and I hoped that I would be playing it for years because of the combat system. It just didn't work. Again the animations aren’t a true representation of what’s actually happening and with the manual blocking system they implemented it made it difficult at times to fully block an attack without knowing class attacks/combos off by heart.For anyone who hasn't played the game Rakion which I mentioned in my first post but likes this kind of system I suggest you give it a go. I haven't played in awhile but it was something I played and enjoyed a lot. It’s just a simple game with a lot of bad design choices but it’s a relatively small download and you can experience all of the game without paying anything, you just won't beat most of the people that do ^^I've based my design from Rakion and true fighting games, I've gone back looking at the classic 2D fighters right through to the newer fighters like Tekken and even Street Fighter IV. My biggest problem I fear is coming up with the balance of where the power actually is.Hope this clears up some more questions and gives a better idea as to what I'm trying to achieve but if you still have questions please just post or if you would like to help out in its design feel free to PM me, Thanks. ; Hi I am impressed by your enthusiasm :)Your thought was exactly the one that me and my korean developers shared in designing action based MMORPG in 2005 (didn't work out well with console minded SEGA though).Maybe I can give you some pointers as a fellow developer, however I need some more details on the game structure itself.Are you thinking about MMO (one with persistent world) or MO (one with P2P)? ; My goal for the design is to make the combat system work as best as possible since other major features for the game require it. I do aim to create a MMO one day, with technology and middleware becoming better all the time I believe there will be a day where Indie developers will compete on the same ground as huge commercial MMO's.At the moment I'm aiming to make the combat a game of its own and then implement features from that starting point. My idea and goal for a very basic release would be a lobby based multiplayer game which focuses on training players in the way of combat. I say training because it will act as a Beta test for the released version of the combat mechanics and help to tweak and find any unbalance before combat becomes such a major foundation of the entire game.As more features are implemented players will have a bigger role in tweaking, giving feedback and ideas to help with further development. The basic game client/server will allow a lot of testing to be done without having to spend millions ahead of time making a persistent world and all the extra content and also allow for player base to form early and help shape the game.I say client server at the moment but Peer2peer is an option for what I have in mind for early development as well, which would save on expenses. I do have some marketing ideas and goals for the end release to make the game affordable for everyone but still maintain a high quality server.Hope that helps and if you have any other questions feel free to ask ^^ Thanks. ; Honestly, the first thing that comes to mind with what you describe is a boxing game.Just take out the gloves and slip in weapons and it seems this is what you are after; which was somewhat what AoC originally sounded like (but with moving camera angles) and decided to back out of later.So I keep thinking, instead of looking at complicated combo-mashing systems like Tekken, why not take a look at boxing titles where the combinations are fare smaller, but tactically must be diverse; as well the stats of the character's must be robust and versatile according to training and point spending.In a sense, you are looking at making the beta very much a kata of this.Another game that seems appropriate would be the Bushido Blade series (which you have undoubtedly played considering your interests).Seems mixing these two concepts together would produce the atmosphere you are looking for.I'm not sure if you are having magic or not, or how you are thinking of mixing it in such a highly strict systems. ; Key Points1) latency and syncAs we know, MMOs (that is, C-S structure) are way slower than MOs (P2P). If you are planning a fast paced action, you SHOULD go for MO, or the game will be a fast-input-but-not-so-accurate-output kind of game.2) benefit as an ONLINE actionBiggest concern of all should be WHY we should implement such detailed action in really frustrating online environment, since all the cool stuff in offline environment will NOT WORK FULLY. (If players like really good sync and high action based game mechanics, they'd simply go buy another console action game)3) Action VS Character GrowthBiggest dilemma in designing online action game would be confronting irony between action components and character growth. For example, usually in action games, the actual growth takes place in users itself (control skills), where almost all of the online RPGs pick character growth (better items, level up) which are user's possessions that lure players to come back to play again.These things may well be considered before actually designing the action portion of the game.Let's hear about what you think on this, and continue :) ; Regarding lag Robert; check your inbox. ;) ; I'm really glad for the help, it really is helping honestly, and I’ll address the questions and answer anything in the order that I read the posts so I'll start with:Griffin_Kemp, one form of combat will be unarmed and players can train that so boxing and martial arts techniques will play a role in the game. Each skill will offer something others don't, with unarmed granting more powerful grip attacks vs fencing which offers further reach with its weapons and a higher chance for critical strikes for example.I'm glad you mentioned "complicated combo-mashing" because I wanted this thread to help make sure I didn't make the system too complicated. The fact it's aimed for PC and the 3rd person view I have selected should help limit button confusion while still allow for a complicated and skilful system.I know the original post was very vague but I'll explain a little more now. I have six attributes which make up the three finite resources, health, stamina and mana for a character. Each skill has attributes assigned to them so training in them also helps raise your attributes along with the skill itself. Training skills unlocks your more powerful abilities since even early in the game players can use a weapon and wield combos like real life but the more proficient you become in a skill you unlock talent points. These talent points make a big difference to your abilities and allow characters to focus on the abilities they use or need to fit their style of play. The character development alone is quite complex and that doesn't include any added effects from items either.Which areas do you think are most important for combat?e.g. 50% Player Skill, 25% Character template, 25% items etc"In a sense, you are looking at making the beta very much a kata of this."- I'm not entirely sure what you mean by this so if you could rephrase I'd like to answer.The Bushido Blade series isn't something I've looked into or played and since my internet is shaped till 1am I've only had a chance to look at one youtube video but it shows promise and I'll make sure to look into the mechanics later on.I do plan on having magic skills available to the players as well as ranged attacks like archery and throwing weapons since they all basically work under the same principle. Attacks will vary in the way they are applied within the game but the user should eventually pick up on how attacks work for their character and what to expect from opponents by visual cues such e.g. 2-Handed sword combos or flaming hands representing red magic.Now to answer Limdul, for the latency and sync issue I know MMO's are very demanding on bandwidth and it will be a long time if ever my ideas make it to that level but I still plan to design skills in a way that do favour out of sync combat with passive bonuses plus I've never been a fan of super fast paced fighting so I plan for a slower system which should help players and the server.I'm creating this combat mechanic for this platform and style of game because I personally want to play it and believe others will too. I'm not trying to make this the ultimate fighting game for players who enjoy the super fast paced action of most console fighters but instead move away from what’s become the standard combat system present in most MMO's today.As I've mentioned before the combat part of the game plays an important role in almost all the other aspects. I hope to find a balance between all the features in the game that not only makes a player feel like their character is needed or the items they posses but that their skills are important in combat. Other major features then focus on their supportive aspects like Crafting with the economy and my own Community system with social interaction. So think along the lines that as the character grows and gains within the game so will the players as new options open up for them to experience and master.I'm sorry for such a delayed response but hope this answers everything but again if not, feel free to ask more. Thanks again to everyone
Casting to avoid warnings
General and Gameplay Programming;Programming
I have alot of wanrings in my code. I've got rid of half by getting rid of warnings related to deprecated code. The other half is mostly because of situations where one data type is used in place of another.Now, I know that when I have an int and am passing float data to it, that takes along time due to rounding. So usingint a = (int)thatFloat; is slow. Am I right, then, in thinking the other casts are ok? For example I have some RECTs I am making for text, and I am getting warnings about passing floats into longs. I should leave those because of rounding, and just suck it up and handle the warning. Is that the best plan?Other times, I am using vectors and I need to know how many objects are in the vector. Am I ok casting from t_size to int because there isn't a slow down?I've always just gone and programmed and never really worried about casting, but this time I want to clear up that darned box of all the warnings I get, and on this occasion speed does matter.Maybe someone could point me towards an article or two on this? It's an interesting topic but google isn't helping me too much.
Worrying about the speed of a cast is completely pointless. You should instead worry about why there is a cast in the first place, and what consequences can arise from having it there. Any casting situation can (possibly) result in a loss of data or some other unintended consequence. Casting from float to long, of course, loses decimal precision. Casting from size_t to in can cause an overflow, since size_t is based on an unsigned integer type.You should evaluate each situation where you receive a casting warning, and determine whether you actually need to cast, or whether you should instead be working with the 'correct' data type. They give you a warning for a reason. ;Quote:Original post by FunsoNow, I know that when I have an int and am passing float data to it, that takes along time due to rounding. So usingint a = (int)thatFloat; is slow. The only difference from not casting that float to int explicitly is that you get a warning. The compiler will anyway emit the same casting-code, what else shall he do when you try to assign a float to int? (the alternative would be to throw an error).And if I remember correctly, since Pentium a x86/87 fistp took no more than 6 cycles.Sidenote: In clean C++, you use static_cast<target-type>(sourceValue), not (target-type)sourceValue or target-type(sourceValue), for such conversion. ; It is more than just the fraction truncation. Rounding is generally not a problem.The warning there is very significant: If the integral part cannot be represented in the destination type, the behavior is undefined.When storing to a char, there is no check to verify that it fits within CHAR_MIN and CHAR_MAX. No runtime check for INT_MIN and INT_MAX for integers. No runtime check for storing in a signed or unsigned variable of short, long, or any other integral type. If the value at runtime when the conversion takes place doesn't fit, you get undefined behavior.If you aren't familiar with undefined behavior, it is a Really Bad Thing™. It might appear to do nothing wrong. It might happen to do the thing you expected. It might crash every time. It might randomly crash. It might introduce random errors. It might cause toenail fungus and make your pet leave you. It is just a Bad Thing.The warning is there to help you avoid the significant bug of undefined behavior. ;Quote:Original post by phresnelAnd if I remember correctly, since Pentium a x86/87 fistp took no more than 6 cycles.The fistp instruction is fast, but some compilers don't actually use it for float->int casts. I know that MSVC uses a ftol subroutine for standards compliance which in some situations can bottleneck code using a lot of casts. If you want a non-C++-standard compliant fistp instruction, you have to either use inline assembly or a special compiler switch to generate a fistp instruction for casts (which risks breaking things because it's not standards compliant, and also depends on the FPU rounding mode).As mentioned, the cast int a = myfloat is an implicit cast, and int a = (int)myfloat is an explicit cast. The compiler issues a warning for implicit casts because it isn't sure that was your intention, whereas typing in a cast explicity shows your intention is to convert the data type. If it is your intention to implicitly cast and you don't care about the side effects, #pragma warning(disable: xxxx) or similar can turn off the warning. ;Quote:Original post by FunsoI have alot of wanrings in my code. I've got rid of half by getting rid of warnings related to deprecated code. The other half is mostly because of situations where one data type is used in place of another.Now, I know that when I have an int and am passing float data to it, that takes along time due to rounding. So usingint a = (int)thatFloat; is slow. The point of that particular warning isn't due to performance (most compiler warnings aren't), but correctness. When you cast to an int, you are potentially losing data, and have potentially undefined behavior (if the truncated float can't fit in an int).What the compiler is doing is making sure that you know you're doing this. When you cast to an int, you're telling the compiler, "yes, I'm sure that this is what I want to do."float a = 2.5f;float b = 2.5f;int ai = (int)a;int bi = (int)b;float fAnswer = a + b;int fAnswerToInt = (int) fAnswer;int intAnswer = ai + bi;Obviously, fAnswerToInt and intAnswer won't be the same. This loss of data is what the compiler is warning you about. ;Quote:Original post by AshleysBrain #pragma warning(disable: xxxx) or similar can turn off the warning.Generally, I would warn (no pun intended) against this sort of thing. Explicitly casting is generally a better way to go, especially once you get into "self commenting" code. ; If you are using C++, I'd get out of the habit of using those C-style casts and into the habit of using the C++ explicit casts. Consider:void f(){ char *s="hello"; int c=(int)s; // compiles, probably not what you meant to do int d=(int)23.0f;}void g(){ char *s="hello"; int c1=static_cast<int>(s); // error, probably rightly so int c2=reinterpret_cast<int>(s); // compiles, tells the compiler you are sure int d=static_cast<int>(23.0f); // compiles}Using static_cast will cause compiler errors where there is no implicit conversion between the types. When you really need to do a reinterpretation of the bits from one type to another, reinterpret_cast makes it explicit in your code that this is your intention.
Sirikata: Developers needed for open source platform
Old Archive;Archive
Sirikata (http://www.sirikata.com) is an BSD licensed open source platform for games and virtual worlds. We aim to provide a set of libraries and protocols which can be used to deploy a virtual world, as well as fully featured sample implementations of services for hosting and deploying these worlds. The project has grown our of some years of research at Stanford Computer Science and we are now trying to build this out to a full scale community run open source project.The Platform Developers starting page (http://www.sirikata.com/wiki/index.php?title=Platform_Developers) is a good place to get a further sense of the project and what needs to get done. Any code related questions can be asked on our open dev list (http://groups.google.com/group/platformtalk).We are looking for strong C++ programmers. Experience with Ogre and/or working on large systems would be preferable.Since everything is open you can just jump in from here :)Paid contract work could become available for very strong candidates. Please send your bio/CV to Henrik Bennetsen ([email protected]) with links to any relevant work.
A moderator will probably pop in to ask you reformat according to the Help Wanted post template, that'll avoid a few redundant questions in the thread.I visited Stanford a few weeks ago where this project was presented in a conference, and it caught a nice amount of attention from both developers and content creators. I recommend anyone interested in free networked online worlds to take a peek. There's a lot of momentum going on with this project!Pleased to catch you here Henrik, welcome to GameDev!
Hiccups as I walk between tiles...
For Beginners
Hey all,I'm trying to have a character walk from one tile to another in your typical RPG style map layout. I'm looking to make the player walk from one tile to another before they are able to move again (ie, not move anywhere). This is for gameplay reasons and has to be exact.The problem is, the player hiccups as he walks ever so slightly beyond a tile and gets snapped back towards it. I'm using your typical position += velocity * deltaTime.This code is no doubt causing the issue:if (currentState == WALKING){if (velocity.y < 0){facing = FACING_UP;animationManager.setAnimation("WalkUp");if (targetTile.getPosition().y >= position.y){position.y = targetTile.getPosition().y;velocity.y = 0;}}else if (velocity.x > 0){facing = FACING_RIGHT;animationManager.setAnimation("WalkRight");if (targetTile.getPosition().x <= position.x){position.x = targetTile.getPosition().x;velocity.x = 0;}}else if (velocity.y > 0){facing = FACING_DOWN;animationManager.setAnimation("WalkDown");if (targetTile.getPosition().y <= position.y){position.y = targetTile.getPosition().y;velocity.y = 0;}}else if (velocity.x < 0){facing = FACING_LEFT;animationManager.setAnimation("WalkLeft");if (targetTile.getPosition().x >= position.x){position.x = targetTile.getPosition().x;velocity.x = 0;}}}Is the only solution to switch to a fixed time step and move away from the delta times?Thanks!
The code is quite simple and looks okay, so I don't think it is wrong.The player shouldn't be able to walk beyond a tile.The only thing i can think of: Maybe you're rendering at the wrong time. Are you sure you are:1. Moving the player.2. Checking it's position against the target tile.3. Rendering your scene.In that order?Also prepare to get flamed for using the word "manager" in a variable name.^^ ; When the player presses a directional movement key, he is to move only one tile and cannot move again until he represses another key, is this correct? Are you changing currentState to a non-walking state after reaching the destination tile?EDIT:Are you performing the the code snippet above before or after you are moving? ; The code you shows is the cause for moving back. The problem lies not here though.The problem is (I assume) that you add the delta movement, but you don't clip it. So the player moves onto the target tile and a little bit beyond. The code snippet you showed then sets the player back causing the visual "hiccup".If you need a tile-centric movement you have to check, if the delta movement would move the player beyond the tile. If it does, calculate the time delta that's actually needed to exactly reach the tile and stop the player there. Subtract the calculated delta from the full time delta and run the loop again until there is no more movement beyond a tile. ; I agree with Endurion; the problem could lie here. Except, you could just set the position to the target position instead of the minimum delta that is required to move the position to the target position. [smile]Try this:if (velocity.y < 0){facing = FACING_UP;animationManager.setAnimation("WalkUp");// check to see if the position after applying velocity * delta_time// puts the character past the target position:float predict_y = position.y + velocity.y * delta_time;if ( targetTile.getPosition().y >= predict_y ){position.y = targetTile.getPosition().y;velocity.y = 0;}}Unfortunately, you'll have to change your four identical code blocks to match, you could refactor your code as:struct WalkHelper{std::stringmAnimName;// Animation name to feed to animationManagerFACING_ENUMmFacing;// Facing to set the character's "facing"Vector2mDirection;// The direction this refers to WalkHelper( const std::string& anim, FACING_ENUM facing, const Vector2& dir ) :mAnimName( anim ),mFacing( facing ),mDirection( dir ){}};/* ... */if ( currentState == WALKING ){// Set up the possible movements (one-time init):const WalkHelper walks[] = {WalkHelper( "WalkUp",FACING_UP,Vector2( 0, -1 ) ),WalkHelper( "WalkRight",FACING_RIGHT,Vector2( 1, 0 ) ),WalkHelper( "WalkDown",FACING_DOWN,Vector2( 0, 1 ) ),WalkHelper( "WalkLeft",FACING_KEFT,Vector2( -1, 0 ) )};const unsigned walks_sz = sizeof( walks ) / sizeof( WalkHelper );// Iterate through all the possible movements:for ( unsigned i = 0; i < walks_sz; ++i ){const WalkHelper& w = walks;// Select the x or y component of w.mDirection that is not zero, then check// to see if the selected component of direction and the character's velocity// match signs:if (( w.mDireciton.x != 0 && ( w.mDirection.x < 0 == velocity.x < 0 ) ||( w.mDireciton.y != 0 && ( w.mDirection.y < 0 == velocity.y < 0 ) ){// Set facing and animation:facing = w.mFacing;animationManager.setAnimation( w.mAnimName );// Get the distance between the character and the target tile:float distance = ( targetTile.getPosition() - position ).length();// Get the distance that the character will travel this frame:float traveldst = ( velocity * dt ).length();// If the distance is within the character's stride:if ( distance < traveldst ) {// Snap him to the tile, and set velocity to zero.position = targetTile.getPosition();velocity = Vector2( 0, 0 );// No more directions to checkbreak;}}}}*Untested code[Edited by - _fastcall on June 19, 2009 2:04:47 AM];Quote:Original post by _fastcallI agree with Endurion; the problem could lie here. Except, you could just set the position to the target position instead of the minimum delta that is required to move the position to the target position. [smile]Try this:*** Source Snippet Removed ***Coming soon: A refactoring of your code snippet so you don't have to change your code in four places!That's just needlessly complicated. If you simply check if the player moved to far after you actually moved him, you won't need to predict anything.So just move him, THEN check if he moved too far. If so move him back. And THEN render.
rainbow cloud
GDNet Lounge;Community
I dont think Ive seen this before (there was snow/hail yesterday) ice in the sky defracting light, but anyways this colored cloud was up in the heaven today for at least ~10 minutes, I was watching for a few minutes it dissipating + weaving across the sky (before I grabbed the camera + took a few shots)so has anyone seen this sort of thing before?
Sure,in winter season when frosty weather peplace warm and surplus water in air turns in ice crystals.Imho this is a kind of parhelia.Ice crystals has another refraction than water,and such "rainbows" has another appearance. ; My first guess was going to be some kind of pollution, but I think Krokhin is right; it's a dispersion effect, probably from ice crystals.That's pretty cool, I've never seen that before. ;Circumhorizontal arcNice find, now try and see if you can sell the pictures.Quote:Original post by KrokhinSure,in winter season when frosty weather peplace warm and surplus water in air turns in ice crystals.Imho this is a kind of parhelia.Ice crystals has another refraction than water,and such "rainbows" has another appearance.That link is suspect; it seems to have some type of malware associated with it. ; Looks beautiful. I can't remember having seen anything like this before. I probably don't live in the right climate zone.Then again, it could be the government experimenting with chem-clouds in order to control your mind ;);">This person would probably believe it actually is a government conspiracy. Nice pics tho. ; It's very simple to make it artificialy in sunny and frosty (below -20*C) day: just splash out a bucket of boiling water in the sun direction as far as it possible.It looks just amazing, like a million rainbows in the snow blast. ;Quote:Original post by kevtimcCircumhorizontal arcyes thats seems to be it, ok, so it is quite rare (One doesnt want to embarrass oneslef I remember an ozzie friend of mine seeing hail for the first time, he was running around yelling its snowing :) ).I should of been quicker with the camera, like always youre torn between watching something or going inside + looking for the camera only to come back + the event is finished, since it started off much brighter than I took the photos of, I captured its dying phase.Quote:Original post by KrokhinSure,in winter season when frosty weather peplace warm and surplus water in air turns in ice crystals.Imho this is a kind of parhelia.Ice crystals has another refraction than water,and such "rainbows" has another appearance.halos around the sun (+ sometimes the moon) I see ~10x a year but nowhere as strong as those photos (gotta be no wind for this to occur + temp ~0->10degrees)I noticed somethingsee here,http://en.wikipedia.org/wiki/Circumhorizontal_arcall the photos start at red at the top + blue at the bottom, yet mine are reversed (or more correct blue left + red right)why?is it cause Im in the southern hemisphere?also according to wiki'In order to be observed, the sun must be very high in the sky, at an elevation of 57.8'this is not true as u can see where thew sun is in the first photoalso'In areas of Northern Europe it can only be observed around the time of the Summer solstice'which is about now, thus here in the southern hemisphere it should be reversed right? so thats completely wrong, unless it occurs globally at the same time (which seems strange)Quote:Nice find, now try and see if you can sell the pictures.since photos are rareI have the originals ~6m/pix photos plus 10 others as well, though I wont sell but giveaway free in the interests of science, email me if interested ;Quote:Original post by zedzQuote:Original post by KrokhinSure,in winter season when frosty weather peplace warm and surplus water in air turns in ice crystals.Imho this is a kind of parhelia.Ice crystals has another refraction than water,and such "rainbows" has another appearance.halos around the sun (+ sometimes the moon) I see ~10x a year but nowhere as strong as those photos (gotta be no wind for this to occur + temp ~0->10degrees)I noticed somethingsee here,http://en.wikipedia.org/wiki/Circumhorizontal_arcall the photos start at red at the top + blue at the bottom, yet mine are reversed (or more correct blue left + red right)why?is it cause Im in the southern hemisphere?also according to wiki'In order to be observed, the sun must be very high in the sky, at an elevation of 57.8'this is not true as u can see where thew sun is in the first photoalso'In areas of Northern Europe it can only be observed around the time of the Summer solstice'which is about now, thus here in the southern hemisphere it should be reversed right? so thats completely wrong, unless it occurs globally at the same time (which seems strange)Heh,I had to look it in wiki,and has found Sun dog.IMO there are two types of effects: 1. Based at full internal reflection and refraction of light in water drops,it happens mostly in sun opposite direction -rainbows 2. Refraction /reflection on ice crystals -various halos,false suns,sun dogs etc,mostly to sun direction.Your photo has a normal color order (for sun dogs and rainbows),that's why I supposed that it's a kind of parhelia,this phenomena has a circle symmetry relatively to sun and it doesn't depend from hemisphere of couse.In your link photos it's pretty hard to determine where is the sun at all,may be an order is right? (though it seems me that in this photo in your link the sun is somewhere in the top-left corner,i.e. everything ok)-------My 20.06.09 observation ">of sundog[Edited by - Krokhin on June 20, 2009 12:48:57 PM]
It's Official: Dogs Are Smarter Than Cats
GDNet Lounge;Community
The Guardian reported yesterday that cats are not as smart as we think they are: Cats outsmarted in psychologist's test. Quote:...Psychology lecturer Britta Osthaus says cats do not understand cause-and-effect connections between objects. She tested the thought processes of 15 of them by attaching fish and biscuit treats to one end of a piece of string, placing them under a plastic screen to make them unreachable and then seeing if the cats could work out that pulling on the other end of the string would pull the treat closer.They were tested in three ways, using a single baited string, two parallel strings where only one was baited, and two crossed strings where only one was baited.The single string test proved no problem, but unlike dogs (which Osthaus has previously tested) no cat consistently chose correctly between two parallel strings. With two crossed strings, one cat always made the wrong choice and others succeeded no more than might be expected by chance....The study helped show the limits of feline intelligence, said Osthaus, who conducted the research while a teaching fellow at Exeter University. "If we know their limits we won't expect too much of them, which in turn is important for their welfare. I am not trying to say cats are stupid, just they are different. We are so anthropomorphic we can't see the world through their eyes."...Given that I am allergic to both dogs and cats I don't have a stake in the outcome of the contest, but I thought this bit of news was worth a chuckle just the same. What do you think about the results? about the tests? about cats and dogs living together? ...
Yes, but now for the real question: Are cats smarter than psychologists?It really doesn't surprise me. I mean, if cats were smarter than dogs, wouldn't we have seeing eye cats (as opposed to seeing eye dogs)? ;Quote:Original post by MoeIt really doesn't surprise me. I mean, if cats were smarter than dogs, wouldn't we have seeing eye cats (as opposed to seeing eye dogs)?Indeed, dogs hold down a variety of jobs and do them very well. They are trainable, which speaks to their intelligence and their ability to, at least to some degree, comprehend things from our perspective. ;Quote:Original post by MoeIt really doesn't surprise me. I mean, if cats were smarter than dogs, wouldn't we have seeing eye cats (as opposed to seeing eye dogs)?I think that goes more toward the trainability of dogs rather than intelligence. Besides, octopii are more intelligent than both [grin]; Dang. If I ever go blind I'm totally going to get me a seeing eye octopus (or octopi). ;Quote:Original post by ChaosEngineQuote:Original post by MoeIt really doesn't surprise me. I mean, if cats were smarter than dogs, wouldn't we have seeing eye cats (as opposed to seeing eye dogs)?I think that goes more toward the trainability of dogs rather than intelligence. Besides, octopii are more intelligent than both [grin]crows aswell it seems[Edited by - SimonForsman on June 17, 2009 6:03:26 PM];Quote:Original post by ChaosEngineQuote:Original post by MoeIt really doesn't surprise me. I mean, if cats were smarter than dogs, wouldn't we have seeing eye cats (as opposed to seeing eye dogs)?I think that goes more toward the trainability of dogs rather than intelligence.Doesn't it take intelligence to be trainable? Training is usually done through cause and effect (do this and get a treat), which takes intelligence to learn. Plus every dumb animal I've owned has been untrainable, whereas the smart ones are highly trainable. ; I'm pretty sure cats understand cause-and-effect quite well. Especially when you spray them with water for climbing on the curtains. They don't usually do that again. ; Cats just have a strong will of themselves. Cats are definitely smarter than rats or mice but are less trainable for example. Heck, I used to have a bunny that I trained to follow me around and understood commands such as "don't touch" and "stay". It was definitley less smart than the cat I have today, yet I can't teach my cat these things.Also, don't forget about all the crazy things people have been able to teach catls, like using the toilet instead of a litter box. ;Quote:Original post by LessBreadabout cats and dogs living together? ...Warning: This link may exceed federally mandated limits for cuteness.
Most promising Smartphone?
For Beginners
This is my first post here, I'm a fairly new developer, long time gamer. Being a game developer is very exciting to me, and I've already learned a lot from this site. Hopefully one day I'll be adding some valuable info around here as well :)I'm planning to purchase my first smartphone soon with the intent of developing games for it. Is there any consensus as to which smartphone is the most promising in this regard? I understand that Android and the Palm Pre are fairly new, so this would almost certainly come down to speculation. Are any of the phones on the market particularly *bad* for game development? The types of games I have in mind aren't typical, but more along the lines of social or augmented reality, incorporating (hopefully) image capturing, direction sensing, etc (don't wanna divulge too many details). Thanks in advance!
capability wise, the iphone looks to be at the head of the pack, that being said apparently the developer terms aren't very appealing, that combined with the fact that in Canada, Rogers wireless (the sole iphone carrier) wants your left n*t means I don't see myself getting one. ; Yeah,the iPhone is less appealing to me for those very reasons. However, it does have a significant market share and that is important to me for the sorts of games I'd like to develop (multiplayer w each player having a separate device). Technologically I don't know of anything working against the iPhone. While it may not be the best on the market at doing everything it does, it does what it does fairly well. I'm sort of leaning in that direction (iPhone) as I don't know that any other phone will become so prevalent amongst the general public. I'm not looking to make tons of money with this or anything (though I'm certainly not opposed to the idea), but due to the multiplayer aspect, it would be nice if it could be playable by a sizeable segment of the population.Is it possible to have interoperability for a game between multiple different devices? Say one user has an iPhone and one a Pre, could the game be developed for each respective platform in such a way that these users could play? Are there any platforms which would be more suited to 'playing nice' with other platforms? ; Apparently RIM's blackberries are the top runners:http://www.crn.com/retail/218000045;jsessionid=WXD1QLUTSBLUIQSNDLOSKH0CJUNN2JVN; Any phone with Google Android seems to be the most promising imo, just because it's open source. The Marketplace on Android already has several wonderful programs and there will be many more coming in the next few years. ;Quote:Original post by LocheimIs it possible to have interoperability for a game between multiple different devices? Say one user has an iPhone and one a Pre, could the game be developed for each respective platform in such a way that these users could play?Of course - all smartphones that I am aware of allow you to add networking to your applications, and as long as you implement the same networking protocol in each client, they can play together.Quote:Original post by godsenddeathcapability wise, the iphone looks to be at the head of the pack, that being said apparently the developer terms aren't very appealing...What particular aspect of the iPhone developer terms do you mean? The approval process is a little unwieldy (but I have heard less complaints about it recently), and the refund policy is scary, but the commission Apple takes (30%) isn't too bad... ; If your interest is specifically in developing games, then iPhone is currently the clear frontrunner. And as onerous as various provider terms are, the brilliance of iPhone is that it shares its operating system with the iPod touch. (Disclaimer: my phone is a Blackberry 8900 Curve, and I own a first-generation iPod touch.) ;Quote:Original post by swiftcoderQuote:Original post by LocheimIs it possible to have interoperability for a game between multiple different devices? Say one user has an iPhone and one a Pre, could the game be developed for each respective platform in such a way that these users could play?Of course - all smartphones that I am aware of allow you to add networking to your applications, and as long as you implement the same networking protocol in each client, they can play together.Quote:Original post by godsenddeathcapability wise, the iphone looks to be at the head of the pack, that being said apparently the developer terms aren't very appealing...What particular aspect of the iPhone developer terms do you mean? The approval process is a little unwieldy (but I have heard less complaints about it recently), and the refund policy is scary, but the commission Apple takes (30%) isn't too bad...I've read that they take huge commission, and apparently they tend to reject apps that directly compete with their own apps ;Quote:Original post by godsenddeathI've read that they take huge commissionAs I mentioned, the commission is 30%, which in my experience is pretty reasonable as compared to game portals.Quote:and apparently they tend to reject apps that directly compete with their own appsApple doesn't make games, so even were this the general case, it wouldn't affect us [wink]
Pause full screen application
General and Gameplay Programming;Programming
Hi all,If any fullScreen application is running i want to pause/minimize it and open my fullscreen application.After that i want to restore again the initial application.C++ code will be appreciable.Thanks,Gerald.
Well in my custom C++ game API, all you gotz to do is this://Somewherez in codeGame.setMode ( Game::GOD_MODE )and everything is *fabulous*.Joking aside, you have to tell us what API or engine you are using or what platform you are making this on. We don't have mind powers. ; I think i should be more clear with my questionI have an Console application(Say A.exe) built in VC++,the job of this application is to find any game is currently running in my pc.If game is running the A.exe will call another exe say (B.exe).The problem is "B.exe" should open in full screen mode and the game that was running previously should be paused/minimized.I tried the following code which is in "A.exe" calls the "B.exe"DWORD spi_time;SystemParametersInfo(SPI_GETFOREGROUNDLOCKTIMEOUT, 0, &spi_time, 0);SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, (LPVOID)0, 0);STARTUPINFO info={sizeof(info)};PROCESS_INFORMATION processInfo;info.wShowWindow = SW_SHOW; if (CreateProcess(NULL, "B.exe", NULL, NULL, TRUE, 0, NULL, NULL, &info, &processInfo)){ HWND hWnd = FindWindowA(NULL, "Quiz Application" ); //Window name of "B.exe"SetForegroundWindow(hWnd);SetActiveWindow(hWnd);::WaitForSingleObject(processInfo.hProcess, INFINITE);CloseHandle(processInfo.hProcess); CloseHandle(processInfo.hThread);} The above code opens the "B.exe" but not able to focus as the first visible application (ie)B.exe is not spawn over the game which is running.
Student - Game industry
For Beginners
Hello, first of all let me introduce my self, trying enter the gaming industry, before I seek advice. I'm writing from the netherlands, recently turned 17 and I'm currently entering 5th year of the 6 years of pre-university education. I have chosen the most dificult profile of the 4 profiles you can choose in Pre-University Education. Its called Nature&Technology. With this profile and Math B (the most advanced type of Math) I can basicly almost enter almost any type of education on Universities.But on the list of Free-Courses when choosing this profile for Pre-university education YEAR 3/6 I could choose 2 free courses and I chose Biology and Economics, and I never chose Computer Sciences or Informatics (we call it: Informatiekunde). I did get Informatics / Computer Science one short year. I then wrote small stuff with notepad and made a website, realy easy stuff, but I totally forgot where it is and how I did it. Basicly I followed instructions of teacher. But that was back then.I had a very good reason for Letting Informatics go to make room for other subjects back then: the university in Amsterdam or any other universities here in Holland didn't have Computer Science or Informatics as a requirement to previous studies (Pre-university Eduction requirements). They did however put Math B in their requirements. So I thought I'll do Economics and Biology with Math B to open up more opportunities in the future. So it opened many many more paths and opportunities. But now that I'm older I know I'm going to enter the gaming industry. Thats my desire and the decision I made. Now I'm going to explain further how I'm trying to achieve this and what kind of plans I'm making for the future.I'm totally new to programming and any other developing on computers for that matter. I recently bought "Absolute Beginner's Guide To C" Second Edition By Greg Perry. This is the best books I could find and its also one of the easiest. I read the first chapter and I downloaded Visual C++ express edition (I think 2008 version) and followed tutorials on the internet setting this up on my computer coming across alot of terms I really didn't have a clue about. Ignoring these terms I followed the steps to several "Hello world" tutorials and I kept failing to execute the program or set up my computer correct, or even compiling programs I wrote. I kept failing and I actually messed up my whole computer playing with all these files and trying to do all those stuff I read on the internet wich I don't even understand for 10%... So I gave up. Now I'm very persistent if I know my desires exactly. So I'm never going to stop now no matter how many times I fail now that I've made the decision. I'm back for more, and I need some advice, even if that means critisize me. Like you need talent for programming and I can never do that unless you give up your whole life and stop showering and get behind ur computer 24/7 because I'm such a nobody in the gamedev at the moment. Maybe thats true because thats my current impression of my self at the moment. This is very dificult, my mindset: its easy to HAVE knowledge, you are really educated when you can acquire knowledge fast. But it is very hard to acquire knowledge about programming stuff. Thats why I find this dificult. And thats where I'm at now, totally a beginner in the developement and progamming world. With all these help around and still I can't acquire knowledge about programming.But I could use some advice here from people to help me make more organized plans to achieve these stuff. I recently came across a website that blew my mind away. It is the perfect university education I seeked for so long. http://www.computersciencegames.comCharles Sturt University in Australia (Bathurst) teaching Bachelor Computer Sciences (games technology) 4 years. In The Netherlands I've always found "Bachelor: Informatics" followed by "Master: Computer Sciences" with the requirements of Math B to enter the bachelor as I already mentioned. But those don't really focus on entering the gaming industry and the one from Charles Sturt University DOES! And I think its the only one on the planet or not? Anyway I'm going to contact that university about diffrence between distance education (by computer) or just staying in their Halls of Residence and attend their seminars for 4 years (Australia is on the other side of the planet! but its beautiful). Also about the diffrence between regular bachelor computer sciences and bachelor computer sciences (games technology). Unless any of you guys can answer those.Now I wonder is it really stupid that I have no background at all about computer sciences and then trying to enter this education without even the knowledge about the inside on my own computer, I mean I know simple stuff like videocards, processors etc. But I'm not that fimiliar with them compared to many friends I know who DO. When they talk I'm like wtf are you talking about? I never had time to get into all this deeper, but I'll make time now. Do you think I should try request from my school to attend Informatics my last 2 years ANYWAY? So that I atleast have a little bit of background? Or should I just independant learn stuff my self, is that ok? Anyone here ever attended Computer Sciences know how much basic knowledge is actually required besides the math? How hard would it be for someone who has compeleted pre-university education but has no clue about anything that is connected with computers? I mean it says "no requirements for Informatics/computer sciences as previous studies to enter bachelor computer sciences... I don't know about the Charles Sturt University tho. the requirements there may be higher. I'm going to write another topic (Absolute beginner to C Q's) about the present instead of the fututre where I'm having particular problems about programming as an absolute beginner, thanks for reading and any advice given is very appreciated.
Are you sure programming is the best path for your personality and talents? If you are intent on pursuing programming because you think you have to, then maybe you should look at all the other types of occupations in the video game industry and rethink. ; I suppose I can give you a few different responses to this. For one, as Tom said, there are many routes into game development, and programming isn't the only one. But you should also keep in mind how quick career plans can change, especially someone of your age. If you are 17, and love computers and technology and have a passion for making things work, and also have a passion for video games, than it is definitely a career path you should look into taking. If you are 17 and just like the idea of creating games because you like playing them, it might not be enough to justify wanting to go through that much trouble to procure a position doing this.If you are still interested, I would suggest you not worry yourself too much with the way computers work AT THIS MOMENT. If you are looking to get into college for computer science, they require you to take classes that teach the basics. Technology isn't quite a talent that you are just born with, you have to learn it, and at the college level they don't expect you to know everything. That's what teachers are for, to teach you. I'm in college right now, and am lucky that I have been considered as an advanced user since I was 13 and built my first computer. Having the hardware knowledge thus far has helped me absolutely none, and it won't help me until I start doing more low level programming that actually affects the hardware, which unless you are looking into engine programming, you will probably never have to look into.;Quote:Original post by twintwixHello, first of all let me introduce my self, trying enter the gaming industry, before I seek advice. I'm writing from the netherlands, recently turned 17 and I'm currently entering 5th year of the 6 years of pre-university education. I have chosen the most dificult profile of the 4 profiles you can choose in Pre-University Education. Its called Nature&Technology. With this profile and Math B (the most advanced type of Math) I can basicly almost enter almost any type of education on Universities.So you're doing gymnasium or atheneum then?Quote:But on the list of Free-Courses when choosing this profile for Pre-university education YEAR 3/6 I could choose 2 free courses and I chose Biology and Economics, and I never chose Computer Sciences or Informatics (we call it: Informatiekunde). I did get Informatics / Computer Science one short year. I then wrote small stuff with notepad and made a website, realy easy stuff, but I totally forgot where it is and how I did it. Basicly I followed instructions of teacher. But that was back then.The informatica I had on highschool was a joke. Half a year of fiddling with QBasic if I remember correctly. For the most part I've been doing level-design in my spare time, and some (ugly, but gradually improving) websites. During my last year I decided I wanted to get a headstart on programming, so I did a project in C++ for school, swamping some programmer friends with questions. Hehe. Turned out that it's easy to learn bad habits, as I found out later, but oh well, it was interesting and challenging, and I did get some experience early on. I should note that those years of level-design payed off, too - they gave me valuable insight on game-development processes.Quote:I'm totally new to programming and any other developing on computers for that matter. I recently bought "Absolute Beginner's Guide To C" Second Edition By Greg Perry. This is the best books I could find and its also one of the easiest. I read the first chapter and I downloaded Visual C++ express edition (I think 2008 version) and followed tutorials on the internet setting this up on my computer coming across alot of terms I really didn't have a clue about. Ignoring these terms I followed the steps to several "Hello world" tutorials and I kept failing to execute the program or set up my computer correct, or even compiling programs I wrote. I kept failing and I actually messed up my whole computer playing with all these files and trying to do all those stuff I read on the internet wich I don't even understand for 10%... So I gave up. Now I'm very persistent if I know my desires exactly. So I'm never going to stop now no matter how many times I fail now that I've made the decision.C is an older, lower level language. Still useful in some areas, but not really one of the most beginner-friendly languages. I'd suggest Python for a first language. There's less low-level details that you need to worry about, which leaves you with more time to learn how to program.Quote:This is very dificult, my mindset: its easy to HAVE knowledge, you are really educated when you can acquire knowledge fast. But it is very hard to acquire knowledge about programming stuff. Thats why I find this dificult. And thats where I'm at now, totally a beginner in the developement and progamming world. With all these help around and still I can't acquire knowledge about programming.Don't look at it like that. You've got opportunities to learn - embrace and enjoy them. :)Quote:Charles Sturt University in Australia (Bathurst) teaching Bachelor Computer Sciences (games technology) 4 years. In The Netherlands I've always found "Bachelor: Informatics" followed by "Master: Computer Sciences" with the requirements of Math B to enter the bachelor as I already mentioned. But those don't really focus on entering the gaming industry and the one from Charles Sturt University DOES! And I think its the only one on the planet or not?It's certainly not the only one. And it's not a requirement to 'get into the industry' either. Maybe it's just me being skeptical of game-development courses, but I'd say actually being a good programmer is more important than whether or not your education was particularly game-oriented. I've gotten my bachelor informatics and I'm continually striving to become better at what I do. Just make sure you get to be a competent programmer. That's what you want to do, so you'd better do a good job at it.That, or you can pick another route, as Tom Sloper and Joshuad already mentioned. ;Quote:Original post by Tom SloperAre you sure programming is the best path for your personality and talents? If you are intent on pursuing programming because you think you have to, then maybe you should look at all the other types of occupations in the video game industry and rethink.I'm currently in a position where I can become almost everything, I don't lack talent in any areas of my life besides my Raptor brain (the one that does all the actions like fighting and sports). I can be artistic, philosophical, logical, emotional, psyochological, I've worked on all those aspects and I'll keep working on them all my life besides my sport skills has gone lower, I used to be able to footbal basketbal and peform gymnastics like a pro making airflips & stuff, but the value of those skills decreased as I become older, besides dancing value is increasing like Salsa but those aren't real sports? But I do push my limits alot to see what I do like and what I don't like. Thats how I get to know my self better all the time. So thats me... And no matter how many bad things I've heard about programmers it still stays an attractive profession in my eyes. Just the amount of possibilities and advanced jobs you can have as a programmer. I don't care about how programmers get critisized because I for one am not afraid of critics. I can still have a mentally+physical healthy life and become a programmer. I don't buy newest versions of cars even tho the older version of the same car is better just because I should be afraid of critics I even appreciate critics if they are valid. I'm also a person that likes to develop taste in everything like, cars, games, women, movies, food. Eventually you will know what you like and don't like. And I know that I like classic cars more then modern ones.I've thought about becoming a: -psychologist, I find the way that humans work outside their natural world(civilization) very interesting. How certain character traits have been blend in from barbarism to civilization. How the interaction between the 2 genders is still so very animal-like. How humor has become such an important factor in our daily lives even tho you didn't require humor to escape from a crocodile or a lion in our evolution process. Turns out that evolution-psychology was alot more for me. But still I woulden't like to make a profession out of it.-neurologist, my dream was to create a company called Artificial Dreams that would overrun the entertainment industry since I know alot about the psychology behind entertainment like games and movies. Movies and games is really hypnosis, and hypnosis is really almost like dreaming and dreaming can be really entertaining for me besides that you forget them quick as with games and movies but then less severe since the memory is still active and hypnosis here isn't very deep, but what entertainers movie and game developers are trying to achieve is suck you in the game by creating stuff that gets your attention and creating the vibe like sound music compositions etc. This is perspective of my deep thinking philosophical mind, and hypnosis is all around you btw, its just that you mind has this defence mechanism that doesn't make you as vaulnerable to hypnosis from therapy which you would actually cooperate with the hypnotist to gain acces to you. I would actually lead this company with a master mind group of people working in harmony and me being leader with sympathy rather then dictatorship. And neurology to master the details and do my part of the job a 100%.-astronomer well you could figure out your self how big the universe is, and now I would blow your mind if I talk about time travel and parallel universes. now this will always be a passion of mine but getting a profession that requires me to find new energy resources trough researsch I'm not interested in. I can always read the newest stuff about this subject and watch documentaries without working my but of on phsysics theories. Because I know that the job isn't important, its the desire to want to achieve something that gets you there, keep the desire in mind, nurish it, picture it everyday and you will achieve with persistence, organized planning and desire being your motivation. Like the guy trying to time travel to get back to his dad who passed away. A dead father being the motivation and the guy is close to manipulating the energy fields or something to create a worm hole. Seriously what people without talent or education have achieved trough motivation and persistence would blow your mind away. I know I will succeed on this kind of subjects alot since I have talent for it, but I would never have enough motivation to get to the top.-physicist (this is one of my biggest talent, physics I letterly dominated this subject on school always with little learning, I compare my younger years to that of Einstein and I admired him alot. I grew up thinking the way a physicist does.Now all this I don't care. I know sometimes being succesful is making other people do stuff, since that would be more succesful then trying everything on your own. I don't require to know everything, since I know with an academic degree I can acquire knowledge everywhere. For a master mind group to cooperate in perfect harmony thats another thing. Thats how I will achieve stuff in my life. Wether I'm a lead gamedeveloper, band leader, Professor, founder of Artificial Dreams, what ever kind of leading you can imagine. I know that becoming a good leader is learning and gaining knowledge from a good leader as a good FOLLOWER. I think I will start as a follower in the game developement world by becoming a programmer. Not just to enter the game developement world easily but also because being a programmer just sounds attractive over all. The money and easy jobs everywhere. I don't mind working behind computers for long hours at all. I prefer it actually. I love working with in huge teams from all cultures all over the world like I always imagined game developers did. But writing programs like puzzling sounds fun. I think I can even enjoy the process of debugging since I'm a very patient guy, and trying out diffrent techniques which suits me best to write making as little bugs as possible. And eventually I think even those hardware that get in touch with your senses (Artificial Dreams) in the future will require smell, sight, sound programmers. Programming is so wide. The demand for programmers will gorw only more and more. So the money I will earn is very good. And I'm also good at math and I enjoy the challenge of it. The only thing that would stop me really is if I don't have any talent whatsoever on this part, but I know I can develop talent for it anyway. But the impression I have from computer scientist or informatics thinking is how they annoy so much when people can't think logical and when they're trying to teach people stuff so simple and logical yet they can not comprehend. I found this very funny idd and I was the favorite student of that guy. I can be VERY logical. I can like annoy people by the amount of logical I can have, I can even shut down my emotions if I want to xD comes with the hard work in school. I don't think I'll have a hard time on the math side of programming, logical thinking, patience, anti-stress. Really I even have clothes of the brand "Relakz" ...when people get stressed and man or in a argues I'm always the one thats relax and puts more effort into solving the problems instead of screaming them out loud. I can always see problems easy, and I like problem solving alot. And the last thing is I can work in very long hours without breaks and without stressing alot, since I've learned that by working my way 3 levels of normal school education up from lower secondary professional education to higher general secondary education to pre-university education(atheneum). And I was in year 3/6 when I reached atheneum, so in 1 lvl increased every single year. I've never really thought about it alot but infact this says alot more about me then I think, since people comment on it alot. And I can really learn programming if the knowledge is organized for me to gain and I don't have to search for it all the time trying to organize information my self, I hope that teaching dificult stuff like programming is being taught well and organized step by step in Computer Sciences. So what do you think now I've described my self a little more detailed. I can picture my self working for one of the companies who have brought me so much entertainment of great value. Me being part of that is a great honor. They will be role models of my future gaming developement, but I would like to programm stuff for them once in my life. And btw thank you alot for the comment Tom sloper, I'm getting to the rest of you commenters now after this reply Sorry if for my writing skills, its kinda late here in netherlands and I'm writing as fast as I can, hehe. I'm sure you get it. ;Quote:Original post by JoshuadI suppose I can give you a few different responses to this. For one, as Tom said, there are many routes into game development, and programming isn't the only one. But you should also keep in mind how quick career plans can change, especially someone of your age. If you are 17, and love computers and technology and have a passion for making things work, and also have a passion for video games, than it is definitely a career path you should look into taking. If you are 17 and just like the idea of creating games because you like playing them, it might not be enough to justify wanting to go through that much trouble to procure a position doing this.If you are still interested, I would suggest you not worry yourself too much with the way computers work AT THIS MOMENT. If you are looking to get into college for computer science, they require you to take classes that teach the basics. Technology isn't quite a talent that you are just born with, you have to learn it, and at the college level they don't expect you to know everything. That's what teachers are for, to teach you. I'm in college right now, and am lucky that I have been considered as an advanced user since I was 13 and built my first computer. Having the hardware knowledge thus far has helped me absolutely none, and it won't help me until I start doing more low level programming that actually affects the hardware, which unless you are looking into engine programming, you will probably never have to look into.Well then my reply to Tom sloper could also be used to your comment :) And its good to know that universities organize knowledge for me aswell and that I can LEARN programming. Because thats a thing I'm good at luckily. Otherwise I can still develop talent tho, I've done it alot. So what do you think now? And ty for the reply Joshuad, 13? wow you must be really skilled by now. ;Quote:Original post by Captain PQuote:Original post by twintwixHello, first of all let me introduce my self, trying enter the gaming industry, before I seek advice. I'm writing from the netherlands, recently turned 17 and I'm currently entering 5th year of the 6 years of pre-university education. I have chosen the most dificult profile of the 4 profiles you can choose in Pre-University Education. Its called Nature&Technology. With this profile and Math B (the most advanced type of Math) I can basicly almost enter almost any type of education on Universities.So you're doing gymnasium or atheneum then?Quote:But on the list of Free-Courses when choosing this profile for Pre-university education YEAR 3/6 I could choose 2 free courses and I chose Biology and Economics, and I never chose Computer Sciences or Informatics (we call it: Informatiekunde). I did get Informatics / Computer Science one short year. I then wrote small stuff with notepad and made a website, realy easy stuff, but I totally forgot where it is and how I did it. Basicly I followed instructions of teacher. But that was back then.The informatica I had on highschool was a joke. Half a year of fiddling with QBasic if I remember correctly. For the most part I've been doing level-design in my spare time, and some (ugly, but gradually improving) websites. During my last year I decided I wanted to get a headstart on programming, so I did a project in C++ for school, swamping some programmer friends with questions. Hehe. Turned out that it's easy to learn bad habits, as I found out later, but oh well, it was interesting and challenging, and I did get some experience early on. I should note that those years of level-design payed off, too - they gave me valuable insight on game-development processes.Quote:I'm totally new to programming and any other developing on computers for that matter. I recently bought "Absolute Beginner's Guide To C" Second Edition By Greg Perry. This is the best books I could find and its also one of the easiest. I read the first chapter and I downloaded Visual C++ express edition (I think 2008 version) and followed tutorials on the internet setting this up on my computer coming across alot of terms I really didn't have a clue about. Ignoring these terms I followed the steps to several "Hello world" tutorials and I kept failing to execute the program or set up my computer correct, or even compiling programs I wrote. I kept failing and I actually messed up my whole computer playing with all these files and trying to do all those stuff I read on the internet wich I don't even understand for 10%... So I gave up. Now I'm very persistent if I know my desires exactly. So I'm never going to stop now no matter how many times I fail now that I've made the decision.C is an older, lower level language. Still useful in some areas, but not really one of the most beginner-friendly languages. I'd suggest Python for a first language. There's less low-level details that you need to worry about, which leaves you with more time to learn how to program.Quote:This is very dificult, my mindset: its easy to HAVE knowledge, you are really educated when you can acquire knowledge fast. But it is very hard to acquire knowledge about programming stuff. Thats why I find this dificult. And thats where I'm at now, totally a beginner in the developement and progamming world. With all these help around and still I can't acquire knowledge about programming.Don't look at it like that. You've got opportunities to learn - embrace and enjoy them. :)Quote:Charles Sturt University in Australia (Bathurst) teaching Bachelor Computer Sciences (games technology) 4 years. In The Netherlands I've always found "Bachelor: Informatics" followed by "Master: Computer Sciences" with the requirements of Math B to enter the bachelor as I already mentioned. But those don't really focus on entering the gaming industry and the one from Charles Sturt University DOES! And I think its the only one on the planet or not?It's certainly not the only one. And it's not a requirement to 'get into the industry' either. Maybe it's just me being skeptical of game-development courses, but I'd say actually being a good programmer is more important than whether or not your education was particularly game-oriented. I've gotten my bachelor informatics and I'm continually striving to become better at what I do. Just make sure you get to be a competent programmer. That's what you want to do, so you'd better do a good job at it.That, or you can pick another route, as Tom Sloper and Joshuad already mentioned.Ye athenuem since I wasn't aloud to attend greece/latin lessons, because my previous schools never teached them. It would be too much to catch up with those guys after 3 years or so I think.Python? Never heard of it. WoW! I always thought to focus on C or C++ since its what game devs use alot. And the Absolute Beginners guid to C from Greg Perry actually treats its readers as if they are old people who never touched a computer, so I thought it would be beginner friendly. And about the university, I've read so much about it and it seems that it would give me many advantages to just follow that computer sciences (games technology) in particular, because its really no disadvantage in finding jobs compared to a regular programmer who attend regular computer sciences education, it covers all the basics but the system is very great in charles sturt university, they work on your employement as well as being just a good programmer. Like get you jobs in companies with their many connections, I can even give them some companies I would have in mind they will even write those companies FOR me. I don't really know how useful that is but sounds unique and exclusive. And then after some time ( I forgot the whole system) your teacher will come over talk with you and your employer and then with you in private again to ensure everything is in your likings in that environment. Even the costs for living in your new home after travelling to your new employer abroad is figured out. The succes rate at Charles Sturt University is very high and I think they can help me step with the right foot into the new world of game dev. And they also mentioned that like 100% of the people there remain in those companies they got in and are offered a full-time job with a wage right after the "work placement" period is over. The only diffrence in Charles Sturt university is that they have industry placement, and that they actually put alot of stuff you learn into practice. Thats priceless stuff you can't just learn I thought. But is this actually all useless stuff when it comes to programming? Its all about your skills and a great portifolio which shows great demo's or creatings of you as a programmer, and really all you need is experience or getting involved in programming for several "good" games before you will be accepted in other companies? Really does a programmer not even require any skills into offering his own services besides proof?Let me quote a Student testimonial (Matthew Pettifer: lead programmer at Electronic Arts): "The games course at CSU provided me with the core skills I use daily in the developement of our latest game: Dead Space. Being a game play programmer, I need a high level of knowledge in both object oriented programming and human computer interaction. Thanks to the games tech course, I was able to gain employment as soon as I finished my degree." I mean EA? Wow! I know that EA isn't really what they used to be, but still they are succesful now. I think they can dominate with all the exclusives they would have if they created their own Console, EA 360 xD I know that EA employs many programmers and is a big part of the gaming industry. I still remember playing need for speed: road challenge or other NFS series on playstation with my bro when I was 7 years old and seeing that EA brand on the screen, succes on its early ages. they are the second largest company in the industry but NFS sux... what money does to you ^^ they should stay loyal. Loyalty to consumers is very important to me, I think it would be a honor to work with those game designers that make brilliant games like from Remedy, Alan Awake and Max Payne. Tho Max payne 3 wont be from those same dev's... anyways,Captian P, ty very much, for your comment. I mean wow tt gave me alot of new insight! :) really great stuff.[Edited by - twintwix on June 18, 2009 8:24:59 PM];Quote:Original post by twintwixI recently came across a website that blew my mind away. It is the perfect university education I seeked for so long. http://www.computersciencegames.comCharles Sturt University in Australia (Bathurst) teaching Bachelor Computer Sciences (games technology) 4 years. In The Netherlands I've always found "Bachelor: Informatics" followed by "Master: Computer Sciences" with the requirements of Math B to enter the bachelor as I already mentioned. But those don't really focus on entering the gaming industry and the one from Charles Sturt University DOES! I was born, raised and educated in Bathurst, Australia ;)I attended Charles Sturt doing a Bachelor of Information Technology, but I had lots of friends (and family) that did the "Computer Science (games technology)" course.None of the people that teach that course have ever worked in the games industry. Take a look at this page, and take note that they're not showing any students who have actually gotten jobs in the industry either! One guy is doing an internship at EA. (To be fair, I know of a handful of students who have gotten full-time jobs at companies like Transmission and EA, but they're not advertised on that portfolio page).Any student in that course that has gotten somewhere, has done so because of their own talents and passion, not because of the university.e.g. I wanted to do that course but (luckily!) I didn't do well enough in High-school to get in. However, I still got a job in the industry much quicker than the games-tech students, because I taught myself games in my spare time (Whereas many of the games-tech students relied on classes to learn, and didn't teach themselvs).If you have the same passion for game programming, then you can do any computer-science degree at any university and succeed. You've just got to push yourself and be willing to learn on your own.That said, Bathurst is a nice little town, but very hot in summer and very cold in winter ;) ;Quote:Original post by HodgmanQuote:Original post by twintwixI recently came across a website that blew my mind away. It is the perfect university education I seeked for so long. http://www.computersciencegames.comCharles Sturt University in Australia (Bathurst) teaching Bachelor Computer Sciences (games technology) 4 years. In The Netherlands I've always found "Bachelor: Informatics" followed by "Master: Computer Sciences" with the requirements of Math B to enter the bachelor as I already mentioned. But those don't really focus on entering the gaming industry and the one from Charles Sturt University DOES! I was born, raised and educated in Bathurst, Australia ;)I attended Charles Sturt doing a Bachelor of Information Technology, but I had lots of friends (and family) that did the "Computer Science (games technology)" course.None of the people that teach that course have ever worked in the games industry. Take a look at this page, and take note that they're not showing any students who have actually gotten jobs in the industry either! One guy is doing an internship at EA. (To be fair, I know of a few students who have gotten full-time jobs at companies like Transmission and EA, but they're not advertised on that portfolio page)Any student in that course that has gotten somewhere, has done so because of their own talents and passion, not because of the university.If you have the same passion for game programming, then you can do any computer-science degree at any university and succeed. You've just got to push yourself and be willing to learn on your own.That said, Bathurst is a nice little town, but very hot in summer and very cold in winter ;)haha you make me want to go live in Australia! And I really appreciate your comment alot! This is not something the university them self would admit that easily, I know ofcourse that succes doesn't lie within the school itself, scince I've been to 5 schools in my life, even a private one, and the diffrence is that some teachers don't teach you to teach your self and some do. Ye rly I said teach to teach your self xD ...I've figured those stuff out too. But you've just gave me that boost of confidence I required. ty :)I've got another question then. You and Captain P saying I've just got the be the best programmer I can be, so I was thinking about the master degree. I've really only looked into universities here in Netherlands besides CSU in Australia ^^Do you know wether it would be useful to get that Computer Science Master degree then? to become an even more competent programmer like you and Captain P suggest me to. Don't know wether something like a Masters degree even exits outside my country or how the system works there ^^ I'm sure it does. So isn't it possible to follow a master Computer Science in games technology? That would be awesome. but what about the master in general, is it of any use in the future career of a programmer? I have this impression of you that you know stuff like that :P Not sure tho. thanks tho, your comment really had a impact there... wow these forums are even more useful then I could have ever imagined! And its a honor to write someone who grew up in australia, one of my favorite countries and actually got education in CSU, hear its famous for its community :-) ; I'd just like to throw in a little back-up Hodgeman's statement about the industry: from what I've seen in a lot of interviews and heard across the board, most people in the industry weren't formally trained in Game Design. Any general Computer Science degree should do, and would probably be recommended as they likely train you to adhere to standards and focus on more practical applications in business and science. Game Development is something you can aspire to on the side, as there plenty of resources online (look here!) As Hodgeman also said, it shows that you've got the motivation to learn and take on tasks yourself; it shows you're a go-getter.
redirecting stdout and stderr to a single file
General and Gameplay Programming;Programming
Hi guysI have a program that processes about 150,000 files and outputs one line of text for each file to the standard output stream, plus one line of text every time an error is found with a file, to the standard error stream.Oviously, the amount of information makes it impossible to read from a command prompt, so I have to redirect the output to a file.The bad thing is the error message does not reference the file it applies to, so it's like:(stdout) processing file blah.txt(stderr) error found!I know how to redirect both streams to a file:program.exe > log.txt 2>&1but I think that because buffering, the messages are not reported in order which makes it impossible for me to track down the error. What I get is basically 150,000 lines of "processing blah blah blah", and then at the end a single line "error found!", which of course doesn't apply to the last processed file at all.I can not modify the software I am using (which is perforce, by the way)How could I deal with this? I've tried to google this but didn't find anything interesting.Thanks in advance for any help!
What makes you think that the messages are in order when they're displayed to the console? And if they're not, what makes you think that the information about the correct ordering can be retrieved at all? ; Pr. Zahlman , I usually am a big fan of your maieutics, but could you make your point more explicit here? [smile]Let me rephrase my question: is there a way to make sure that both standard and error streams of a single process are reported in the same order as they are written to.The reason I think it's possible is because it makes sense to me. That does not mean it is actually possible. If I knew I wouldn't be posting here.Best, ; How about putting a timestamp to your output? At least visually you could try to sort out when an event occurs. ;Quote:Original post by jantaLet me rephrase my question: is there a way to make sure that both standard and error streams of a single process are reported in the same order as they are written to.The reason I think it's possible is because it makes sense to me. That does not mean it is actually possible. If I knew I wouldn't be posting here.Expanding on Zahlman's post -Consider the standard output stream and the standard error stream as two independent objects, which they really are. With these stream objects, there are certain internal buffering mechanisms that prevent output from always going directly out to the "console" (just for a simple example, it's a little more complicated under the hood). The console is a shared resource, so if at any time any three of the output stream objects use it, there will be some problems with the result (it has to do with I/O resources).So if one object were to write "Hello World" and at the same time (i.e, when you are using threads) another object was to write "123456", then the actual output that you see is not defined. It could print the messages in order, it could print "Hello 12345World6", or any number of other combinations. If you want a simple analogy, think about a 2 lane one way road that merges into one lane. There is no way to keep the cars in the same original order they were traveling in.If you just had one thread running, then output should always be serialized and you would avoid any problems with multiple writes. If you didn't though, there is no way to guarantee correct ordered output of the text unless the application had synchronization in place for accessing the output stream objects.So, you don't have many possible ways to solve the problem. You could try:1. See if you can make perforce use only one thread for processing all those files so output is serialized and you can follow all the input sequentially. I don't use it so I'm not sure how it's setup or even if this is possible, but I would imagine it is using more than one thread right now to process all those files. If it is currently using one thread at a time, you should not be having problems, so I think it's safe to assume it is! Likewise, look for any options related to this issue in the output format so it does not do this.2. Try to use this MSDN article: How to spawn console processes with redirected standard handles, only if you can run perforce as a console application or invoke it through a console prompt via cmd line and hope you can at least dump the text that way. I would think that you will get the exact same output from your original stream redirection example, but it's always worth a shot for verification.3. This is out of the question here I assume, but sometimes you can just patch the client yourself or inject your own DLL to detour the logging mechanisms and synchronize them yourself. I don't think it's a realistic solution for you here, but that's quite often one way to get around these problems.I don't think there is really any easy way around it aside from reconfiguring perforce if it was possible. You might want to contact their support though as they might know of how to solve this issue if you have not already. Good luck!
Sprite Sheet Studio
2D and 3D Art;Visual Arts
Hey there people.I'm a hobbyist game designer and mostly like to dabble in XNA and DirectX with C++.My art skills are garbage but I have a very good programming background.Awhile ago my brother who is an animator approached me about creating a program that would make sprite sheet creating a little easier. He had been using a program we found when we were kids called "Chara Mucker 1999". This allowed some neat little features that greatly helped in sprite sheet making.... 10years ago. The program has now been pretty much outdated. Nothing that I am aware of at least matches it in terms of focusing on sprite making. On the other hand it's missing some features common to most graphic editing software today.Real sprite based games are not that popular anymore of course but I know that many casual designers still love to make them as they are quite easy to work with. So with all this information in mind I set out to make a new program for him to create sprite sheets.Along the way I decided that if I was going to put all this work into this program I might as well design it so other people could use it too. So I now have a sprite sheet creating/editing piece of software almost in alpha release that I want to share with the world... maybeSo I have a few questions for the community.#1)What programs do you guys currently use to make sprites? I know of very few sprite creating pieces of software. I am familiar with other things like photoshop and gimp but what is out there that you use that focuses on sprites?#2)Do you think it would be worth it to make it available to the public? I made it for my brother but hey if other people want it thats cool too. Here is a bit of a feature run down.-Layers: Like in photoshop and such you can separate elements of the sprite into layers making it easier to make changes to certain elements. Like drawing a basic animated form and clothing layers on top to make it easier to change the clothing later. Layers can have their opacity changed.-Animating: Once a sprite is completed you can proceed to build animations by clicking on the cells. (ie: walking cells 0-7 at 60ms a cell) a preview is shown of the animation and you also set what the animation does when it completes like looping, freezing, going to a different animation etc. What makes this a neat feature is that when you export the final sprite sheet an animation ".sas" file is spit out (really just XML). That can be used by a programmer to know what the artist had intended each animation to be and once the code is written can simply use the .sas file to load that animation info into a game.-Hue Saturation Brigtness shifting: Idea behind this feature is often times people will want to have very similar sprites with only a small colour change. Think like megaman or npc's in rpg's. This feature allows you to narrow down your colour selection and change the HSB (hue, saturation, brightness). This was done so you can do something like take a yellow piece of armor with red lines and turn it into a black piece of armor with green lines. The whole process would take about a minute or two while if you tried to do it using colour replace it could take a lot longer and might not look as good.-Tools: The usual painting pencil line drawing etc. It has a few tools I am quite proud of those being, colour replace: Click a colour and it will change every occurrence of that colour to your selected colour. Also an outline tool which will allow you to instantly outline an area with a specified colour.-Grid: Sections off the sprite sheet into where the cell boundaries are and can be further broken down to half and quarter cell boundaries. Finally it can display all of this and at higher magnification a grid of the pixelsI know nothing in this program is new or revolutionary but as far as I know there isn't a program that combines sprite sheet making with some effects like layers and hue shifting.A screen shot of a semi recent build of the projectSo would anyone be interested in sampling the software? I am shooting for making the alpha release for June 28th. I'm not sure if there is a market to sell it. I know the main audience would be hobbyists so I couldn't make it more then $10-$20 or just donation based. For now though I just wanna know if people are interested, if there is similar software or if I should just keep it to myself...
I have looked all around for a good program to help me make sprites and animated gifs and swfs. Only problem is, I make vector sprites, not bitmap ones, so I can't do much with your current program concept.Currently I make my vector frames in Inkscape, then have to import them one at a time and hand-align them in Gimp to use its animation playback filter and export an animated gif file. This is very suboptimal because I can't edit the vectors natively in gimp, and I haven't figured out how to make gimp's animation playback thingy work properly with transparent backgrounds, so I've so far been limited to doing animations with colored backgrounds, which is almost useless for sprites.What I'd really love is a module for Inkscape which can preview animations and export them as swf files or transparent png sprite sheets. This would require implementing in Inkscape some kind of sidebar where groups of vectors could be treated as layers/frames. Inkscape is free software, I'm not sure how open source it is though - since I'm not a programmer I didn't pay attention to that when I was researching the program. ;Quote:#1)What programs do you guys currently use to make sprites? I know of very few sprite creating pieces of software. I am familiar with other things like photoshop and gimp but what is out there that you use that focuses on sprites?I primarily use MSPaint and occasionally delegate to MSGIFAnimator and Graphics Gale for animation/alpha blending respectively. There's quite a few others available, but that doesn't mean people won't be interested in your program.Quote:So would anyone be interested in sampling the software? Sure, i'd be interested in checking it out.Quote:I am shooting for making the alpha release for June 28th. I'm not sure if there is a market to sell it. I know the main audience would be hobbyists so I couldn't make it more then $10-$20 or just donation based.For now though I just wanna know if people are interested, if there is similar software or if I should just keep it to myself...2D artwork and sprites are still quite popular in the casual gaming market, just check out some of the artist communities in my signature, www.Tigsource.com, etc. I'd suggest you ask them what they think of your program, what kind of features they'd like to see in it, etc. It should help give you a better idea of your target audience. ; I mainly use GraphicsGale, but I have to switch to IDraw3 for animating since GraphicsGale's animation features are mainly suited for animated GIFs and not for sprite sheets. I think IDraw3 is what you call "Chara Mucker." It would be nice to have one program to do it all.I mainly use 16 and 256 color paletized sprites, but my game is a bit retro. Anyway, to suit my needs, it would have to have good palette editing options, like GraphicsGale. For example, I like to use the load palette option for my NPCs sprites so I can see what it looks like with various palettes. Other palette editing features I use is color ordering. By placing different shades of a same color together and in order in the color index, my game can temporarily assign a gradient palette to the sprite and cycle it to create a nice palette animation effect.The only reason I would use layers would be for "paper doll" style sprites like in Diablo 2, but I've managed to do it without that feature. However, my game has very low resolution (320x240). For a high resolution game, I'm sure it would be very useful.Basically, if you can make a program that supports the sprite editing capabilities of GraphicsGale and add IDraw3's animation preview system, I think it would be perfect for me. ; Thank you for the interesting replies.I will definitely have a look at that tigsource site some more it looks like a promising place for feedback.Ya I don't really work with vector graphics often I find there is something really charming about 16-bit graphics"Chara Mucker" is different then "chara maker". To your credit Chara mucker I believe is what me and my brother called it. If I remember correctly now it's actually called "Character Maker 1999" though a search on google only returned 2 results for that name. They were the right program but it appears to not be around anymore and virtually fallen off the internet.Your pallet suggestions are fantastic. Currently I have it so that you can select a default pallet which is your regular old rgb mix plus brown added in for kicks. Then you can grab a pallet of every colour currently in use on the selected layer.I was going to simply put off creating your own pallets and saving until later but from the feedback I have received I will implement it so that you can save and load your own pallets. As well there is a instant colour selector by holding down the middle mouse button you can instantly grab you current colour and then it will come up with 256 similar colours.In terms of direct comparison to Graphics gale and iDraw3 mine lacks polish but understandbly it's alpha software. GG is quite complex and it has some very nice features. I will be taking a few of the things it does with pallets for sure. iDraw on the other hand seems inferior to my program but mostly due to age. Most specifically I think my animation method is much better.On the last note I mostly added the layers as a way to work your sheet. The Idea I guess is basically be able to onion skin and put rough work on layers so you can model better work over it. As well it can be used to make more complex stuff like clothing layers.If these are 2 of the more common programs I think there is room for my program in the hearts of spriters... with a little polish of courseThank you very much for the feedback and I hope you will give the program a shot....going away from the net for the weekend I suppose I will write a manual for it
using webcam to get players face
For Beginners
i was wondering how do you go about getting the a screenshot from the webcam for the players face , so other online players can see what they actually look like etc :D
I dunno, but I'd guess a google of "YOUR_PROGRAMMING_LANGUAGE_HERE webcam" or "YOUR_PROGRAMMING_LANGUAGE_HERE connect to webcam" will give you some good insight. ; I believe you want to look into capturing an image from a Twain compliant device. At least that'd probably be the easiest way of going about it.; Why not just let them upload a pic if they want... ; Why not just enter their name into Facebook? ; If you can find it at a bookstore, I believe Game Programming Gems Vol 6 has a chapter about webcams. I believe they discuss algorithms to detect movement and such but you'll be able to find out how they get the webcam stream from their source.
Variable Paremeter with value type bug
AngelCode;Affiliates
Perhaps there is something I am missing, but I cannot get variable parameters with out reference to work. I have stripped out the function to the bare minimum to reproduce.The following causes a call to NxVec3 operator= with null pointers:Script:NxVec3 value;varParam(value);NxVec3 is registered as :RegisterObjectType("NxVec3", sizeof(NxVec3), asOBJ_VALUE | asOBJ_POD | asOBJ_APP_CLASS_CA);varParam is registered as:RegisterGlobalFunction("bool varParam(?&out)", asFUNCTION(varParam), asCALL_CDECL);varParam is implemented as:bool varParam(void *ref, int typeId){(*(NxVec3*)ref) = NxVec3(20.0f,10.0f,5.0f);return true;}Stepping through the debugger, when it reaches varParam, a call to NxVec3 operator= with the value being assigned to the cast ref pointer. After the function leaves, I can't quite follow what it is doing on the ascript side, until shortly after another call is made to the NxVec3 operator = method, except this time with invalid pointers. The operator registration and implementation is provided below:RegisterObjectBehaviour("NxVec3", asBEHAVE_ASSIGNMENT, "NxVec3 &f(const NxVec3 &in)", asMETHODPR(NxVec3, operator=, (const NxVec3&),const NxVec3&), asCALL_THISCALL);NX_INLINE const NxVec3& NxVec3::operator=(const NxVec3& v){x = v.x;y = v.y;z = v.z;return *this;}Also note, I have tried this with primitive types and it worked fine, but have not tried with any handles as of yet. Does this even support handles? Thanks for your time.
I believe you're actually getting a pointer to a pointer when it is a registered type, so you code should be written as:bool varParam(void *ref, int typeId){ (**(NxVec3**)ref) = NxVec3(20.0f,10.0f,5.0f); return true;}This would be because of the way objects are passed internally in AngelScript, but I realize that it would be better for the application if it was just a pointer to the object so I'll look into changing this in a future release. ; That code change worked. Thank you!Though the syntax does seem rather silly :PAlso, why does asIScriptModule have GetObjectTypeByIndex() but no GetObjectTypeById()?If using asIScriptEngine->GetObjectTypeById(), does this include object types defined in that particular modules in script? Also, if this function returns null when using a typeId passed from a variable parameter, is it safe to assume the passed variable must be a primative?On a semi unrelated note, I was comparing library sizes from my previous version 2.15.1 to 2.16.2 built with the settings provided in the included msvc2009 projects2.15.1 release = 749kb2.15.1 debug = 2632kb2.16.2 release = 6969kb2.16.2 debug = 2777kbI assume alot of inlining is going on but thats almost a 10 fold increase in file size for release mode! What gives? ; GetTypeIdByIndex() is used to enumerate the types that were declared in the script, classes, interfaces, enums, etc.The GetObjectTypeById() in the engine will return the object type for types declared in script modules too.No, if GetObjectTypeById() returns null it can mean, either that it is primitive, or that it is an invalid type id.To determine if the type id is for a primitive type you should check the bits in asTYPEID_MASK_OBJECT, if none of them are set, then the type id is for a primitive type.You may want to check the CScriptAny add-on for examples on how the variable argument works.About the binary size. I'm not sure, but I think it is because I turned on full optimization for speed in order to reproduce and fix some bugs that only appeared like that. Try turning down the optimization again, and you'll probably get a smaller binary size. ; Wow, you are awesome!I did not know about AddRefScriptObject, or CopyScriptObject. I assumed the only way to deal with that was to have a giant switch for all possible registered data types to cast them proper. This is most excellent.
Independant Team
Old Archive;Archive
Brief description:I have recently started a small independant studio and am looking to recruit a great team to complete a wide array of projects. I don't want to sugarcoat anything so please take everything into consideration. It is going from the ground up, so Im looking for dedicated, team oriented individuals.Location is not an issue, I'm sure many of you are tired of being office monkeys. We will communicate through conference calls, konolive, and any other application that makes projects easier.In terms of qualifications, I doubt you'll hear this again, but I am looking specifically for those who know a computer, video games, and electronics better than their own body. Do not feel that a degree will disqualify you.Target aim:During the creation of each project, the best marketing approach will determine how the software to be release. A majority will be retail, some will be released as freeware.Compensation:My partner and myself unfortunately don't have a large budget, so I am looking for individuals that are willing to initially invest time. In exchange, incoming profits will be divided between the team members until enough revenue is generated to supply salaries. I am grateful to those who are willing to continue under these circumstances. Technology:We currently own a rapid application suite and have obtained the SDK for certain phone operating systems. Depending on the skills, we will adapt software to better fit the needs.Talent needed:Looking for programmers, graphic designers, and musicians.Team structure:Myself - Part of the Business End, Marketing, Graphic Design, Ambiant Music, Writing & EditingDavid - Contract & Legal Work, Accounting, Writing & EditingContact:If you are interested, please send me a private message and include some background about yourself and/or development skills. If you have a creative portfolio or resume, let me know and I will contact you by email.Previous Work by Team:Nothing developed yet.Additional Info:Anything else you want to say, snippets of the story/design, screenshots, etc. This section is optional but strongly recommended, most people should be able to think of something.Feedback:ANY[Edited by - sirluketheangry on June 18, 2009 9:47:23 PM]
Hey! Congrats on opening up a new studio! You may want to check out the mandatory posting template, which is sticky-ed at the top of this board, to make sure you cover everything that needs to be covered. Best of luck on this endeavor! ; PM Sent! ; I appreciate every response I get. Thank you all ; Let me echo Ari's comment: use the mandatory posting template. Otherwise this thread will be closed.Thanks, Nate ; Alright, I changed it to better suit the forum.
[web] PHP & MySQL - How secure is this?
General and Gameplay Programming;Programming
Hi there,I have written a login page (using MySQL & PHP) where users can log in and view their own information etc...I am wondering if, how I have gone about it is secure against hacker attacks or if there is more I can do.My initial login screen prompts for username and password and compares against a MySQL table for validation. Once successful I have used 'session_start()' and am passing the login name to the pages after that. Not all users have access to the same resources so each page heavily relies on $_SESSION['loginName'] (used to pass the username around).How secure is this approach? Is there anything I can do to increase security?Thanks in advance.
I assume that the password is hashed (preferably salted and hashed) on the database? If not, that would be a good place to start.With regard to sessions, it is worth implementing at least some rudimentary protection against session hijacking.Ensuring that you prevent SQL injection attacks goes without saying. ; Also not a bad idea to use SSL (https) for the login handling, to avoid sending those passwords in plain text. ; Also, relying on an external authentication provider could eliminate a lot of safety issues. ; Thanks for the suggestions so far. I'll take a look at those links :)Quote:Original post by benryvesEnsuring that you prevent SQL injection attacks goes without saying.How do you prevent against this happening? ;Quote:How do you prevent against this happening?There are several levels of security you can build into your app to prevent SQL injection.The first starts with access rights of the database session you're opening up. If you can reasonably predict that a user's actions will be read-only, there is no need to connect to the database with any DML or DDL privileges.Second, never ever use raw user input directly in a SQL statement in your server side scripts (that includes ANYTHING that comes from the client through form or url variables for that matter, even if the user didn't explicitly input the value, a hacker could still change hidden form fields or URL parameters with ease).Instead, you'll need to perform some processing and safety checks to that input before you use the values in your SQL. The best way to do this is utilize bind variables that many frameworks provide, because type checking will be performed for you automatically. A hacker won't be able to inject string of SQL where an integer is expected if the bind variable is type safe. Building dynamic SQL from appending strings together (and not using bind variables) is generally a bad idea.Also, make use of stored procedures as much as possible in place of SQL statements written directly into your scripts. Among other benefits, you will also get type-safety from this practice.Hope this has helped and I wasn't too vague or too simplistic. Now, Google SQL injection and read! ;Quote:Original post by lonewolffIs there anything I can do to increase security?On a different note than my last post, yes there are some things you can do.First, it's good that you're using sessions, just make sure you don't store the username in a cookie. By default, PHP sessions will not do this so you're probably ok.Second, you can use a revolving session ID, where each time you grab a user's session on the server, you keep the session alive and CHANGE their session ID - this will send a different session ID back to the client in a cookie. This helps eliminate session hijacking because a hacker would generally have very little time to discover and use a session ID before it is changed, and would have no way to predict the next session ID to be used.And probably most important of all, your biggest security vulnerability will not come from session hijacking or these other devious tricks. Hackers are generally lazy and will take the path of least resistance. Close any back-doors, get rid of magic passwords, enforce users to enter STRONG passwords, and use strong random passwords for your own FTP access and database users. Make sure files that aren't supposed to be seen from the internet are not stored in directories under the web root... just generally good security practices. ; I've been using php/mysql for some time, and while I've had several problems with code that accepts $_POST data, I've never had a problem with someone hi-jacking another users account. But, to cover the basics:SSL - keeps hackers from seeing plain text sent to your server. If a hacker can see the username/password, its over. Sometimes you need this level of protection (bank accounts, stock accounts, etc), sometimes, you don't. It costs money, so you decide.mysql_escape_strings() - never take raw user input. They can/will hack your mysql commands. Its rare, but it happens.Read only on database - Always a good policy.Rotating $_SESSION ID's - good in concept, but I believe a hacker can hijack the ID, then rotate the true user out of their session. IP Tests w/ Browsers - I like to do this as I find it hard to spoof IP's and Browser signatures. Set it in the session at login, then compare it to the user's IP and Browser. I'd imagine this working extremely well with SSL. You can use this code to get a users IP address:function get_ip(){if ($_SERVER['HTTP_X_FORWARD_FOR']) {$IP = $_SERVER['HTTP_X_FORWARD_FOR'];} else {$IP = $_SERVER['REMOTE_ADDR'];} return $IP; }No back doors... or at least, very cryptic back doors. Encrypt passwords with either MD5, or some equivalent, when storing in the DB. I actually don't like MD5. I use crypt('$Password', random_string) to produce some decent encryption.Privacy is the best policy. The more information you share, the more it will be used against you.Other than the above, you'll be set. ; Awesome guys! Some great suggestions to look into.So far, I have the files in a location outside the webroot scope as I allready saw that this could be a massive issue in itself.I certainly have some research to do for the session hijacking though. I might see if I can actually hijack my own session from another PC.Interesting stuff. :)
Visual c++ cross platform build?
For Beginners
I'm currently using visual c++ express to write a game using SDL.How do I build an executable for, say, macOSX? Thanks in advance,Chris
You can't with Visual Studio. I don't know if it's possible to use the GNU g++ compiler on a Windows machine to make an OS X executable, but it may be. I do know you can use g++ on a Mac to make an OS X executable though (which it sounds like you don't have). ;Quote:Original post by MikeTacularYou can't with Visual Studio. I don't know if it's possible to use the GNU g++ compiler on a Windows machine to make an OS X executable, but it may be. I do know you can use g++ on a Mac to make an OS X executable though (which it sounds like you don't have).Yeah, visual studio is unable to create exe's for Macosx.If you have a Mac running Macosx download a copy of SDL and follow this guide to rebuild your SDL game for it:http://www.meandmark.com/sdlopenglpart2.html; I think you can create a makefile project in VS, which you can use to set up a custom build system using gcc or whatever. This would allow you to use the IDE but target different platforms when you build (of course you wouldn't be able to run or debug though). Could be worth some googling.. ;Quote:Original post by MikeTacularYou can't with Visual Studio. I don't know if it's possible to use the GNU g++ compiler on a Windows machine to make an OS X executable, but it may be. I do know you can use g++ on a Mac to make an OS X executable though (which it sounds like you don't have).It is maybe interesting to note that there is also a port of MinGW to Linux, or in other words: there's a port of the port of GCC for windows for linux. ; It might be a good idea to use a system such as CMake to handle the makefile generation for your project - it will generate you the required files to build on many platforms, including the required files for a Visual studio project, and then all you need to do is use those makefiles on the platform they are for (e.g OSX) to build your game.Edit: As previously mentioned, I think you do need a machine running the target operating system to build for it. ;Quote:Original post by BadgerrEdit: As previously mentioned, I think you do need a machine running the target operating system to build for it.Not at all. This is what cross-compiler are for: they run on the development machine but produce binaries for the target architecture. Otherwise it would be very frustrating to develop embedded applications :-PObviously, even if you can built for a completely different machine, you will need the target machine in order to execute and test the built binaries.;Quote:Original post by BadgerrEdit: As previously mentioned, I think you do need a machine running the target operating system to build for it.The example I have given was specifically about a cross-compiler (MinGW == Windows port of the standard compiler suite on GNU systems; MinGW-GCC is a kind of "backport" to GNU, so that you can compile windows applications without the need for running windows).Quote:summakyObviously, even if you can built for a completely different machine, you will need the target machine in order to execute and test the built binaries.While this is always a good idea, it is possible to test windows applications without windows:* With Wine, you can run windows applications natively on many operating systems.* A free and clean room windows implementation in the pipeline: ReactOS* There are also free DOS', like the most prominent Dosbox, DOSEMU or FreeDOS (note that DOSEMU is similar to Wine as DOS programs can be run natively with it, i.e. without virtualization)I also remember that when you pack a custom Linux kernel, there was somewhere the page where you could enable/disable support for several executable file formats (like a.out, COFF, ELF) and there was also a switch for the old DOS format.edit: ouch I quited myself instead of editing the other post :S ;Quote:Original post by summakyNot at all. This is what cross-compiler are for: they run on the development machine but produce binaries for the target architecture. Otherwise it would be very frustrating to develop embedded applications :-POf course, how silly of me not to realise that :-P; Fedora 11 now provides a cross compiler. Turns out the teamed up with MinGW and they developed a way to compile windows executables from linux.
[C#] Creating new instances using Polymorphism
General and Gameplay Programming;Programming
I have a class that inherits from another class, in this case Bullet is the base class and PistolAmmoNormal is the class that inherits from Bullet.Is it possible to pass base type Bullet into a class and then create a new instance based on what type of Bullet was passed in?For example:// Current type of bullet is PistolAmmoNormalPistolAmmoNormal bullet_Current;// Generate all possible instances for that typebullet_CurrentList = bullet_Manager.GenerateAllBullets(bullet_Current); public List<Bullet> GenerateAllBullets(Bullet bullet_Current) { bullet_Current = new WhatEverTheTypeOfBulletBeingPassedInIs(); .....I hope that made sense.Thank you guys.
I'm not really sure what you're trying to achieve here. If you want a method that creates a List<> of Base, you could use a generic function like thisList<Bullet> GenerateAllBullets<BulletSubType>(int numBullets) // generic constraint: BulletSubType must derive from Bullet and have a default constructor where BulletSubType : Bullet, new(){ List<Bullet> bulletList = new List<Bullet>(); for (int i = 0; i < numBullets; ++i) { bulletList.Add(new BulletSubType()); }}If you provide more detail as to what you actually want, we might be able to help more. ; You can use reflection to do what you want.using System;using System.Reflection;namespace CSharpTest{ class Base { public readonly string type; public readonly string name; protected Base(string type, string name) { this.type = type; this.name = name; } } class DerivedA : Base { public DerivedA(string name) : base("A", name) {} } class DerivedB : Base { public DerivedB(string name) : base("B", name) {} } static class Program { static Base createOfType(Base obj) { Type passedType = obj.GetType(); Type stringType = "".GetType(); Type[] parameterTypes = { stringType }; ConstructorInfo ci = passedType.GetConstructor(parameterTypes); object[] parameters = { "Bar" }; return (Base)ci.Invoke(parameters); } static void Main(string[] args) { DerivedA obj = new DerivedA("Foo"); Base newObj = createOfType(obj); Console.WriteLine(newObj.type); Console.WriteLine(newObj.name); } }}But there is probably a better design that avoids needing to do this. ; Sorry guys.What I would like is to create a new instance of PistolAmmoNormal inside the GenerateAllBullets. Exactly the same as:bullet_Current = new PistolAmmoNormal(); However, I want to pass the in bullet_Current as type Bullet. The type of Bullet in this case PistolAmmoNormal would create a new PistolAmmoNormal, if the type of bullet was PistolAmmoFlammable then a new instance of PistolAmmoFlammable would be created.bullet_Current = new PistolAmmoFlammable(); I was wondering if there was a good way of doing this automatically depending on type?! ;Quote:Original post by TheUnbelieverYou can use reflection to do what you want.*** Source Snippet Removed ***But there is probably a better design that avoids needing to do this.Why would you use reflection? What's wrong with either a generic approach or a polymorphic Create method?i.epublic class Bullet{ abstract Bullet Create();}public class PistolAmmoNormal{ Bullet Create() { return new PistolAmmoNormal(); }};Quote:Original post by Spa8nkyI was wondering if there was a good way of doing this automatically depending on type?!This is what my code does. Copy and paste it, and try switching the type of 'obj' in Main from DerivedA to DerivedB. ;Quote:Original post by ChaosEngineWhy would you use reflection? What's wrong with either a generic approach or a polymorphic Create method?Er, because I'm an idiot. ;Quote:Original post by TheUnbelieverQuote:Original post by ChaosEngineWhy would you use reflection? What's wrong with either a generic approach or a polymorphic Create method?Er, because I'm an idiot.Lol, I wouldn't say that at all. Your solution will certainly work and is probably the most flexible approach. There might be an easier way, that's all.To the OP, can you post a complete example of what you want. Don't just post 1 or 2 lines, show the entire function and an example of calling it.Why do you want to pass in an instance of the type?You've been given 3 solutions already, do any of them fit? You could also doBullet CreateBulletOfSameType<BulletSubType>(BulletSubType bullet) where BulletSubType : Bullet, new(){ return new BulletSubType();}this will work if you havePistolAmmoNormal bullet = null;Bullet bulletCurrent = CreateBulletOfSameType(bullet);// bulletCurrent is a PistolAmmoNormal but not Bullet bullet = new PistolAmmoNormal;Bullet bulletCurrent = CreateBulletOfSameType(bullet);// bulletCurrent is a Bullet ; Of course, that makes sense now.ChaosEngine's method is precisely what I am after.However why would I use abstract instead of virtual and override, is it a faster way of implementing the same thing?E.G. public class Bullet{ public virtual Bullet Create();}public class PistolAmmoNormal{ public override Bullet Create() { return new PistolAmmoNormal(); }};Quote:Original post by Spa8nkyOf course, that makes sense now.ChaosEngine's method is precisely what I am after.However why would I use abstract instead of virtual and override, is it a faster way of implementing the same thing?It's nothing to do with speed. If you have a virtual method you have to provide an implementation of it. If Bullet is a valid concrete class in your code, then use virtual i.e.public class Bullet{ public virtual Bullet Create() { return new Bullet(); }}However if every type of bullet must be a sub-class then use abstract.
Power Up Studio Looking for Artist
Old Archive;Archive
Hello We are a Starting up studio name Power up Studio: Next Stage of Evolution and we are currently looking for a 3-D Modeler/Concept Artist. Our last 3-D Modeler/concept artist had to leave for personal matters and we have a slot open for an artist. Skills for this position includes1. knowledge of 3-D modeling: doesnt matter what program you use to create your models as long as you can create characters, assets, buildings, and obj.files and poser does not count.2. Knows how to draw: must atleast know how to draw conceptinal art because we will give reference if needed to explain how we would like the characters or weapons.3. Must know how to sculpt. Know either zbrush or mudbox as we are using normals for our game.4. Also must know how to texture: I you dont know how to texture but still know how to do the other request we will give you a chance.5. Must know how to rigg a character. We are using the gears of war engie to create this game and will do our best to push it as much as we can. We are passionate about or careers and working hard to try to recieve the recongition in the industry. We work as a team and will treat any new commer the same and all we ask is for you to have the same passion about what you do when it comes to creating games or pushing your work for your profolio. I know it would be more beneficial for me to show you my work so you can see what atleast one of the members of the studio can do. My site is www.sagebase-3d.comPlease contact me by my email which is [email protected], steam konton217, or by repling here and leaving your email for me so I can email you. Thank you for looking at this post and hope to recieve a reply soon[Edited by - Sbarrion on June 19, 2009 8:55:23 AM]
Pyglet API Doc Sucks!!!!
GDNet Lounge;Community
Sorry this is more of a rant so I will put it here. So I have been trying to learn how to use Pyglet. You know the python api. Well I spent the last few hours trying to figure out how to make a background image fill the screen. I scoured the API doc over and over and over and all I found was blit(x, y, z=0). Not in once place do they mention that you can pass keyword args to the blit method of a AbstractImage specifying width and height of the image. The only way I found out about it is through massive googling. Seriously people if you are going to make a api doc make sure you can actually read it and know how to use the damn methods.
ok ; Make spaceships, not war. ; I gave fore warning of the rant. Just so happens it gets quite frustrating when the API docs for something leave out things that are that important. ; AbstractImage.blit really takes only (x, y, z). Texture, a subclass of AbstractImage, overrides this method. And Texture.blit is documented correctly. ; This may sound like a terrible idea but you should consider posting your rants on the right website.
Combat without Finite Resources
Game Design and Theory;Game Design
How could a combat system be designed such that a player is give more interesting interactions than damage against a finite resource such as health?I am inspired here by the idea that many simple games have lose conditions that do not track a recourse. Chess for example has the checkmate. There is not loss by taken resources. A players last piece(s) can still checkmate his foe who may have most or all of his. How can defeat conditions be implemented in the typical fantasy RPG setting where fireballs fly, swords clang, and arrows whistle without tracking health at all.
Vital organs? Lose your head = combat over.Are we talking about parties or single combat? I recall an interesting turn-based 1v1 kickboxing simulator a few years ago where the winning tactic was usually to kick and punch the right bodyparts in order to knock your opponent off-balance (at which point the match was won, since there was no way to recover due to bad design).Combat between groups of individuals can end when one side surrenders. I think an easy way to track this is to track avenues of retreat. As long as each member of a group has a valid path to run away from a conflict, they wont feel the need to lay down arms and surrender. It is only when all vectors of retreat are cut off that a combatant must make a decision to fight and die, or kneel and (hopefully) live.If you're just looking for ideas to mimic the mechanic in chess that allows a win without complete attrition, then you need only look for flags to be captured and assaulted. In the Total War games a valid tactic is an all-out assault on the enemy general, while keeping your own high-ranked general alive. When the enemy general dies, his troops lose a great deal of morale and will flee shortly thereafter. ; One way is to keep track of hits. Normal hit = injury, critical hit = death.Which applies to normal combat as well, a person may get injure quite a number of time with arrows sticking out of him, but what kills him is that sword that went pass his armor and into his torso causing him to bleed to death.In your chess context, it will be a peasant armed with a crossbow killing a full plated knight. ; You could have a game in which each player is trying to finish off a combination of moves before their opponant, whilst disrupting their opponants combo. Which is sort of what Chess is. The trick is to have it so that a combo, once disrupted, can be changed into another combo. Finite resources are usually used in order to increase the chances of a finishing move later in the game, instead of being a victory condition in and of themselves. ; That sounds very much like what I had in mind really. What I was thinking about ended up involving a stamina bar to record the break point (empty) where he is vulnerable to a finishing move. Without such a bar, how to you modify the state of each fighter as the moves are preformed successfully or blocked such that they result in a path to a finishing move? In other words, the game play of chess creates opening and defenses, and openings taken advantage of can create bigger openings or even checkmate. How do I do this?(I know what I'm trying to get at here, though I'm just not sure if I'm getting it out coherently...) ; I'd like to put The Guild 2 on the table here. I think they did a really good job at giving a fantasy game alternative goals besides fighting off and killing the enemy. The game involves trials, bribery, theft, magic, and building a successful business. You also have the choice of influencing your way to the top of the town political hierarchy. A must play for anybody tired of the ol' fantasy RPG.On a side note, I think the most powerful idea of chess is that the ends justifies the means. Your pawns need to be sacrified in order to bring the opponent to a checkmate. Chess has resources, which must be used strategically. I think most games have a resource or another to keep track of, which directly or indirectly determines your success. ; Go is a very good example of a game without finite resources, insofar as you can win by taking almost no guys, simply by controlling a large enough area.Other games, particularly of the turn based variety (battle for wesnoth is a terrific example, since killing the enemy recruiter auto-wins most scenarios) have victory which isn't defined by killing every opposing unit.;Quote:Original post by JasRonqIn other words, the game play of chess creates opening and defenses, and openings taken advantage of can create bigger openings or even checkmate. How do I do this?(I know what I'm trying to get at here, though I'm just not sure if I'm getting it out coherently...)Each piece in chess expands the number of valid moves that you can make. The more pieces that are taken, the less moves that you can perform. So if you were to make a combat system based on something similar, then each successful block would limit the amount of moves that their opponant would be able to make. Eventually one of the combatants would be able to perform a move that the other wouldn't have a counter for, and would win. This is still a finite resource though, although it is more discrete than continuous. ; But enless we are being literal here and dismembering our enemy, then the closed off options from blocks are temporary effects which can be manually reversed or wear off. For instance, maybe I smack an arm and that arm goes weak for a few seconds, maybe even a significant amount of time, but its not forever. Also, there is no escape in chess, in fighting though, you can retreat, unless that has been removed by a net over the head, which could be cut out of. So this is even more dynamic than chess really. ; Super Smash Brothers does this. While there's "Health," there's no level at which you "run out" of health. Instead, getting knocked off the stage kills you, which can happen even with almost no damage done.
Setting Matrices for Texture Coordinate Generation
Graphics and GPU Programming;Programming
So if I use:IDirect3DDevice9::SetTextureStageState( 1, D3DTSS_TEXCOORDINDEX, (1 | D3DTSS_TCI_CAMERASPACEPOSITION) );How do I set the matrix it uses to generate these coordinates? If I am going to do shadow-mapping I want the coordinates to be transformed as a projection from the light source. So I need a way to set the matrix values to be used with this automatic generation.L. Spiro
You'll want to set stage 1's D3DTSS_TEXTURETRANSFORMFLAGS to D3DTTFF_COUNT4 | D3DTTFF_PROJECTED to activate the matrix and projection mode. And to set the matrix, you use SetTransform(D3DTS_TEXTURE1, &matrix);. Remember to set the texture transform flags back to D3DTTFF_DISABLE when you're done, so as not to muck up any other code using a texture in stage 1.NOTE: I'm not guaranteeing the accuracy of the names provided, as it's from memory, but the help and/or Intellisense will quickly fix any misspellings for you.
[.net] Excessive use of properties
General and Gameplay Programming;Programming
I have a very generic base class for items in my game and due to restrictions beyond my control I can't derive more specialised classes from this base class. So every item has a general type (weapon, ammo, ...) and up to three additional values to further describe it ({pistol, rifle, ..}, {left handed pistol, right handed pistol}, ...)Now, let's assume I want to check whether a given item is a rifle, pistol, etc.Given the choice between these two:public bool IsRifle { get { return CheckWeaponType(1); } }public bool IsPistol { get { return CheckWeaponType(2); } }public bool IsRocket { get { return CheckWeaponType(3); } }public bool IsKnife { get { return CheckWeaponType(4); } }public bool IsFoo { get { return CheckWeaponType(5); } }public bool IsBar { get { return CheckWeaponType(6); } }private bool CheckWeaponType(uint WepType){ return (ItemType == ItemTypes.Weapon && SpecialType1 == WepType);}public bool CheckWeaponType(uint WepType){ return (ItemType == ItemTypes.Weapon && SpecialType1 == WepType);}Is there a reason to prefer one over the other? Personally I like the first approach since it's easier to read, but I'm generally a sucker for abstraction so I can't tell whether it's too much or not. Since this class really is for every single item, I would end up with about ten Is* properties each for armor, weapons, buffs, etc.Also, I realise one could go with the second approach and replace the uint WepType with an enum and thereby avoid the magic-numbers and get similar pleasant code like CheckWeaponType(Item.WeaponTypes.Rifle); but I'd like to avoid that since all item data is read from external data files and I'd have to update the code whenever I update the data files.Is there a difference in performance or memory-use maybe? I'm still kinda new to C# and couldn't find anything in the various MSDN guides.thanks,borealis
Quote:Is there a difference in performance or memory-use maybe? I'm still kinda new to C# and couldn't find anything in the various MSDN guides.Does it really matter? Do you check this type more than 10000 times a second? If not then you really shouldn't worry about this kind of microoptimization. If you do then you probably still shouldn't worry about this; at least not until you have confirmed with your profiler that it's a bottleneck. Also checking if an object is a rifle thousands or millions or times suggests a bad design anyway, so you probably have bigger issues if this code is performance critical.Quote:I'm generally a sucker for abstraction so I can't tell whether it's too much or not. ...Also, I realise one could go with the second approach and replace the uint WepType with an enum and thereby avoid the magic-numbers and get similar pleasant code like CheckWeaponType(Item.WeaponTypes.Rifle); but I'd like to avoid that since all item data is read from external data files and I'd have to update the code whenever I update the data files.You're a sucker for abstraction, but you want to keep passing around ints? It can't take long to update the data loading code to load the data into an enum. You would have to update the input validation part of the code anyway whenever you modify the enum. I would seriously reconsider using an enum if I was you and then simply have property WeaponType Weapon{get{return weaponType;}}Anyway if you could change your class hierarchy I would consider whether this is really the right way to design it. Often the approach of having a single GameObject class used for many things is bad OOD. However if you can't change the design due to code depending on this design or for some other reason, then I would suggest you at least switch to using enums; not for performance, but for ease of use. ; I would use an enum for the weapon type instead. public enum WeaponType{ Rifle, Pistol, Rocket, Knife, Foo, Bar}Now just test for the enum.theTroll ; I'm still learning C# so I hope I'm not missing something language-specific here, but you saidQuote:all item data is read from external data files and I'd have to update the code whenever I update the data files.it seems to me that in the end, you'd have to update MORE code if you did NOT use enums, since you'd either be writing new properties or changing magic numbers. Personally, using 'magic numbers' has caused me grief before, and I try to avoid them.I vote for adhering to the KISS principle in this case. ; I suspect what you really want is either inheritance, or have multiple classes that implement one or more interfaces.
Blogs for everyone, 'on the house'
GDNet Lounge;Community
Wouldn't granting the blogs to all gamedev acc encourage people to come to gamedev to show off their stuff, that would be a nice way to encourage the freedom of speech.
Yes grant us blogs!Another feature that could be cool would be a "Snippet Wall", people instead posting 'source' tags for a reply on how to do stuff on a thread, they write a titled snippet wall in the snippet wall section which they link to in their reply and that can also be browsed by people later. ;Quote:they link to or it could be a button at the post frame (next to rating, pm, etc.) ; a laudable ideatwo flys thoughA/ extra bandwidth (perhaps even an order of magnitude) == extra costs B/ decrease in revenue, from the X number of ppl that pay already each monththus not a good idea WRT business sense ; I can't explain why in detail, but this will soon be a moot point thankfully. While we'd love for existing Journal authors to continue publishing here on the site, several have already given into hosting their own blogs instead and just reposting to their GDNet journals with links back to their blogs for the full post. We understand the reasoning behind this and have come up with something in V5 to support these users and take advantage of the blogosphere in general to provide an even greater breadth of knowledge to everyone in the community.If anyone knew of Andy Schatz's site Qatfish before he took it down (to help feed our upcoming endeavor), then you have an inkling of what's coming. ;Quote:Original post by GaiidenI can't explain why in detail, but this will soon be a moot point thankfully.Ooo, sounds promising. Is there any idea (even very roughly) when "soon" is?Personally I find trying to update two blogs/journals tedious and as a result my net posting rate has gone down. [sad];Quote:Original post by GaiidenWe understand the reasoning behind this and have come up with something in V5 to support these users and take advantage of the blogosphere in general to provide an even greater breadth of knowledge to everyone in the community.GDNet TwitBlogs confirmed. ; I've never heard of Quatfish, but after reading this I'm excited. I presume it will be a GDNet+ feature, will it not? ;Quote:Original post by programmermattcQuote:Original post by GaiidenWe understand the reasoning behind this and have come up with something in V5 to support these users and take advantage of the blogosphere in general to provide an even greater breadth of knowledge to everyone in the community.GDNet TwitBlogs confirmed.Says you :PQuote:Original post by MikeTacularI've never heard of Quatfish, but after reading this I'm excited. I presume it will be a GDNet+ feature, will it not?Not directly, no. That would be akin to making our entire Resources section GDNet+ only - you can still find them all our there on your own, but you wouldn't have access to the central repository. That would be pretty lame on our part, IMO. It's a big chunk of our content moving forward though so little bits and pieces may be GDNet+And by GDNet+ I may not be referring to what you currently know as GDNet+... ; gah. too much drama and suspense. spill the beans already.
Casting boost::shared_ptr(Derived) to boost::shared_ptr(Base)
General and Gameplay Programming;Programming
Hello,I have this method which takes a reference to a boost::shared_ptr<Base> as parameter and I'd like to pass a boost::shared_ptr<Derived> to it, but for some reason I can't.class Base {};class Derived : public Base {};void add (boost::shared_ptr<Base>& obj) {}int main(){ boost::shared_ptr<Derived> d (new Derived()); add (d);}Throws:error: no matching function for call to `add(boost::shared_ptr<Derived>&)'note: candidates are: void add(boost::shared_ptr<Base>&)Could you orient me on this? tnx.
This doesn't work for regular pointers. Why do you expect it to work with smart pointers? ; Then they say c++ alows you to shoot yourself in the foot... ;Quote:Original post by SiCraneThis doesn't work for regular pointers. Why do you expect it to work with smart pointers?Wait...class Base{public:virtual void print () {}};class Derived : public Base{public:virtual void print () {cout <<"hello!";}};void add (Base* obj){obj->print();}int main(){ Derived* d = new Derived(); add (d); return 0;}; Base * != Base *& ; :O ; I use boost::shared_dynamic_cast for this kind of thing : struct Base { virtual void print() {}};struct Derived : public Base { virtual void print() { std::cout << "Derived\n"; }}; void print(boost::shared_ptr<Base>& obj) { obj->print();}int main(){ boost::shared_ptr<Derived> d (new Derived()); print(boost::shared_dynamic_cast<Base>(d));}Are there any situations where this would go wrong? ; Why so complicated? You don't need dynamic_cast for an upcast.class Base {};class Derived : public Base {};void Bar(const shared_ptr<Base> &base) {}void Foo() { Bar(shared_ptr<Derived>(new Derived()));}All that's wrong with your original example is that it's not const-correct.If you pass a shared_ptr<Base> & (a reference to shared_ptr) to your method, that means the method can put any other object deriving from Base into the shared pointer.This of course is incompatible with the original pointer, which only takes objects of type Derived, so if your method put an instance of OtherDerived in it, after the method returns, you would end up with a shared_ptr<Derived> that carries an OtherDerived instance.-Now if the non-const shared_ptr reference was intentional, you need to cast. But a temporary shared_ptr (without the dynamic cast) should solve that problem, too:class Base {};class Derived : public Base {};void Bar(shared_ptr<Base> &base) {}void Foo() { shared_ptr<Derived> derived(new Derived()); shared_ptr<Base> base = derived; Bar(base);}; You're right, shared_dynamic_cast is not appropriate in this situation - I don't think I've properly woken up yet. But there are a bunch of casts in shared_ptr.hpp, which pretty much create the temporary for you, and maybe a bit more explicit as to the intention. ;Quote:Original post by CygonNow if the non-const shared_ptr reference was intentional, you need to cast.No, a cast won't work in standard C++. The result of a cast is an rvalue, and an rvalue can't be bound to a non-const reference.
Is there a way? Or is it guess-work?
General and Gameplay Programming;Programming
This is kinda strange question, but, how should I go about making a gun in a first person view. Should I just find a position for the gun that looks good, or is there actually a certain way FPS's place their guns in the view?Angles, Location, FOV?... Should it be calculated and move around acting as if it were in a players hand, like in UT3 when u move quickly up and down u see more of the gun, its not like its fixed with the screen but kinda has a more loose control.
guns are usually special 3D models and animations, They are placed relative to the camera view, possibly with some sort of spring system to give the illusion of motion. Also, they are often rendered as an extra pass, on top of the world geometry, with a Z buffer clear. That allows you to change your projection matrix and stuff like that (change of FOV for example, as you mentioned, changing the near plane and far plane clipping, ...). They can require extra steps, such as calculating reflections, and shadows. Then usually the 2D HUD is drawn on top of everything, in a similar fashion (no z test, orthographic projection, render 2D items...). ; Yeah, most games seem to render the gun seperately as an extra pass. The artist should be able to tweak it's position and the FOV that it is rendered with until it looks 'right'.It seems to be the trend these days to rotate it a bit when the players view changes, to make it seem less static. e.g. if the player looks quickly to the right, the gun model will rotate left slightly.Some games though (OFP/ARMA) just place the camera where the head is on the player model, and render the entire player model the same as any NPC. The gun is drawn in the world just like any other object, and the animations of the player model cause it to be positioned in front of the camera when aiming.[edit]Video:This is a system I made a long time ago where the mouse moves the gun model, and then the camera rotates slowly to catch up to where the gun is pointing. </plug>
Bouncing Ball
Math and Physics;Programming
Ball bouncing in a circle for the iphone, the device gives me the acceleration in x,y,z axishttp://www.flickr.com/photos/60395315@N00/3621325296/I am working on figuring the math for this, wondering if I am on the right pathLets say the ball is starting from (a,b) inside the circle (see figure) hitting any point (c,d) on the circle. The next point the program calculates based on the accleration/velocity the device returns is outside the circle (m,n). Now when we check the bounds, the ball should have bounced from the point (c,d).The line (a,b) & (m,n) intersects the circle at (c,d)The tangent of the line is x.c + y.d = r*r (x,y are points on the line)The distance of m,n from the tangent is equal to the point p1, p2 where the bounces to at this point I reverse the velocity & reduce it to .75 percent of its original.Am I on the right path here. How do I find point (p1,p2), where I am going to draw the ball?[Edited by - MysteryBox on June 12, 2009 11:06:33 PM]
Hi MysteryBox,I guess you have a small thinking error here:Quote:The distance of m,n from the tangent is equal to the point p1, p2 where the bounces toat this point I reverse the velocity & reduce it to .75 percent of its original.You do not want to reverse the velocity, instead you want to mirror it at the tangent at (c,d). To do so, calculate the tangential and normal parts of the velocity along the tangent, and reverse the normal parts.You will also need to calculate how much percent of your initial velocity was "used" when the collision occurred. Of the remaining amount you can then take 75 percent and you should end up at (p1,p2).Cheers,fng ;fnq, thanks for the reply. Let me see if understand this correctly.The angle of the bounce will easy to calculate based on the angle at which the ball hits the tangent.The calculation of the velocity(scaler) of the resulting bounce is what confuses me. Quote:To do so, calculate the tangential and normal parts of the velocity along the tangent, and reverse the normal parts.so the resulting bounce velocity will be the reversed normal to the tangent and the angle will be the mirror angle? Quote:You will also need to calculate how much percent of your initial velocity was "used" when the collision occurred. Of the remaining amount you can then take 75 percent and you should end up at (p1,p2).Do I subtract this from the normal velocity we calculate above?
How to you organise your cpp and header files?
General and Gameplay Programming;Programming
So I am working on a new project and trying to come up with ways to organise my cpp and header files. I am using VS 2005, breaking up different functionality of the project into different smaller projects inside the solution.I was originally thinking of1) have the .h file together with the .cpp OR2) have a folder called src, and another called include, and have a parallel structure that looks like this:\src\Data\src\Modules...\include\Data\include\ModulesI am not writing a library (but some of the functionalities may be reused by other projects later)...which approach is better for the long run?Thanks in advance!
After a couple of years I decided (at least for now) that the best way to organize my source files is .h and .cpp in the same folder, and the directory structure organized exactly as the namespaces defined in the program/library (A contains B contains C). ; I tend to just dump all source files in a single directory, and let IntelliSense deal with it. I used to do the whole nested-directories thing, but I don't find it worth the effort to maintain these days - at least for C++: languages with a proper package mechanism (such as Python) are another story. ; I tend to do the same thing as owl: group .cpp and .h files together and mirroring the namespace structure. Intellisense often breaks on templated code, so dumping everything into one directory doesn't work very well for me. ; include/src with parallel directory structures for now. This is mostly to cater to my own sense of structure: when #include-ing files, I'd rather see something like #include "resources/cache/resource_cache.h" than simply #include "resource_cache.h". This way I can get a sense of which systems depend on which other systems just by looking at the directories from which they pull their #includes. ; I keep a... * include folder for shared headers(without extension) & template implementations * a source folder for non-shared headers(with extension) and source foldersBoth have sub-directories roughly based around project/namespaces (the enum hack comes to mind as an exception) ; More answers here. :) ; I toss everything in one folder and use filters in Visual Studio to organize them within the IDE. ;Quote:Original post by owlAfter a couple of years I decided (at least for now) that the best way to organize my source files is .h and .cpp in the same folder, and the directory structure organized exactly as the namespaces defined in the program/library (A contains B contains C).Exactly, its what I use as well...almost by default I done it that way for the first time. If you give a class a category (namespace) it makes very much sense to put it in the same category directory wise.; I have found over the years that there are very strong advantages to mimicing the C++ namespace heirarchy with a source file namespace heirarchy. This eliminates filename conflicts the same way it does variable and type names.I have also found the urge to place headers and sources in separate directory heirarchies somewhat weird and unjustifiable. Sources and headers go together. When generating a dev package for a library the headers get pulled and packaged separately anyways.Generally, assets are kept in a separate directory heirarchy because they are run-time data not build-time data.Packaging metadata is also stored separately from sources. This simplifies making targeted source distributions.Finally, a separate heirarchy for test suites are separate from sources. Testing should be orthogonal to building and packaging.
Modeller/Artists wanted for Starwarp - Online Space Combat/Strategy game 90% complete
Old Archive;Archive
Project name:Starwarp.Brief description:An overhead online space game. Dogfighting and taking over opponents planets is the basic idea.We then plan to extend the game to allow ship upgrades, earning ranks to have access to additional ships, bigger maps, different game types (domination, victory points, capture the flag, etc).Target aim:Free initially, then make money through advertising/addons.Compensation:None, but a great showreel. Possibility to earn something if the game is successful.Technology:Game is written in Java using LWJGL (OpenGL), so should run on any machine with Java.Currently loading OBJ models, but might shift to 3DS. Talent needed:3d Modelers/skinners to make spaceship models. Models should be about 2,500 - 10,000 polygons, as its an overhead game very little detail is needed on the bottom of the model.Team structure:Programmers: Alex Scott and Richard Jones.Website: www.starwarponline.com Contacts:Use the forum on the website.We are after 3d modellers to create spaceships/fighters/ordnance/structures, and possibly 2d artists for load screens and concept art.[Edited by - alexjascott on June 25, 2009 5:18:50 AM]
bump ; We cant pay anything I am afraid - so please no more people contacting me wanting paid work. ; bump ; bump ; Still no takers - anywhere else I should be asking/recruiting? ; Come on people - 90% completed game just needs artists to finish it off! ; Up. ; alexjascott- there is no need to bump this post 7 times, especially when there has been zero interaction or interest shown from the community in this thread. The bumping policy for GD.net states: Quote:Bumping:As a general rule, bumping is not allowed in the Help Wanted forum. There are however, certain conditions under which it will be allowed: * If after 2 days your thread has received no replies. In this case, you may bump the thread once, but you should first make some changes to the original post - try to provide updates and/or additional information. You may repeat this a few (not more than three or four) times, after which you should wait a couple of weeks. * If you are adding additional content, you may do so by editing the original post. * You may at any time post to say that all positions have been filled. * You may at any time respond to questions posted in your thread.You've already gone way beyond this. I've already had to talk with you about this on this thread as well. Please stop. Otherwise disciplinary action will be taken. Thanks, Nathan ; I'm hesitant to "reward" this thread with another free bump, but I believe I can offer you some useful advice.Your game sounds interesting. I visited your website, and it looks interesting. The fact that you advertise yourself as "90% done" is intriguing. You've got the potential here to find yourself a solid artist (although finding free labor is always a challenge).Unfortunately, your post kind of leaves us wondering what's really going on. You have provided very little information about the game, no pictures, no videos, no concept art. For a game that is 90% done, these are all things I know you should have, somewhere, and if you would show them off here, I think you would get a better response.It's good that you included a link to your website, because if you hadn't, I wouldn't have even bothered responding (which means most others wouldn't, either). However, you really should hyperlink the website using code like this:< a href="www.starwarponline.com" > www.starwarponline.com < /a >Oh, and seriously, stop it with the self-bumping. It makes you look desperate. :3
What books did developer read for game development in the 1990s?
For Beginners
I want to make a game But I wonder how game developers worked in the 1990s, how they made games, how they learning before the Internet became as widespread as it is today. etc.how do they know how to build game mechanics as character ability power up system?how they know to reverse engineering game competitor company.what book I should read?
As far as I know (not being a programmer myself), books on the subject started appearing in the early 2000s. Up to that point, it was “learn by doing” and tips from one another. ;The first book that came to mind was Tricks of the Game-Programming Gurus: Lamothe, Andre, Ratcliff, John, Tyler, Denise: 9780672305078: Amazon.com: Books, which was geared toward beginners/students/amateurs. There were others, but that's the best selling pre-2000. After that point in time, game development became a hot topic in the book publishing world. Even GameDev.net has a series - Beginning Game Programming: A GameDev.net Collection (Course Technology Cengage Learning): 9781598638059: Computer Science Books @ Amazon.com.Otherwise, in the professional realm a lot was “learn by doing” as Tom said, or through word of mouth on early Usenet/IRC/websites (pre-GameDev.net in 1999 - see About GameDev.net). ;Computers in that era didn't have an OS like we have today. The machine booted, and you were dropped in a command shell or in an interactive BASIC interpreter. You basically programmed directly at the metal. Video memory was directly accessible, by writing in a known address range you could make pixels appear at the screen in various colors. The “OS” had a corner in the memory too for its data, but nothing prevented you from poking around there. Lua, Python, C#, C++ didn't exist, ANSI-C was just invented (K&R book about that was in 1989 iirc). Assembly language of course did exist (with books) and was used.Monthly computer magazines were published for all types of home computers. Tips and tricks were exchanged in that way, also program listings were printed in those magazines that you could then enter at your own computer. Studying those listings, and trying things for yourself is how you learned. There was also technical documentation about the computer.If you want to enjoy that stuff, today there is a retro-computing movement, that lives in that era, except with slight more modern hardware but still no OS, etc.;Alberth said:Computers in that era didn't have an OS like we have today.In the 1990s there was MSDOS, Several versions of Windows, and of MacOS. And that's not all the operating systems of the nineties, most likely.Like Linux, for instance.;Tom Sloper said:Alberth said:Computers in that era didn't have an OS like we have today.In the 1990s there was MSDOS, Several versions of Windows, and of MacOS. And that's not all the operating systems of the nineties, most likely.Like Linux, for instance.Yep. There were things like Windows 95, Win 98, and at the time I was still using a Commodore Amiga (AmigaOS) .To deal with the original question “what game dev books was I reading in the 90s?” Back in that era, one of my favorites was : The Black Art of 3D Game Programming by André LaMothe. ;Abrash was the guy who did the Windows NT graphics subsystem and worked on Quake.https://www.drdobbs.com/parallel/graphics-programming-black-book/184404919 ;There are a couple of" history of video games" books, that track the rise of the medium and genre.Just google for them. ;GeneralJist said:There are a couple of" history of video games" booksThat's not what the OP is looking for.;Thanks all
Choosing a career in AI programmer?
Games Career Development;Business
Hello everyone, my name is Ramon Diaz; I am currently studying Game development and programming at SNHU. I have taken the initiative to learn about a professional career in AI programming. I have a lot of gaps in my development in the short term. I have blueprint experience with AI but not enough to choose a career in this profession. I would like to know how I can be competitive leaving the university in 5 months after finishing my studies. I am looking for knowledge from all of you who have been in the industry for years.
Entry level? Know your algorithms, it will help you at interviews. If you have made demos it can help you get jobs, but the market is wide open right now and should be relatively easy to find work for the foreseeable future. Overall, it reads like you are on the right path. When you graduate and start looking for work, be open to any positions rather than just an AI specialty. Once you have a job it is easier to transition into whatever specialty you prefer.;Thank you. ;I would like to know how I can be competitive leaving the university in 5 months after finishing my studies.Talk about last minute. Create AI projects? Or A game with character behaviors? Pathfinding examples. Crowd movements. Anything really. Learn how navigation meshes work.;@dpadam450 Character Behavior is what I doing in the project at this moment. Everything related to AI programming.;@dpadam450 Is it the same when learning C++ in AI as visual scripting Blueprint? If I were to make a demo, what kind of programming should I focus on my attention? ;@frob It is important to have a portfolio? ;Not for programming. You will need to show you know how to do the work, but it is usually some interview questions and writing some code of their choice. If you have something you want to share with them, you can do it if you want. Having done fancy demos can sometimes help get interviews, and can help show your interest and abilities, but it is generally not needed. It does not hurt, unless you do it badly and therefore becomes a cautionary warning. Build it if you want. I have interviewed and hired bunches of programmers without portfolios. ;I'm studying AI at the moment, in terms of statistical learning. I've learned so much about AI over the past few weeks. Check out: https://hastie.su.domains/ISLR2/ISLRv2_website.pdf​andMachine Learning with R: Expert techniques for predictive modeling, 3rd Edition
Newbie desperate for advice!
Games Business and Law;Business
Hi allI'm new to the game development community and need some advice.I've created 2 educational games with a simple idea but are sufficiently challenging for all ages. These could be played on pcs or phones.Is it worth patenting any parts of the games?What would be the best way to monetize?How should I market the games?
hendrix7 said:I'm new to the game development communityReally? Your profile shows that you've been a member here since 2004, and your last activity was in 2007, asking about raycasting.hendrix7 said:Is it worth patenting any parts of the games?Probably not. Expensive and there will be hurdles, and possible lawsuits after the patent is granted (if it is).hendrix7 said:What would be the best way to monetize? How should I market the games?There are several threads here in the Business and Law forum about that. While you wait for more replies from the community, you can read up on those previous answers to those questions. Mainly, “you should have thought about that before you finished your games.” (You wouldn't be “desperate” now.) Good luck with your sales!;@hendrix7 Filing for a patent can be expensive, and you need to document the solution and how it separates from anything else. I have developed software that solved problems in a way that no other software does, but there is only a very small portion of that that can actually be patented. Even though you can file an application yourself, I would recommend hiring an experienced IP attorney. This too is very expensive, though, so you are best off doing this if this idea can provide millions in income. If it can't, then it's actually not that harmful if anybody copies it.You could look at registering trademarks, design and other parts of the games. This is cheaper, but it will protect you brand more than your idea or solution.Again, if this is something that could turn a real profit, it might be worth looking into. If not, it's a very costly waste of time.As for marketing - my day job is actually creating videos and commercials etc., so naturally that's the first thing that comes to mind.Make videos for social media or other platforms where your target audience is likely to see it. Oh, and you need to define a target audience. Know where they are, what they respond to, what their struggles are and how your product will solve their problems, enhance their life experience or in other ways contribute positively to their life.There are several other ways to do this, but the list exceeds my level of expertise in the area.;patenting is costly, and time intensive. As said above, it depends on a lot if it's worth it. ;@hendrix7 Nothing is worth patenting unless you're willing and able to defend your patent. There is no patent police; you're responsible for finding and prosecuting infrigement.What you're patenting has to be novel and non-obvious to a person skilled in the art. You called your idea ‘simple’ which makes me wonder if it's obvious or already in use.;@Tom Sloper Thanks TomI have been programming for a while but not games until now.Thanks for getting back and your advice, particularly patents.;@scott8 Thanks for your reply.I see. The play of the game utilises basic maths skills so I'm guessing it'll be difficult to identify anything that's unique. I suppose, in a similar way, it would be difficult to patent something like ‘Wordle’. Am I right?
Hi I'm new. Unreal best option ?
For Beginners
Hallo everyone. My name is BBCblkn and I'm new on this forum. Nice to virtually meet you 🙂. One of my biggest dreams is to make my own videogame. I love writing design as in text on how my dream game would be. Now I got no skills to create it. But who knows what life will bring. Is Unreal the best program to have fun with an experience ? Obviously I prefer a simple but capable program. Not pre designed auto drop. Why not install Unreal and roam into it and see if anything happens.My favorite games are in the genre of Fantasy, usually stone age with magic. Dota, Homm, Diablo and the odd one out is the genius Starcraft 1. But I played plenty of different games, especially when I way younger. I don't game currently at all but designing gets my creative juices flowing and is so inspiring and fun. Thanks for having me guys
BBCblkn said:My name is BBCblknI am truly sorry for you. Even Elons daughter has a better name than that.BBCblkn said:Is Unreal the best program to have fun with an experience ?Give it a try, but it's not meant for total beginners.Starting small always is a good idea. 2D is easier than 3D. You could try GameMaker, learn some programming language, learn some math, move on to more advanced engines like UE or Unity… ;There's honestly no perfect program for beginners. If I had to compare Unreal though at my skill level, I would probably pick Unity. However, It really comes down to your needs, and how much programming you want to learn. Furthermore, I would also keep in mind other engines.;@BBCblkn I'd recommend Gamemaker studio 2 as a first engine. It's easy to learn and I haven't had a problem making my game ideas in it yet.There are some good tutorials on YouTube to follow to learn it. Do note you'll be limited to 2D games with GMS2.Bit late to the post, but I hope it helps;gamechfo said:Bit late to the postTwo months late. Always consider whether you honestly believe that a question asked long in the past is still awaiting an answer. Thread locked.
How to publish a book?
GDNet Lounge;Community
Hello, So, over the holidays I finished my 1st book. Do any of yall writer types know where I can find:an editorpublisherIt's like 99% done, just need to know what to do next. Also, it's cross genre, so it doesn't necessarily fit the standard model.
You've given nowhere near enough information to get a final answer, but I can suggest next steps for you. (For background, I've worked as an author, co-author, editor, and ghostwriter on 9 books so far.)Publishing is a business deal. You need to figure out what business services you need.Do you even need a publisher? Do you need a distributor? You already mention needing an editor. Do you need marketing? Do you need retail agreements? Digital or physical? If physical, POD or offset, how many each of hard or soft, what size of print run can you afford? What business services do you need? Publishers have an awful lot of potential features of what they can provide and what those services cost.Once you know the list of services you actually need, your favorite bookstore will have books that have listings of all the major publishers and hundreds of minor publishers, along with the services they provide and the specialties they work with. Work through the listings methodically, and talk to them all until you've got a deal. You'll also want to start shopping around for a lawyer at that point, both because they have connections and because they'll be working with the contracts you'll be signing.Once you know what you need and have talked with your lawyer the first few times, you will be ready to start shopping around. It's far better if you have more money and are using the publisher as a paid service. That is, you pay them for the services they provide up front. It will cost you many thousand dollars but you'll require far fewer sales to reach profitability. It can be better to do an online plus POD service starting out if you're self funded. If they need to front any of the money there will be two phases to the deal, one phase before it's profitable and another after a threshold is reached and it's profitable. The exact terms will depend on your needs and the services they'll be providing. Before you sign with anyone, you'll need to work back and forth more than once with your lawyer to help you negotiate what's fair in the agreement. Good lawyers understand the costs of the various services and can help you get fair rates.Just like publishing games, the more you need from them the harder your pitch becomes. If you need a lot of services the more it will cost you. If you're looking for them to invest in you, front you money, and pay for the books, don't expect a lot of money from the deal, and in addition your pitch needs to be amazing and you'll be rejected many times. If you've got the money to self-publish and are only looking for retail agreements that's rather easy. ;hmmmWell Self publish might work too. I'm looking for:an editor publishing distribution for ebookNo hard cover or physical book planned at this timemaking cover art. Future Audio book production. I think that's it. I'd be willing to do physical print if needed, but I don't really want to pay for that at this time. frob said:You've given nowhere near enough information to get a final answer The issue is I don't know what questions or criteria I should be asking or looking for. ;Have you considered publishing with Packt?https://www.packtpub.com/;GeneralJist said:2. publishing distribution for ebook 3. No hard cover or physical book planned at this timeFor distribution of an ebook there are plenty of options. Amazon is the biggest with kindle direct publishing requiring little more than an html file and an image for the title. If you are comfortable with software tools you can use that same document to build/compile every other format out there. You're on the hook for everything else with the business if you go that route, but it can work well if you are marketing through your own channels.There are many ebook publishers out there targeting specific platforms and specific readers or specific genres. I mentioned publisher lists, they also include electronic-only publishers. Understand the tools they use against piracy are also helpful since otherwise anybody with access to the file can make unlimited copies.Be careful of contracts, you almost certainly want something that has a non-exclusive agreement since you've done all the work yourself already. If a publisher wants an exclusive deal they need to be putting quite a lot on the negotiating table.GeneralJist said:4. making cover art.Find an artist with the style you like and contact them. Often it's in the range of a couple hundred bucks, especially for ‘unknown’ artists when they're starting with something that wouldn't have seen the light of day otherwise. Artist friends are best, and asking around at local art schools is inexpensive.GeneralJist said:5. Future Audio book production.If you don't need it now, it's something easily done later.GeneralJist said:1. an editorThis one is the most difficult. Skilled editors are amazing. If you go with a publishing house they'll provide professional editors, at professional rates. ;taby said:Have you considered publishing with Packt?https://www.packtpub.com/hmmm 1st time hearing of them.Looks like they are more of an educational option?My book is a mix of mental health journey auto bio, and Sci Fi elements. It's not really a standard “how to” for game dev. ;so I just heard back from my 1st publisher submission.https://triggerhub.org/​And they essentially say they be willing to look at it deeper, and have extensive edits to focus on the mental health angle. but they would want me to cut a lot. From what they are hinting at, It sounds like they want to cut a lot of the Game dev and gaming journey, as they are a publisher focused on mental health.So, now I need to decide what to do.I sent them back an email saying I'm open to continued dialogue.Without knowing exactly what they want to cut, and edit, I don't know how to proceed.Also, would it be better to hold out, and find a publisher that is willing to accept most of the game dev journey, as I'm looking for a continued publisher to work with, aka accept most of the book as is. Any advice would be helpful.Thanks yall. ;GeneralJist said:Any advice would be helpful.Look into your own mind and heart.;hmmmok,So I've submitted to a few other places.We shall see.I submitted to this place called author House, and they got back to me really quick, but it looks like they want me to pay a couple thousand for a package:https://www.authorhouse.com/en/catalog/black-and-white-packages​I personally find that a bit frustrating.I mean, really, I wrote the book, I thought traditional publishers get paid from a % of sales?@frobWhat do you think?Is the above package a good deal?I was also a little put off, as it seems the person who called me didn't even read anything about my book, and asked me “so what's your book about?"beyond the above, how does this usually work? Edit: so, after a bit of basic research, it seems the above organization is a bit scamy. The hunt continues. ;You're unlikely to get a publisher deal, where the publisher pays you an advance and distributes your book to retail outlets.You'll have to self-publish, meaning you have to bear all the costs for printing, and nobody will distribute it for you. https://en.wikipedia.org/wiki/Vanity_press​
First-person terrain navigation frustum clipping problem
General and Gameplay Programming;Programming
I am trying to develop first-person terrain navigation. I am able to read a terrain and render it as well as to move around the terrain by interpolating the location of the camera every time I move around. The main problem I have is that depending on the terrain, i.e. moving on a sloping terrain, the near plane clips my view (see below). What is the best way to avoid this? Presumably, I can interpolate the heights for the bottom corners of the near plane … any help would be appreciated.
I believe this can aways be an issue. I mean if you are clipping to a near plane and that plane passes through geometry, it has to do something. That being said you technically don't have to clip to a near plane at all, however many graphics APIs require it. Another other thing to consider is once you have collision working, you can put your camera, including your near clipping plane inside a collidable object, for instance a sphere, such that this problem will never occur. If you are eventually going to make this a real first-person game, that should take care of the problem since your camera will be inside the players head. Even in a 3rd person game you can put them inside a floating sphere. ;Gnollrunner said:That being said you technically don't have to clip to a near plane at all, however many graphics APIs require it.The near clip plane is always needed, even if you use a software rasterizer. If you don't do the clipping, vertices would flip behind the camera, causing glitches way worse than what we get from clipping.mllobera said:What is the best way to avoid this? Presumably, I can interpolate the heights for the bottom corners of the near plane … any help would be appreciated.Yes, basically you want to ensure that the camera is in empty space (above the hightmap), not in solid space (below the heightmap).But in general you can not treat the camera as a simple point, because the front clip plane requires a distance larger than zero. So ideally you build a sphere around the camera which bounds the front clip rectangle of the frustum, and then you make sure the sphere is entirely in empty space, for example. In the specific case of your terrain not having too steep slopes however, it should work well enough to sample height below camera, add some ‘character height’, and place the camera there. That's pretty simple and usually good enough for terrain.It's quite a difficult problem mainly for 3rd person games in levels made from architecture. It's difficult to project the camera out of solid space in ways so the motion still feels smooth and predictable.Some games additionally fade out geometry which is too close, attempting to minimize the issue.Imo, the ‘true’ solution to the problem would be to let the clipping happen, but rendering the interior volume of the geometry as sliced by the clipping plane.That's pretty hard with modern rendering, which usually lacks a definition of solid or empty space. But it was easy to do in the days of Doom / Quake software rendering. When i did such engine, it was possible to render clipped solid walls in simple black color. This felt really robust and not glitchy, so while it does not solve all related problems, i wonder why no game ever did this. ;@undefinedJoeJ said:The near clip plane is always needed, even if you use a software rasterizer. If you don't do the clipping, vertices would flip behind the camera, causing glitches way worse than what we get from clipping.You can clip to a pyramid instead of a frustum. I used to do this many years ago on old hardware. So there is no near clipping plane. In fact you don't need a far clipping plane either.Edit: Just wanted to add as far as I know the near and far clipping planes mostly have to do with optimizing your Z resolution. If you are dealing with that in other ways, I think they aren't strictly necessary. I currently don't even deal with the far plane and let LOD solve Z-fighting issues.;Gnollrunner said:You can clip to a pyramid instead of a frustum.I see. You still have front clip. It is a point, formed indirectly as the intersection of the other other frustum planes.I've misunderstood your claim to be ‘you don't need a front clip’. But you didn't say say that. Sorry. But now i'm curious about the experience with z precision you have had. I guess it just worked? Which then would probably mean: All those painful compromises of ‘make front plane distant so you get acceptable depth precision for large scenes’, are a result of a bad convention being used by APIs?Or did you use no z-Buffer? ;@undefined My whole engine is based on aggressive LOD and culling. I don't do projection in the matrix. It's a post step. My Z coordinates are world distances. My current project does have a near clipping plane mainly because DirectX wants one, but it's not that relevant for my application.;Ah, so you use the pyramid for culling only. But for rasterization, the usual front clip plane at some distance i guess.Still an interesting question if ‘some distance’ is really needed, but i guess yes.I did some experiment about point splatting. It uses spherical projection, which is simple than planar projection:auto WorldToScreen = [&](Vec4 w){Vec4 local = camera.inverseWorld * w;if (local[2] < .1f) return (Vec3(-1)); // <- front clip at some distance of 0.1Vec3 screen = (Vec3&)local;screen[2] = length(screen); // if it was zero, i'd get NaN herescreen[0] = (1 + screen[0] / (screen[2] * camera.fov)) / 2;screen[1] = (1 + screen[1] / (screen[2] * camera.fov)) / 2;return screen;}; Planar projection would cause division by zero too, i guess.;Thanks for all your comments! I will need to investigate how to do what Gnollrunner proposed (about putting the camera inside of a sphere). ;This may be obvious, but in case it helps:Let me note that, as a first-person camera may be more likely than a third-person camera to draw very close to geometry, it likely makes some sense to have a smaller near-plane distance for the former than the latter.Now, this only ameliorates the problem, it doesn't remove it entirely: it means that the problem will still appear, but only if the player gets very close indeed to a surface. It's intended to be used in conjunction with one or another means of preventing the camera from approaching quite so near to a surface (such as the sphere-approach mentioned by others above).;Thaumaturge said:This may be obvious, but in case it helps:Let me note that, as a first-person camera may be more likely than a third-person camera to draw very close to geometry, I'm not sure that's so true. I mean in both cases you have to take care of the problem somehow. The case of a first-person camera is a bit easier because it should always be in the collision boundary of the player (sphere(s), ellipsoid, capsule etc.). As along as the near plane is also within that boundary, the problem should never occur. So if you have a 10cm radius sphere and put the camera in the back of it, that gives you maybe a 10 to 15 cm camera to near clipping plane distance to play with depending on the field of view you are going for. With a 3rd person camera, you can also get very close to terrain, in fact your camera can end up within terrain or some object if you don't do anything to solve that problem, and this will happen very often without separate camera collision. One typical way to handle this is just implement your following camera, ignoring terrain considerations. Then to figure out your camera's actual position, project a line back from the head of the avatar to the camera's ostensible position, and see if it intersects anything to get the camera's true position. In reality you should project a cylinder and not a line since your camera will need its own bounding sphere to contain the near clipping plane. In any case this means that as you move around your camera can jump forward to clear terrain and objects. I've seen this in a few MMOs. However, when you leave blocking terrain you have the option of implementing smooth movement back to the cameras desired location. If you want to get really fancy, I guess you could try to predict when your camera will need to jump forward ahead of time and try to do smooth moment forward too. Maybe you can have a second camera bounding sphere which is somewhat larger, that would trigger smooth movement, but I think you would still need a fallback camera jump routine to be safe.
ASCIIpOrtal
Your Announcements;Community
I don't drop in as much as I once did... which wasn't much. But I wanted to plug my current project which I just got to what I'm calling my final public beta. It's called ASCIIpOrtal. It's Portal, in ASCII. I'm using the PDCurses library and hope to integrate sound with SDL, tho I've never done that so hopefully it'll work. If anyone has any experience with this, let me know.Meanwhile, you can get more information here as well as downloading the source and windows binaries:http://cymonsgames.retroremakes.com/forum/index.php/topic,7.msg218.html#msg218<a>I've also made a video that shows off what I've got so far.At this point it's a game, it's just not a portal game. But I'd be thrilled if some decent levels were made for this one, then see how portals effect it.
Book for networking novice
Networking and Multiplayer;Programming
Hi all,I'm looking to make a start in networking. Never even touched it before, im a complete novice on the subject.I'm quite strong in C++ and in DirectX and I'm looking for a book to teach me how to network (preferably in c++) and then after that, how to use directX to do network gaming. I've looked at the list of books on this site but none of the descriptions are all that clear so im looking for recommendations.What book should a networking novice get to start off with? Thanks!
Stevens: TCP/IP Illustrated is pretty good.It's important to understand networking at a fairly comprehensive level, which include things like physical framing, ARP, DNS, NAT, etc. University networking textbooks would be useful, too. They may also talk about things like ATM, SONET, ISDN, etc, which is good to understand for a feel for how networking actually works.I would recommend against just getting a book that teaches WinSock/Berkeley Sockets, because that's just the API; it doesn't teach you what's going on underneat. That would be like learning SQL without understanding sorting, searching or relational algebra; it makes you make poor design and implementation choices.Finally, "using DirectX with networking" is no different from "using OpenGL with networking" or "using text with networking." There used to be an old networking API called DirectPlay, but it's been deprecated for a long time, and Microsoft suggests you use WinSock or a third-party libarary and on top of that.; (1) Intro: Tannenbaum, A. "Computer Networks(2) Programming: Stevens, R. "Unix Network Programming"(3) And as noted before Stevens, R. "TCP/IP illustrated"Want to say as well that Richard Stevens is just beautiful author, all of his books are just amazing. ; cheers for the suggestions guys, like i say I am a complete novice when it comes to networking, cant believe i've done 4 years of games programming at uni and not once was any networking taught. disappointing.Even most of the acronyms above are greek to me, I really do have to start completely at the beginning! ; If you want to start right from the beginning, the link in my signature will get you started. But, after that, the books the guys have suggested will help you advance even further.Good luck :)
Small Unicode goofiness
General and Gameplay Programming;Programming
Sort of a minor headache I've been having; perhaps someone here might be able to help out.I'm using VS2008 and have a handful of different build configurations set up to (hopefully) toggle Unicode support cleanly and efficiently. I've recently discovered that the Windows headers seem to casually disregard the 'use Unicode character set' switch; this manifests itself as RegisterClassExA, OpenFileA, etc. being used over the wide character equivalents. I've tried manually entering the _UNICODE and UNICODE switches into the predefined macro/symbol space, but no dice. Actually adding these same #defines smack on top of the include directive also does jack.The strangest part is that it appears to work just fine everywhere else, only the Windows headers themselves seem to ignore this. Is there anything else I have to do in order to get this working aside from just rerolling their macros myself?
Select project properties (ALT+F7)in the Configuration Properties->General sectionCharacter Set, set it to Use Multi-Byte Character SetNow Build->Clean Solution and you should be ready to go;Quote:Original post by mmakrzemSelect project properties (ALT+F7)in the Configuration Properties->General sectionCharacter Set, set it to Use Multi-Byte Character SetNow Build->Clean Solution and you should be ready to goNo change. :\ I also *want* it to be Unicode right now, IDK if that was clear. Thanks, though! ; I've never seen this. Can you post a minimal example?
Octree implementation
General and Gameplay Programming;Programming
I started to implement my own octree, however there are things I don't fully understand the concept yet. My current tree subdivides an axis aligned box (all available space) into 8 child boxes, of half the bounds of the parent box. I think this is the same for all octrees (except loose ones). I then dealt with insertion of elements. Every node in my tree can store up to 8 elements. When a 9th elements is being inserted, they are split among child nodes (which are created on-demand, so a node can have anything between 0 and 8 child nodes). Thus Considering every branch, only the deepest nodes actually stores elements, all other simply subdivide space.I've been reading a lot of posts on forums about the subject, and I got the impression, that there are implementations that somehow store an arbitrary list of elements in a node. But I wonder how to determine if a node should create new branches or not. For example, Yann L talks about his galaxy generator:"At the root level, there are 50 million stars. At the deepest level ( #12 ) there are 200 stars. [...] When the node gets recursively split into 8 children, all stars from the parent node gets distributed into the correct child ( selected based on their coordinates )."Does anyone have an example what kind of functions can be used to determine if a node should create new branches?
One possible measure of cost are Havran's Surface Area Heuristics, which are commonly applied to Kd-trees in Ray Tracing, but they are not limited to Kd-trees or Ray Tracing. His heuristics give a rough probability with which a ray hits the geometry inside a node. As a result of SAH, you would also get large, empty spaces, which are useful for an early return upon tree-traversal.Of course SAH is mostly useful in ray tracing or when you want a fast collision detector, for raw rasterizing, I think it's more important to reduce the number of polygons. ; Thanks for the info. It helped me to think of more reasons on how an octree can be subdivided (especially about the criterias met). However I have some template issues with my implementation. I wanted my octree to accept another template argument: a traits class that defines the behaviour of the octree. In order to be flexible, this class is required to offer a function bool subdivide( const node & ) that is invoked to test if subdivision of a node is required or not. However this causes a C3200 error:This is the traits class, that defines the octree's subdivision behaviour. The error points to the "typedef typename..." line:error C3200: 'math::basic_octree_traits<elem_t,float_t,vector3_t>' : invalid template argument for template parameter 'octree_traits', expected a class templatesee reference to class template instantiation 'math::basic_octree_traits<elem_t,float_t,vector3_t>' being compiledtemplate<typename elem_t,typename float_t,typename vector3_t>class basic_octree_traits{public:typedef typename octree_node<elem_t,float_t,vector3_t,basic_octree_traits> octree_node_t;};This is the node class that contains a std::map with the possible child nodes.template<typename elem_t,typename float_t,typename vector3_t,template<typename T1,typename T2,typename T3>class octree_traits>class octree_node{/// Typedef for the octree traits typetypedef typename octree_traits<elem_t,float_t,vector3_t>octree_traits_t;};And finally the octree class that contains the public interfacetemplate<typename elem_t,typename float_t,typename vector3_t = vector3<float_t>,template<typename T1,typename T2,typename T3>class octree_traits = basic_octree_traits>class octree{};Can anybody explain why this error appears? I am passing a class template to the last parameter of octree_node, as basic_octree_traits is not a complete instantiation.*Edit* Well, I could somewhat solve my problem: I replaced the template template stuff with a simple typename octree_traits and passed an instantiated basic_octree_class into the parameter. Seems that VS 2008 isn't able to do this otherwise.[Edited by - SiS-Shadowman on June 19, 2009 12:50:39 AM]
Rotational axis? for movement of ball
General and Gameplay Programming;Programming
I have a ball on a track and right now the ball moves side to side and I change the rotation based on which key the user has pressed. Problem is when the user presses fwd and left/right the ball doesn't say 45 degrees. So to make the ball look a bit more realistic in movements what am I needing to do to get this ball to rotate correctly when moving 2 directions at once vs. 1(fwd,right, left) Their isn't any backwards...//used to calculate playerDir and is a scalar//used later on with a playerTransformMatrix to determine playerPos.xyzvelocityClamped = velocity;NX::MATH::Clamp<float>(velocityClamped, .5f, 1.0f);if(playerRight)playerDir += velocityClamped * PLAYERDIR_ACCEL_CONSTANT * DIR_CHANGE_RATE;if(playerLeft)playerDir -= velocityClamped * PLAYERDIR_ACCEL_CONSTANT * DIR_CHANGE_RATE;//for the rotation of the ballif(playerRight)rotMatrix.Rotate(angle * velocity, false, false, true);//z axiselse if(playerLeft)rotMatrix.Rotate(-angle * velocity, false, false, true);//z axiselserotMatrix.Rotate(angle * velocity, true, false, false);//x axisrotMatrix is a 4x4 matrixthanks
There's not much to go off of from that code, but if I understand correctly, you're trying to have the combination key-press LEFT + UP create a 45 degree rotation as opposed to a full 90 (or 0) degree rotation. The problem with your code, then, is the if/else if/else sequence. In the event of a LEFT + UP combination, only one of those if blocks is going to be executed; namely, the first one that evaluates to true.Try changing the code to a series of simple ifs. This way, each of the statements that evaluates to true will be executed, not just the first one. ; Nah that doesn't work, the ball goes all nuts like you are stretching it out and contracting it... ; LOL. So much for listening to me [smile]Out of curiosity, what does your code look like now? ; I used thisif(playerRight)rotMatrix.Rotate(angle * velocityClamped * .1f, false, false, true);if(playerLeft)rotMatrix.Rotate(-angle * velocityClamped * .1f, false, false, true);if(playerFwd)rotMatrix.Rotate(angle * velocity * .00025f, true, false, false);; Can you post your Rotate() function? ; Hi jky,I changed my Rotate to sepearate functions but still does the same thing as before. I can only rotate one axis at a time with this rotate function. What I am wondering is do I need to do some kind of rotational velocity or angular velocity? I have no idea I am not looking for realistic simulation here, but would like the ball to spin on the correct axis when the player moves in those directions?Thanks//Rotate a 3D point in Radians not Degreesvoid RotateX(T angle){ T sine = sin(angle);T cosine = cos(angle);matrix[5] = cosine;matrix[6] = sine;matrix[9] = -sine;matrix[10] = cosine;}//Rotate a 3D point in Radians not Degreesvoid RotateY(T angle){ T sine = sin(angle);T cosine = cos(angle); matrix[0] = cosine;matrix[2] = -sine;matrix[8] = sine;matrix[10] = cosine;}//Rotate a 3D point in Radians not Degreesvoid RotateZ(T angle){ T sine = sin(angle);T cosine = cos(angle); matrix[0] = cosine;matrix[1] = sine;matrix[4] = -sine;matrix[5] = cosine;}; What are the types of velocity and playerDir?I notice that your rotation functions don't set the matrix to identity before setting the relevant elements. Is this intentional? This means that the results may be incorrect if the matrix is not already identity. ; both are scalar floats and I call identity before the rotate in a separate call ; Don't you need 3 rotation matrices, one for each axis, then rotMatrix would be the product of those 3 matrices (in the right order) ? Your RotateX/Y/Z functions assume the matrix is identity, so you can't call those functions successively on the same matrix. It overrides part of the last rotation, stretching the ball.
Radiosity for lightmap creation?
2D and 3D Art;Visual Arts
I'm hoping to get the best visual quality in my game as I can while still allowing for low end hardware. As such I'm going to need to make use of light maps and such. I was paging through wikipedia on different light and shadow techs and Radiosity stands out as being pretty amazingly beautiful. Obviously its to intensive for realtime use, even on good hardware and wouldn't even be supported on low end stuff, much less slowly. But I was wondering, could it be used to create a realistic map of light distribution, sans animated objects, that can then be turned into a lightmap. I could then just use projected shadows for animated objects and achieve a reasonably pretty scene, in real time, on hopefully reasonable speeds on low end stuff.So, is it possible to create a light map using Radiosity? What tools could be used to do it?
Yep, radiosity-based lightmaps have been standard from Quake to Half-Life 2 ;)I've heard of people using the povray raytracer to make lightmaps before. ;Quote:Original post by HodgmanYep, radiosity-based lightmaps have been standard from Quake to Half-Life 2 ;)I've heard of people using the povray raytracer to make lightmaps before.Just wanted to specify that Quake II was the first game (AFAIK) to use radiosity and that HL2 use a special radiosity algorithm that separate incoming directions :-)On the other side, perhaps you might want to look at HL2 radiosity: it should provide better quality, and it is fast enought to run on old hardware (I've played HL2 at max quality on a geForce 6600). I don't think that there are free tools able to output to that format though, and I don't have deeper informations to share :-(EDIT: if HL2 normal map radiosity interests you, try this;Quote:Original post by cignox1Quote:Original post by HodgmanYep, radiosity-based lightmaps have been standard from Quake to Half-Life 2 ;)I've heard of people using the povray raytracer to make lightmaps before.Just wanted to specify that Quake II was the first game (AFAIK) to use radiosity and that HL2 use a special radiosity algorithm that separate incoming directions :-)On the other side, perhaps you might want to look at HL2 radiosity: it should provide better quality, and it is fast enought to run on old hardware (I've played HL2 at max quality on a geForce 6600). I don't think that there are free tools able to output to that format though, and I don't have deeper informations to share :-(EDIT: if HL2 normal map radiosity interests you, try thisQuake I used Radiosity. It was just an limited version of it (restricted number of light bounces).; Just a little warning before you invest lot of resources and ends up frustrated by lightmap restrictions.As already has been stated, radiosity-based lightmaps are quite common and have one of the best visual lighteffects for static lights, but...there're lot of disadvantages of lightmaps and their use is somewhat limited.1. They are static. For most "level" based fps this is not a problem, but for any rpg with i.e. day-night cycle a no go.2. Aliasing effects.Low resolution lightmaps have strong aliasing effects.3. High videomemory consum.Higher resolution lightmaps consume lot of videomemory, restricting it to only "small" level or heavy streaming.4. Lightmap packaging is difficult.Nowaday many tools support texture baking, but there are only a few tools which support effective lightmap packaging (putting all the lightmaps into a few single large textures). 5. Only diffuse/emissive lighting is supported, you can't use it for specular or any other view dependent lighting. So, if you want to utilize any view depedent lighting effect (i.e. normal mapping), you have to use dynamic lights too.Well, lightmaps are easy and pretty, but have many restrictions. You will encounter lightmaps most often in FPS and almost never in any open world (MMO)RPG. ;Quote:Original post by Running_WildQuake I used Radiosity. It was just an limited version of it (restricted number of light bounces).This sounds new to me. Have you any source? I've played Quake I for years, and I've never seen global illumination contributes. Just lightmaps. Quote:5. Only diffuse/emissive lighting is supported, you can't use it for specular or any other view dependent lighting. So, if you want to utilize any view depedent lighting effect (i.e. normal mapping), you have to use dynamic lights too.This is exactly what normal map radiosity (Half Life 2) was made for.That said, I agree about all those limitations (and I would rather go with real time lightning) but if the OP wants to support low end or old hardware, lightmaps are most probably the only choice... ;Quote:Original post by cignox1Quote:Original post by Running_WildQuake I used Radiosity. It was just an limited version of it (restricted number of light bounces).This sounds new to me. Have you any source? I've played Quake I for years, and I've never seen global illumination contributes. Just lightmaps.I can't remember if the Q1 light-map baking tool supported full radiosity (i.e. bounces). But seeing as the engine doesn't care how the light-maps were generated, you can use a 3rd party light-map baking tool to have static radiosity (bounced) in the Q1 engine ;) ; I am doing an RPG, but its isometric 3D and would need graphical capabilities approaching an RTS, ie, many mobs on screen (though not many dozen).While normal maps, specular lighting etc are cool, a non-first person camera angle makes them not make much sense. Also, there wouldn't be a lot of opportunity in my game for spec lighting because it will be set in a swamp and a desert. few things would actually look right with it. Dunno if normal or bump maps make much sense from a isometric view, but to support lightmaps it might be best. Im still looking into all my shadow options though. I didn't realize the subjects importance to my concept till I started researching all of this. ;Quote:I am doing an RPG, but its isometric 3D and would need graphical capabilities approaching an RTS, ie, many mobs on screen (though not many dozen).While normal maps, specular lighting etc are cool, a non-first person camera angle makes them not make much sense. Also, there wouldn't be a lot of opportunity in my game for spec lighting because it will be set in a swamp and a desert. few things would actually look right with it. Dunno if normal or bump maps make much sense from a isometric view, but to support lightmaps it might be best. Im still looking into all my shadow options though. I didn't realize the subjects importance to my concept till I started researching all of this.The usefulness of normalmapping depends not on firstperson,third person,or iso camera. Take a look at starcraft II, a rts game benefiting heavily from normal mapping.Even in a swamp or desert there are enough objects which would look better with normal mapping. Think about armor (metal,leather), monster or wet plants. Btw. not only specular lighting depends on normal mapping, diffuse lighting too .Back to the shadow/lighting topic. In a large RPG world using lightmapping will most likely be a show stopper (memory consumption). From a isometric perspective a simple orthogonal shadowmap (sun) and a few dynamic (shadowless) pointlights would be a nice and easy start.--Ashaman ; Which do you route do you think would offer the best visuals at a playable frame rate?
Designing a shooter for one-vs-one combat
Game Design and Theory;Game Design
I have an idea for developing a shooter that features instances of one-vs-one combat. I'm trying to tap more into tactical skills (outsmarting the enemy) rather than technical skill (who can aim better). The problem is, I'm not sure how someone can counter a gun without just shooting back with another gun.So far my most promising idea is having the players struggle for the best attack position, while giving them enough health to get to cover, and maybe have them go back and forth like that a few times before it ends. I'm not sure if it will end up being the most interesting solution, so I'm wondering if anyone else can think of some good ideas. For the record, I'm not sure if I want to promote sneaking - maybe, maybe not - but I'm definitely fine with a bit of melee combat.I'm also interested in hearing of any games that puts a focus on this kind of combat, to see what they did right/wrong.
Some ideas:The player has 2 reticulates for shooting. One is quite large, the other is very small ( possibly a normal dot ).If you can see your enemy and can target a certain part ( maybe 3 parts on 6? - head, body, 2 arms, 2 legs ) of his body within the large reticulate, the shoot automatically hits. This should lower the technical skill requirements.However, if you wish to try a lucky hit or can see just a small fraction of your enemy's body ( for example, he isn't hiding well ) you can try to hit him with the small reticulate.For maximizing the importance of every single bullet, the latency between every shot is very high. Also, shots do a large amount of damage.Now, the only missing things are all the tactical gadgets, such as smoke bombs, flash granades, decoys, mines, timed bombs, and so on. Maybe a knife should be also a basic weapon, which deals certain death.What do you think? ^_^ ;I think Svalorzen is really onto something when he talks about the time delays of the weapons. If you create a lag time for the weapons, and possibly even limit the ammo provided, that will force the player to make sure they are ready to fire. You could perhaps let the players use the terrain as a weapon. Rock slides, or falling trees. Allow the players to set up booby traps like trip wires, or motion activated bombs. ; You're on the right track with your thoughts about increasing the importance of positioning and spatial awareness within the game. In a typical Free for all or Team vs Team shooter, your spatial awareness is being maximized by tracking multiple objects in a complex environment. In a one vs one game using those same engines, your spatial awareness is not being stressed to the same extent. You will want to emphasize any design features that rely on awareness of the environment to succeed.Some ideas that have been used effectively in past games: Slowing down the player's movement speed, especially while strafing and moving backwards. Decreasing the player's offensive capability while moving or turning rapidly, which is usually done by reducing the accuracy of their shots. Allowing different body positions, crouched and prone, that offer a slimmer profile while reducing or eliminating movement. Allow the player to erect a limited number of projectile-stopping barriers (force fields, for example). Make the majority of your weapons range-limited, such as flame throwers, chainsaws or lightning guns. Create devices that act as distractions, such as noise-makers and decoys that will create the sound of footsteps fleeing down a hallway or some such. Allow damage taken from the rear or flanks to be greater.:) ; Probably the single biggest thing you can do to encourage careful tactics is to make each shot do a lot of damage. I don't like Svalorzen's idea of automatic targeting (if I may call it that), but a lot of the other stuff he said is good.Seriously, though, go out and have 1v1 duels with someone. Use rubber bands, airsoft guns, nerf guns, whatever. Go experience 1v1 combat!I've had some experience in this, with both airsoft and rubber bands. It often comes down to outmaneuvering someone to get a good shot. Actually, you really just want to avoid detection entirely, and get your shot off before your opponent knows where you are. Once the initial opportunity for this is lost (when both players are aware of each other), things often degenerate into a standoff. Either someone needs to back off farther away, or someone needs to run really quickly into a new position. Here, the lack of technical skill works in the runner's favor, because unless they are really clumsy, they have a pretty good chance of surviving the bullet fusillade, especially if there is no fusillade because rate-of-fire is limited. Also, these fights usually take place over distances that make accurate targeting difficult, because it's safer for both combatants out there. They naturally avoid closing with each other, until they are forced together by the circumstances.You want to emphasize the maneuvering and stealth aspect of the game, while reducing the occurrence of standoffs. Design your terrain with lots of opportunities for cover and stealth, but also for movement when the tendency might otherwise be to hunker down and wait for the other guy to move. Perhaps remove all radar-type devices, and replace them with a simple system that makes up for the lack of peripheral vision (or experiment with some kind of fish-eye camera view). Let detection be on sound and visuals alone. Be careful that levels are large enough to allow you to move undetected to a certain extent, but small enough that contact is inevitable. You would want to have some levels/stages suited to tactical maneuvering, others suited to stealth, and whatever other strategies and combinations you can think of.One interesting game I played with rubber bands was a 1 on 1 duel where each player only had 1 rubber band for the whole round. Careful tactics were very important, moderated by the fact that each round went very quickly. You either had to get a sniper shot off before your opponent saw you, or pop up and have a faster snap shot than they did. My cousin and I played a lot of these games, and they were more fun than you might expect. We had a fairly large yard, and we would start on opposite ends, giving us lots of room to "get lost". It wasn't the ideal place to play, but it was pretty good. It only got old when we had fully exploited the tactical possibilities of our environment, and couldn't come up with any new ones. I can only imagine how fun it would have been if we had had some really interesting, varied terrain.One tension-building mechanic happens when there is a possibility that you or your opponent or both are just going to wait the other one out. You may decide to wait for your opponent, and snag them when they walk by. But then you never know if they are doing the same. So you might venture out, full of fear that you are going to get shot. Even worse is when you are waiting for someone, but they detect you anyway, and out-sneak you. That's embarrassing.One last thought: design levels to avoid circling, where two players are just following each other around some large obstacle, or trying to out-guess the opponent about when to stop and wait or reverse direction. That's not usually very fun. You never want the game to settle into a limit cycle like that. ; I'm getting some good ideas from this.Traps, or any device that isn't a gun, are things I haven't really considered much. They could work though. I think there would be a way to incorporate them such that players could construct their own cover, concealment, etc. A limited means of altering the flow of the level. It's a dynamic I really should consider more fully.And then there's the idea of restricting the rate of fire, or rather, how much damage a person can do before the enemy gets a chance to react. After firing a shot/volley the logical thing would be to move to cover, since you can't continue attacking and the enemy might negate the advantage with a counterattack. But what if instead of having an instant of powerful attack, it was reversed to become an instant of weakened defense. From an advantageous position, the attacker could hit the weak spot (flank, back, etc.), but then the person being attacked would tend to face the attacker or escape, accomplishing much the same thing. I may be misinterpreting the intent of the suggestion, though.I do find it interesting that someone suggested reducing the speed of strafing/backpedaling; I was going to do that, but for a different reason. I wanted to make the player feel like they were controlling a person instead of a set of floating geometric coordinates, which most shooters haven't really improved upon since... ever. I thought it might have been because you could move in any direction with equal speed, so I decided that strafing/backpedaling would naturally be slower. It's kind of funny how that worked out.If my original question has run its course, maybe I can come at it from a different angle. Let me ask, what do you think would be the best way to reduce the technical skill requirements of a shooter? Is auto-aim taking it too far? I have an idea for an unusual solution, but I wouldn't want it to drive the discussion, I'd rather hear 100% original ideas first. ; It's a tough problem. If you want to be dealing a lot with fields of fire and zones of cover and careful maneuvering, then level design will be a big part of gameplay. Slow-fire weapons help a lot with this, and what you wind up with (with nerf guns, anyway) is a situation where you're trying to get the other guy to take a difficult or risky shot, so you can bum-rush him while he reloads. It might get monotonous and boring, though.If strategic positioning will be a core feature, how about working on deepening locomotion? UT got pretty wild with the wall-jumping and dodge moves, making instagib matches really intense, with dodging and circling and leaping all over the place. A cover system like you might see in Gears of War or similar titles can add some adrenaline to getting behind stuff.How about limiting ammo, or otherwise introducing a "meta-reload"? You fire the gun once every five seconds, but every twelve shots you have to spend twenty seconds recharging the thing before you can shoot it again. That'll reduce the chance of just circling and shooting until someone dies every time you see the other guy. A related option is guns overheating. Take the two sniper rifles in Halo. The human rifle fires four shots, as fast as you can pull the trigger, but then you've got to reload it. The Covenant version never reloads, but if you fire it too fast it'll overheat, which takes just as long as reloading. ; Another thing could be making the map environment made of blocks. Two shots destroy a block. The blocks are disposed like in a trench warfare, in groups of 3-4.So you could plan to get your enemy in one spot, having mined another one near it, destroy his cover and then watch him go over your mine in order to protect himself from your fire =);Quote:Let me ask, what do you think would be the best way to reduce the technical skill requirements of a shooter? Is auto-aim taking it too far? I have an idea for an unusual solution, but I wouldn't want it to drive the discussion, I'd rather hear 100% original ideas first.This isn't a 100% original idea, since it relates to the only game I've played that's really fun with only one other player: Americas Army.The reason it's fun is it relies on maneuvering and tactics rather than gun power stats to determine a winner. All guns are absolutely deadly and very accurate (if you spot someone across a map, chances are he'll be dead in seconds. This forces players to be more cautious and sneak around, find ambush points, etc. more, and works well for 1 vs 1 because it becomes a small scale tactics war where you need to outsmart your opponent (and react quickly). ;Quote:Original post by AethonicIf my original question has run its course, maybe I can come at it from a different angle. Let me ask, what do you think would be the best way to reduce the technical skill requirements of a shooter? Is auto-aim taking it too far? I have an idea for an unusual solution, but I wouldn't want it to drive the discussion, I'd rather hear 100% original ideas first.The best way to reduce technical skill requirements is to make the rate of fire as high as is practical. More bullets = more chances to hit. How easy do you really want to make it?Probably if you combine potent ammunition (where one to three hits will usually do it, depending on the location) with a fairly high rate of fire (~200 rounds per minute?), you will have a good balance of technical skill requirements and forcing the player to be creative in their maneuvering. Also, as Iron Chef Carnage said, level design will be extremely important in giving the player opportunities to be creative.At this point though, we're talking about content creation: weapon design and level design. As long as you make it easy to tweak weapon properties during play-testing, you should do pretty well.
Screen resolution independence
Graphics and GPU Programming;Programming
Reading the xna website I found out that it is recommended to have your game displayed on a 720p resolution.I fear that asking my artist to produce pixel art for a 720p display will be too much of a burden so my idea was to create a lower(read: more traditional) resolution art and the re-render the whole scene directly to 720pI remember doing something similar in DirectX but I'm no sure if this is still possible inside XNA (probably using render targets?)Does anyone knows how to accomplish this?Thank you
The point of using 720p is that you can scale up and down to different resolutions and aspect ratios and still get a pretty good display.The lower you go, the more you'll have to scale up. 720 is a good go-to because consoles use it.Damn I just read a real good blog post on this, but can't find it.If I'm running 1680*1050 (16:10 aspect), you'll draw at 1150*720 and scale it up. If I'm at 1024*768 (4:3 aspect), you'll draw at 960*720 and scale it up. This way you don't end up drawing more and more of your world at higher resolutions, but you can also support different aspect ratios without stretching.UI you draw native, relative to edges or center, and just make sure to stay inside 4:3.Hope that made sense, it's been a looong day..[Edited by - CadetUmfer on June 21, 2009 9:44:59 AM]; Yeah, I actually made a few blogs of my own about such a thing here (and specifically here). However, it is embarrassingly garbled logic and I still have yet to post my final results so I'll just recap.The basic idea is to use the floating-point vectors of 3D coordinates to your advantage. You would define a 'virtual' resolution and then scale actual pixel sizes to floating-point percentages and use them as the polygon's vertices in 3D space. The final step is to then take into account the aspect ratio using a view-transformation matrix and BAM, yer done. Because all of the sizes are scaled to the desired 'virtual resolution' you can run in any physical resolution and the display will scale automagically for the most part. Granted, taking into account different aspect ratios is more work but I really can't speak from experience there.hth
Recomposing and Editing SFX for a videogame footage
Music and Sound FX;Audio
Hi people,To compose for a visual subject, I choosed a one minute footage from the game tutorial of Medieval II: Total War. After putting an end to the video by editing and erasing all audio, I took related sound effects, same or similar to the ones in the footage, from its original game by monitoring. By examining the exact positions in the timeline, I edited, manipulated, and mixed SFX by using some effects such as EQ, reverb, compression, expander. Without sound effects, pure music would be dull. While sorting SFX out, I recomposed its music. After polishing the overall final mix, I rendered the video by resizing because of uploading limits for big size files. I enjoyed working on this non-profit personal project. It is on the section "Demo Reel and Videos" of my website. It is easy to watch. I cant give a particular link because of my website's technical structure. Here we go;http://www.hakanyurdakul.com/Best wishes,Hakan
Hakan- Hey, I watched the video. Some good stuff here! Is your post looking for feedback on this or are you just wanting to share it with the forum?Thanks!Nate ; Thanks for watching, NateOf course, it is open for feedback. Receiving feedback is one of the best things to improve myself...Best wishes,Hakan ; Okay, just wanted to check first. I have a few thoughts about the video:1) String ostinato: My ears got pretty tired of this musical element since it's there basically the entire time. I think either having the ostinato figure move to another section and leave the strings or have it leave the piece entirely for a while would help. Then you can bring it back. 2) Stronger ending needed: I love that you synced the ending with the music, good job on that! However, the ending itself feels rather weak. Since this is a trailer, you want to really leave the viewer with the impression of "OMG! I HAVE to get this game!" I don't feel that your music's ending is doing that yet. Consider having some sections to a long crescendo moving and building tension to that final chord. It also sounds like a muffled cymbal crash there as well. If you have a different sample, try and use a cymbal crash that is much more aggressive then let it ring out throughout the end tag. Your last note plays with 5 seconds to go. That's a long time for just silence.3) Musical dynamics: The music all feels like it's sitting at one level basically. Yes there are some dynamics but I feel that you could use much more. I also feel that your music production really lacks the low end, which can also diminish the amount of impact felt from the music.4) More sound design: Some of the sound design is spot on. Awesome! There are, however, several gaps. I'll try and point them out. * 0:26 Why not support the flying catapult "missiles" more? They could use a shrieking flying sound and then some huge explosions. * 0:31 You have a great swipe SFX for the sword but the stabbing motion is very weak. Make this bigger. This is killing the other guy and deserve a better, louder SFX especially since the swipe was so good. Use something for the pulling out motion as well.* 0:44 Why no swipe SFX here? Especially since you had one before, it's going to really stick out to other audio pros (and perhaps just the casual viewer) that this element is missing.* 0:51 Same thing here. Several large motions with little to no sound attached to them. Fill in the gaps.* 1:03 The logo needs some kind of SFX while it flies up to the camera. This is because it's the last thing the viewer sees and because it's the name of the product you want them to remember. You want this to create a large impression on them so they'll go out to the stores and buy it. Overall SFX feedback: You have some nice stuff in here but you're falling into a similar trap that I did when I first started sound design. There's too many gaps. For me, I didn't think about sound design having progression and development just like a musical piece would, but it does! Try approaching sound design like you do musical composition. Consider the "balance" of your sounds and the "flavors" that you're putting in there. Is it all the same thing? If so, change it! Are there gaps? Fill them in! Does the sound design do a good job of drawing anti caption of an upcoming event? If not, make it do so! I didn't even touch on some of the swooping, long camera movement, but you could really use another pass to fill in some of your gaps. Imagine it this way: I should be able to listen to only our sound design by itself and have a pretty good idea of what's going on. You want to create a full world with the sound design. When I'm watching your trailer, I don't get this sensation. Some of this might also be due to how the music and sound design are mixed together. This is always tricky. Whenever you add music to a trailer, you're always going to lose some SFX nuance. It's just how it goes. But what you want to try and do is limit the amount of loss and make the key points in both the music and the sound design stand out.Thanks for sharing this. I enjoyed watching it. I hope that helps!Nate ; Thanks so much Nate,Basically, I choosed this footage for only recomposing. I edited SFX because pure music would be dull. Well, I located SFX according to its original position. In original version, there are gaps as you mentioned since it is a videogame tutorial instead of its trailer. I think dealing with SFX is harder than composing, if I decided to create its SFX again, I would try to fill these gaps and experiment different options. When it comes to the music, I feel that it is lack of the low end, or middle range is high little bit, too. I dont have proper studio equipment and acoustically treated room. At mastering session, I think, somehow I didnt give attention. It reveals ostinato feeling, and becomes weaker at the end as you mention. My aim on music was to create a blind tension overall by opening C major chromatic, and modulating from Eminor-Fminor to C major chromatic again. Ending part is Eminor (keys)I think I will leave this work like that, and start for a new one. Next time, I will take more care for mastering and SFX. Finally i enjoyed working on such a thing. It made me aware of how painful SFX is.Thanks again.Best Wishes,Hakan ; Yeah, I think it would be best to leave your sound design out if you're more focused on music. I have several trailers on my website that only feature music since I didn't do the sound design and they come off pretty well. Sure, sound design adds a layer but what you don't want is to have sound design that draws criticism if you're only focused on the musical aspect. Please share the next one too! I'd love to check it out.Nate ; Most importantly, you mention that "without sound effects, pure music would be dull" on your description.Your goal should be to make certain that "without sound effects," your music is not dull!; Thanks for your comment Dannthr,It might be good point. I think my goal shouldnt be as you said. Video, music, and SFX are altogether in the name of totalartwork. Of course, just writing music to video could be another option. I just wanted to edit SFX as well, and I enjoyed it, totally different and hard task in my opionion. Thats why I show respect to sound designers. If i thought that my music was dull, i wouldnt compose it for the video. It is not related to the song. When eyes watch the video and ears listen to the audio, brain stimulates the ears to catch the action's sound (SFX) for video. Therefore i mentioned "pure music would be dull". It is only for this work at the first place. Maybe I wouldnt mention like that for a different videoBest Wishes,Hakanwww.hakanyurdakul.com ; Hakan, allow me to be blunt.The music is weak and let me explain why:During your track you aim to create tension through a series of rising harmonic progressions.Unfortunately, you put TOO MUCH strain on the harmonic progressions ability to carry the tension completely by itself.So your tension--your build--becomes a hollow one.You see, Hakan, strength and power is about contrast not about volume or density. Your track lacks strength because it lacks contrast. Most significantly point numbers 1 and 3 of Nathan's critique address this lack of contrast.Your rhythm lacks contrast and dynamics lack contrast.So yes, your original assessment was accurate: "The music is dull."Instead, spread the workload between a broader variety of musical concepts. Let rhythm do some of the work, let harmonic progressions do some of the work, and let dynamic contrast do some of the work. Each of these three elements multiply the power of your composition--but in order for them to be effective, you must learn to harness them.Because of your defense of your own work, I don't believe you'd take well to a listening assignment--so instead, I will simply leave you with what I found to be the simplest example to grasp.That is to say, an example of dynamic contrast and rhythmic contrast.Please listen to 0:30 to 2:00 of ">Hans Zimmer's "A Family Affair" from the OST to Dead Man's Chest.Generally, I don't give Zimmer as listening material, but I feel this example is basic enough for you to metabolize even in a state of defense--that is to say, it's obvious.As far as your defense that the sound effects and music would not be one without the other--unfortunately, the music should stand on its own just as the sound effects should stand on its own, and together they will be all the more powerful for it.Finally, I would like to conclude by reminding you (or possibly informing you for the first time) that no criticism is without some measure of merit. Even simple or uninformed criticism comes from a legitimate listening experience. Experienced criticism, on the other hand, like Nathan's or mine, expounded or not, is not based on whimsical impressions but rather a grounded perspective of music and sound as a craft.I highly suggest you use the tools we provide you to improve your craft.; Thanks so much for your criticism Dannthr,Well, this way to explain is more clear. You explained why it was like that. I am very well open to criticism, otherwise I wouldnt post and share this video to this forum. I listen to people's feedback so that I can see the points I am lack of and strong. It is a good way to learn.However, while doing criticism or leaving feedback, there should be some respects. For example, it should be noticed that the person who posts his work might be inexperienced, and this work might be his first work. Yes, it is my first work to compose, edit SFX, and deal with video things for a footage. Thats why criticism or feedback should be clear and direct to the points. Your first comment :" Most importantly, you mention that "without sound effects, pure music would be dull" on your description.Your goal should be to make certain that "without sound effects," your music is not dull! "I wouldnt approach like that for a person whom I dont know if I were experienced to leave feedback. I would directly tell him about the points, and advise "keep working hard". If I didnt know his goal or were confused to understand, i would ask him for explaining it more clearly. Thats why I explained why I tried to edit SFX on my answer to your first comment. You described that a state of defense. I am really suprised. For example, as an experienced person, Nathe firstly asked me if it was open for feedback before he left a feedback because I didnt mention about that on my post. It was nice of him, otherwise, he could leave an unhelpful feedback without explaining the points. I believe in that you didnt mean like. I think this forum is to share and improve ourselvesWell, as Nathe points, you point the same things: Lack of dynamic and rhythm contrast. I will try to sort it out these problems on next work. I listened to the example you choosed for me. I can tell you about my simple opinions. Firstly, it is mono and hard to hear orchestration and its inside dynamic contrast because of the fact that stereo field was killed by converting into mono. Secondly, Hans Zimmer is an advanced example for a beginner. If i choosed an example, it would be a stereo recording, and suitable for beginners in the name of film and videogame music. They are my simple opinions for a beginner.Thanks so much again. I will try to be brave and experiment for these points.Best Wishes,Hakan
Shader language, which to use ?
Graphics and GPU Programming;Programming
Hi all guys !Just one question. Do you think is better to learn to write shaders using HLSL or the native assembly-like language ?Right now I'm using DX9.Is HLSL slower ?thanks a lot !!
If you are beginning with shading i recommend hlsl. if you know c, you will have no problem learning hlsl.i dont think that assembler-shading is slower than hlsl. its like c++ and assembler: if you know how to optimize c++ code its nearly as fast as assembler.pp000 ; The shader compiler will aggressively optimize your HLSL. Unless you're very familiar with how to create performant shader assembly, it's extremely unlikely that you will write faster assembly yourself.Also FYI, in DX10 you no longer have the option of writing shaders in assembly so you might as well get used to using HLSL. ; I believe that from DX10 onwards you have no other choice than HLSL anyway ; FXC is your command line compiler for HLSL/FX... it'll compile your shaders/effects to binaries for quick loading (can be and usually is a significant time saver), dump assembly listings and reflect meta data for your perusal (great learning tool toward that end).
const char* not crashing?
General and Gameplay Programming;Programming
Why doesn't the following code crash?#include <string>#include <iostream>const char* test(){ std::string s = "hallo"; s += "!!"; return s.c_str();}int main(){ const char* c = test(); std::cout << c; std::cin.get(); }At the end of test(), the std::string gets deleted. How is the memory handled so that the const char* keeps pointing to something valid, and when is that deleted?The string isn't one simple constant but two added ones, so it can't just point to the literal strings in the code.
Quote:Original post by LodeWhy doesn't the following code crash?*** Source Snippet Removed ***At the end of test(), the std::string gets deleted. How is the memory handled so that the const char* keeps pointing to something valid, and when is that deleted?The string isn't one simple constant but two added ones, so it can't just point to the literal strings in the code.That's undefined behaviour. I'd guess that the only reason it works is that either the memory occupied by the string data isn't filled with gibberish when it's freed (I.e. not using the debug CRT), or your STL implementation keeps small strings on the stack, and the stack isn't being reset with gibberish when the function ends. ;Quote:Original post by LodeWhy doesn't the following code crash?At the end of test(), the std::string gets deleted. How is the memory handled so that the const char* keeps pointing to something valid, and when is that deleted?The string isn't one simple constant but two added ones, so it can't just point to the literal strings in the code.std::string.c_str() typically returns a pointer to the string's internal buffer, and even though that buffer will have been freed, the memory won't have been overwritten yet. Given that it is a small string, and it has only just been freed, you probably won't trigger the operating system's memory protection features when you access that memory.Obviously, you should never do this, and should return the std::string itself instead. ; Well it's for a C-style dll interface, I need to return it as a const char* :(And appearantly other people have also been doing it with code like that what I posted, which is what made me wonder about it and post it here in the first place.What were the developers of C smoking when they decided not to add useful strings to the language and do they realise what they have caused still 30 years later? ;Quote:Original post by LodeWhat were the developers of C smoking when they decided not to add useful strings to the languageThey didn't smoke anything. They just thought "Hey, let's create a portable assembly language!". ;Quote:Original post by LodeWell it's for a C-style dll interface, I need to return it as a const char* :(There's no really good solution for this. The best thing you can do is have the caller give you some buffer where you'll deposit the result. Make sure the caller also specifies the size of the buffer, so you know when to stop if the string is too long.Alternatively, you can return a pointer to a malloc()ed block of memory that they can release using free(). In this case, document this fact as loudly as you can, because someone will make a memory leak out of it.For completeness, you could also return a pointer to some global buffer (similar to making s static in your example. However, this has its own problems. ;Quote:Original post by LodeWhat were the developers of C smoking when they decided not to add useful strings to the language and do they realise what they have caused still 30 years later?What were the developers of FORTRAN smoking? What were the developers of APL smoking? Who smoked so much to actually invent any 2nd generation programming language?And what were you smoking when you decided to use C where C++ was intended?Don't take serious, just a small, benevolent side blow, not sure what I smoked to write such BS ;)C was always about being minimalistic and close to the metal, DevFred's phrase about C being a "portable assembly language" is not fetched from to far away.Also, C was always for people "who know what they do", i.e. when the return a pointer-to-char then they know why and what will happen. Pretty much like when you are logged in as root on a Unix box, C shows no mercy for programmer-fail. That analogy was no accident, btw.One last note: C really does not have strings, it only has array of char. And a bit of syntactic sugar to make initialization a bit more comfortable:#include <stdio.h>int main () { char mem[] = {'h','e','l','l','o',',',' ','w','o','r','l','d','\0'}; char *str = mem; ... puts (str);};Quote:Original post by LodeWhat were the developers of C smoking when they decided not to add useful strings to the language and do they realise what they have caused still 30 years later?C is a glorified PDP-11 assembler -- the creators, Kerninghan and Ritchie, didn't think: they just wanted to get UNIX done. ;Quote:Original post by LodeWhat were the developers of C smoking when they decided not to add useful strings to the language and do they realise what they have caused still 30 years later?I think it's more like "hey, we need some way to handle text in our new language. I have an idea on how we can do so much better than FORTRAN's Hollerith variables....".Just evaluate their design decisions in the context of what was available in the 1960s. ;Quote:Original post by BregmaQuote:Original post by LodeWhat were the developers of C smoking when they decided not to add useful strings to the language and do they realise what they have caused still 30 years later?I think it's more like "hey, we need some way to handle text in our new language. I have an idea on how we can do so much better than FORTRAN's Hollerith variables....".Just evaluate their design decisions in the context of what was available in the 1960s.Upon first glimpse, those Hollerith variables look like labeled data sections in some assembler. Would that assumption be correct?
Need a little help analyzing a little program
General and Gameplay Programming;Programming
Hello everyone...I'm in a bit of a kerfuffle here.I don't understand part of this code:#include <iostream>using namespace std;unsigned short sqrt( unsigned long a ){unsigned long rem = 0;unsigned long root = 0;unsigned long divisor = 0;for( int i = 0; i < 16; i++ ){root <<= 1;rem = ( ( rem << 2 ) + ( a >> 30 ) );a <<= 2;divisor = ( root << 1 ) + 1;if( divisor <= rem ){rem -= divisor;root++;}}return (unsigned short)root;}It's a binary root finder that works only with addition and subtraction. Sadly the book featuring this code doesn't explain it at all! I think I understand the 16 iterations though: variable a is an unsigned long integer. Within 16 itirations and pushing 2 bits each time to the left it will be 0 after the 16th iteration if 1 is entered...since it's an integer root finder, that's the smallest value apart from 0 that you can enter. Did I understand this correctly? What really baffles me though is how the variables rem and divisor work together and what they represent. All I can tell is that they'll start increasing once the 'a' variable overflows (well it doesn't overflow but it'll be 0x000...etc.)...so 0 basically. Anyone have an idea?Cheers,Chris
This is a lot of guesswork on my part, but I think I might understand that code well enough to get the gist of it.The basic idea is you are determining which bits of the root should be set, one at a time starting with the Most Significant bit of the root. However, it starts out by actually setting the LSB of the root and then shifting that bit as well as the previously set bits as it goes on. To determine whether a bit of the root should be set or not we need to know if the remaining quantity to calculate the root from can be divided by the number or not. That is, if the remainder (more on that in a bit) is less than the divisor implies that the remainder can be divided by the divisor wholly. ie, if remainder / divisor > 1 is true then we should set the root current root bit.The divisor, if you'll notice, is set to what the next root would be if the root bit we are on were to be set. Then by seeing if the remaining amount can be divided by the next root we see if we were correct to assume the bit was set. And when the divisor IS less than the remainder (presumably the remainder is more than 1 time greater than divisor but less than 2 times greater than the divisor) we remove the divisor from our calculations, having taken it into account.Finally, the remainder increases by a factor of 4 PLUS whatever remaining original number (a) we have to go. That is, I believe the equation works on the 2 highest remaining bits in the original number PLUS the previous remaining number that we haven't taken account of yet.It is here where I start to get confused again by the workings of the algorithm. I'd need to step through the code in my head or in a debugger and I'm a little too busy to get into that right now. However, I think this wikipedia article might help you a little bit. The algorithms aren't the same, but read the paragraph describing it and hopefully you'll start to better grasp what the function you have is doing.Hope this helps.
Visual C++ error
For Beginners
hi guys i been going through beginning game programming and i am stuck. the book wants me to include a resource file Blizzard.rc but it doesn't let me what am i doing wrong?
this is the code i need to include in my game //-----------------------------------------------------------------// Blizzard Resources// RC Source - Blizzard.rc//-----------------------------------------------------------------//-----------------------------------------------------------------// Include Files//-----------------------------------------------------------------#include "Resource.h"//-----------------------------------------------------------------// Icons//-----------------------------------------------------------------IDI_BLIZZARD ICON "Res\\Blizzard.ico"IDI_BLIZZARD_SM ICON "Res\\Blizzard_sm.ico"how would i implement this? ; What version of VC++ are you using and what is the error message?Normally, you should just be able to put this in a text file called Blizzard.rc and add it to your solution just as with any file. ; VC++ 2008 and to you have to include resources as an .rc or can u implement it into another file? like a header file or a .cpp file? and if so how would i do that? ; Create a text file called Blizzard.rc, paste that code into it and then, in Visual Studio's Solution Explorer (where it lists your files, right-click on the source files folder, choose "Add", "Existing item..." and point it towards that Blizzard.rc file. That's all you need to do.And yes, it must be an .rc file.
Scaling the Transform Matrix
Graphics and GPU Programming;Programming
I have a 1600 x 1200 image, and a 400x300 version of the same.I applied translation(tx,ty) to the 1600x1200 image.To apply the corresponding translation to the 400x300 image,I just changed the translation to: (tx/4 , ty/4) as the smaller is 1/4th the size.(1) Is that assumption correct? Also, if the post-translation origin for the big image is (ox,oy),(2) would the post-translation origin for the small image be (ox/4,oy/4) along the same lines?Thanks a lot,Abhi
Please don't cross-post on these forums.
OpenGL (SFML) texture mapping problems
Graphics and GPU Programming;Programming
All im trying to do is map a simple texture onto a box, i have followed several tutorials, but i think i must be doing something wrong. the texture i want to use loads fine,here is the code for the front face of my cube, and its texture mapping:--------glNormal3f( 0.0f, 0.0f, 50.0f);glTexCoord2f(0.0f, 0.0f); glVertex3f(-50.0f, -50.0f, 50.0f);glTexCoord2f(1.0f, 0.0f); glVertex3f( 50.0f, -50.0f, 50.0f);glTexCoord2f(1.0f, 1.0f); glVertex3f( 50.0f, 50.0f, 50.0f);glTexCoord2f(1.0f, 1.0f); glVertex3f(-50.0f, 50.0f, 50.0f);---------------------------------------------and here is the result:http://i210.photobucket.com/albums/bb217/zfan5/box.jpgthere is no red in the texture file and the cube before the application of the texture is white. im not quite sure why it will only texture the bottom 1/3 of the cube....any advice or suggestions would be greatly appreciated, thanks in advanced.
There could be several problems, without more code it is hard to say. From what you have posted I would suggest 1. Your normal is wrong, it should be a normalized vector. Use glNormal3f(0.0f,0.0f,1.0f).2. Your fourth texture coord is wrong, it should be glTexCoord2f(0.0f,1.0f).3. Wrong colors could be a problem of the wrong texture/file format combination. The most common formats use either RGB or BGR, if you use the wrong format the red and the blue color channel are exchanged.4. From the image you have posted I would guess that your texture load/upload is wrong.--Ashaman;Quote:Original post by zeldatoothemax--------glNormal3f( 0.0f, 0.0f, 50.0f);glTexCoord2f(0.0f, 0.0f); glVertex3f(-50.0f, -50.0f, 50.0f);glTexCoord2f(1.0f, 0.0f); glVertex3f( 50.0f, -50.0f, 50.0f);glTexCoord2f(1.0f, 1.0f); glVertex3f( 50.0f, 50.0f, 50.0f);glTexCoord2f(1.0f, 1.0f); glVertex3f(-50.0f, 50.0f, 50.0f);---------------------------------------------Well your texture mapping is incorrect. It should be:glNormal3f( 0.0f, 0.0f, 50.0f);glTexCoord2f(0.0f, 0.0f); glVertex3f(-50.0f, -50.0f, 50.0f);glTexCoord2f(1.0f, 0.0f); glVertex3f( 50.0f, -50.0f, 50.0f);glTexCoord2f(1.0f, 1.0f); glVertex3f( 50.0f, 50.0f, 50.0f);glTexCoord2f(0.0f, 1.0f); glVertex3f(-50.0f, 50.0f, 50.0f);; Oh, sorry guys about the wrong texture cord, in the version im using its actually right, but i think it is probably the way im loading my image, thanks ill look into it ;)
Strange bug in my code
Engines and Middleware;Programming
I'm making a tetris clone but I have a strange bug in the code (please download it at http://igpgames.altervista.org).My problem is the tetraminos is not showing and moving right and I don't know why.Thanks in advance for any help.Bye, Berserk..
Please help. ; You may want to present your problem better to get any help. Currently your post read like this: "I have a bunch of code, it doesn't work, please fix it". Perhaps you didn't mean to sound like that, but that's pretty much what I read.In order for people to assist you, you may want to consider doing the following:Instead of providing the entire code base, isolate or even generalize the problem. Place break points, trace and analyze debugger output or reduce the project to its bare essentials. This often gives you more insight into the problem.If you're still stuck, post the relevant parts of your code using the source tags and provide a short but meaningful description of the classes, functions, variables etc. and how they relate to each other. Sometimes just adding some comments to the code already suffices. If it's unclear from the context, specify what language/frameworks/libraries etc. you're using.Tell us what the code should do if it worked correctly, and what it currently does. In case of graphical 'errors', screen shots might help too.If you have some idea of what the problem could be, gives us your opinion.; I don't have a clue on where the bug is, this is why I provide the entyre source.The source is commented in the headers with short explanations on what variables and methods of my classes do.I think the problem is in tetraminos::draw because the tetraminos is not drawn correctly while the playground grid is, but I can't do any debug because I don't know where visual studio 2003 places the executable when I press play and I need a bitmap to be on the same path.Otherwise all I get is a black screen.I also noticed some problems moving the only block of the tetraminos appears on the screen and sometimes the falling tetraminos fills the grid playground.I really don't have a clue of what could be producing the bug and believe me, the only way to notice how strange is is seeing personally.I'm using the allegro library (version 4.2.2).The fact is, the code seems well written. Other persons sayd me the code is well written and to my eyes there's nothing wrong. I need more expert eyes.Thanks in advance for any help.Bye, Berserk..; The point is that noody here has the time to do the work you should do to come uü with an actual problem. Running the Visual Studio Debugger just takes a blink of an eye. It also takes care of setting the correct path to load your files from. In case you cannot load resources when running from Visual Studio you need to revise your loading routine to make it more intelligent. Basically, your problem seems to be that something does not render. So no need to read all of the source code. Before starting asking questions here debug (or if you are not able to do that: write to a log file) what you are trying to render to make sure the render device is in a correct state (read: has the correct transformation) and that your data you want to render is valid such as having the correct positions to start with. ; I would already done a debug if I knew where visual studio places the executable in debug mode. Please download the source and tell me if is there something wrong. ; try in the project's debug directory.For example, i have my project saved to c:\projects\project1there will be a c:\projects\project1\debug. ;Quote:Original post by Thc-03_BerserkI would already done a debug if I knew where visual studio places the executable in debug mode. Please download the source and tell me if is there something wrong.Luckily you don't need to know where it is as just pressing the "start debug" button in the VS IDE will find it for you. Just make sure you aer compiling the debug version. I recommend putting a bunch of breakpoints where you *think* the problem may occur and checking the status of your variables in those places as the program runs. ; I already tryed with the debug subfolder with no success. ; Try, if all else fails, a Find Files and Folders search with the name of the executable. This is the easy part. But try to help us help you. I don't use Allegro, but I could help if I knew what exactly was wrong. Try commenting out lines, changing values, anything to try to narrow down the problem's location. As it stands, I can't be bothered to hunt through other people's source tree while I have my own projects to work on.
Render simple collada cube
Engines and Middleware;Programming
Hello.I'm not sure if this is the correct forum for this, but anyways. I've decided to use collada for my hobby 3D engine and made a simple converter from collada to my own format. this is the mesh I've parsed for my test:from cube.dae, the one that follows with collada DOM<mesh> <source id="box-lib-positions" name="position"><float_array id="box-lib-positions-array" count="24">-50 50 50 50 50 50 -50 -50 50 50 -50 50 -50 50 -50 50 50 -50 -50 -50 -50 50 -50 -50 </float_array><technique_common> <accessor count="8" source="#box-lib-positions-array" stride="3"> <param name="X" type="float"/> <param name="Y" type="float"/> <param name="Z" type="float"/> </accessor></technique_common> </source> <source id="box-lib-normals" name="normal"><float_array id="box-lib-normals-array" count="72">0 0 1 0 0 1 0 0 1 0 0 1 0 1 0 0 1 0 0 1 0 0 1 0 0 -1 0 0 -1 0 0 -1 0 0 -1 0 -1 0 0 -1 0 0 -1 0 0 -1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 -1 0 0 -1 0 0 -1 0 0 -1 </float_array><technique_common> <accessor count="24" source="#box-lib-normals-array" stride="3"> <param name="X" type="float"/> <param name="Y" type="float"/> <param name="Z" type="float"/> </accessor></technique_common> </source> <vertices id="box-lib-vertices"><input semantic="POSITION" source="#box-lib-positions"/> </vertices> <polylist count="6" material="BlueSG"><input offset="0" semantic="VERTEX" source="#box-lib-vertices"/><input offset="1" semantic="NORMAL" source="#box-lib-normals"/><vcount>4 4 4 4 4 4 </vcount><p>0 0 2 1 3 2 1 3 0 4 1 5 5 6 4 7 6 8 7 9 3 10 2 11 0 12 4 13 6 14 2 15 3 16 7 17 5 18 1 19 5 20 7 21 6 22 4 23 </p> </polylist> </mesh>this is the only mesh and as you can see it contains 24 vertices, 6 faces, 4 vertices per face.When I'm done parsing I've got an array containing all the vertices and create a vertexbuffer (Direc3D 10). Now, when I draw the vertices I just draw from 0 -24 like so:UInt32 stride = sizeof(Vertex);UInt32 offset = 0; //Toplogy is D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIPm_pD3DDevice->IASetVertexBuffers(0, 1, &m_pVB, &stride, &offset);m_pD3DDevice->Draw(m_numVertices, 0);The result is cube like, but it is full of holes.This is my first attempt to render a collada file and I know that collada is only meant to describe how a model is built, not how it should be drawn. Is drawing the vertices one by one the right way to do it or should i try something else? like making the polylists to a list of tringles?anywas, the vertices i end up with are these and they do seem to be correct:vertex [0] : x:-50y:50z:50vertex [1] : x:-50y:-50z:50vertex [2] : x:50y:-50z:50vertex [3] : x:50y:50z:50vertex [4] : x:-50y:50z:50vertex [5] : x:50y:50z:50vertex [6] : x:50y:50z:-50vertex [7] : x:-50y:50z:-50vertex [8] : x:-50y:-50z:-50vertex [9] : x:50y:-50z:-50vertex [10] : x:50y:-50z:50vertex [11] : x:-50y:-50z:50vertex [12] : x:-50y:50z:50vertex [13] : x:-50y:50z:-50vertex [14] : x:-50y:-50z:-50vertex [15] : x:-50y:-50z:50vertex [16] : x:50y:-50z:50vertex [17] : x:50y:-50z:-50vertex [18] : x:50y:50z:-50vertex [19] : x:50y:50z:50vertex [20] : x:50y:50z:-50vertex [21] : x:50y:-50z:-50vertex [22] : x:-50y:-50z:-50vertex [23] : x:-50y:50z:-50
I don't know is this should be posted in the DirectX forum instead of alternative librarys? ; You also have to parse the polylist/triangles.As show in the sample file the first index is for vertex position and the one after it is the normal. So for example the first polygon consists of (0,0) (2,1) (3,2) (1,3) where each pair stores the position index and the normal index.Also, I suggest you to use the Refinery to convert you polylist into triangles which are what your graphics card probably likes the most. ; The test cube only contains a polylist, so I just took the vertices and put them in an array. I got the normals to, the order(index) from p. I just downloaded the refinery and will convert the polylists to trianglelists instead.[Edited by - HermanssoN on June 23, 2009 7:53:15 AM];Quote:Original post by HermanssoNThe test cube only contains a polylist, so I just took the vertices and put them in an array. I got the normals to, the order(index) from . I just downloaded the refinery and will convert the polylists to trianglelists instead.thanks for reply//Hermansson
[SOLVED] reading indeces from D3DXMESH
Graphics and GPU Programming;Programming
Hi!I'm trying to get the Indeces from a D3DXMESH, but i cannot figure out how?I have tried to solve it on my own, but I realised I couldn't.As far as I came:const BYTE* pIndexes;DWORD* indeces;mesh->LockIndexBuffer(D3DLOCK_READONLY, (void**)&pIndexes); mesh->UnlockIndexBuffer() ;I hope you can help me.PS: sorry for my bad english language skills, im from austria (not australia)[Edited by - pp000 on June 18, 2009 2:32:17 PM]
Typically an index buffer will have 16-bit indices, in which case you should use an unsigned short* pointer instead of a BYTE* pointer. You can check for sure by calling GetDesc on the index buffer and checking the Format member of the D3DINDEXBUFFER_DESC. ; i have a working solution i think , checks for the format 16 or 32 bit and gets the x,y,z in to a D3DXVECTOR3, if i find it i will post it ; thank you, that helped a lot, but ive got another problem now:i have tried something that writes the indices into a textfile. and i have changed pIndeces from BYTE* to unsigned short*.ofstream myfile;myfile.open ("test.txt");for (UINT j = 0; j < noOfIndices; ++j) { const unsigned short* d = (const unsigned short*)pIndexes; myfile << *d << "\n"; pIndexes++;}myfile << "end" << "\n";myfile.close();ive looked into the .x file and the indices are:0,3,2,1, 4,7,6,5, 8,11,10,9, 12, ...but when i print them, i get (i have sorted/formatted it):0,3,2,0,2,1,4,7,6,4,6,5,...my question:what am i doing wrong?thank you ; i solved it, thank you for helping me =)here's the code i use:DWORD nFaces = mesh->GetNumFaces();ofstream myfile;myfile.open ("process.txt");UINT count = 0;for (UINT j = 0; j < nFaces*3; ++j) {if (count != 2 && count != 3) {const unsigned short* d = (const unsigned short*)pIndexes;myfile << *d << "\n";}count++;if (count == 6) {count = 0;}pIndexes++;}
Passing application side array to AS?
AngelCode;Affiliates
See how AS arrays are more then C++ arrays, there probably isn't a great way of doing this huh?
I use the std::vector registration helper included in the sdk with a modified version for use with handles of classes. I like it much. ; I guess I missed it, where is that functionality provided in the SDK? ; An example of std::vector binding is in tests/test_feature/source/stdvector.h. ; Ah great, thanks guys :) ; As of 2.17.0 (if all goes as planned) you'll be able to register a template type, e.g. array<class T> and AngelScript will be able to instanciate it for any type. For the array types that the application uses, you'll be able to register a template specialization, e.g. arrat<float> so you can directly pass arrays of this type to and from scripts.This is a generalization of the current built-in array type and the array type overloading that stdvector.h does. Eventually I'll probably remove the built-in dynamic array type in favour of this template type (with a standard add-on, of course). ; Wow that'll be fantastic!
help game engine
For Beginners
hi guys i am having trouble with my game engine can u guys please help me :D#include "GameEngine.h"GameEngine *GameEngine::m_pGameEngine = NULL;int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow){MSGmsg;static int iTickTrigger = 0;int iTickCount;if (GameInitialize(hInstance)){//initialize the game engineif(!GameEngine::GetEngine() ->Initialize(iCmdShow))return FALSE;while (TRUE){if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)){if(msg.message == WM_QUIT)break;TranslateMessage(&msg);DispatchMessage(&msg);}else{if(!GameEngine::GetEngine()->GetSleep()){iTickCount = GetTickCount();if(iTickCount > iTickTrigger){iTickTrigger = iTickCount +GameEngine::GetEngine() ->GetFrameDelay();GameCycle();}}}}return (int)msg.wParam;}GameEnd();return TRUE;}LRESULT CALLBACK WndProc(HWND hWindow, UINT msg, WPARAM wParam, LPARAM lParam){return GameEngine::GetEngine() ->HandleEvent(hWindow, msg, wParam, lParam);}GameEngine::GameEngine(HINSTANCE hInstance, LPTSTR szWindowClass, LPTSTR szTitle, WORD wIcon, WORD wSmallIcon, int iWidth, int iHeight){m_pGameEngine = this;m_hInstance = hInstance;m_hWindow = NULL;if (lstrlen(szWindowClass) > 0)lstrcpy(m_szWindowClass, szWindowClass);if (lstrlen(szTitle) > 0)lstrcpy(m_szTitle, szTitle);m_wIcon = wIcon;m_wSmallIcon = wSmallIcon;m_iWidth = iWidth;m_iHeight = iHeight;m_iFrameDelay = 50;m_bSleep = TRUE;}GameEngine::~GameEngine(){}BOOL GameEngine::Initialize(int iCmdShow){WNDCLASSEX wndclass;wndclass.cbSize = sizeof(wndclass);wndclass.style = CS_HREDRAW ¦ CS_VREDRAW; //error C2146, error C2065, error C2143wndclass.lpfnWndProc = WndProc;wndclass.cbClsExtra = 0;wndclass.cbWndExtra = 0;wndclass.hInstance = m_hInstance;wndclass.hIcon = LoadIcon(m_hInstance, MAKEINTRESOURCE(GetIcon()));wndclass.hIconSm = LoadIcon(m_hInstance, MAKEINTRESOURCE(GetSmallIcon()));wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);wndclass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);wndclass.lpszMenuName = NULL;wndclass.lpszClassName = m_szWindowClass;if (!RegisterClassEx(&wndclass))return FALSE;int iWindowWidth = m_iWidth + GetSystemMetrics(SM_CXFIXEDFRAME) * 2,iWindowHeight = m_iHeight + GetSystemMetrics(SM_CYFIXEDFRAME) * 2 + GetSystemMetrics(SM_CYCAPTION);if (wndclass.lpszMenuName != NULL)iWindowHeight += GetSystemMetrics(SM_CYMENU);int iXWindowPos = (GetSystemMetrics(SM_CXSCREEN) - iWindowWidth) / 2,iYWindowPos = (GetSystemMetrics(SM_CYSCREEN) - iWindowHeight) / 2;m_hWindow = CreateWindow(m_szWindowClass, m_szTitle, WS_POPUPWINDOW ¦WS_CAPTION ¦ WS_MINIMIZEBOX, iXWindowPos, iYWindowPos, iWindowHeight, iWindowWidth, NULL , NULL, m_hInstance, NULL);// this is errorr line error C2146, C2660, C2059if (!m_hWindow)return FALSE;ShowWindow(m_hWindow, iCmdShow);UpdateWindow(m_hWindow);return TRUE;}LRESULT GameEngine::HandleEvent(HWND hWindow, UINT msg, WPARAM wParam,LPARAM lParam){switch(msg){case WM_CREATE:SetWindow(hWindow);GameStart(hWindow);return 0;case WM_SETFOCUS:GameActivate(hWindow);SetSleep(FALSE);return 0;case WM_KILLFOCUS:GameDeactivate(hWindow);SetSleep(TRUE);return 0;case WM_PAINT:HDChDC;PAINTSTRUCT ps;hDC = BeginPaint(hWindow, &ps);GamePaint(hDC);EndPaint(hWindow, &ps);return 0;case WM_DESTROY:GameEnd();PostQuitMessage(0);return 0;}return DefWindowProc(hWindow, msg, wParam, lParam);}please can u help
Quote:Original post by emforceplease can u helpNot unless you post what the problem is you need help with.; errors are listed in the source code sorry for not telling you earlier ; The correct symbol to OR the flags together is | not ¦. ; Your bitwise or operators are not the right character.If you look carefully at your code you have this symbol: ¦ (Broken pipe in half) and it should be a solid bar, this symbol: | (Solid pipe) ; thanks alot :D it fixed it. btw this is my first empty game engine is it supposed to bring up about 10 linker errors if it has no syntax errors and the like? ;Quote:btw this is my first empty game engine is it supposed to bring up about 10 linker errors if it has no syntax errors and the like?You can have linker errors without having any compiler errors. Furthermore, if you do have linker errors, it means that something is wrong (just as with compiler errors). If you're not sure what's wrong, or what the errors mean, post them and someone can probably help point you in the right direction.That code is from the book Beginning Game Programming, right? Or maybe Sams Teach Yourself Game Programming In 24 Hrs? If so, you may be getting linker errors because the definitions of the functions in question aren't presented until later in the book (at least this is what I picked up by Googling around a bit).This is completely IMHO, but I would question whether this is the best reference to be using (and whether this is the best way to go about introducing oneself to C++ or to game programming in general). Even if you're intent on starting with C++ rather than a more user-friendly language such as C#, I think there are easier (and more educational) ways to get into it then copying some Windows-specific 'game engine' code out of a book.For one thing, this mires you in the details of WinAPI programming from the get-go, which really isn't a very good way to be introduced to the language or to game development in general, and can stick you with some bad habits as well (such as using Hungarian notation).IMO, you'd be better off starting with a library such as SFML, which hides all of these nasty platform-specific details behind a more modern object-oriented interface. This allows you to focus on developing good programming habits and learning the basic concepts behind game development and software design, without getting distracted by low-level details. (Also, using the code from the book more or less ties you to Windows, whereas using a cross-platform API would leave open the possibility of porting your code to other OSs, such as OS X and Linux.)Again, this is all IMHO.
Engine design -- feedback?
General and Gameplay Programming;Programming
Howdy everyone!I'm developing a persistent world 3D development system using Direct3D 9 and was hoping to get some feedback on my latest design. Positive feedback is fantastic, but please keep it professional :)The engine core is constructed inside a number of static and dynamic libraries, consisting of client code, audio, graphics, platform, network, math and common utilities (among others); the game client is also written inside a dynamic library.The engine is commonly started from an executable included with the entire development kit: For all intents and purposes all it does it initialize the client code and nothing more. Once this process is started, the client code proceeds to load and initialize the platform (window, input, etc), graphics (DirectX or OpenGL), audio then finally the game client code.Since the client code is located inside a library, the game client itself is able to link to it statically and load resources, render the game world / GUI, etc.If anyone sees flaws in this design, I'd love to hear about them. And although this isn't the correct place for this (I'll be posting a help request in the near future), if anyone is interested in working on a freely available persistent world development system, feel free to email me at nate at foreverknightsgaming dot com.Regards,Nate Strandberg
Don't take this in a hostile way, but I don't think that's even remotely close to the amount of information one would need to give any sort of meaningful assessment.A better thing would be a rough description of the DLL layout, (i.e. what you've chosen to throw in there and why) your interfaces for using each of these components, if/how they talk to each other, your stances on/approaches to parallelism, etc. ;Quote:persistentPersistent in what way? Networking is mentioned - server-side, client-side, P2P?Let's say I add a car to the world (mesh, stats, controller, physics, AI). How does that work? Since all of this is persisted, how do I upgrade the AI? Perhaps I need to add or remove a variable - but some other content may rely on old behavior? How are these situations handled?Let's say I add car to my state, and connect to someone else who does not have the car content. What happens? Do they need to transfer entire car content? What if they have a different version of a car already?How do I remove content from the world? Let's say I have a building, into which others have put in furniture, and the city simulation calculates surface area of the building trying to determine taxes. Now I remove the building, and replace it with a different one. What happens to the furniture? What happens to the city module that calculates surface area? ; @InvalidPointer -- I see no reason to take your reply as hostile; my original post was put up with very little time left before I had to leave for work.Platform Library -Contains all the platform specific code (windows, linux, mac OS):Window creation, message handling, input handling. In a nut shell, this dynamic library is the only one that any code thats platform specific can reside. This library does not call any other part of the engine, it only interfaces directly with the Client.Graphics Library -Contains all the core rendering code for your specific API; DirectX 9 is currently functional, plans for DirectX 10 and OpenGL are on the drawing board. This library exposes a class based on the RenderDevice pure-virtual interface which allows the Client library to initialize the specific API, create and delete textures, vertex && index buffers. This library also doesn't call any other part of the engine, it interfaces directly with the Client.Audio Library -Same as graphics; allows you to choose different APIs: Direct Sound is currently all we have developed, plans are in the works for OpenAL.Network Library -Wrapper on top of ReplicaNet (http://www.replicanet.com): An extremely powerful networking engine. This library is very generic and is designed to be used by both the Client library and the different server applications.Game Client Library -This is where all client-side game specific code resides and is exposed to the engine Client using a macro that wraps a few basic export functions; I'm working on a system that will make this process easier (I'm considering a very watered down COM style interface) as I approach a functional release. The engine Client will call specific functions which need to be overridden to allow functionality; specifically onInitialize, onTerminate, onPreUpdate, onUpdate, onPostUpdate. This library is also responsible for creating the initial connections to the different servers, verifying version numbers, etc. I'm more than happy to go more indepth if you need it :)The other parts of the engine are server specific and are honestly not designed yet.@ Antheus - To be frank, I prefer the term persistent verse "MMO engine". The network design is purely client -> server; and as with most online games, the client is not trusted in any way except with physics calculations and the likes.--> Let's say I add a car to the world (mesh, stats, controller, physics, AI). How does that work? Since all of this is persisted, how do I upgrade the AI? Perhaps I need to add or remove a variable - but some other content may rely on old behavior? How are these situations handled? <--For the most part, this is done using ROL files inside replicaNet along with the server side game code; although currently this is TBD.--> Let's say I add car to my state, and connect to someone else who does not have the car content. What happens? Do they need to transfer entire car content? What if they have a different version of a car already? <--This is something I'm still considering; I'd love to setup a system where content is downloaded on demand, and doesn't require the client to download / install the entire game at once. Again, TBD.--> How do I remove content from the world? Let's say I have a building, into which others have put in furniture, and the city simulation calculates surface area of the building trying to determine taxes. Now I remove the building, and replace it with a different one. What happens to the furniture? What happens to the city module that calculates surface area? <-- Sadly this is currently TBD also; I'd love feedback on how you'd implement this technology yourself if you're willing.Again, more than happy to answer any questions that arise. If you need direct contact, email is best.Regards,Nate S.; Looking at your layout there-- seems pretty straightforward; should work pretty well. One caveat I'll give you (from personal experience!) is that extremely strict adherence to 'platform-specific functionality goes in the platform helper class' has a nasty tendency to INCREASE interdependence; think long and hard about what you decide to retain there and why. Often times a handful of #ifdefs can be just as clean/readable as a call into an external library, especially for small yet important program logic changes. Typedefs and pointers can also help with this immensely, in particular when dealing with interfaces and platform-dependent data types.Also, how exactly do you plan on handling renderer differences? Virtualizing the hell out of *all* your objects (i.e. the O.G.R.E. way) is a flat-out bad idea, but I'll hold off on that until I know a bit more. You can do very impressive things using only simple offsets into arrays and some clever typedefing. ; The primary reason for using dynamic libraries was purely to give developers using the tech the ability to write their own platforms / graphics APIs and not gain straight access to the core engine code. The more I look at how the engine is evolving from the original designs I wrote up / put together on paper while slow at work make me wonder if it might be best to just integrate a lot of functionality directly into the core library as you suggest. Honestly the way I'm looking at it now, I'd hope developers would be more focused on their game project verse writing a new graphics API wrapper ;)I'm not exactly sure what you mean with "renderer differences". Are you referring to how the renderer interface varies from DirectX to OpenGL, or are you asking about the scene graph system?Also, how do you feel about Unicode? Most parts of the engine that deal with the file system or displaying messages are fully Unicode compliant, but I've strayed off in some parts and used straight std:: string VS wstring.-Nate ;Quote:Original post by InvalidPointerVirtualizing the hell out of *all* your objects (i.e. the O.G.R.E. way) is a flat-out bad idea.I fail to see what is so flat-out bad about it, would you like to elaborate?@ OP: I suppose your design looks good, but you'll only know if it's a good idea once you get it up and running [wink]. Just be careful with all the flexibility, sometimes things need to be coupled together tighter for better performance/understandability/etc. ; I'd like to think the engine is quite easy to understand.. I'm a bit of a OOP and comment nut; also all my classes are buried deep in namespaces to make it very obvious where you can expect to find different interfaces for different needs.This is the third revision on the engine project as a whole, so I've seen how it handles when coupled together and how it handles as it sits now- separated.Another thought did occur to me, what do you guys feel about singletons? I know many people find them extremely chunky and avoid them like the plague, others use them often. As it sits now, the client class, asset "manager" (basically a glorified virtual FS) and the asset loaders themselves are all singletons, but I'd like to keep it at that if possible and not force everything to rely on the client singleton and not have direct access to others when needed.-Nate ;Quote:Original post by nullsquaredQuote:Original post by InvalidPointerVirtualizing the hell out of *all* your objects (i.e. the O.G.R.E. way) is a flat-out bad idea.I fail to see what is so flat-out bad about it, would you like to elaborate?@ OP: I suppose your design looks good, but you'll only know if it's a good idea once you get it up and running [wink]. Just be careful with all the flexibility, sometimes things need to be coupled together tighter for better performance/understandability/etc.Well, for starters-- why would you even consider passing an COpenGLTextureObject or whatnot into a DirectX-based renderer? It sounds all fine and dandy at first until you realize you're setting yourself up for unwitting disaster. It doesn't even have to be intentional, either; one of them could merely be skipped during a change of renderer and all of the sudden you're well into the land of undefined behavior. Worst-case scenario with the alternative, your textures are just going to look wrong; that's much easier to track down and fix.In short, it's polymorphism you don't need nor should you even want. As an added bonus, you can avoid a lot of needless overhead for the virtual function call, especially since such manipulation forms a large part of the renderer functionality anyway.
Debugging a bug that's in release mode only...
General and Gameplay Programming;Programming
I got a very weird situation going on with the software I write professionally. The issue is that when we run it in release mode, a bug pops up, which looks related to an improperly initialized variable after running a few calculation sets. The bug happens in very specific cases, and is unreproducible in a debug build of the software.I tried enabling debug symbols on the release build, but due to all sorts of copy protection schemes, the p.o.s doesn't run when built from within the IDE. It requires me to do all sorts of post build steps, which require quite some additional work to get working at the moment.Is there some way for me to disable the automatic initialization of variables in debug mode? I'm working with VC++ 2008 Professional.Toolmaker
Try /RTCs. ; Preventing debug initialization depends on where these variables are allocated - heap data, static data (globals, etc), or on the stack.1. Heap is the most awkward. Firstly you must link with the release CRT libraries ("Runtime Library" in the C/C++ Code Generation settings) as the debug ones initialize heap allocations. Once you've done that you also need to start the process without the debugger attached as Windows also initializes the heap for you. You can attach the debugger (using the debug menu) right after it's started so you can actually debug.2. Statics & globals I believe will always get zero initialized, so you can't control that.3. Stack variables are controlled with the run time check compiler options (/RTC*) "Basic runtime checks" in the C/C++ Code Generation options.If that doesn't help then I'd suggest making a new build configuration, probably based on the debug one, but with the settings as close as possible to the release settings (avoiding anything that brings in the copy protection stuff, and with debug info on of course). ; Just out of curiosity, what about enabling 'debug informations' in a realease build? Wouldn't that make you able to debug the code without all other debugging stuff? ;Quote:Original post by ToohrVykTry /RTCs.This hasn't worked the few times I tried it. Only setting the CRT Library Runtimes to Release did. It does seem to report at compile-time if my variables are not initialized, however. YMMV. ; I figured out the bug, by old fashioned log style debugging. Turns out, it was caused by a gigantic set of uninitialized variables on a piece of 7 year old code. The bug only occurred under Windows XP, because the Windows 6.0/6.1 kernel immediately re-uses the released memory in it's cache.The bug was reproducible when I started a new project after doing calculations in a previous project with much higher ceiling values. The new project would be placed at the same memory location as the old project, and thus have a 'valid' value in the one of the variables, which was then used. Properly initializing the variable did solve the problem, altho I find it rather odd that a lot of these variables are never initialized during the runtime of the class...Toolmaker ; Try gflags (google it) to debug better in release mode. When it's installed, type in a terminal:cd C:\Program Files\Debugging Tools for WindowsGFlags.exe /i YOURAPPNAME.exe +hpaWhen done, don't forget to restore your system to normal by doingGFlags.exe /i YOURAPPNAME.exe -hpa ;Quote:Original post by Toolmakeraltho I find it rather odd that a lot of these variables are never initialized during the runtime of the class...Are they ever read from? ;Quote:Original post by cignox1Just out of curiosity, what about enabling 'debug informations' in a realease build? Wouldn't that make you able to debug the code without all other debugging stuff?That might work, but enabling debug information pushes data around to different memory addresses so your bug may no longer repro.The act of debugging can make it so that your bug doesn't reproduce anymore - a heisenbug :P
Modifying makefiles to use gfortran rather than mpif90
General and Gameplay Programming;Programming
So my problem is this: I have downloaded some code I'd like to be able to run (http://www.mrao.cam.ac.uk/software/multinest/), it's written in fortran (mostly) and the makefiles they provide are designed to use the mpif90 compiler, which I don't have. I would like to modify their makefiles so that they use the gfortran compiler instead (although I'm not super attached to it if there is something else I should be using). Most of my problems arise from the options that need to be passed to the compiler; gfortran seems to have different options to mpif90, as I suppose one would expect, so it doesn't recognise any of the options supplied. I, however, know very little about fortran and the various compilers, so I have no idea what most of the options do and what to replace them with. I have tried scouring the documentation of each of the compilers to do some direct swaps but I haven't been very successful.As an example, here is one of the makefiles:------------------#FC = mpif90 FC = gfortran -ffree-line-length-none#FFLAGS += -fpp -w -O3 FFLAGS += -cpp -w -O3 #I thought this was the correct alteration to make but I seem to have been mistakenCXXFLAGS += -I. -O3 LINKLIB = ld -shared LIBDIR = ..NESTED_lib = ..NESTED_inc = ..#LIBS=-L$(NESTED_lib) -lnest3 -lmkl_lapack -lmkl -lguide -lpthread#LIBS=-L$(NESTED_lib) -lnest3 -llapack -fopenmp -liomp5 -lpthread #this was just me swapping some packages around (because I don't have the Intel stuff), I'm sort of hoping this didn't screw anything up.LIBS=-L$(NESTED_lib) -lnest3 -llapack -fopenmp -lpthread OBJFILES = params.o like.o nestwrap.o main.oall: gauss_shell %.o: %.f90$(FC) $(FFLAGS) -I$(NESTED_inc) -c $*.f90 gauss_shell: $(OBJFILES)$(FC) -o ../gauss_shell $(OBJFILES) $(FFLAGS) $(LIBS)clean:rm -f *.o *.mod ../gauss_shell--------------The commented lines show the original contents of the makefile, my modifications are directly below. The current hiccup is the -fpp option (although there will probably be more), some kind of preprocessing command I am given to understand, which is not recognised by gfortran. I thought -cpp was the gfortran version of the same thing but that seems to be wrong, i.e. I still get errors like:-----------------make[1]: Entering directory `/home/farmer/Documents/MultiNest_v2.7/example_gauss_shell'gfortran -ffree-line-length-none -cpp -w -O3 -I.. -c params.f90gfortran: unrecognised option '-cpp'gfortran -ffree-line-length-none -cpp -w -O3 -I.. -c like.f90gfortran: unrecognised option '-cpp'gfortran -ffree-line-length-none -cpp -w -O3 -I.. -c nestwrap.f90gfortran: unrecognised option '-cpp'gfortran -ffree-line-length-none -cpp -w -O3 -I.. -c main.f90gfortran: unrecognised option '-cpp'gfortran -ffree-line-length-none -o ../gauss_shell params.o like.o nestwrap.o main.o -cpp -w -O3 -L.. -lnest3 -llapack -fopenmp -lpthread gfortran: unrecognised option '-cpp'make[1]: Leaving directory `/home/farmer/Documents/MultiNest_v2.7/example_gauss_shell'----------------------There is also an option -nofor_main in a different file, which I believe is telling the compiler that the source file isn't written in fortran, which gfortran does not recognise.So, are there any fortran experts around? I don't really know what half the stuff in the makefile is actually doing either, so a good guide to the various components and options of makefiles would also be appreciated, although to be honest I just want the thing to compile. I'm running Ubuntu 8.04 if that's relevant.
This doesn't seem to be an issue with makefiles but with figuring out the right command line for invoking the compiler. Have you tried reading the compiler's documentation? You know, 'man gfortran', 'gfortran --help', that sort of thing?
Integrating PhysX into my Engine......
Math and Physics;Programming
I'm sure this has been covered elsewhere, but my initial searches prove futile.Basically, i have an engine (meshes, transformations, cameras, lighting, particles, etc. ). We are still missing collision detection and 3d-Ray Picking (would it be useful to do 3d ray picking with physx?). I thought since we want to use the PhysX SDK anyways that those could be implemented using the SDK. But I have a couple of questions.feel free to call me an idiot and post a link explaining this stuff =).1) I see a TON of tutorials that come with the SDK which is great, but only one (and its not absolute to me) that really talks about integration like above. Is it really a matter of taking my mesh class and adding Actor* stuff to it? using the same vertices I use to render? And how will i translate my objects around without interfering with the physics translations?!2) My game has a space aspect to it, so I dont want to have gravity acting on everything the same, could i say, register a mesh with a certain scene each with different gravity?I also have a material class for my lighting.... I think it would make sense to define a metallic material with physics properties as well as lighting properties... does this make sense?
Quote:Original post by AverageJoeSSU1)Is it really a matter of taking my mesh class and adding Actor* stuff to it? No, stop right there. Your graphics and physics should be entirely seperated.struct SpaceShip{ Graphics graph; //contains meshes and stuff Phyiscs phys; //contains your actor and stuff};Quote:using the same vertices I use to render? This is possible, if the vertices remain on your client side memory. If you've shipped them off to VBO's and deleted them from RAM then obviously this will not be possible. How ever your geometry is stored in the first place should be intelligent (at least with a shared_ptr) and generic enough to be shared by both your graphics and physics system.Quote:And how will i translate my objects around without interfering with the physics translations?!void SpaceShip::SetPosition(const Vector &p){ phys.SetPosition(p); ApplyPhysicsPositionToGraphics();}void Spaceship::ApplyPhysicsPositionToGraphics(){ graph.Transform = phys.Transform;}Quote:2) My game has a space aspect to it, so I dont want to have gravity acting on everything the same, could i say, register a mesh with a certain scene each with different gravity?This depends on the physics library and how well you design your abstraction layer above it. Assuming that phyx allows either per world, or per scene, or per object gravity, then you will just need to expose this in your implementation. But typically this is easily supported, at one of the mentioned granularities.Quote:I also have a material class for my lighting.... I think it would make sense to define a metallic material with physics properties as well as lighting properties... does this make sense?You'll need to create a material table outside of your graphics engine, probably down in the physics engine. When you reference the geometry you'll need to do a lookup and choose a suitable material from this table from which to obtain your friction, and restitution coeficients.; Dang.. that's super helpful.. thanks.Any idea about the picking? or should i just implement that on my own turf?; The physics engine is a pretty optimal place to do picking. How ever, most of the time the collision geometry and graphical geometry is not 1 to 1 (Trees for instance, or any other complex shape). It's not always trivial to make compute this mapping between the picked collision face and the graphical collision face, should you need that information (ex: decals).But if all you need to do is pick at the object/collision goemetry layer, the physics engine is a perfectly suitable place.If you do happen to need the graphics face, then i believe the typical method is to find the point and normal of the pick intersection on the collision geometry, and project that point onto the geometry of the graphics. Imagine a ray shooting in both directions finding the first face with a similar normal. (slow as balls) ; Very cool... since its an RTS i dont really see the need for object face picking, since objects can be made of a a bunch of objects (like ship, laser turret, engine, all separate) i think just being able to pick at the object level is fine.This has been a very insightful post. Can't wait to get to work.I had an idea for stuff i want to do with this engine, enough of the technical stuff lets talk about COOL stuff haha jk. I thought a plasma-napalm like weapon that sprays on ships and melts the surface would be cool, kind of a tearing like effect on the geometry with physics liquid as the weapon. And prolly what i want the absolute most, is CRAZY explosions. I already have HDR in place with deferred rendering, so lighting is taken care of. But I want objects to split and explode dynamically, and even crash land into other stuff.Those are the two unique-ish things i want to do, hopefully i'll be able to do them. ; Sounds like fun, good luck! ; I recently saw a post that has caused me to come back.A guy asked if it was possible to sync a physics mesh with a graphics mesh.... for example... if a geometry is torn (like cloth), or a softbody is altered... is there a way to sync the mesh generated by PhysX and used in graphics by the GPU? or are these separate and only can be synced by the CPU.I use a VBO created from a Mesh* . Is this trivial? creating a new mesh everytime physx alters the mesh? his question was more driven towards extracting particles for rendering.
Socket Reading & Select
General and Gameplay Programming;Programming
I've defined my socket to be non-blocking. I want to monitor the socket and read when data is available. I could use the ioctlsocket (windows socket) and constantly loop to check for data. I tried to use the select call w/ a timeout to wait for data?FD_ZERO(&ReadSet);FD_SET(MySocket, &ReadSet);select(1, &ReadSet, NULL, NULL, &TimeOut);However, it always came back immediately to indicate activity. Is it just checking for readability and NOT data available for read?? My intention was to have a socket reading thread.
Quote:Original post by fathom88FD_ZERO(&ReadSet);FD_SET(MySocket, &ReadSet);select(1, &ReadSet, NULL, NULL, &TimeOut);The first argument to select() is likely incorrect. Try passing MySocket+1 instead. ; I thought the value was ignored under Windows. I'll give it a try. ; First of all, the first argument to select() is supposed to be the highest file descriptor you are interested in, plus one. So in your case it should be MySocket+1.Once select returns, you have to check the return value for errors. It will return -1 on an error (for instance, it could be that passing in the wrong first argument is an error?). Then you can check errno to find out what was wrong. This is a must for any networking code, not only for the call to select, so get used to it even if it is a little tedious.You should use FD_ISSET to see what events have been triggered (even though you currently only have one event).Hope that helps. ; Tried it. I checked the return value and it's a one which indicates the checked condition was met. ; What happens when you try to read from the socket? If select is telling you that there is something to be read, this is probably the case.I think you may have to post a complete program (keep it as short as possible) that shows the problem.Disclaimer: I've only ever done network programming on Unix, so it could be that you are hitting some obscure corner of Windows and I won't be able to help. ; It will return immediately if the socket is closed, isset will return true but read will return 0.
multiple initialization proble m
General and Gameplay Programming;Programming
my Animation class has these constructors:// constructorAnimation(Sint16 x = 0, Sint16 y = 0, uint reserve = 3);Animation(const Point &pos, uint reserve = 3);// _pos is an object of type Point// constructor #1Animation::Animation(Sint16 x, Sint16 y, uint reserve): _pos(x, y), _current(0){_SprVec.reserve(reserve); // reserve space for sprites}// constructor #2Animation::Animation(const Point &pos, uint reserve): _pos(pos), _current(0){_SprVec.reserve(reserve);}Animation anim(Point(10, 0), 10);error C2374: 'anim' : redefinition; multiple initialization1> .\main.cpp(175) : see declaration of 'anim'What's wrong?
Post your main.cpp file in its entirety, along with the header and source files for the Animation class. ;Quote:Original post by sheep19Animation anim(Point(10, 0), 10);error C2374: 'anim' : redefinition; multiple initialization1> .\main.cpp(175) : see declaration of 'anim'What's wrong?My guess is you have tried to declare anim twice in the same scope. See C2374. ;Quote:Original post by _fastcallQuote:Original post by sheep19Animation anim(Point(10, 0), 10);error C2374: 'anim' : redefinition; multiple initialization1> .\main.cpp(175) : see declaration of 'anim'What's wrong?My guess is you have tried to declare anim twice in the same scope. See C2374.That was it, thanks a lot. I was using the same name in the same scope.