Jump to content
  • Advertisement

jeffkiwi

Member
  • Content Count

    52
  • Joined

  • Last visited

Community Reputation

210 Neutral

About jeffkiwi

  • Rank
    Member

Personal Information

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. So in each frame I record the current coordinates - if there's a collision it resets the x and y. This mean if you held "right" while holding "up" you could not slide "up" along the tile because of the way the resetting works. I changed the code so it updates the X and Y separately, but now I still have an issue where my character cannot slide along a texture if it is collides with the top or bottom of the texture (side collisions work okay and the character can "slide" up or down the side of a texture). Edit: I added 3 tags to this post but only c++ appears int keyInputX(SDL_Rect playerarea, Input input) { input.update(); int playerSpeed; playerSpeed = 4; if (input.keyDown(SDL_SCANCODE_RIGHT)) playerarea.x += playerSpeed; if (input.keyDown(SDL_SCANCODE_LEFT)) playerarea.x -= playerSpeed; return playerarea.x; } int keyInputY(SDL_Rect playerarea, Input input) { input.update(); int playerSpeed; playerSpeed = 4; if (input.keyDown(SDL_SCANCODE_UP)) playerarea.y -= playerSpeed; // key input if (input.keyDown(SDL_SCANCODE_DOWN)) playerarea.y += playerSpeed; return playerarea.y; } void CheckPlayerCollision(SDL_Rect & player, std::list<Tile> & TileList, SDL_Rect & oldLocation) { for (Tile& mytile : TileList) { // this is the collision code for the rock tiles if (player.x + 40 > mytile.location.x && player.x - 100 < mytile.location.x) { if (player.y + 100 > mytile.location.y && player.y - 76 < mytile.location.y) { // nest this for speed player.x = oldLocation.x; player.y = oldLocation.y; } } } } main loop below: originalLocation.x = area.x; originalLocation.y = area.y; area.x = keyInputX(area, input); // update player location X CheckPlayerCollision(area, TileList, originalLocation); area.y = keyInputY(area, input); // update player location Y CheckPlayerCollision(area, TileList, originalLocation);
  2. That might explain it then.
  3. On my profile it says 0 warnings but if I click it, then it says 1 warning point. Does this bug appear to moderators?
  4. I compiled this on my new laptop and it runs pretty well, except for the awful frame rate. I originally discovered 0 A.D. while searching for Linux-friendly RTS games. I hope to work on it soon or at least understand it better.   trac.wildfiregames.com/wiki/BuildInstructions   http://trac.wildfiregames.com/
  5. Oh yay I'm confirmed for the programming course next year!
  6. jeffkiwi

    Degree versus diploma

    I'm now in the process of applying for the diploma course. Even though I'm not enrolling for "web programming" it seems that everything is about web programming anyway. When the tutor mentioned the trend, I realised how true it was: look at Microsoft's outlook.com. If you right-click a folder it brings up a custom menu, instead of the generic "back / print / view page source" stuff. Outlook is an application running in a browser. I always wondered why PHP and Javascript seemed uninteresting to me, it's because you need a database to go with those languages, otherwise there's nothing to process. There's my new job idea: website backend programming. c++ / SDL games for Linux will be my weekend project, and I want to re-balance the Battle For Wesnoth campaigns, especially Descent Into Darkness, the missions of which are nearly impossible to beat! I'd also like to develop Fedora or at least do the packaging. I'll be busy next year.
  7. jeffkiwi

    Question about C++ game development

      Try to make applications (especially games) with SDL2. It's more fun.   http://www.libsdl.org/
  8. It works now, thanks. My image was actually larger than 50KB but that was good: I saw that the limit is 50kb not 0kb :)
  9. I try to upload the following:   http://jeff-mitchell.co.nz/images/she_cafe_public.jpg   And the uploader says that the maximum allowed size is 0kb? Is anyone else having this problem?
  10. jeffkiwi

    Degree versus diploma

      I forgot to mention publishers. I had a long debate at CNCNZ forum regarding EA Games and Command & Conquer. Apparently, EA Games doesn't have creativity or ingenuity, except when it comes to marketing and finance. I'm told that EA won't make another C&C because RTS games are considered "high risk" investments, yet Petroglyph made a new RTS, albeit on a small budget. If it weren't for a small handful of people who think for themselves, then the games industry would become meaningless and have no guidance. It has got near that point already. I owned a PS4 for about 18 months and only had maybe 6 games before I became bored and sold the console.
  11. jeffkiwi

    Degree versus diploma

    Thanks Promit, I hadn't heard of an associate's degree before. When I made this thread I was thinking: "whaaaaaat, you don't have a diploma course in the US". Ha-ha. Anyways, some of the local game developers have no C.S. degree. One of them was working in the pharmacy business, and somehow turned to game development. These guys make $30,000 NZD a year which is probably about $20,000 - $25,000 USD a year, LOL! I'm not that interested in writing reports at this stage in my life, so I'll do the diploma and learn everything I can on the side (PHP and CMS too). Without a degree I think you can network with good folks and improvise a career. I met a scruffy, short, cigarette-smoking Linux fan once. He started on helpdesk and made friends there, then made his own software development company - he had no qualifications, he had trustworthiness.   While getting a degree may generally be the best approach, I'm going to avoid it for a heap of personal reasons. I know a national socialist in Australia who has 2 degrees but because of the jobs he wants, he has to self-censor and he can't even write letters to the editor without risking his "reputation" ... and I'm talking about any old letter to the editor, not necessarily one about his favourite ideology. I'm strongly opposed to this "corporate" nonsense. If it means being shallow, having no spare time and having no free speech then I'll go my own way. I went to an open-source meeting 1-2 months ago, and heard brilliant insights from the organiser. I get all of my inspiration from independent companies.
  12. I've likely got the wrong idea in my head - I thought that scopes were handled differently (while versus for). A for-loop has its own scope/namespace, like a virtual container within the program, the same thing with functions. I thought while loops were different, because I can declare something immediately prior to the while loop, and access that data from within the while loop without needing to pass a value or reference.
  13. Some folks here say that whether or not you "need" a degree depends on what country you live in. I'm 26 years old, and I live in New Zealand. universities here are all the same, there's no such thing as one university that's better than another.   I'm settled on doing a software diploma for 1-2 years. Universities are "overkill" in my opinion, and I'm disgusted at their marketing tactics toward high school leavers: everything is about having friends/status/ego and "chasing the party". I dislike many of the university students that I've met, I perceive them to be brainwashed with conventional nonsense; or the other extreme, they think they can change the world. I've been to local gamedev meetups here in Christchurch and the guys there are great - completely the opposite of university graduates. I was telling guys at the local gamedev group that I intend to do a diploma. One of them questioned my objective. I said that I want the piece of paper (the qualification), but I want to make games on the weekend. The guy blurts out: "don't waste your time, New Zealand's education system is 4 years behind, and you'll most likely end up working on things like Barbie Seahorse Adventures and Air New Zealand complaint forms - you should just make the next Call Of Duty from your basement and break into the games industry that way"     :lol:   From what I can tell there's nothing wrong with doing a diploma in software engineering, so long as you aren't forced to do Microsoft Office. If you have to learn office for the first 4 weeks, don't do the course! The benefit of a degree seems to be maths knowledge and advanced concepts. I'm confident that I can learn advanced stuff from a book. Anyway, as mentioned I'm already going to do a diploma. I just wanted to offer my 2 cents and have a little discussion about this topic. What countries do you think are friendly toward candidates who have diplomas, not a degree? Are there cultural reasons for this or is it a case of shallow employers, who essentially hire people based on data?
  14. I found some resources which appear to show exactly what I was after:   http://gameprogrammingpatterns.com/design-patterns-revisited.html   Above: singleton pattern explained in the context of games; and finally ...   ... http://www.gamefromscratch.com/page/Game-From-Scratch-CPP-Edition-Part-5.aspx   Above, using GameObjectManager to manage objects by avoiding a for ranged loop, instead using while ... from within the GameObjectManager member function.    
  15. I think that explains it: have a master class which allows any derived class to be accessed from anywhere in the program.   In my programs I have only ever included .h files, never .cpp ... so this sounds like an esoteric concept to me. I'll look into it.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!