Much better. Making your own txt map parsers just reinvents the wheel, I think your environment (c# or java) has a nice Xml Serializer that translates those stuff to objects, and then you don't have to implement all that thing by hand.Code:<?xml version="1.0" encoding="utf-8"?> <newmap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsize>20</xsize> <ysize>20</ysize> <layers> <layer>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,1,0,1,0,1,0,0,1,1,1,0,1,1,0,0,0,0 0,0,0,2,0,2,0,0,0,0,2,0,0,0,2,0,1,0,0,0 0,0,0,2,1,2,0,2,0,0,2,2,0,0,2,2,0,0,0,0 0,0,0,2,0,2,0,2,0,0,2,0,0,0,2,0,0,0,0,0 0,0,0,2,0,2,0,2,0,0,2,0,0,0,2,0,0,0,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 2,1,1,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,1,2 2,2,2,1,1,0,0,3,0,0,0,0,0,0,0,0,0,0,2,2 3,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,2,3 3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3 3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3</layer> </layers> <entities> <entity> <type>info_player_start</type> <name>Watson</name> <target></target> <x>224</x> <y>352</y> <layer>0</layer> <attribs> <attrib> <name>weapon</name> <value>fists</value> </attrib> </attribs> </entity> </entities> </newmap>
Also, why does everyone seem to think we all want to know about their taste in indie anarcho-punko-caribbean german electro-pop dubstep revival nuevo jazz post harlem white supremecist underground streetracing music.
The thing that's ridiculous about it is everyone of the people making videos thinks they're being really sly and everyone watching doesn't realize they specifically turned on their favorite song and scrolled down to their best patch of code. Obviously they were just being ultra laid back and just recorded a video of their software on a whim and couldn't be bothered to crop it and turn off the music playing in the background.
DirectX 10/11 window running in perfect harmony from C#.
All DirectX stuff is done in C++ and compiled to a DLL. C# then loads the DLL and interacts with the window from a managed class. I admit, I haven't done much of the C++ stuff but I know how it all works at least. I did do the C# part though.
It's a group project for 3D programming. We got a list of example stuff (if we do something awesome not on the list then we'd get credit for that) that would give us points if we did and then we had to get like 10 points each or something to pass. So we decided to make a level editor because it's fairly simple and something we could throw in as much shit as possible on. The reason we decided to blend in C# is because of it's wonderful Windows Forms. All GUI will be done through C# and the DX window will work as a preview window.
Oh and so far, nothing fancy is done. All that the C# can do is start the DirectX window. Currently working on adding tools for spawning objects (loaded from .obj files).
Later, I'm going to add a heightmap editor to draw terrain which will update in realtime on the preview window.
Working on ma GUI
Well it's a start <:
Gonna take on the mammoth task that is... DIRECTX
Added an attack 'effect'.
Slicin' them skeletons
OpenGL all the way.
So I was testing debug hooks in Lua, just because I needed to make sure the hook wouldn't get called when its own code was executing, and...
In fact it takes more lines of code to initialize DirectX 10 than OpenGL 3.3 without any libraries.
I'm liking the OpenGL SuperBible.
Before I knew anything about OpenGL and DirectX, I sort of liked OpenGL by default because of the whole "open" thing. Now I like it more, because platform independence is important to me. Sure, maybe your game targets X-Boxes, but wouldn't it be cooler if you cold port it to anywhere with minimal changes, or just a couple clever preprocessor #if's?
Could anybody recommend some Libs for OpenGL then? I hear GLUT is outdated.
On a related note, does anyone know what the typical/proper semantics are for uniform block bindings? I've been setting them each and every time I change programs, but I think this might be excessive. They're part of the global state, right? Not program state like regular Uniforms?
Secondly i forgot to turn off the audio recording, sorry for that.
Thirdly that kind of music is not my style but if i listen to a music that i realy like i cannot concetrate to the code. (But i think it's still better for the majority if the video has this kind of music than for instance Metallica or Slayer what really i like.)
Basically my point is that learning opengl is frustrating. There's a lot of very annoying things that work strangely coupled with bad documentation. I'm not talking about simply drawing a couple of triangles here. Actually I had to quit with opengl for now after my driver crashed when trying to create an srgb renderbuffer.
Sorry I didn't really mean to get in to a rant about it especially because I was only joking around with my first post but whatever.
Not only that but in opengl I found it was not possible to have a pixel format without a depth buffer, nor a 32 bit float if that's what you need, leaving it useless as it's not possible to be used in a framebuffer object.
Working on a spell/skill system!
got the basics down, kinda ugly implementation tough, need to think of a prettier way to do it, but it does the job.
By fire be purged!
To switch back to the regular framebuffer, you use glBindFramebuffer(GL_FRAMEBUFFER, 0);.
You could choose to think about it as the FBO with the ID of '0'.
And like I said, you shouldn't be accessing the front- or back-buffers, anyway, so the 'texture' issue doesn't matter.
completeness rules for FBOs do not require a depth buffer to be attached, and you have 1-, 2-, 3- and 4-channel 32-bit floating-point formats to choose from (GL_R32F, GL_RG32F, GL_RGB32F, and GL_RGBA32F).
So I'm still working on that tetris code. Collisions are pretty much done, and I started working on line detection code, and I disabled for debugging purpuses a function that I made reduntant anyway. What the function did was take a snapshot of the blocks and store them for redrawing, that was how I held block data before using arrays. I didn't dump it yet because I needed to store colors somewhere. Anyway when I started to look at the actual array, i found out that that function was masking a very bad bug, which was removing blocks from the array at the left of any falling block, an i have no ideea why.
stop arguing about which is better because it's clearly opengl as it runs on anything
Regional science fair next weekend, and apparently it's common for google and Intel to hand out scholarships and merchandise to contestants, hoping I score something.