Jump to content

Shard

Members
  • Posts

    293
  • Joined

  • Last visited

Everything posted by Shard

  1. Yes, the system would be useful in many ways. Altho I am resistant to learn C#, I think it would definitely be helpful to further my horizons and have another language under my belt.
  2. Yea but its also drag and drop in C++ in a Windows Form application. The reason I'm stressing for C++ is because I want to get this product out rather than learn C#. And I do know that they are similar, but they are not the same and this will slow me down. Edit: Is the render controller source avaliable so that I can try to port it myself? I really need a Windows Forms app instead of something like CEGUI. Edit: Can someone outline the process of creating a Windows Forms Application with Leadwerks in C#(maybe a tutorial?) Again the basic idea is that in the center of the screen there is the Leadwerks window which runs all the time. On the left and right are context menus that display information based off of the item selected on screen be able able to transmit data and check data in boxes, etc. For example, if I click on the planet on the Leadwerks window, on the right bar, all the relevant boxes will come up and then in the right box, I can set the mass to be 100. Then I can click apply and the mass of the planet becomes 100 in the Leadwerks game.
  3. I thought that LEO was a C++ wrapper for Leadwerks. If not, then how do I integrate LEO/Leadwerks with a windows form application?
  4. I've asked Pixel to take a look at this thread. Is it possible for someone to post a sample project in C# so that I can take a look at how its setup. Also, would it be possible to port the wrapper to C++?
  5. Could you explain this a bit more as I have not done much C# and I don't know anything about the render controls or .NET. Also, I'm far more proficient in C++ and I would much rather code this sim in C++. Is there anyway to do this in C++?
  6. Is it possible to use windows forms with Leadwerks? The basic setup I'm trying to do is have buttons and value boxes on the bars on the sides of the main window with a Leadwerks window rendering things in the center. The reason I need this is because I'm looking to do a fairly complicated UI with multiple options and settings but I don't need the UI to be run on top of Leadwerks, since this is not for a game (for that, I'll be using CEGUI) and instead for a sim. Is this possible?
  7. Can I ask what you would be applying this in?
  8. Just glancing at it, this seems a little bit complicated. But alas, I do need it so I'll have to put some time into learning how to do it. I suppose I'll just make a wrapper of sorts and tie it in with my sim initialization/drawing methods.
  9. Shard

    Shard - The Return

    Thanks! Now I have something to compare to. From the sounds of it, my version will have some different features than this program and will be significantly cheaper (single user was $40) I'll mess around with it and see what its like.
  10. Shard

    Shard - The Return

    It is not intended to compete with those products. Those products are Planetarium softwares, used to show and explore the night sky. My product is limited to the solar system, where it allows the user to create their own solar system and then let it "run" to see what would happen with that particular setup. For example what would happen if the solar system had binary stars or a black hole, etc. After what little research I've done, I haven't seen a similar product on the market yet. Please let me know if you know of similar software that exists. Also, the price will be fairly low. I'm not looking to make a living off of this project. I'm probably going to charge $10 for a single user license. And for an educational license, I thinking about doing $1 per license.
  11. This doesn't quite work. Because the orbits are based off of the gravitational pulls from the planets around it and the user will have the ability to move planets around, the orbit could be a perfect circle, an oval or not a shape at all and instead just a line.
  12. Just reviving this thread as I didn't get an answer last time but Josh showed us all a video of Newton doing some destructible objects way back in December. We haven't heard about this since then and I'm just wondering what happened to it. Currently I am only looking for destructibility on primitives (mostly spheres) for my solar system simulator (so that when planetary collisions happen or tidal forces tear a planet apart). Anyone know anything about this?
  13. This is a fairly complicated question so I hope I present it correctly. I am looking to draw the orbit of planets for my solar system simulation and I'm not sure how to go about it. Last time I tried this (with DarkGDK) I drew several spheres to show the line of the orbit, which then looked correct when viewed from a distance, but was very inefficient. As far as the orbit code goes, I will figure that out using code (which in theory will give me a mathematical function) for what the orbit is. I am hoping I can use this in some way so that I can draw the orbit of the planets using 2D drawing to the screen. Does anyone have any suggestions of how to do this?
  14. Please, this would be so much nicer for tracking of versions.
  15. Shard

    Shard - The Return

    Hello all, I, Shard, have returned. After completing our Applied Project at DeVry University, team Third Initiative took a much deserved vacation during which we slept in, stayed up late, did nothing productive and played WoW. * * * Now that our school is back in session we are moving towards our Senior Project, which will take everything that we have learned with our Applied Project and scale it up into a much bigger game. We are both very excited to be working on this and have decided to stick with Leadwerks because of its great features as well as the great community that has helped us advance so much. This time around we are planning our project much more carefully as well as recruiting new members to help us created a better game. We will also be doing a far amount of research before we begin coding and have better documentation done for our vision of the game. In addition to this, we will be releasing POC's or Proof of Concepts, which will be working versions of specific features (such as Networking, Menu Systems, etc) to the people who have already registered with us as beta testers. This will help us get specific features figured out so that it makes debugging easier as well as allowing us to test features in much better detail. * * * On a more personal note, I will be starting up a small side project of my own for my GSP280 - Simulation Design class. If anyone remembers, I once talked about creating a solar system simulation with multiple features. Since I will be doing a simulation class anyways, I figured that I will create a simulation that I can both show off for this class as well as try to capitalize on it. I will attempt to release this piece of software once its completed as a product which I hope to make a small amount of money on, with my target market being education institution and astronomy fanatics. This will be taking the engine in a new direction as I will be moving away from things like models and animations but rather using the Leadwerks framework to create a simulation sandbox, rather than a game, which to my knowledge, has not been done around here yet. There will be more details to come about the specifics of this project soon. * * * So there it is. A small update of what will be happening soon. I will shortly resume plaguing the forums with my thousands of questions, but I am hoping that with my research and experimentation, this time around they will be more educated and deeper questions. See you all on the forums!
  16. What is the proper method for loading water? We had water working in our project a while ago, but since then I have been testing it with water turned off. Now that I turn it back on, water doesn't show up properly. The current problem is that the water is always at 1 for its height, no matter how I set it in the editor. What is the proper method for loading water? What files need to be included so that it loads properly? Thanks.
  17. So it seems that something is wrong with my Media class because I can play the video when I put your code into my main and run it but when I try to run it through my media class, it always crashes at the same location, the CreateClip function T_T Please take a look at my media class and tell me what I'm doing wrong with it. // Header File #pragma once #pragma comment(lib,"libtheoraplayer.lib") #pragma comment(lib,"opengl32.lib") #pragma comment(lib,"openal32.lib") #include "Include.h" #include <windows.h> #include "engine.h" #include <gl/gl.h> #include "TheoraVideoManager.h" #include "TheoraVideoFrame.h" #include "OpenAL_AudioInterface.h" class Media { private: int nextPow2(int x); TheoraVideoClip *clip; TheoraVideoManager *manager; OpenAL_AudioInterfaceFactory *iface_factory; float w; float h; float tw; float th; TBuffer testbuffer; TTexture testtexture; TMaterial testmaterial; public: bool eax; Framework *frameWork; Media(); void PlaySoundFile(string &nonAbstractFileName, bool loop = false, float volume = 10); void PlaySoundFile(TSound &sound, float volume = 10, bool loop = false); void PlaySoundSource(TSource &source, float volume = 10, bool loop = false); TSource LoadSoundFile(string fileName); void PlayVideo(string &nonAbstractFileName, bool autoRestart = false, bool skippable = true); void PlayVideo(TheoraVideoClip *clip, bool skippable = true); TheoraVideoClip* LoadVideo(string &fileName, bool autoRestart = false); void Update(); void Initialize(); }; //CPP #include "Media.h" Media::Media() { clip = NULL; manager = NULL; } void Media::PlaySoundFile(string &nonAbstractFileName, bool loop, float volume) { nonAbstractFileName = "abstract::" + nonAbstractFileName; TSound sound = LoadSound(str(nonAbstractFileName.c_str())); PlaySoundFile(sound,loop,volume); } void Media::PlayVideo(string &nonAbstractFileName, bool autoRestart, bool skippable) { nonAbstractFileName = "abstract::" + nonAbstractFileName; nonAbstractFileName = AbstractPath(str(nonAbstractFileName.c_str())); this->clip = LoadVideo(nonAbstractFileName,autoRestart); PlayVideo(this->clip,skippable); } TheoraVideoClip* Media::LoadVideo(string &fileName, bool autoRestart) { TheoraVideoClip *clip = manager->createVideoClip(fileName, TH_RGB, 0, 1); clip->setAutoRestart(autoRestart); return clip; } void Media::PlayVideo(TheoraVideoClip *clip, bool skippable) { float w = clip->getWidth(); float h = clip->getHeight(); float tw = nextPow2(w); float th = nextPow2(h); TTexture videotexture = CreateTexture( tw, th, TEXTURE_RGB ); TheoraVideoFrame* f = clip->getNextFrame(); unsigned long time = GetTickCount(); unsigned long t = time; bool exitVideo = true; while(f || exitVideo == true) { TheoraVideoFrame *f = clip->getNextFrame(); if(f) { BindTexture(videotexture); glTexImage2D( GL_TEXTURE_2D,0, GL_RGB, w-1, h-1, 0, GL_RGB, GL_UNSIGNED_BYTE, f->getBuffer() ); clip->popFrame(); } t=GetTickCount(); float diff=(t-time)/1000.0f; if (diff > 0.25f) diff=0.05f; // prevent spikes (usually happen on app load) manager->update(diff); time=t; // Update timing and world UpdateAppTime(); UpdateWorld(AppSpeed()) ; // Render frameWork->Update(); frameWork->Render(); DrawImage(videotexture,0,0,GraphicsWidth(),GraphicsHeight() ); // Send to screen Flip(0) ; } } void Media::PlaySoundFile(TSound &sound, float volume, bool loop) { TSource source; if(!loop) source = CreateSource(sound); else source = CreateSource(sound,SOURCE_LOOP); PlaySoundSource(source); } void Media::PlaySoundSource(TSource &source, float volume, bool loop) { volume = Clamp(volume,0,10); PlaySource(source); SetSourceVolume(source,volume); FreeSource(source); } TSource Media::LoadSoundFile(string fileName) { fileName = "abstract::" + fileName; TSound sound = LoadSound(str(fileName.c_str())); TSource source = CreateSource(sound); return source; } void Media::Update() { } int Media::nextPow2(int x) { int y; for (y=1;y<x;y*=2); return y; } void Media::Initialize() { manager = new TheoraVideoManager(); this->iface_factory = new OpenAL_AudioInterfaceFactory(); manager->setAudioInterfaceFactory(iface_factory); manager->setDefaultNumPrecachedFrames(32); } //Usage Media *media = new Media; media->Initialize(); media->frameWork = [frameWork Reference]; string vid = "bunny.ogg"; media->PlayVideo(vid); //This Works Fine // ==================================================================== // This file was generated by Leadwerks C++/LEO/BlitzMax Project Wizard // Written by Rimfrost Software // http://www.rimfrost.com // ==================================================================== #pragma comment(lib,"libtheoraplayer.lib") #pragma comment(lib,"opengl32.lib") #pragma comment(lib,"openal32.lib") #include <windows.h> #include "engine.h" #include <gl/gl.h> #include "TheoraVideoManager.h" #include "TheoraVideoFrame.h" #include "OpenAL_AudioInterface.h" int nextPow2(int x) { int y; for (y=1;y<x;y*=2); return y; } int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd ) { Initialize() ; SetAppTitle( "hello_video" ) ; Graphics( 1024, 600 ) ; TWorld world; TBuffer gbuffer; TCamera camera; world = CreateWorld() ; gbuffer=CreateBuffer(GraphicsWidth(),GraphicsHeight(),BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL); camera=CreateCamera(); // THEORA SETUP THEORA SETUP THEORA SETUP THEORA SETUP // THEORA SETUP THEORA SETUP THEORA SETUP THEORA SETUP // THEORA SETUP THEORA SETUP THEORA SETUP THEORA SETUP // THEORA SETUP THEORA SETUP THEORA SETUP THEORA SETUP TheoraVideoManager *mgr = new TheoraVideoManager(); OpenAL_AudioInterfaceFactory *iface_factory=new OpenAL_AudioInterfaceFactory(); mgr->setAudioInterfaceFactory(iface_factory); mgr->setDefaultNumPrecachedFrames(32); //TheoraVideoClip *clip = mgr->createVideoClip( "bunny.ogg",TH_RGB,0,1); TheoraVideoClip *clip = mgr->createVideoClip( "bunny.ogg",TH_RGB,0,1); clip->setAutoRestart(1); float w = clip->getWidth(); float h = clip->getHeight(); float tw = nextPow2(w); float th = nextPow2(h); TTexture videotexture = CreateTexture( tw, th, TEXTURE_RGB ); // THEORA SETUP THEORA SETUP THEORA SETUP THEORA SETUP // THEORA SETUP THEORA SETUP THEORA SETUP THEORA SETUP unsigned long time=GetTickCount(); unsigned long t=time; // Game loop while( !KeyHit() && !AppTerminate() ) { if( !AppSuspended() ) // We are not in focus! { // THEORA CODE UPDATE TEXTURE // THEORA CODE UPDATE TEXTURE TheoraVideoFrame *f = clip->getNextFrame(); if(f) { BindTexture(videotexture); glTexImage2D( GL_TEXTURE_2D,0, GL_RGB, w-1, h-1, 0, GL_RGB, GL_UNSIGNED_BYTE, f->getBuffer() ); clip->popFrame(); } //mgr->update(AppSpeed()); // THEORA CODE UPDATE TEXTURE t=GetTickCount(); float diff=(t-time)/1000.0f; if (diff > 0.25f) diff=0.05f; // prevent spikes (usually happen on app load) mgr->update(diff); time=t; // Update timing and world UpdateAppTime(); UpdateWorld(AppSpeed()) ; // Render SetBuffer(gbuffer); RenderWorld(); SetBuffer(BackBuffer()); RenderLights(gbuffer); // THEORA "PLAYBACK" // THEORA "PLAYBACK" DrawImage(videotexture,0,0,GraphicsWidth(),GraphicsHeight() ); // Send to screen Flip(0) ; } } // Done return Terminate() ; } Why isn't it working D:< Edit: The release version doesn't run at all if the Initialize function is allowed to happen. But I think this occurs in VS2010 and works fine in 2008 but the results are not consistent. Anyone know how to remedy this?
  18. Thanks, changing the bitrate to 128 fixed the problem but created a new one. (of course >,>) The audio files we have play at 96kbps so when the this->iface_factory = new OpenAL_AudioInterfaceFactory(); is set it plays the audio files faster to compensate for the speed. Is there some way to set the playback speed of video files? The other options for me would be to increase the audio files to 128 or set and unset the iface every time I play and finish a video.
  19. For some reason all the sound has recently started playing extremely quickly and I'm not sure why. Has this been an issue for anyone else? Edit: Seems to be related to initializing the audio of the Theora Video.
  20. Still did it in Release Mode. So... what do we do to fix the problem?
  21. Nope, I usually just click the C++ shortcut on the Werkspace page. Plus its a hidden from view unless I scroll down. Hrm, only in debug mode. I haven't tested this, but if thats the case then I can live with cause as long as Release works its all good.
  22. Indeed it is. /three thumbs up
  23. Mind = blown; I suppose, but all the same, it is a bug that needs to be fixed, no?
  24. But it also happens with the terrain. Seemed appropriate in this case as this involves everyone, not just coders. I post in the C++ threads when its just about code and Editor when its just about Editor. There isn't an overall engine discussion thread except General Discussion which is the general discussion of the engine WerkSpace> Leadwerks Engine> General Discussion
  25. Nice to have you back. Render Target feature sounds like a fun feature to have.
×
×
  • Create New...