Jump to content

jcsnider

Administrators
  • Posts

    4905
  • Joined

  • Last visited

  • Days Won

    477

Everything posted by jcsnider

  1. Can you highlight/tell me which line is erroring & copy/paste the call stack when the error occurs?
  2. Tesy
  3. Reference the code changes I made in this commit. (Specifically in the map properties section.) They may not have made it into Rob's version and therefore, yours. https://github.com/jcsnider/Orion-Game-Engine/commit/46ee3e403ebb24941027ffac141e6ee358cf17ce
  4. Draw it at locX - 16 and locY - 16 instead of recPos.X, recPos.y
  5. Divide your quests into pages. Say that you can have 10 quests per page (per scroll) and 100 quests total. You will have to start using a PageIndex variable. For example, PageIndex = 0 would mean the first page. The math to show 10 quests per page would look like this Dim newLinePos As Integer = QuestItemWindow.ControlLocation.Y + QuestItemWindow.Location.Y + 2 dim y = 0 'This is the position in the list you are drawing For i = PageIndex * 10 + 1 to PageIndex * 10 + 1 + 10 DrawText(QuestItemWindow.ControlLocation.X + 2, newLinePos + y * ChatLineSpacing, QuestList(i), SFML.Graphics.Color.Black, SfmlChatFont, FONT_CHAT_SIZE, GameWindow) y = y + 1 next Later on you check in your QuestItemWindow mouse events. You do something like this. Dim newLinePos As Integer = QuestItemWindow.ControlLocation.Y + QuestItemWindow.Location.Y + 2 dim y = 0 'This is the position in the list you are drawing For i = PageIndex * 10 + 1 to PageIndex * 10 + 1 + 10 if (MouseX >= QuestItemWindow.ControlLocation.X + 1 and MouseX <= QuestItemWindow.ControlLocation.X + 1 + QUESTITEMWINDOWWIDTH) then if (MouseY >= newLinePos + y * ChatLineSpacing and MouseY <= newLinePos + y * ChatLineSpacing + ChatLineSpacing) then 'Clicked on quest number i do stuff and then exit sub end if end if y = y + 1 next
  6. Sound Implemented Dev Blog Jun. 27 2015 News/Updates The title says it all, sounds and music are now working in the Intersect game engine. We've added options to start the game with main menu music and then added the basic functionality of music on each map, along with a global map sound that loops. So you can have some type of adventure tune while hearing the wind blow through the trees, or water drop in caves. But that's not all! We've also implemented a new version of my tile based sound system. This is an attribute that you can place on a tile in the Map Editor, each tile can have its own sound, and a distance in which you can hear it. When you get close, the sound gets louder and it dissipates when you walk away. In real life, if you are walking past a waterfall you expect to hear it right? That same concept applies in game too! We will get a video of this in action up soon. My laptop without a dedicated GPU isn't happy when I try to stream or record anything these days. As always, feel free to post comments and questions below! We are excited to hear your thoughts on our progress!
  7. Alright so really you would start out by taking a tilesheet and splitting it into equal squares (probabaly 32x32 pixel components). This can be done with .Net or even my multi-purpose graphic splitter. Then you would save the files based off of their index in each sheet. In this example, you would save the top left tile as 0. The tile to the right 1, the tile to the right of that would be 2, and so on. Then in your engine you would have to come up with a logical way to group these tiles or else it would just be a cluster of random tiles in your map editor. I don't see a ton of performance benefit from doing this. If you don't like the duplicate tiles I would recommend fixing your graphics instead of trying to repair them in code.
  8. Sorry my bad. Okay, render tmpSprite as BlendMode.Alpha (or just no blend mode). And draw your lights to the RenderTexture GameWindow.Draw(tmpLight, New RenderStates(BlendMode.Add)) Should be tmpBuffer.Draw(tmpLight, New RenderStates(BlendMode.Add)) Also, define the rendertexture ourside of the sub at the top of your module. You really don't want to recreate it every frame.
  9. Not going to talk much here. If there is anyone out there who wants to start learning C# I highly recommend you stop by the guys who created it. Microsoft is always looking to get more and more people using their languages so they commission for video tutorials just like these to teach people who are interested how to start programming. These tutorials are for the absolute beginner, the first video is all about calming the nerves and prepping you for installing Visual Studio, which you can find here. (You want the free, community version.) If you know nothing about programming and think you might want to get started this is a resource that is worth looking at. Best of luck!
  10. Add * 32 when setting your position. tmpSprite.Position = New Vector2f(x * 32, y * 32) If that doesn't work completely you may have to wrap them in ConvertMapX() and ConvertMapY() tmpSprite.Position = New Vector2f(ConvertMapX(x * 32), ConvertMapY(y * 32))
  11. Best method is to use the existing connection when logging in. Server is online if socket is connected. Even if you used the ping class, you wouldn't be testing the actual port or if an Orion server is actually there.
  12. Hotbar Implemented Dev Blog Jun. 24th 2015 Short Summary Short and sweet, the hotbar gui window is up and running. Complete Update Features of the Hotbar Include: 1. Adding Items or Spells 2. Spells on cooldown render in grayscale 3. You can remove items by right clicking 4. You can swap hotbar slots by clicking/dragging different hotbar items on top of each other. 5. It shows which items are equipped. 6. Hovering your mouse over hotbar objects brings up the relevant description windows. Content/Show Off As always, feel free to post comments and questions below! We are excited to hear your thoughts on our progress!
  13. Yeah that makes sense. You didn't post the disposal code that was causing the error to appear. You are correct, since you never assign item index of 0 to anything, by removing it from your disposal loop you resolved the issue. Goodjob!
  14. The ReDim starts at 0 because it is an array, even though the index of 0 is never used. Your code will fail if the item graphic(s) aren't there. Can you check that out?
  15. HUD Updates/Entity Inspector Dev Blog June. 22 2015 Short Summary Add animation on your vital displays in the HUD. (HP/MP/EXP Bars). I reworked the Entity Box a little so it can be used for inspecting all entities including other players and events when targeted. Complete Update When you click on an event, the same window appears but gives you information about the event and removes the irrelevant health/mana/experience bars! This feature is can be toggled on and of on for each event so you can decide if you want to use this feature and when you want to use this feature. (Clicking anywhere on the game screen, removing your current target, makes the box automatically disappear.) Content/Show Off As always, feel free to post comments and questions below! We are excited to hear your thoughts on our progress!
  16. Again, I would never, ever use GetTickCount() as part of the calculation, I would ONLY use it between frames to see how many milleseconds has elapsed. Can you make the server implementation work like the client's? I think you would have better results.
  17. That's exactly it.
  18. Lets separate this up... Copy the code you have working in the server and make it work in the client standalone. (No server communication neccessary.) Then, when the player logs in have the server send the current time, game rate and time amount which simply injects itself into your existing client code. The client will be off by up to 1-2 seconds but that is no problem. Don't base the client code off of the server tick count if you are still doing that. Just add seconds based on the change in the client tick count.
  19. SIMPLE ENOUGH FOR A CHILD; POWERFUL ENOUGH FOR A DEVELOPER. - Enterbrain About: RPG Maker VX Ace is the latest edition of the RPG Maker series of single player 2d rpg game engines. It is a lot easier to copy what they say about themselves: Trailer: pdKHAe6StuE Features (again, straight from Enterbrain):
  20. I think your issue has something to do with GetTickCount(). That value is different on the client and server and will never match up. You need to send the servers tick count and find the difference when calculating the client time.
  21. Your first issue could be caused by the loading of a map while trying to render the screen. (Or improper redefining of the map when loading occurs.) Here is the chain of events that you are seeing: You're fighting an NPC. You die. Which warps you to spawn. The game screen enters a render loop, starts to draw the map. The client sees the warp packet and destroys the map to reload. The drawing continues but freaks out when the layers no longer exist. There are several different options on approaching a fix for this. There are a lot of strategies to tackle cross threading issues like this. You could send the new map data to the main thread and parse it there between frames for example. But here is a better way. The idea is that we don't want the map to be null while trying to render. We can accomplish this with SyncLocks. Place a new global variable somewhere (Right around the definition for the map would suffice.) and define it as follows. - Public MapLock as new Object() Next, go to Sub ClearMap() and surround the Subs contents with SyncLock(MapLock) 'Code Here end SyncLock Finally, head over to Sub GameLoop and add those two lines of code again. Add SyncLock(MapLock) before If CanMoveNow and Add End SyncLock after your Day/Night If then block. Let me know if that fixes your first issue.
  22. Hi all this is a sample thread in which I will be posting some random "helper" programs that I end up creating for myself that I may find useful for the community. If you have any requests, please feel free to post them here, I may tackle a few in my spare time. If you have any questions please post them in the relevant tool's topic. Projects: Multi-Purpose Graphic Splitter Batch Wav to Ogg Converter Best, JC!
  23. Change NPC to List(of MapNpc) and then .Add(0) to .Add(new MapNpc())
  24. I think you want to shoot for something like this: 'Init Players For i = 0 To MaxPlayers Players.Add(New Player()) Next 'Init Items For i = 0 to MaxItems Items.Add(new Item()) 'Throw the stuff that was here into the items Sub New method like we did in player. Next 'Init Spells 'etc 'Init Npcs 'etc
  25. Lots of changes. First, after For i = 0 to MaxPlayers add Players.Add(new Player()) Before we can access someone in the list we have to add them to the list. Then, remove all of the redim loops after that, we don't redim lists. We redim arrays, plus we want to do that stuff in the Sub New inside of the player class. Make your Sub new like this Public Sub New() For x = 0 To Vitals.VitalCount - 1 Vital.Add(0) Next For x = 0 To Stats.StatCount - 1 Stat.Add(0) Next For x = 0 To Equipment.EquipmentCount - 1 Equipment.Add(0) Next End Sub Finally change your definitions: Public Property Vital() As List(Of Vitals) Public Property Stat() As List(Of Stats) Public Property Equipment() As List(Of Equipment) As they should all be As List(Of Integer) = new List(Of Integer)
×
×
  • Create New...