BloodWarrior

Members
  • Content count

    155
  • Joined

  • Last visited

Community Reputation

164 Neutral

About BloodWarrior

  • Rank
    Member
  1. Canceling a Constructor [C++]

    Oh... yeah.. forgot c) c) make your constructors fail safe! IE: pre process any resources required for them before hand and pass them directly to the constructor... that way the constructor never fails and there isnt anything that can fail. But c) is just moving the internal code of the constructor outside and testing it before doing the creation... not really a solution.
  2. Canceling a Constructor [C++]

    Thats constructors for you. It allocates the memory and runs whatever code for intiialisation. returning null is impossible. What you usually do is: a) use the factory method (you used it on the second part) or b) throw an exception during the constructor. Use a three stage build for this: constructor intiialises the entire object but can fail and call terminate and then throw. destructor calls terminate. Terminate is called whenever you want to destroy the object (FROM the destructor! dont make this one public!). Its very important that you deallocate anythng you might allocate during the constructor before you throw yourself out of the constructor! If you dont you will end up with mem leaks. Does anyone else have a better process than this? I dont particularly fancy the try catch penalty that this requires but I never saw a better solution (other than factory methods). Yours Truly K
  3. Is this a good idea?

    [quote name='SteveDeFacto' timestamp='1309277751' post='4828726'] I honestly learn better on my own and I have personal projects I would prefer to spend that time on instead of sitting in class. Plus I am sure I will get a far better education at NCSU than I am getting now. I am more worried about the risk of not doing as well as I think I can. On my college placement test I scored 97-99% on every category but this test was not timed... It seems like I should be able to do this but I still feel like it's a big risk... [/quote] And there is your answer! Your instincts are warning you against leaving. Dont drop college, just keep side projects and keep learning extra skills. You can even make a couple of games and sell them (Angry birds anyone?). Use them as portfolio, showcase them to other companies, try to get sponsored/scholarship. But trust me when I say this: Being good at programming isnt enough. You need more skills that cannot be self taught. Being Able to Talk in Public Managing a Team Discussing project features and deadlines Handling a broken milestone (very important to be able to explain to the managers why you just missed a deadline) Those skills are extremelly useful and companies will rather hire people that can express themselves than nerds that cant communicate unless its via email or msn. And you will never learn those from a book or sitting by yourself. Yours Truly K
  4. Most satisfying game you've played and why

    Ultima VII RPG game with huge open world, economy, etc Also Star Wars Galaxies (before the combat upgrade and the total destruction of the game): Great sense of comunity, crafting, hanging out and doing missions with a group. Usually a game is only good if the player can relate to it (not necessarily with the pc but with the game). I played Crysis all the way to the end but at the end I felt like meh. Dead Space is also a great game but meh.... i finished it so what. On the other hand: Demon's Souls was incredible, there was a huge sense of achievement when you finally get that platinum trophy Ultima VII was just a huge mistery that needed to be solved and that made it excellent. I guess what Im going for is a game that I has a good storyline or a huge sense of accomplishment. Deux Ex and Chuckie Egg have nothing in common but both are incredibly good games.
  5. The new guy says Hello!

    Heyas Welcome to the never ending quest for a computer game! Remember: Procrastination will.... meh, ill remember the rest of this later Yours Truly K
  6. [list][*] hm...[*]Wouldnt an Event Listener model be far more easy to program, maintain and use... also faster no?[*]in pseudo code:[*]Player:[*]When Kill: fire killed event[*]When Move: fire move event[*]When whatever: fire whatever event[*]Message Display Listener:[*]KillEventListener: display first kill message then remove listener (we only care about first fill so dont bother listening anymore)[*]And since you are using events lots of stuff can listen to it[*]A log can keep track of how many kills, jumps, etc without affecting anything else in the code[*]A separate counter for the gui can display kills in the screen[*]A special system can log kills for x time to give you killing sprees, etc[*]Only problem is that you will have to design interfaces to listen to the events (and fire them) but again, that will save you on compile for as long as you dont modify the interfaces.[*]Yours Truly[*]K[/list](edited to add line breaks... by the way! how do you do this in this new formats?! weird!)
  7. 2d Movement

    for first question: 1- store current direction (headed up for example) 2- pressing left or right change direction (was up, pressed left now facing left. Press left again and now will be facing down) 3- pressing up or down move toward or backwards according to direction. Also dont forget to rotate the sprite when you change direction. Yours Truly K
  8. Game programmer Interview question

    wait a moment... I can easilly make up a simple algorithm that will eventually reach out but it will take forever... kinda like "abcdefg" -> a+b+c+d+e+f+g ? ab+c+d+e+f+g ? abc+d+e+f+g ? abcd+e+f+g ? abcde+f+g ?> too big then abcd+ef+g ? abcd+efg ? not big enough then ... but that is crap... there should be a better algorithm, no? maybe X / a > or <? X / ab > or <? no.. I cant figure it out... whats the answer on this one? Yours truly K
  9. [.net] .Net HTML rendering engine

    hm... This is a very very simple process of rendering html. Phase 1- Create a text parser that reads your html file (from src or from http) Phase 2- The parser must break down the html text file into a collection of objects So when you read <tag> text <tag2>text2</tag2></tag> you should be able to create object "tag" parent of object "text" and object "tag2" which is parent of "text2". Phase 3- Render objects into screen An object would be something like Type -> DIV Child of -> its parent Position -> absolute | relative | static -> translates into X,Y Size -> W,H Collection of children -> styles -> When rendering recursively through the screen you should be able to handle position and basic styles. Thats about the best I can come up with in short. Yours Truly K
  10. creating Maze simulator in C++

    Dont get this wrong but: Are you asking us to do your coursework? Yes its possible to do a maze like that and yes it shouldnt be very complicated (how complicated would depend on your specs). I suspect this answers your question but thats not exactly what you had in mind. Yours Truly K
  11. database on the client

    Wouldnt it depend on what exactly are you storing in this database? If it was something like localisation, images, and other minor details you could get a mini database like SQL Lite (see above post). If it was major things like user details, character skill levels, money, item details, then bad since they could easilly be hacked and modified to enhance this particular client. Note that while images could be hacked and changed since its only relevant for this client its not a major thing. Yours Truly K
  12. My IE7 is running it around 22 to 30 frames and if I press x it breaks (trying to set a background colour with an invalid parameter). Sorry I didnt want to look too deeply at your code so I didnt actually pay attention to the error. You should know that my IE at work is set for reporting all and any errors... its a headache but I also do quite a lot of webwork. All in all its quite good. Cant say that im not a little envious about never bothering to do something similar. Yours Truly K
  13. J2ME Modals

    Quote:Original post by trojanman With J2ME, in general, you want to avoid doing things in separate threads. What you probably want is something similar to this: *** Source Snippet Removed *** Obviously, this is just a pseudocode representation of what you might be looking for. (Note, you need to separate update & rendering [wink] ) You want to avoid any places where you are waiting for input. Additionally, in the J2ME event handlers (keyPressed, keyReleased, hideNotify/showNotify, etc.) you want to avoid doing lots of processing and other things that will potentially take a long time. What you should be doing is using those event handlers to set flags or call functions that trigger other behavior in your main loop. hm... yeah, I follow you in all of those but my problem is when I actually want to know now what the user wants to do: For example: a normal Are you sure? During the game loop I pool the keystates and discover that the user just chose an action. I then want to know if the user is sure before triggering the code. If I dont have a blocking modal (stops my current processing until it returns) then i will have to set a lot of flags and states so that after the modal returns I can correctly process it. Is that what most of you are doing? or are you using blocking modals? All my work experience is window based programs (not games) and there we tend to use a lot modals for these situations (basic window modal dialog). Those completly block all processing of our code until the modal returns (not counting drawing and processing of the modal itself of course). I could re implement something similar (and am planning to) but I would like more input on this. Anymore ideas? basically: blocking modal or saving state and then resuming it after modal done. Yours Truly K
  14. J2ME Modals

    Heyas I was checking some things and I realised that doing modal dialogs in J2ME is a bit trickier than I thought. for example Main Loop: while(true) {do game } During the game i want to ask the user a question so boolean bResponse = GetUserChoice; GetUserChoice would be something that draws a modal window and then asks the user to choose its option, basically a modal window. My problem is this: if I wait for user input I have to pause my main loop and trigger a second loop on a separate thread that will handle the drawing and management of my modal. Nothing else on the main loop will be working as its locked onto that point, waiting for that answer. I can write this no worries but I was wondering if there was a better way of handling this. Any thoughts? Yours Truly K
  15. [java] Same session for Java Client

    Heyas Ok so Ive been there and I know exactly what you are doing wrong: WebStart sucks! Dont get me wrong, it has its uses but its not for what you are doing. When you launch WebStart you remember you need to specify some parameters in the JNLP file? including a full http url for where your files are? This is because WebStart will actually launch a new javaw process which has nothing to do with the current IE process. Because you are in a different process you have no access to the server session (where you have logged in before starting your application). So... there you go. I solved my problem by using an applet instead of webstart. (Oracle does the same, launch an ie which has an 0x0 applet which launches a huge frame which can access the applet which can access the ie page which is logged to the server session). I might be wrong and there might be some way of making it work. If there is please let me know. (also feel free to browse the java forums for my posts about this problem, look for bwvictorious). Yours Truly K