Jump to content

martyj

Members
  • Posts

    544
  • Joined

  • Last visited

Everything posted by martyj

  1. I don't know about text as I have never done 2d text in OpenGL, but your panels would be sent to the GPU on creation, so multiple draw frames wouldn't really impact performance compared to double buffering.
  2. Are you referring to 2D drawing of double buffering? Since Leadwerks uses OpenGL, you don't have to worry about problems of double buffering on 2d draws I believe. I think leadwerks renders a 2d image by rendering a texture on a quad with a specific Matrix to render it. I don't think leadwerks draws on the actual post rendered OpenGL buffer. To render 2d images with the CPU instead of the GPU would be very CPU intensive comparatively. Since leadwerks loads texture data to the graphics card, you're basically saying "Graphics card, draw image X". To do double buffering you would be passing image buffers to and from the graphics card every render frame which defeats the purposes of OpenGL buffers.
  3. I was planning something similar to coroutines. Basically specifying points for the camera and the time between movements. Then specifying a list of time frames where actions occur and function callbacks to perform operations such as falling rocks, ect.
  4. I will be starting to introduce cutscenes in my game. My design idea is to use a secondary camera other than the player's camera, using SetRenderTarget on the secondary camera to tell the game which camera to render to the screen buffer. I was wondering if you call Hide() on a Camera, will it not render? I don't want to render the player's camera and the cutscene Camera at the same time. Thanks, Marty
  5. I've been spending a few hours today managing assets for my game, unifying materials, ect. I have three suggestions that would have saved me a ton of time. 1. Have a confirmation dialog on re-import. It sucks to accidentally press it when you want to edit it. 2. Delete key should ask for confirmation on deleting an item. 3. When multiple models use the same Diffuse texture on importing, just create one material instead of creating a material with the name specified in the model. Granted a lot of this could have been avoided if the assets were in the desired format for Leadwerks, the problem is that selection is limited to the Leadwerks store, which doesn't offer the full selection of assets as other places. Thanks, Marty
  6. There is no set rotation on a texture. http://www.leadwerks.com/werkspace/page/api-reference/_/texture/
  7. So there's been a lot of PBR posts lately on the Leadwerks blog. (Absolutely wonderful guys). The only problem is, you can't add this functionality to the terrain as you are limited to 3 textures on the terrain. Diffuse, Normal, Displacement. PBR requires the use of 7 textures in the case of Shadmar's shaders. It would be wonderful we could extend the terrain just like we have extended regular object rendering. Thanks, Marty.
  8. "Shovel can be used to chop down a tree." Technically speaking, a shovel could cut down a tree. It would just take a lot longer compared to an axe. Will this be released on steam? It's looking really good. How did you do the player navigation? Is this custom wrote? I noticed it doesn't have the bugs of Leadwerks. So feedback ---------------- 1. Have a click action icon to show that you performed an action. Look at League of Legends or Runescape when a person clicks. 2. Placing a fire doesn't light a fire http://i.imgur.com/fV9Ly2v.png 3. Sometimes you can pick up rocks without being near them. 4. Trees flicker which appears to be caused by their shadows. 5. It would be nice to adjust the resolution, and make the game not full screen. 6. When you collect all the resources from a tree, it would be nice to have a better visualization. Maybe swapping the material out on the tree?
  9. You could try picking from the camera on screen ordinates. Depending on the location of the pivot whether it is behind the camera or in front, decides where it picks. http://www.leadwerks.com/werkspace/page/api-reference/_/camera/camerapick-r199
  10. Your GPU should work. Make sure you have the latest Nvidia drivers. http://www.geforce.com/drivers Also make sure that Leadwerks is using your GPU and not your CPU's GPU. Intel HD3000 I think only supports OpenGL 3.1?
  11. Could you post some of your code? Assuming you have an instance of a SpotLight you can hide and show it with the Hide(), Show() functions. Psudocode: function PlayerUpdate() { if window->KeyHit(Key::F) { if splotLight->Hidden() { splotLight->Show() } else { splotLight->Hide(); } } }
  12. martyj

    GeoVox

    I've read that it can export PNGs. Just wanted opinions to see if it generates the heightmap correctly, how well it works, ect.
  13. martyj

    GeoVox

    So GeoVox is on sale on steam at the moment, I was wondering if anybody has used this http://store.steampowered.com/app/368470/ Does it work well with Leadwerks? How is the program overall compared to that of the built in terrain editor?
  14. So we're working on multi-player in our game. The backend server is written in Golang, the frontend in C. We use TCP and UDP sockets. TCP for sending player connections, player messages, and UDP for player position and rotation. We still have to add a lot of "anti-lag" along with sending player animations. I've tried guessing the animation based upon the player movement, but with 0 to no latency, it doesn't allow enough time between game ticks.
  15. @Macklebee you were 100% right. As far as Range goes, is 1.0 one meter? I found that I couldn't hear anything if the range was about 10.0.
  16. I am having trouble getting 3d sound to work. Setting up a listener at the player position Player* player = this; Listener* playerLIstener; this->playerListener->SetPosition(player ->GetPosition(), true); this->playerListener->SetRotation(player ->GetRotation(), true); Setting up the playing source testSound = Sound::Load("Sound/Npc/walking.wav"); source = Source::Create(); source->SetSound(testSound); source->SetPosition(Vec3(0.0, 2.0, 0.0)); source->SetLoopMode(true); The audio file in question is Mono. http://i.imgur.com/Xh1EuSO.png Playing of the audio: if (window->KeyHit(Key:)) { if (source->GetState() == Source::Playing) { source->Stop(); } else { source->Play(); } } The audio is playing in both speakers, but the audio doesn't change volume as the distance grows. Any ideas why the volume isn't changing relative to distance?
  17. I only have two bugs with the inventory code. 1. When you drag an item, it sometimes doesn't resize correctly to the drop location if you drop it to the same location. 2. When you drag an item, the quantity doesn't go with the item. I can send you a zip of the whole UI if you're interested. Along with some javascript console commands to add items to the inventory. Let you play around with it.
  18. I am still working on keyboard. It's the one feature preventing me from showing a multi-player video. Javascript: element.droppable({ drop:function(event,ui) { var dragIndex = angular.element(ui.draggable).data('index'); var dragLoc = angular.element(ui.draggable).data('location'); var dropIndex = angular.element(this).data('index'); var dropLoc = angular.element(this).data('location'); if(dragLoc == dropLoc) { if(dragLoc == 'in') { var dragRow = parseInt(dragIndex/GAME_ENGINE.InventoryScope.cols); var dragCol = dragIndex%GAME_ENGINE.InventoryScope.cols var dropRow = parseInt(dropIndex/GAME_ENGINE.InventoryScope.cols); var dropCol = dropIndex%GAME_ENGINE.InventoryScope.cols var oldItem = GAME_ENGINE.InventoryScope.inventoryRow[dropRow][dropCol]; GAME_ENGINE.InventoryScope.inventoryRow[dropRow][dropCol] = GAME_ENGINE.InventoryScope.inventoryRow[dragRow][dragCol]; GAME_ENGINE.InventoryScope.inventoryRow[dragRow][dragCol] = oldItem; // TODO: Have Inventory do this logic GAME_ENGINE.InventoryScope.moveItem(dragIndex, dropIndex); } else { var oldItem = GAME_ENGINE.ActiveItemScope.items[dropIndex]; GAME_ENGINE.ActiveItemScope.items[dropIndex] = GAME_ENGINE.ActiveItemScope.items[dragIndex]; GAME_ENGINE.ActiveItemScope.items[dragIndex] = oldItem; // TODO: Have Inventory do this logic GAME_ENGINE.ActiveItemScope.moveItem(dragIndex, dropIndex); } } else { if(dragLoc == 'in') // dropLoc = ai { var dragRow = parseInt(dragIndex/GAME_ENGINE.InventoryScope.cols); var dragCol = dragIndex%GAME_ENGINE.InventoryScope.cols var oldItem = GAME_ENGINE.ActiveItemScope.items[dropIndex]; var newItem = GAME_ENGINE.InventoryScope.inventoryRow[dragRow][dragCol]; GAME_ENGINE.ActiveItemScope.items[dropIndex] = newItem; GAME_ENGINE.InventoryScope.inventoryRow[dragRow][dragCol] = oldItem; // TODO: Have Inventory do this logic GAME_ENGINE.InventoryScope.addItem(oldItem.id, oldItem.qty, dragIndex); GAME_ENGINE.ActiveItemScope.addItem(newItem.id, newItem.qty, dropIndex); } else // Drag Location = ai, drop Location inventory { var dropRow = parseInt(dropIndex/GAME_ENGINE.InventoryScope.cols); var dropCol = dropIndex%GAME_ENGINE.InventoryScope.cols var oldItem = GAME_ENGINE.InventoryScope.inventoryRow[dropRow][dropCol]; var newItem = GAME_ENGINE.ActiveItemScope.items[dragIndex]; GAME_ENGINE.InventoryScope.inventoryRow[dropRow][dropCol] = newItem; GAME_ENGINE.ActiveItemScope.items[dragIndex] = oldItem; // TODO: Have Inventory do this logic GAME_ENGINE.ActiveItemScope.addItem(oldItem.id, oldItem.qty, dragIndex); GAME_ENGINE.InventoryScope.addItem(newItem.id, newItem.qty, dropIndex); } } scope.$apply(); GAME_ENGINE.ActiveItemScope.$apply(); GAME_ENGINE.InventoryScope.$apply(); } }); HTML: <div id="active_item_inventory"> <div class="inventory_item" ng-repeat="item in activeItems track by $index"> <div ng-if="item.qty==0"> <div class="item" data-index="{{$index}}" ng-class="{selected: item.id!=0}" data-location="ai" droppable> <div class="active_selection_box" ng-show="$index == selected"></div> </div> </div> <div ng-if="item.qty > 0"> <div class="item"> <img ng-src="{{item.icon}}" data-index="{{$index}}" ng-class="{selected: item.id!=0}" data-location="ai" draggable /> <div class="count" ng-show="item.qty > 1"> {{item.qty}} </div> <div class="active_selection_box" ng-show="$index == selected"></div> </div> </div> </div> </div> <div id="inventory"> <div class="inventory_row" ng-repeat="row in inventoryRow track by $index"> <div class="inventory_item" ng-init="rowIndex = $index"> <div ng-repeat="item in row track by $index"> <div class="row_item" ng-init="colIndex = $index"> <div ng-if="item.qty == 0"> <div class="item" data-index="{{(rowIndex * cols) + colIndex}}" data-location="in" droppable></div> </div> <div ng-if="item.qty > 0"> <div class="item"> <img ng-src="{{item.icon}}" data-index="{{(rowIndex * cols) + colIndex}}" data-location="in" draggable /> <div class="count" ng-show="item.qty > 1"> {{item.qty}} </div> </div> </div> </div> </div> </div> </div> </div> CSS #inventory{ } #inventory .inventory_row{ padding: 0px 0px 0px 2px; height: 84px; } #inventory .row_item{ } #inventory .item{ background: #404040; line-height: 64px; width: 64px; height: 64px; margin: 10px; float: left; } #inventory .item img{ vertical-align: middle; width: 54px; margin: 5px; } .item .count{ position: absolute; margin-top: -84px; margin-left: 4px; } #active_item_inventory{ height:104px; } #active_item_inventory .inventory_item{ float: left; } #active_item_inventory .item{ background: #404040; width: 84px; height: 84px; margin: 10px; line-height: 64px; } #active_item_inventory .item img{ vertical-align: middle; width: 74px; margin: 5px; } .sortable{ list-style-type: none; margin: 0; padding: 0; } .ui-draggable-dragging{ z-index: 1000; width: 54px !important; }
  19. Yes. I used jQuery UI's draggable for it. I probably should have recorded that aspect . I was super rushed last night.
  20. Check out a video about the UI for my game. The UI uses Awesomium built using Html, css, javascript, and AngularJS as the framework.
  21. martyj

    Relocation

    If I had a choice to live somewhere in the US, I would not choose San Fransisco, too expensive for living, and $100k a year is still living poor there. I would probably choose a university town. Somewhere like Spokane. I personally like trees, and there is little chance of drought up there. California is overly priced IMO. San Diego is a nice city to visit IMO. But not to live.
  22. Cheers m8. I can't believe I didn't notice that
  23. I have a 3d model here, a fishing pole, and the line isn't showing up on the pole. All my materials look good. The line just doesn't show up on the fishing pole. File in question: http://martyj.net/Fishing.zip Look at fishing_pole.fxb Thank you for your time
  24. martyj

    C++ Deploy

    I was wondering if anyone had any tips on C++ deploying of the app. The base C++ app uses Lua for programming. My app does not. If I hit "publish" it deploys a Lua application. How can I get the publishing feature (Encrypted zip of assets) along with my customized .EXE? Thanks, Marty
×
×
  • Create New...