Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

JeffSventora

Members
  • Posts

    525
  • Joined

  • Last visited

    Never

Everything posted by JeffSventora

  1. Thanks for the info but I have a question. With: ``` data = (char *)realloc(size); if (data == NULL) { return false; } this.data = data; ``` Wouldn't I still need to copy the data from the buffer? It's not guarenteed that realloc will use the same area of memory, right? But you're right, I definitely didn't write this the best possible way. I'll go ahead and modify it. Also, you're "next_power_of_two" will not work on numbers that are already powers of two.
  2. This is a useful class I wrote that you can use to write data to a buffer. **ByteStream.h** ``` #ifndef _BYTESTREAM_H_ #define _BYTESTREAM_H_ #include using std::strlen; using std::strcpy; using std::memcpy; class ByteStream { // Data Members char* buffer; int bufferLen; int bufferSize; int read; int write; // Private Methods void Resize(void); public: // Constructors ByteStream(void); ByteStream(int Capacity); // Destructor ~ByteStream(void); // Write Functions template ByteStream& operator(T& val) { int sizeOf = sizeof(T); int bounds = sizeOf + read; if(bounds > bufferSize) return *this; memcpy(&val, buffer+read, sizeOf); read += sizeOf; return *this; } ByteStream& operator>>(char* val) { strcpy(val, buffer+read); read += strlen(val) + 1; return *this; } char* ReadBytes(int len); // Methods void ResetRead(void) { read = 0; } void ResetWrite(void) { write = 0; } // Accessors char* Buffer(void) { return buffer; } int Length(void) { return bufferLen; } int Size(void) { return bufferSize; } }; #endif ``` **ByteStream.cpp** ``` #include "ByteStream.h" #include using namespace std; // Constructors ByteStream::ByteStream(void) { buffer = new char[1]; bufferLen = 0; bufferSize = 1; read = write = 0; } ByteStream::ByteStream(int Capacity) { buffer = new char[Capacity]; bufferLen = 0; bufferSize = Capacity; read = write = 0; } // Destructor ByteStream::~ByteStream(void) { if(buffer) { delete [] buffer; buffer = nullptr; } } // Private Methods void ByteStream::Resize(void) { int newSize = bufferSize bufferSize) { Resize(); } memcpy(buffer+write, data, len); bufferLen += len; write += len; } char* ByteStream::ReadBytes(int len) { int bounds = len + read; if(bounds > bufferSize) return nullptr; char* val = new char[len]; memcpy(val, buffer+read, len); read += len; return val; } ``` **Example** ``` ByteStream bs; double x = 1.0; int y = 100; bs > tx >> ty; ByteStream bst; bst.WriteBytes(bs.Buffer(), bs.Length()); ```
  3. But compared to just buying spells and having them is a much better idea. It allows your game to have builds, with the current system you could basically have every spell for your class.
  4. I'll be joining the next one. >![:)](http://www.touchofdeathforums.com/community/public/style_emoticons//smile.png)
  5. Skill tree editor. Skill trees and jobs. Still to this day no one has done it >.>
  6. JeffSventora

    Skyrim

    I don't even want to know how long that would take. Lol
  7. The moment I saw it, I knew it was destined to be a wallpaper. Lol
  8. [attachment=465:MyDTOP.png]
  9. I think the biggest thing is that, concept art is purely for concept. If you want me to judge it based on it's concept, all I would say is that as long as your team understands what it portrays than it completes it's job as concept art, if not, make more concepts.
  10. http://www.youtube.com/watch?feature=player_embedded&v=re1EatGRV0w
  11. Glad someone understands ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons//tongue.png) I'll have to take a break from this project for a while. I have a 4 month deadline for a competition and I honestly haven't even started it yet. Hopefully I can pass this on to one of the other developers and help them along the way.
  12. JeffSventora

    Skyrim

    Isn't it impossible? I thought that the game generated shit for you to do constantly.
  13. I do have a working wrapper, it isn't 100% worked out though. I didn't want to present that and lose support for RamGec & Krypton. My primary reason for including these third party libraries was purely due to the lack of time I can dedicate to this project (school, school, school!). But I appreciate the feedback, thanks!
  14. Glad you like it ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons//tongue.png)
  15. Main Post Update The latest build of the engine is available for the community to see. This is my latest work on the project. it's a bit unorganized, I do apologize. Some parts of the code are experimental as well. I do expect harsh criticism, so please give me some. I am open to opinions, but please understand in advanced that we may not share the same views, and while that may be true I have no problem discussing them. So far, the client and server are set up and communicating (sending packets). I've also implemented the complete base for the engine (States, etc…) now all that needs to be done is actual game things. We need to get players rendering, maps rendering, etc... please ask questions if you have any! The download is attached to the MAIN POST at the bottom, look for ENET.zip
  16. Seriously guys? Does learning have to be banned now?! Lol…
  17. New versions of the engine will require new interface elements that correspond to the new layout. The engines will work differently and so the interface will have different available interactions. What will be required? - Logo - Window Background - In-game Window Backgrounds - Buttons (various sizes) - Icons This project requires a lot of effort. We are looking for someone ready to put forth quality work. None of us are being paid in cash but we will be responsible for taking this engine to the next level. By accepting this role you will most definitely be credited and respected amongst the community. Please feel free to PM me or any other staff member (developer group) to join us in our effort to provide this community with a great, new product! * Be prepared to show off some work!!!
  18. Can you show us a zoom between 1 & 2?
  19. Maybe a bit much, but why not just implement greedy search or A Star?
  20. C++ may be older, but C++ follows a standard that is updated every now and then, essentially "newer versions". And wasting time managing memory? You do realize that memory access is one of the slowest operations on a computer right? Control over that can greatly increase your app's performance if you know what you're doing. Also, someone correct me if I'm wrong but I do believe WinSock is the lowest level of network capabilities available on Windows, in other words, Lidgren uses WinSock.
  21. How about the winner helps me develop the C# version ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons//smile.png) I'll vote for that person lol.
×
×
  • Create New...