|
If people are still interested in doing 2D with OpenGL, I wrote a pretty good C library for doing so. It can be downloaded at http://joel.slylabs.com/?q=node/4 . The documentation is here http://joel.slylabs.com/?q=node/12 , and a tutorial for getting it set up with SDL can be found here http://joel.slylabs.com/?q=node/14 . I even used it for my final graphics project.
|
# ¿ Dec 26, 2007 11:37 |
|
|
# ¿ May 7, 2024 20:09 |
|
pianoSpleen posted:A lot of stuff is really poorly explained and there's no logical progression to the tutorials past the first few. There wasn't, for example, a useful tutorial about things like vectors/matrices. Instead there was suddenly some fancy effect that needed an understanding of them and almost no explanation of what was going on that someone who didn't have an understanding of vectors would be able to make sense of. To be honest, past about tutorial 20 it's more like a parade of demos combined with "Look at me! I can prove I wrote it!" than an attempt to teach you what you need to know. Game Tutorials is crap, at least when they were free it was. It just gives you a folder full of source files, with no clear reading direction, and the 'tutorial' was comments in the source. I would definitely recommend not spending money on them.
|
# ¿ Apr 6, 2008 15:40 |
|
Mr. Dog, it's because your program is using PeekMessage instead of WaitMessage. Instead of waiting for input, you are polling for it, which means your program is going to cycle through regardless of what's in the message, so your process running at 100% is perfectly normal. If CPU usage is that important to you, you may consider using waitMessage, and periodically forcing the window invalidation and using that as an indication as when to redraw the window.
|
# ¿ Apr 16, 2008 06:38 |
|
TSDK posted:No it's not. Using present parameters of either ONE or DEFAULT should be causing the loop to sync with the refresh rate of the monitor. If it's not, then either the window is minimised, or (another random thought) the drivers have been told to ignore vsync. He was worried about it running at 100%. Anything polling the event loop is going to be running at 100%. I agree about using WaitMessage being mostly retarded, but that's a way to make it not run at 100%.
|
# ¿ Apr 17, 2008 06:21 |
|
http://www.devmaster.net/news/index.php?storyid=2062 Truespace 7.6 is now free. This is good news for those of us who can't wrap our heads around blender.
|
# ¿ Aug 15, 2008 06:12 |
|
not a dinosaur posted:I left something out- before doing glTexImage2D, you need to call glPixelStorei You don't need glPixelStorei. And technically, shouldn't he be using PBO's :P
|
# ¿ Dec 10, 2008 06:07 |
|
Pfhreak posted:It's on my old rear end laptop, with no video card, and 1 gig of ram for Vista, my video card, and all my other applications. Even then, it runs it pretty solid at 40 frames per second or so when I'm drawing a 40x40 grid. On average, each cell draws ~2-3 blocks and a shadow. So that's 5600 quads roughly, and I don't know how much of a performance hit using managed code brings. How are you drawing your sprite batch? The biggest hit you can take is when you change textures. The standard method is deferred, which does no sorting, try using textured instead. http://msdn.microsoft.com/en-us/library/bb195102.aspx -- SpriteBatch.Begin http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.spritesortmode.aspx -- SpriteSortMode
|
# ¿ Apr 6, 2009 08:54 |
|
Contero posted:What is a commonly used file format for game models? What's one that wouldn't be mind numbingly hard to create an implementation for? What I'm looking for: OBJ is basically the BMP format for models. It's Ascii and easy to parse, there's no built-in animation support, but blender can export each keyframe as an individual file. It supports grouping, normals, materials, UV texture coordinate mapping, etc.
|
# ¿ Apr 6, 2009 19:28 |
|
If you want to do stuff in .NET but don't like XNA for whatever reason, and can't stand Tao.NET, there is OpenTK, which is a quite nice light weight toolkit. http://www.opentk.com/ This one is nice because it's actively being developed. It also works hard to be more than just a managed API wrapper. Works great in mono and .net!
|
# ¿ Jun 17, 2009 01:18 |
|
Is there any scripting engine for .net? I'd like to be able to use some ECMA or python in a game I'm working on.
|
# ¿ Sep 18, 2009 22:49 |
|
wow. boo looks great. Thanks!
|
# ¿ Sep 19, 2009 04:10 |
|
GuyGizmo posted:I'm also looking for a game engine recommendation. Take a look at OpenTK. http://opentk.org/project/opentk It has direct bindings to OpenAL, and is probably the best OpenGL wrapper available.
|
# ¿ Oct 14, 2009 16:32 |
|
UberJumper posted:What is the standard for 3d Models? Or do most engines just use their own internal format? Most engines have their own internal formats. The easiest to get started with is probably Waveform OBJ files. They are pretty simple to parse.
|
# ¿ Oct 24, 2009 18:14 |
|
It's close to being finished, but I've been working on a graphics library for .net. It sits on top of OpenTK and does 2D drawing using OpenGL. I started this project 5 years ago in C. The goal was to allow for a more natural handling of sprites and images and overcome some of the limits of drawing with SDL. I'm sure that it's no where as fast as XNA's sprite batching, but it suits my purposes. I'm working on commenting the code, writing documentation, and coming up with some examples. http://code.google.com/p/angrymoose/ I don't have any downloads yet, but you can check the project out of subversion. There's a simple example, it demonstrates how to set things up and how to do some basic drawing. One of my favorite features is that it uses a factory pattern to determine what kind of surface to make depending on what version of OpenGL you are running. For older versions of OpenGL, it will use a sort of tiling system to get around cards that don't support n-P2 or larger textures. Any kind of feedback would be appreciated.
|
# ¿ Oct 28, 2009 08:34 |
|
almostkorean posted:I just started as an intern working for a car company, and they want me to makes a car simulation. I need to pick out a USB wheel/pedals to use for the project, but I don't really have any experience programming for hardware. So is there is a certain brand/type of wheel that is better to program with? I'd think any of the Logitech ones for PC using DirectX to handle the input should work well enough.
|
# ¿ Oct 30, 2009 21:17 |
|
Gyshall posted:I'm interested in making my own side scroller game just as a hobby. I don't know any programming languages, but I have dabbled in Python before and I can do web design/CSS, if that helps. I used to mess around with RPG Maker and could get around that fairly easily, so I'm wondering if there is a free or sub $150 game engine designed around making side scrolling beat em' ups like Comix Zone or Streets of Rage et al. Any suggestions on where to start? http://en.wikipedia.org/wiki/M.U.G.E.N - mugen may be worth taking a look at. or http://www.senileteam.com/beatsofrage.html - beats of rage
|
# ¿ Jul 13, 2010 08:05 |
|
I'm working on a geometry library for a game, and need just a bit of assistance dividing a simple polygon into a list of triangles. If I was just dealing with a convex polygon, this would be simple, you start from a point and build a triangle fan. But with a concave polygon, this is a bit more tricky, would possibly need to first divide up into 2 or more convex polygons first. My idea was to start with the first vertex and go around the polygon, finding the largest internal polygon that is still convex, splitting that into triangles, then removing everything but the first and last elements, and repeating until all the vertices are used up. Does this method have any merit? The idea would be to do this once, and basically just for rendering as triangles instead of a polygon for speed.
|
# ¿ Oct 5, 2010 04:39 |
|
ynohtna posted:The ear clipping method is a simple method for decomposing an arbitrary poly into triangles assuming your shape contains no holes, but you could also look up Delaunay triangulation and it's variants if you fancy getting fancy. I've been researching ear clipping, i think that will work well for me.
|
# ¿ Oct 5, 2010 13:10 |
|
A doom-a-like I've been working on in my free time with C# and OpenTK Needs .NET 4 to run, haven't tested it under mono, but give it a test run if you feel like it. ASDW - move ESC - quit Mouse - move I doubt it will work on Linux since I had to use some p-invoke to handle the input. http://dl.dropbox.com/u/2126236/Sandbox2.1.zip
|
# ¿ Oct 19, 2010 04:57 |
|
Jo posted:I'm not sure if it's a better idea to have my EntityManager object do all the collision checking or it's a better idea to have the collision checking inside the Entity superclass. Suggestions or advice? I would have a static class with all your collision definitions and use overridable calls to your check collision code, like this... pre:public static class Collisions { public static void Collision( abstractGameObject a, abstractGameObject b) { } public static void Collision (Player p, abstractEnemy e) { } public static void Collision (Player p, abstractLevelPiece l) { } }
|
# ¿ Nov 4, 2010 04:15 |
|
I did a writeup on how reflection can be useful for building a game editor for your .NET game. Let me know what you think? http://unicorn21.tumblr.com/post/1641105473/a-new-detailed-writeup-on-using-reflection-in-your
|
# ¿ Nov 24, 2010 00:20 |
|
This is some sample code of how I solved the problem of processing object interactions. Critiques or thoughts?code:
|
# ¿ Jan 22, 2011 15:44 |
|
Orzo posted:Your code is fine. I don't know if you'll want this or not (it depends on your desired end design), but for your particular example I've made a few modifications to take advantage of generics. The main problem (it might not be a problem at all, if you don't need it!) with your code is that the callback delegate receives BaseObject, not the actual object defined in the interaction. Using generic interaction types, you can make your client code a little fancier. Note at the bottom how the interaction events take advantage of the specific types of the interaction (I've added dumb little properties to Red, Blue, and Green to demonstrate). You know... I knew this could be improved on with generics, I just didn't know how. Thanks!
|
# ¿ Jan 22, 2011 21:38 |
|
Bizarro Buddha posted:What's your actual use case for this interaction system? When it comes to games I'm very wary of writing anything generic especially as a first pass. What are the chances that you're making yourself a hammer before you've realised that you need to deal with screws? I'm working on a game engine. (insert rolly eyes here...) but I've already got a few demos working. This system in my case is specifically for object collisions. such as player-bullet, player-switch, etc. The idea being it can be extended to more than just first person shooters. I would say that it's over 90% complete, and am working to implement a game with it. Currently I have about half a dozen sandboxes testing various features.
|
# ¿ Jan 22, 2011 23:07 |
|
Orzo posted:People will tell you to write games, not engines. It's an annoying mantra parroted all over the place by people that probably wrote an engine at some time and failed. Do your own thing, writing an engine is a great learning experience which may or may not end up in a successful game. I'm usually one of those people, but I have a good reason for writing this one. I'm going for a specific look, and I'm keeping things ridiculously simple.
|
# ¿ Jan 22, 2011 23:38 |
|
Bizarro Buddha posted:Sounds reasonable for triggers like switches, though for collisions like bullet-player you'd usually want more information like point of intersection, normal, and so on, which makes your system less generic. Bizarro Buddha posted:These people are right. An engine is something that grows out of carrying code over between projects. If you set out to write "an engine" with no game to keep the feature set on track and constantly tested for usefulness, you'll end up with a huge set of systems that are of absolutely no use to you in practice. You should listen to people that tried things and failed, and think about the reasons, rather than calling it an annoying mantra. This isn't a from the ground up engine design. This is the refinement of a series of prototypes. This is the 7th iteration, which I'm going to turn into a full blown game instead of a fancy physics test.
|
# ¿ Jan 23, 2011 00:09 |
|
Bizarro Buddha posted:Slightly nitpicky but position and velocity doesn't give you intersection point and normal without doing work that you probably would already have done in your collision detection, so it doesn't make sense to be forced to redo that work in the handler. I think you under-estimate how simple my engine is. Right now I'm only doing cylinder-cylinder detection.
|
# ¿ Jan 23, 2011 00:27 |
|
Zero The Hero posted:I've been trying to learn SDL for a while now, using the [url="https://"http://www.lazyfoo.net/SDL_tutorials/"]Lazy Foo Tutorials[/url] if you're familiar with them, but it's been slow going. I was checking out XNA recently and it looks a lot... cleaner. And easier. Is there any good reason NOT to use XNA and keep trying SDL?
|
# ¿ Jan 23, 2011 06:29 |
|
I've been working on a 2D graphics library in C# that will work well with OpenTK. I'm fine tuning the sprite batching, but the cool thing about mine is how it handles drawing the sprites. The idea is to make calls that look like this. code:
http://mannagum.codeplex.com/releases/view/66880 -- release files There is documentation, and the sampler project contains a few examples (switch screens by pressing 1-3) Thanks.
|
# ¿ May 23, 2011 02:47 |
|
poemdexter posted:I really like this idea instead of having a draw method that is overwritten like 7 times and takes anywhere from 1 to 9 parameters. The only problem I can see is that it's creating a lot of objects so the garbage collector is going to be working overtime. But I figure anybody who is worrying about cache misses would be writing their game in C already. I would definitely appreciate a second set of eyes to see if I'm missing anything obvious.
|
# ¿ May 23, 2011 19:10 |
|
PDP-1 posted:Is there any reason you have to copy the entire object every time you do a transformation instead of just transforming in place and returning a reference? For example the code The question then becomes, how do you know which is the last call? No drawing actually takes place during the draw command. It just queues everything up, and all the magic happens in EndSpriteBatch() One option I do see is only making one clone. You don't want to pollute the original sprite. I will play around with this idea tonight and see if it works. Thanks for the feedback!
|
# ¿ May 23, 2011 22:20 |
|
PnP Bios posted:The question then becomes, how do you know which is the last call? This sorta works... Just not if you plan on retaining the state after making the call. You'll need to some how mark it back as not a clone.
|
# ¿ May 23, 2011 22:51 |
|
I've gotten into writing DOS games for some dumb reason. Does anybody know how to check for multiple key presses at once? I have been dicking around with `int 16h` and it seems pretty responsive, but only reads in one key at a time. Also it does a stupid repeat thing. If anybody has found a good way to just scan keys, that would be neat.
|
# ¿ Dec 3, 2019 06:13 |
|
|
# ¿ May 7, 2024 20:09 |
|
Sagacity posted:You'll need to write your own keyboard handler iirc. Found some old stuff here. Thanks!
|
# ¿ Dec 4, 2019 04:43 |