2 questions about GE 1.4

Non-platform specific questions.

2 questions about GE 1.4

Postby DST » Tue Jul 06, 2010 6:53 am

Question 1: I'm getting an error using sprintf: " Eic sprintf created an empty string. "
This happens on other games i load, not just the one i'm working on, on actor variable strings (made with the variables tab). These same games work properly on version 1.3.9.

Question 2: how do you use the joystick axis function? the buttons make sense, but there's no documentation about the axis.


Thanks
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: 2 questions about GE 1.4

Postby Bee-Ant » Tue Jul 06, 2010 7:29 am

I use ubuntu 9.10

I got that message too...
The only way to avoid it is close the GE then reload the project from File history.
(oh Dee, I think we talk about the same project :P)

Thanks for fixing the copy-paste problem. But,the script generator (maybe) when we click Add on function isn't fixed yet.

Haven't found more bugs. I'll give report again later.
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: 2 questions about GE 1.4

Postby Hblade » Tue Jul 06, 2010 8:48 am

SOLVED THIS ISSUE :D (I think)

Open terminal - type -" sudo bash "- Then drag'n'drop gameEditor to terminal, and press enter :D THis should run GE as administrator which is important in the new GE for some reason :O
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: 2 questions about GE 1.4

Postby Bee-Ant » Tue Jul 06, 2010 3:19 pm

Still the same.
I can't run the drag and dropped GE into terminal.
So,I run GE through this way :
1. Go to GE directory
2. Right click->Open in terminal
3. Type: sudo bash
4. Type: ./gameEditorLinux
5. So far, I can run the GE
6. I went to Global code
7. Click Variable/function
8. Chose DestroyActor
9. Click Add
10. Autoclose
And here's the message screenshot after it autoclosed...
Attachments
Error.png
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: 2 questions about GE 1.4

Postby makslane » Tue Jul 06, 2010 3:44 pm

DST wrote:Question 1: I'm getting an error using sprintf: " Eic sprintf created an empty string. "
This happens on other games i load, not just the one i'm working on, on actor variable strings (made with the variables tab). These same games work properly on version 1.3.9.


I will see this issue

Question 2: how do you use the joystick axis function? the buttons make sense, but there's no documentation about the axis.


There no support for joystick (no event buttons). The joystick can be used to simulate the accelerometer:

http://game-editor.com/docs/script_refe ... elerometer
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: 2 questions about GE 1.4

Postby DST » Tue Jul 06, 2010 5:38 pm

makslane wrote:
There no support for joystick (no event buttons). The joystick can be used to simulate the accelerometer:

http://game-editor.com/docs/script_refe ... elerometer


By "no support" do you mean "WORKS GREAT!?" Here's sample script so everyone can get started using joysticks!!!!

Code: Select all
Vector v = getAccelerometer();
char j0= GetJoystick1Button(0);
char j1= GetJoystick1Button(1);
char j2= GetJoystick1Button(2);
char j3= GetJoystick1Button(3);

xvelocity = v.x*5; //where *5 is your desired speed
yvelocity = v.y*5;

if(j0){
yvelocity=-12;
             }
if(j1){
CreateActor("bullet", etc. etc      }


each button must be made into it's own char x=get line. Works fabulous on my controller, which is one of these:

41FQH0FSW2L.jpg

An inexpensive Tremon usb controller, but very durable.


In regards to my other question, I did what bee-ant suggested and simply restarted GE. The eic sprintf problem has not bothered me since. The new ge runs very fast, and is exceptionally stable on XP. 2 days now, and not a single crash on any game.

:D :D :D :D Muy Bueno!!!!!!
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: 2 questions about GE 1.4

Postby Hblade » Tue Jul 06, 2010 10:07 pm

The problem with PC controllers is, they all have different number positions
Mine is:
Code: Select all
    4
1      3
    2

Where the buttons are, while yours are different :O
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: 2 questions about GE 1.4

Postby Hblade » Tue Jul 06, 2010 10:53 pm

What about the analog buttons? The up down left right :o This is for the joysticks, but is there a way to enable the analog only :o
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: 2 questions about GE 1.4

Postby DST » Wed Jul 07, 2010 12:21 am

Hblade wrote:The problem with PC controllers is, they all have different number positions


You can easily make a key config for the player, in the start menu of your game. Dillodude posted an example of that years back on the forum, and i've used it in a couple of my games too.

Hblade wrote: is there a way to enable the analog only


Don't know, i don't like analog sticks anyway so i can't help you there.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: 2 questions about GE 1.4

Postby Hblade » Wed Jul 07, 2010 12:25 am

Sorry, I meant the Dpad, the vector method uses the analog sticks, which uh, with your method anyone iwth a joystick would be able to slowly move if they barely move the stick :o
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: 2 questions about GE 1.4

Postby makslane » Thu Jul 08, 2010 3:22 am

DST wrote:Question 1: I'm getting an error using sprintf: " Eic sprintf created an empty string. "
This happens on other games i load, not just the one i'm working on, on actor variable strings (made with the variables tab). These same games work properly on version 1.3.9


Fixed. Please, download again.
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: 2 questions about GE 1.4

Postby DST » Thu Jul 08, 2010 3:50 am

Hblade wrote:Sorry, I meant the Dpad, the vector method uses the analog sticks, which uh, with your method anyone iwth a joystick would be able to slowly move if they barely move the stick :o


Found an easy fix for that: To use the d-pad (also known as a pov hat) while preventing bumping the analog sticks and/or poor calibration leaving ghost control, you just have to get rid of low values:

Code: Select all
if(v.x>.3){
xvelocity=v.x*speed;
}


This is actually a good idea to do anyway, due to the way the accellerometer works - positive screen coords + 0 values tend to make the player want to move to 0, 0 on his own.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest