Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


SimonForsman

Member Since 18 Oct 2005
Online Last Active Today, 06:15 PM

#5194799 SDL Pausing game help?

Posted by SimonForsman on 26 November 2014 - 12:03 PM

I know this might sound stupid but what is the best way to go about pausing my game by pressing esc. I need it to pause everything then resume once i repress that key. Many thanks!

 

set paused = true when esc is pressed, don't update your game state if paused is true.




#5192891 How to repost coldfusion post variables in a 3rd page

Posted by SimonForsman on 14 November 2014 - 02:39 PM

if cold fusion supports sessions you can use that to store data, if not you can always have a form with hidden fields containing all the data on page2.




#5190878 Vertically scrolling underwater game, what to use as background?

Posted by SimonForsman on 03 November 2014 - 04:59 AM

 

I'm working on an endless-runner-game type game where the player has to catch coins and avoid bombs. It's underwater in the ocean and the scrolling direction is downward. The player moves towards the ocean floor, except it's like an endless pit and he will never actually reach the ocean floor.
 
The problem is that I don't know what to display as a background, because in open water there are no plants or rocks. wacko.png With a horizontally scrolling game this is easier because you can show plants or the floor moving. The enemies slowly move upward ofcourse, but I don't think that's enough to convey the downward scrolling motion...
 
Any tips or ideas will be much appreciated. Or does anyone know any underwater vertically games like this that I can take a look at?

 

 

I would put things like fish, cliffs, etc in background.




#5181344 Can you explain to me this code !

Posted by SimonForsman on 18 September 2014 - 01:26 PM

it will run & i know it is simple but why when i type 55
the result:
Man, learn to type a number. Good job! (why i get this result )
why i the result not  dead("You greedy bastard!")
Sorry Lysy but when i type the numbers i get many questions

if "0" in choice or "1" in choice:
    how_much = int(choice)
else:
    dead("Man, learn to type a number.")
the first line in that part checks if the text you've entered contains "0" or "1" , if it does it will try to convert the text to a number and assign it to the how_much variable , it the text doesn't contain 0 or 1 it will run the dead function with "Man, learn to type a number." as its parameter.

"55" doesn't contain 0 or 1 so it will run the dead function which prints the parameter "Man, learn to type a number." followed by "Good job!" and then it exits.


#5179020 C++ starter

Posted by SimonForsman on 09 September 2014 - 12:23 AM

i have 1 very big question to ask. ok i am only 15 and been so into programming since i was 12 and i know this is what i love. but i am not a very good at teaching my self through books or video but i have tryed so hard and  i have learned so much but it never seems like i know enough. like i am always going to be a beginner. so should i just give up and wait till i go to college for game dev and learn there or keep going on like a snail and learning really slowly and feeling like i know nothing all the time?


I've been programming for 20 years now, i still learn new things almost every day and there is a metric crapton of stuff that i still don't know.

Keep your projects small and try to add a few challenges to each project you make, if you havn't made any graphical games yet i'd recommend starting by making a pong clone (it covers the basics without complicating things).

You may allready know enough to solve some problems and you will never know enough to solve all problems, as long as you keep moving forward you will eventually get to a point where you know enough for someone to pay you to write code (and when it comes to learning nothing beats working 40+ hours / week with other professionals)


#5178163 GDI+ support on linux

Posted by SimonForsman on 04 September 2014 - 03:41 PM

As far as I know GDI+ is a Windows-only API, anyway I've read around that one might write his code in GDI+ and be able to port it to linux with something like this:
 
Is this true? Does anyone have experience of GDI+ applications that can also run on linux?


https://www.winehq.org/docs/winelib-guide/winelib-introduction

Yes it is sort of true, if your windows binary will run with wine then your windows source code will most likely compile using winelib aswell (Making porting quite a bit easier)


#5177118 unity monthly subscription question?

Posted by SimonForsman on 30 August 2014 - 03:45 PM

I have really not looked at Unity much, but the questions that come to my mind are:

  • Can the free version be used for commercial purposes?
  • If not 1., can existing unreleased closed source code be legally transferred to the commercial pro-version later?
  • Is there a free version for Android and iOS?
  • How much effort is needed to port between platforms? I know the "native" platform languages and API's are different, but I understand Unity abstracts all of that nearly entirely.
  • Assuming 4. is somewhat less than "you really need to be working on all platforms from the very begining", why can you not just develop on Windows on the Free or Pro version until pretty late in development (you have a mobile like OS in Windows 8 if you need that), then get the extra mobile licenses later?
  • can you not pick either iOS or Android, and only if you have a successful project consider porting to the other?
  • If either 1. or 2., is there actually any feature in the Pro version you really need thats worth that investment?
  • If 7. and 3., why would you ever need to get the pro version?
It certainly seems to me like you should be able to proceed by paying nothing now, later maybe getting just the core pro version, sometime later getting one mobile addon, and only getting the second mobile addon after you start having some income.


1) Yes you can use it commercially, there is however a limit on your annual turnover (If you had a turnover above $100k the previous fiscal year you're not allowed to use the free version)

2) Yes you can transfer your code and work to the pro version whenever you want.

3) Yes, Android, iOS and Windows phone support is included in the free version

4) It depends, for a simple game there is not much effort at all required (As unity takes care of it and it is unlikely that you'll run into hardware limitations), If you need to use platform specific functionality or adapt your user interface / controls / etc to the platform there will be a bit of work required though and for more advanced mobile projects you will have to test things properly on a wide variety of hardware.

5) You could do that, Windows phone(and blackberry) support is included in the normal free and pro licenses (iOS and Android is only included in the free version, they cost extra in the pro version), you won't be able to test your game on iOS and Android without buying the extra licenses though so if you plan on releasing on both iOS and Android you will save time(and thus money if you are paying professionals to work for you) by getting both licenses from the start.

6) That is an option.

7) There are a whole bunch of features such as dynamic soft shadows, hdr, 3d textures, render-to-texture(required for a huge number of advanced shader effects), IK-rigs and productivity boosting functionality (scriptable asset pipeline, profiling tools, etc) that are cut out from the free version, so if you: A) need some of the cut features to make your game or B) value your own or your employees productivity (Which you would do if you're a professional as time = money) then you should get pro licenses.

8) Even if you don't need or want any of the pro-only features the free version can't be used by any business which had a annual turnover of more than $100k the previous fiscal year (Which basically means that it can only be used by start-ups, hobbyists and some really small and not very profitable companies).


#5176738 Include file not found in GCC, due to path size?

Posted by SimonForsman on 28 August 2014 - 01:42 PM

You should probably use *nix style paths instead for a cross platform title (/ instead of \)


#5176597 C/C++ tilt sensor for Android/iOS

Posted by SimonForsman on 28 August 2014 - 12:06 AM

Qt has recently added support for mobile platforms, and has a C++ sensor API.
 
If you aren't already using Qt, you almost certainly don't want to include the giant collection of libraries that is Qt, but luckily, Qt is opensource under LGPL and GPL, so you could look to see how they do it, separate out their sensor code, wrap it in its own separate LGPL'd library, and then use that - dynamically linking to it, so the rest of your closed-source commercial product isn't hampered by the licensing.
 
Or you could just examine it, to see what API function calls they use, and then write your own wrapper (or better yet, submit a patch for SDL so others can benefit) by reading the API documentation.


The LGPL is incompatible with Apples TOS (for the app store) and dynamic linking isn't much of an option on iOS(it is possible but apps using dynamic linking will be rejected by Apple). so using LGPL code in mobile cross platform applications is a pretty bad idea unless you intend to only support jailbroken iOS devices.


#5175787 MMO Gap issue

Posted by SimonForsman on 24 August 2014 - 06:57 AM

My recommendations.

1) Make old content easier or less time consuming as you add new content to the game.
2) Non linear progression, if a player can get to a competetive level reasonably quickly it won't matter all that much if veterans have a slight advantage.


#5174151 Dendy games copyright

Posted by SimonForsman on 16 August 2014 - 03:49 PM

Okay. What if a make a game in pixel-style with a dog, ducks and 8-bit music and add some gameplay features? Is it good?


Starting with the goal of making a game as similar to <insert famous game title here> as legally possible is a pretty bad idea unless you are prepared to defend yourself in court (Nintendo can sue you if they think you've gotten too close to their property, if you can't afford to defend yourself it won't even matter if they are right or wrong)

You are really asking how close to a fire you can stand without getting burned but noone here knows how big and hot that fire is and thus the recommendation is simply: Don't play with fire.


#5173257 Is it possible that I just simply lack the required intelligence?

Posted by SimonForsman on 12 August 2014 - 08:39 PM

I've been trying to use JMonkey Engine 3.0 to develop a simple tower defense game. I am only using cubes, and you select on a tower and press c to give it ammo. The bullets are just simple lines. There are so many problems in my code. I've been studying a java for about 8 months, and I am starting to feel discouraged. I'm actually following an exercise from my book, and I am confused as heck. The reason why I say that is because I can't seem to figure out how to debug my code. There's stupid stuff like when the cube-shaped enemy reaches the base, and it's z position is less than zero it will disappear, but it doesn't. I've been stuck on this for days.
 
Could I get any friendly and honest advice? Thanks biggrin.png


First of all, no you do not lack the required intelligence, 8 months is no time at all when it comes to programming and there really is no such thing as a "simple tower defense game" (Its not normally the type of game we would recommend for beginners due to the complexity involved).

I would recommend getting familiar with whatever debugger your IDE includes (here is a guide for eclipse: http://www.vogella.com/tutorials/EclipseDebugging/article.html ).

If you still struggle you could post the relevant code here and ask for more specific advice.

I believe pretty much everything is screwed up. Should I just post all of my written code? And thanks for making me feel better biggrin.png


Its probably best if you only post the classes / methods that you are having trouble with as more people will be able/willing to help if they don't have to read through massive amounts of code first, (You could put a zip with your full code on some online filehost and link to it aswell though if you want people to be able to help you debug things)


#5173253 Is it possible that I just simply lack the required intelligence?

Posted by SimonForsman on 12 August 2014 - 08:22 PM

I've been trying to use JMonkey Engine 3.0 to develop a simple tower defense game. I am only using cubes, and you select on a tower and press c to give it ammo. The bullets are just simple lines. There are so many problems in my code. I've been studying a java for about 8 months, and I am starting to feel discouraged. I'm actually following an exercise from my book, and I am confused as heck. The reason why I say that is because I can't seem to figure out how to debug my code. There's stupid stuff like when the cube-shaped enemy reaches the base, and it's z position is less than zero it will disappear, but it doesn't. I've been stuck on this for days.
 
Could I get any friendly and honest advice? Thanks biggrin.png


First of all, no you do not lack the required intelligence, 8 months is no time at all when it comes to programming and there really is no such thing as a "simple tower defense game" (Its not normally the type of game we would recommend for beginners due to the complexity involved).

I would recommend getting familiar with whatever debugger your IDE includes (here is a guide for eclipse: http://www.vogella.com/tutorials/EclipseDebugging/article.html ).

If you still struggle you could post the relevant code here and ask for more specific advice.


#5172109 Java and JOGL for serious Game development?

Posted by SimonForsman on 07 August 2014 - 01:53 PM

Ok, so I'm running OpenGL 3.0, one of the first things I do in code is check my GL version number to make sure it is compatible through GLEW:

	if(!GLEW_VERSION_2_1)
	{
		cerr << "OpenGL version 2.1 or higher required" << endl;
		return false;
	}
When I compile my shaders I get the error:
 
error: 'in' qualifier in declaration of 'position' only valid for function parameters in GLSL 1.10.
 
> in vec3 position;
 
Even though the GLSL version should be at least 1.20.8 according to this: (for OpenGL 2.1)
 
http://en.wikipedia.org/wiki/OpenGL_Shading_Language#Versions
 
This is what is causing my headaches, I'm not sure if this is an error on my part or an error with GLEW.


It is most likely an error on your part, the in qualifier is only valid in the global scope (with some restrictions) and in function parameters, i would guess that the error is caused by you using the in qualifier in a local scope. (Allthough its just a guess, i havn't seen your code so ...)


#5172077 php problem,how to make download button not show on word document

Posted by SimonForsman on 07 August 2014 - 11:45 AM

I have a php website, that when you click download as ms word, it downloads the page as a ms word document, the only proplem I have is that the button is showing in the word document, how can I make it not show on the word document.
 
the php code to make the word document when I click download is
 
if(isset($_POST['submit_docs']))
 {
 header("Content-type: application/vnd.ms-word");  
header("Content-Disposition: attachment;Filename=word.doc");  
  }
 
the html code is
 
<input type='submit' class='no-print'  value= 'Download as MS word' name= 'submit_docs' >


First of all. You are not downloading a word document, you are giving a html document a .doc extension and changing the content-type header to trick the clients browser into downloading(or open with a document plugin) instead of displaying the document normally. (This is incredibly bad practice, there is no guarantee that future versions of MS-Word or competing wordprocessors will read those files correctly).

You should grab PHPDocX(The community version is free): http://phpdocx.com
or PHPWord : phpword.codeplex.com
to generate properly formed word documents instead.

If you absolutely insist on sending .html files to the user with an incorrect file extension http headers to trick the clients OS and/or browser into launching a potentially incompatible program/plugin to open it you can set a variable after you've set the headers: i.e $skip_buttons = true; and then just do a check before the markup for the button:

<?php if(!$skip_buttons): ?>
<input ..../>
<?php endif; ?>




PARTNERS