   New Age Of Empires Engine
  hello people....I got a gr8 idea...The Plan:i am a big fan of  Age of Conquerors(surely u played it...very pop.!!)....and i am jus getting started with 2d sdl/openGL game prog. So i have begun wurkin on a new 2d engine that does everyting the original Genie engine does and more. The engine has its limitations and i intend to work arnd them...by replacing it!!  Copyright Issues: i intend to use the same art and dodge copyright issues by supplying only the engine as a exe file and not the whole game(intend to give credit to the makers of course).....so people hav 2 buy the game to use my engine(DAMN THOSE LAWYERS!!).The engine will be fully xtensible...new units effects and stuff.this is Open Source Software....i do not intend to make money outta it and intend to make the code avail. of course.My engine smoothly replaces the original exe(or could be a different file...watever)in the same folder and does xactly wat the Genie does.progress so far....the game's res.(sprites,sound,AI scripts,maps,UI elements) are in .drs res. files and i have cracked them open to display all the art successfully...so i can concen. on the engine now....here is where i need lottsa help....Help needed:(I use SDL and OpenGL , standard C library & STL where reqd.)1.The game's graphics(sprites and pictures,UI element textures)are stored in SLP files.These files encapsulate information abt the frames and also the outline of units and buildings where reqd.(outlines r used when units are hidden behind buildings).My question is do i use the SLP format inside the game during rendering frames or do i use png or some other format and clip from the png to the screen.(then outline info has to be stored some where else).Using png  does not  seem to make sense because the compression is lost when the picture is loaded into memory...and SLP format compresses somewat the entire sprite and it remains this way during the game.This means i cant use SDL blitting color keys etc if i directly render SLP(i have a C++ class for this).So what do i use SLP(saves memory) directly or png(memory hog given the huge no. of resources)2.I am hoping to keep the rendering engine in a separate thread from main game loop(which updates the player data).The game engine(loop) and rendering engine share a map which is updated by the game engine and displayed on screen by renderer..As they r on separate threads there could be some synchronisation loss in display....is it wise to have this.3.I also intend to keep the strategy logic(like shortest path calculation,game decisions) in a separate strategy engine THREAD. During game play if a player requests for a decision to the engine ....the game loop need not stop..the data of other players r updated and we proceed to next turn.when the strategy engine returns the decision(after time consuming complex calculations) the player which requested the service from the strategy engine is updated as the decision is now available. So the strategy engine is a sort of server advt its services.Yet it never blocks the main game courtesy of the separate thread!!....so how wise this?The above 2 is planned keeping multi core CPUs in mind which are already taking off4.The rendering engine proceeds co-ordinate wise from top 2 bottom,left 2 right printing each tile of the map. However this creates a problemin detecting hidden parts of units(covered by buildings,walls) that are hidden due to objects printed on screen AFTER the unit..These parts of the unit are not visible but an outline has to be drawn(only at the overlapping regions) to show its presence.So how do i go about detecting intersection among pictures and printing outlines efficiently without having to compare every picture with every other in the map using some nested for loop(too slow!!).5.How do these games handle audio....haven't got down to sound yet but some help will b gudSo if anybody is interested in joining in or lending me a hand plz lemme know....the project is very very interesting esp when we get down to strategy aspects...and i took it up basically because it helps in education and cause i needed to start a notch above plane arcade games given rapidly advancing gaming technology today...gr8 for beginners....   
  It seems to me that your going to work on a project that has no real practical use. Why not spend the time making your own RTS game? Surely that would be much more rewarding!In regards your questions, from what you have said, it appears that PNG won't do simply becuase it will make the game too slow. It also sounds like you can't directly render SLP becuase then you can't make the units transparent. Perhaps you should consider doing a different option, perhaps you could uncompress the SLP when you need it somehow?I think seperate threads is a good idea becuase otherwise the game logic has to wait for the drawing code to finish...There are many sound libs for sound such as OpenAL, Audiere, and Bass just to name a few. It sounds like this project may be beyond your current skill level. I advise that you start smaller and then perhaps in time you could work on this project or your very own RTS game! But be warned, they are lots and lots of work.   ;Quote:It seems to me that your going to work on a project that has no real practical use. Why not spend the time making your own RTS game? Surely that would be much more rewarding!Age of Empires 2 is one of the greatest RTS' of all time. I would love to see the exact same game with a redone graphics engine, and wouldn't call it unpractical or a waste of time.I look forward to seeing your results spriteguru.   ;  i agree, just be very careful with the whole copyright infringement thing.   ;Quote:Original post by spriteguruSo if anybody is interested in joining in or lending me a hand plz lemme know....If you're planning on looking for others to team up with at some point, you may want to keep in mind that people do care about your spelling and grammar - they'll give you some leeway as someone who may not speak English as a first language, but you've got a lot of things that are just lazy or are 'chat' speak in your post - as Help Wanted moderator I see countless people not get help regardless of the quality of thier project because they don't present themselves well.  Apologies if you didn't in fact know the correct/proper spellings, I'm not aware of your level of mastery of the english language, but what I've said still applies if you at some point decide to look for help.Quote:gr8 greati Iu youwurkin workingarnd around2 tooutta out ofxtensible extensiblewat whatabt aboutr areplz please...and so on and so forth, I think I've illustrated the point.  Also capitalise the beginning letter of each sentence, and try to cut down on the random mid-setence abbreviation; programmers are anal, and you'll generally get a better response from them if you present yourself as well as possible.Anyways... your questions...1.  If you can figure out how to render the SLP format correctly, go with it.  There's not much point adding in another stage of reencoding to PNG and then using that.  You'll need to actually figure out the format though; if you can't render it with transparency that tells me you don't understand it fully.  Figure out how it has it's transparency information stored, and modify those classes you mentioned as neccesary.  If you're unable to do so, then you'll have to go with a different format.  Note that if you can encode them to transparent PNGs you're obviously finding the transparency information somewhere during the process. [wink]2.  How low can you keep the level of discrepancy?  If it's noticable it probably isn't a particularly good idea, but if it only produces the occasional minor glitch you should be able to get away with it just fine.  If you're using your time-based rendering properly you shouldn't really have much of an issue with it unless things really start to lag or unless you're doing something wrong.3.  Why?  What advantages is this going to present?  What will happen in the meantime until the decision is made?  How many decisions can be requested at once?  Are decisions prioritised somehow?  How will you deal with the fact that paths may have to be recalculated on a frame-by-frame basis to navigate around moving objects?  There are certainly good reasons for doing it the way you've described, but you'll have to decide if they're actually worth while for you, and exactly how you're planning to handle it.4.  I don't know enough about the particular rendering functions and how the data is stored to really make suggestions.5.  Looking into OpenAL or FMod would probably be a good place to start.Hope that's of some help.   ;  Thanks for all the support and help peopleSorry about the English Kazgoroth...have been working on it & hope you see the improvement now :)1.Now about the Copyright IssueAs i said i intend to supply the engine only.Ensemble produced a great game and it would be unfair to hack their resources. But if only the engine exe & some XML files for settings are given away for free,but NOT the DATA files then it will only help sales of the game...so working on the older game concept will be mutually beneficial.Anyway i intend to get in touch with somebody there when the engine nears completion...of course thats pretty far away yet.2.An isometric map rendering problemWell i am successfuly rendering the SLP now along with transparency & everything, also got the sprite hotspots figured out.But a major problem is rendering an isometric map.I  read up the introductory article by Jim Adams on Isometric views but still can't quite figure out how to render the map on the screen.The basic problem is regarding calculating the top-left tile.the entire map is a huge diamond fitting perfectly inside a square.Inside the diamond  are the isometric tiles.Now a rectangle somewhere inside this area represents the visible portion so the rectangle is the 'camera'. How do i pin-point the exact tile to be rendered from my map from the top-left of the rectangular camera? Also how is the camera scrolled across the map by moving 1 horizontal unit=w/2 & 1 vertical unit=h/2 where w=width of tile & h=height of tile ?But then the top-left of the camera ends up in the middle of tiles at every alternate moveSo if anybody can help with a relatively easy way to display & move (in both directions) across the map i ll be glad.The conversion from tile co-ordinates to screen co-ordinates is escaping me.I understand all the remaining stuff about isometrics of course...the angle of 45 degrees and representing height on a tile by reducing Y etc.3. About the rendering sub-system & game-logic in separate threads....i was planning to do it based on an Intel article on multi-core processors. But as i want the game to run on minimal platforms as well & i dont want it spend time context switching i guess its probably better to go for a single threaded engine initially as the game itself...but i wonder if anybody has done some experiments on this and seen the effect of context switching time on gameplay...like how many threads is it possible to have max in  modern games?4.Staying away from sound at the moment till i get the map going :)Oh by the way is Jimmy Adams still around & is it possible to get in touch with him about the article(June 96)?? The E-mail ID is probably dead by now   ;Jim Adams.  Hasn't been active in quite some time though, so I don't know how much luck you're likely to have contacting him.   