marc40000

Members
  • Content count

    17
  • Joined

  • Last visited

Community Reputation

131 Neutral

About marc40000

  • Rank
    Member
  1. Fast dyanamic_cast

    I always wondered about something related. Assuming at some Point you Need to know what class an object actually is of. Then, as far as I understand, I could try dynamic_cast<> to all possible classes. And that's O(n), if n is the number of possible classes. So having a map or hashtable to just look it up should theoretically be faster for large enough n. Is this correct or am I missing a possible way to use dynamic_cast<> efficiently for this?
  2. Handling many objects

    When I wrote my prvious post, I did a quick google of hashtable and java anf also found HashTable and HashMap. While HashMap looked more appealing than HashTable to me, I'ld prefer a generic version. Spatial Data structures may look complicated at first sight. (Hashtables as well.) But if you don't have to implement them yourself and can use an existing working implementation, it's actually quite simple, as they do what you otherwise have to solve with loops over all objects and check for their positions. It's actually simplyfing your code while being faster. If you don't have many objects in your scene, the speed point might be neglectable though. From a theoretical point of view, assuming you have n objects in your scene and each does a spatial query that has to cycle through all objects, one gamelogic update will be O(n^2). That's really bad for large n. f you use a spatial datastructure, a spatial query goes down to O(log n) and for n objects, that gives us O(n log n) which is way better for large n. Assume n==1000, first scenario, that's about 1000000 "steps" while it's only about 10000 for the spatial data structure version. That's an acceleration of factor 100!
  3. Handling many objects

    Yes, for example in php the associative array is implemented as a hashtable or map. In java, there is probably a hashtable implementation in the framework - but I haven't used java for years so I don't know what it's called. In .net for example it's called a Dictionary so it might not be called hashtable in java. If each frame Update() has to be called on every gameobject, there is no way around actually calling it. I'm not sure what you mean with "recursively controlling itself". Instead of a hashtable or additional to it, you can have a logical tree structure where you put your objects in if you want. I think Unity does this. However, you probably want a hashtable next to it as well so you can get an object given its unique-id.
  4. World scale RTS

    I tried something similar like you describe, even though it was less realistic and more fantasy style and less politics and more rts: [url="http://www.confrontation-unlimited.net/cuweb/"]http://www.confrontation-unlimited.net/cuweb/[/url] The world is split into generated islands that connect through portals. That way, as the amount of players rise, the world can dynamically be resized everywhere, not just at the borders. It's browser based and from 2000, but it still works. There are screenshots on the page. I'm also working on a newer version of it with a dedicated client and nicer graphics etc: [url="http://www.confrontation-unlimited.net"]http://www.confrontation-unlimited.net[/url] This is still in development, so there are some quirks here an there but basically you can build buildings and units and fight. @Orymus3: Funny that you mentioned the fps mode as I had the same idea and tried that. Since everything is 3d and physically simulated, you can select a unit, press f3 and controll it directly. You can still command your other units around in this mode since you can still select them and give them a target. I'm not sure if this will stay a gimmick though. I can hardly imagine this to be of much use when two armies fight each other.
  5. Handling many objects

    I think you need something like this. While an array might not be the best choice, you need a place where all you game objects are put in so you can do things with all of them like your move() or a general gamelogicupdate() or a render() etc. I prefer to have a hashtable to store my game objects in. This comes with some handy features: - you can still iterate over all your objects - every object you create can get a unique id and you can store it in the hastable by that unique id. With an array you could use the index for that, but as the game continues, you get higher and higher ids while old objects get removed and you get holes in your array. OR you could put new objects at the places of removed objects, but then, your index-ids aren't unique anymore. - each object having a unique id allows objects to reference each other without tricky sideeffects. For eaxmple imagine a unit A chase another unit B. You could add a reference of B in A and that way A can check B's location in the gamelogicupdate() and knows where to move. However, what if B gets destroyed? It get removed from the scene, but it keeps existing because A has a reference to it. If A only knew B's id, it can do the same as above by checking the hashtable of B and get B's position. When B gets destroyed, A will notice because the hashtable lookup will fail. Also note that references/pointers are only valid locally. When you add network play, you absolutely need some kind of unique ids. Instead of a hashtable one could use a map. Besides that, you probably want a spatial datastructure as well to put your game objects in so you can do queries like "give me alle objects within a radius of 5m of point p.". One might be able to combine these datastructures somehow, I don't know thought. I always used those two next to each other.
  6. Ha I found out how to do it: Firefox has a "Error Console" where it writes all errors and warnings. That helped a lot - except for one case, where nothing happened and no error or warning appeared in the console. There was also one case where there is a warning and it suggest to use something else instead which would logically be the same as far as I understand it, but it actually behaves differently. So I left the warning :/ But I think it's working in IE, Firefox & Chrome now! :D (I haven't tested others)
  7. Wow, that's cool. Is there an open api to write applications for it? Do applications run mostly in javascript or mostly server side?
  8. Hi ! I wrote a browser game about 10 years ago and thought I lost it, but was able to recover it from an old backup cd lately :) It was quite easy to make it run on a current php version (I wrote it back on php3 with magic quotes on etc.). Just minor modifications though. Back in 2000, Internet Explorer was dominating, followed by a few netscape users and hardly anyone used Opera. So, back then, I went and made it work with IE. Surprisingly, after all what has happend in the browsers history, it still works (except for screen.availWidth and availHeight got case sensitive somewhen :/). But it absolutely doesn't work on any other current browser. :( I don't think there is too much wrong for them, some things I was able to figure out, but most of the time, it's like: when I click something, in IE it happens, but in FF just nothing happens. So my question is: Is there a tool for javascript debugging that somehow tells me what's wrong? It's strange that nothing really happens instead of displaying an errormsg somewhere. I tried the firefox addons FireBug and javascript Debugger so far, but the first doesn't seem to be targetting javascript debugging (or I don't know how to use it correctly) while the 2nd reveals that a lot of javascript functions seem to be implemented in javascript itself in ff and I get lost in some internal ff javascript :/ I installed the game online if you want to have a look: Confrontation Unlimited Web It's a persistent online strategy game with a map and units you can move around on it and build buildings. I have to apologize because the website is in german but the game itself is in english, no idea why I did it back then :D, but the registration is as well in english: registration and you can login from the start page. The registration link from above is already the first page that doesn't work in ff without any comment. If you try that page in IE, you can change the background color of your empires emblem by clicking on those color bars. In ff, that doesn't work - all the other javascript I was able to make it work, like changing the layers of the emblem. There are more of those issues inside the actual game so a general approach for debugging javascript is of interest to me. Thx :) Marc
  9. Searching advise for enhancing my free game

    Yeah Evony. Well, I actually didn't know about that game until someone said, "the girl, the big button - looks like Evony". Then I looked it up and while the Evony girls are more erotic than mine, the resemblance can't be denied with respect to the girl and the button. I don't want to deliver the feeling of cheating of the players. Actually, I want to add female warriors to the game as well, not just male ones. But they won't be able to do any sex whatsoever. Right now, there are now girls in the game except I just recently added an in game tutorial with that title girl describing you what to do. Independent of this issue - it doesn't seem like people leave the website immediately after seeing the girl. In relation to the amount of visitors to the website, the amount of people who actually try the game is not too bad. While this might be increased, I feel my bigger problem right now is, that people trying the game, don't come back. Can it be because they expected girl warriors fighting and that wasn't what they got?
  10. Searching advise for enhancing my free game

    Thanks for your website feedback. It's much appreciated :) Quote:Original post by Shadowwoelf -You should get rid of the giant yellow logo that says Play now, Forever Free! I've seen too many internet ad's that used a similar style so that ruins the experience. -Right now with a resolution of 1024 I have to scroll to the side to log in. -In the forums the "Confrontation Unlimited Community Board ... for those who prefer word over sword" Text blocks out the other logo next to it. I just realized that a lot of people are still using 1024 displays. I thought they wouldn't exist anymore except for an old one for emergency cases maybe. but according to steam's statistics, a lot of them are still used by gamers. So I agree, I have to make the website fit on 1024 pixels displays I guess. This is the case for the website and the login form, the forum logo overlapping itself and the play now button doesn't look that big on my display actually, but is probably half the screen or more on a 1024er display ... Quote: -Bikini girl=Eh. Its not really helping you. You should put in some guy in awesome armor or a battle in the background that's epic. Ok I'll think about that. Why are those girls in all those games if the people posting to this thread think they are wrong placed. After all, people posting in this forum, are the people making those games as well. Isn't that so? Quote: -Newbie guide: Giant wall of text. Consider using some pictures to illustrate. I know, that's bad. I plan to present more about that on the wiki and remove that page altogether. Quote: -All images on the website should go to the screen gallery. Example would be the bottom picture on the main page goes to the download screen. (I wanted a closer look at the picture though) I'm not sure I understand what you are suggesting here. Do you suggest to remove all pictures from the website and move them to the gallery? That'ld make the website look text only. If you want a larger version of the image with the speech bubble, I'm afraid there is non. I just took a screenshot from the game, resized it and draw the speech bubble on top of it manually. There are in game screenshots in the screenshot section though, those can be viewed at the original size. Quote: -Remove the smilies on the web page in text. Doesn't help, may harm your image. I just thought, that'ld make the website feel more personal, after all it's just me doing this game and not a large company. If I try to look and feel like a large company wouldn't that create wrong assuptions and making people wonder when they realize that it's only me at some point? Quote: -Maybe consider removing the wiki till there's something in it. You don't want people to come in to a blank page Heh, when you tried it, I probably just have added it. When I started this thread, there hasn't been a wiki at all. It's new. Now, there is some info in it. Quote: As for the game itself have a thread in your forums that ask what features people want now asap. Then just put like the top 5 and have a poll. Then you know what you should be working on to get more people interested. That's an interesting idea, I could try that. But it's difficult to handle what players wish for. A friend of mine who plays Beyond Protocol told me, they invented a Senat in the game that consist of players. This senate can vote for things to change in the game every month or so. This senat exists since mid 2009 as far as I remeber. And since then 5 or 6 things were decided to change by the Senat. The problem now is, since then, according to him, they can't hold up to the decisions the senat made. Some were quite game mechanic changing. So maybe I could give a list of features and ask them what they would like to see first instead of letting them suggest. I have to think about the features I should suggest though ... Quote: My other suggestion was to get players involved in creating content for the world. Being one person you are limited in what you can do. Actually, that was my plan from the beginning. Right now there is no such functionality in it though. My plan was to allow players to upload models and design maps and let others play it. But as long as noone plays the basic game, I guess it's useless to implement those functionality. Who wants to mod a game nobody plays? Or am I wrong?
  11. Searching advise for enhancing my free game

    Quote:Original post by Shadowwoelf Sorry this isn't game design related, but looking at your website I would suggest that you should try a different style or page layout. While this is not a common response, some people told me I should make the website look better. But what I should do conretely, I don't know. You suggest to change the whole style of the website? Make it look darker? I'm open to advices :) Quote: Otherwise I would agree with everyone else and just start with a small core of people and keep developing. Perhaps even have the community help make it better (Of course that has its own pros and cons). A small core of developers or a small core of players? Developer(s) is just me right now and most of players don't come back right now after some time or immediately. But maybe I should contact some of the players that spent more time in the game directly and ask them to test new features first when I implemented them. Maybe they'll come back to try them. Hmm....
  12. Searching advise for enhancing my free game

    Quote:Original post by adrix89 I have to confess that I haven't played it but heres some ideas that you can use in a persistent setting First of all you should focus on empire building as its probably the only long term goal you can have in a persistent setting My recommendation is to inspire yourself from various RTS management games as well as city building games and trading games(cesar 3,cultures 2,patrician 3,anno series etc) I would recommend a permanent resource stream(like cossacks 1)or make resources abundant(cultures 2) as well as different types for different things Probably the most important factor in your game would be logistics(and the reason I focused on the above games) If you don't have the absolute best logistics to stop lucky players for exponential expansion someone will horde some best units and start conquering everything in a persistent setting An good example of logistics is in cultures where you have to do allot of stuff till you get some warriors and still need food and a roof(those bastards) not to mention carts and roads needed for further expansion Also if the world never sleep you'd have to add allot of automation to keep players safe when there off preferably by letting the players chose what reactions they should have in different circumstances I think similar. There have to be some gameplay mechanics in there that are similar to Anno & Co. The issue with conquering other player's stuff is a general "problem" I think. In the common mmorpg, it's nearly impossible to loose anything. And if they do, because of rewinding to the last backup etc., they don't like it. But I guess, loosing stuff is an element of an RTS you can't circumvent. Whatever I do, the possibility for one player to destroy other players things has to be there some way. Clearly having one player somehow conquer the whole world (easily) isn't something that should happen though...
  13. Searching advise for enhancing my free game

    Quote:Original post by hiigara Creating an MMORTS is a very risky Investment. Mankind is the example of it. It was created by O2, a Telecoms Company which I am sure does not have any Budget problems. I think Persistent RTS is still a baby. There is something missing to make this Genre successful. You could find that something, or if you want to cash in with your Game in the short Term, you have to RPG it a little bit. Or alternatively change the Scale of the Units and go the Evony/Travian way. Well I can't say I haven't invested a penny in CU. But compared to the amout of time I put in it/my game developing hobby, the amount of money I spent additionally is relatively low. Others build model railways in their free time and spent money on it. I'm not planing on "caching it in on short Term" or anything like that.
  14. Searching advise for enhancing my free game

    Quote:Original post by JamesPenny Well, I downloaded your game and played for about an hour. Here's my thoughts: Thank you :) Quote: - Pathfinding. Having to order every unit individualy right up to where it wants to go is just a pain. I know about that. You aren't the first complaining about it ... Quote: - Automation. Woodcutter cuts wood. Tree runs out. Woodcutter stands and thinks 'Yay lunchtime!'. In this case the woodcutter should find another tree, and, when full, return to base. I know about that as well, but making it automatic like that has problems as well. They might run into bad guys. What should they do in that case? Running home? Running somewhere? Luring the monsters somewhere as well? I guess I'll just implement it that way and see. Maybe it's not that problematic. Quote: - Empire map. I saw some random squares, some bars and differant colours. What do these mean? I know about that as well. I have just released a new version with a tutorial that explains the world map. Every square is an island. The bars and colors represent the empires that have stuff on these islands and the Empire which controls the island. Quote: - Graphics. As said before, the models need to be similar in design if you want to look professional. This will probably be the most complicated thing for me, but I have to think about that I guess as it is mentioned a lot. {quote] -Bikini Lady. Get rid of her. Now. EVERY GODAMMNED MMO uses her or one of her cousins. The bare chest wont get you players. This is the internet. We're used to it. [/quote] Sex sells :D I'll think about that. While I'm personally not much pro or con on the graphics surrounding the website of the game, if I want to remove her, I will need something else to put there first. Quote: Overall though you have a solid idea, potentially awesome gameplay and at least one player who's gonna come back. For an MMO, it's a start. Just keep the developing up! Thanks a lot for taking your time and giving me feedback. I'm happy that you like the basic idea. :D
  15. Searching advise for enhancing my free game

    Quote:Original post by haegarr Not really enhancing fun, sorry, but you should consider to handle the character encoding for the PHP pages. I mean especially the Ladders page. Its a Good Thing to have online score lists, IMHO, but its not so good when the names are not displayed well because the browser don't know in what encoding the page is. (See e.g. "Lord Fremdkörper" on the Ladders page, and the copyright sign on the Disclaimer page.) Oh thanks! I wasn't aware of that problem. Even though I am in Germany right now, I have an English windows installed and the characters like ö etc. showed correctly for me. I never thought about how that's possible. I made the website utf-8 now :) I hope that fixes the issue for you. It's hard for me to verify because it looks the same as before to me.