Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - intygamer

Pages: 1 2 3 4 5 6 »
1
Off-Topic / Re: Remake classic games.
« on: July 16, 2014, 08:34:50 PM »
Thanks everybody for all the info.  There are so many clones out there that I didn't think there would be a problem.  I will listen to your advise and be safe and keep my clone games to myself.  Yes clone a game makes it easier to learn and be inspired by game you grew up with.  Me and my son will enjoy those.  Thanks Darkstar2 for all the law links, I will keep for future reference.  Also I had alot of c-64 games I use to play.  I may have played shamus once.   Remember Zork, Star Control, Lode Runner.

I did plan on making some new tux games, but not cloning any.  I may start with Tuxroids or something.  lol

Thanks
Joe

2
Off-Topic / Remake classic games.
« on: July 13, 2014, 03:52:56 PM »
I have remade the Intellivision Astrosmash game from 1978 in Enigma and would like to post it in works in progress category on the forum, making it open source.  I have copied images and sound from the original game and made game play the same as original.  I would like to give credit to original authors of the game.

Would this create a copywrite issue?  If so could I just create my own graphics and sound that is simular?

I thought I would ask here since Enigima is a clone of GameMaker.

Thanks
Joe



3
I attached gm81 format file with the problem to help you fix other formats.

Thanks
Joe

4
Issues Help Desk / Re: Sound Errors Ubuntu
« on: June 29, 2014, 09:23:55 AM »
I tried this in egm format and saved it, still have the sound error.  I thought I'd try it cause it helped with fonts.

Thanks
Joe


5
It works correctly with egm format.   :)  I was using gm81, which I had the problem.

Thanks
Joe

6
After creating a font resource in my game works fine until after I restart lgm/enigma and will not display after compile.  I remedy this by deleting the resourse and recreating it, then it will display again.

I just updated LGM and Enigma.

Not a big deal, just letting you know.

Code: [Select]
2 Adding Fonts to Game Module:
Iterating included fonts...
Allocated some font stuff
Copied metrics
Sorted out some font stuff
Expanded to 128 by 64
Finished packing font stuff.
Allocated a big texture. Moving font into it...
Wrote all data for font 0
Iterating included fonts...
Allocated some font stuff
Copied metrics
Sorted out some font stuff
Finished packing font stuff.
Allocated a big texture. Moving font into it...
Wrote all data for font 1
Done writing fonts.
0 Adding Paths to Game Module:
Done writing paths.
Closing game module and running if requested.
Running "/tmp/egm8357475240988808627.tmp"


*********** EXECUTE
  `/tmp/egm8357475240988808627.tmp`


Thanks
Joe

7
Issues Help Desk / Sound Errors Ubuntu
« on: June 28, 2014, 08:06:06 PM »
I keep getting sound errors loading sounds I created from Audicity.  I made a 2 second gun fire sound in wav format.  This sound will play on the desktop.  I have updated LGM and Enigma.

Are there certain perameters I have to follow to get it to work in enigma?

Code: [Select]
Operating System: Linux
Version: 3.2.0-64-generic-pae
Architecture: i386

Java Vendor: Oracle Corporation
Version: 1.7.0_55

Available processors (cores): 1
Free memory (bytes): 19882592
Maximum memory (bytes): 379125760
Total memory available to JVM (bytes): 49377280

File system root: /
Total space (bytes): 56604643328
Free space (bytes): 39826960384
Usable space (bytes): 36951556096

Stack trace:
java.lang.IllegalStateException: Line not open
at org.classpath.icedtea.pulseaudio.PulseAudioClip.stop(PulseAudioClip.java:543)
at org.lateralgm.subframes.SoundFrame.cleanup(SoundFrame.java:789)
at org.lateralgm.subframes.SoundFrame.actionPerformed(SoundFrame.java:548)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3311)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)


Thanks
Joe

8
The bug is that you need to define the same variables in unit's create event as well. Like add these to obj_unit create:
Code: [Select]
team = -1;
max_moves = -1;
ap = -1;
hp = -1;
I declared the variables like you said and now the userdefined variables work.   (Y)

Thank you very much!  :)
And thanks to everyone that helped.
Joe

9
TheExDeus,
Not sure if file attachment works, can't see it when not logged in, so I added a link.  Let me know if you need it in different format.  This is the example you requested.

http://www.mediafire.com/download/fqryepq1knpmjwa/SwitchInstanceUserVariables.gm81

Thanks
Joe

10
Quote
if I have to access it outside the object that created it I would add prefix object_name.instance_id.variable?
You never add object_name. Instance_id is unique to each instance no matter what object they are. So instance_id.variable will work. object_name usually returns the oldest existing instance, so object_name.instance_id.variable would be like id.someotherid.variable, which is pretty much undefined.

Can you maybe post an example? I just tried adding instances to lists and changing them and it works fine for me.
Try this: https://www.dropbox.com/s/oaiuuppj2htmvnw/unit_test.gmk

obj_unit.un.x I only used this in draw event for obj_text before the modification I made in the attached file.  It would only show 0's for defined variable with un.x.  Prefixing un with the object_name fixed that.  Objects are not global.

I tried to modify old code to make it work with out object_name.id.variable.
Code: [Select]
with (ds_list_find_value(t0_list,obj_unit.up))
{
draw_text(10,50,x);
draw_text(10,70,y);
draw_text(10,90,image_blend);
draw_text(10,110,team);
draw_text(10,130,max_moves);
draw_text(10,150,ap);
draw_text(10,170,hp);
}

Thanks TheExDeus for that example.  I have attach an example for you.  I have modified it using controller object to create instances of obj_unit, like you have in your example.  Now I can see the userdefined values of the last instance with draw event instead of zero.  I still have the same problem, that only value for max_moves is coming from last instance created.

I the example arrow keys move units, pageup and pagedown key cycle threw units, and space bar resets moves back to zero.

Thanks
Joe
   

11
That's what the local keyword does. It moves your declaration into the class scope. From the behavior you describe with the keyword in place, I'd say the code is working as intended, and the problem is more likely to lie in the code that works with those variables locally.
Here's some questions to help me get my facts straight.  Sorry not figuring this out.

Question 1:  When creating an instance un = instance_create(200,100,obj_unit);and assigning values to built-in variables and user defined variables using id un.max_moves = 1;. These should be stored in the objects instance id and accessable to the object that created it.  if I have to access it outside the object that created it I would add prefix object_name.instance_id.variable?

Question 2:  The only thing ds_list is storing are the id's for all the instances and the list is global?

Question 3: The id numbers are globally accessable, but if your not coding inside the object that created it, you need to use the oject name prefix in front of dot id?

In Step Event:
Code: [Select]
if(sc = true)
{
with (obj_unit) {image_index = 0;}
un = ds_list_find_value(t0_list,up);        //variable up changes to switch to different instance id
un.image_index = 1;
sc = false;
}
In the step event the id is called from ds_list and put into "un" variable which is used in key events without calling ds_list in those events.
I believe this works because un.image_index changes and un.x and un.y values change correctly in the key events.

un.max_moves  Which is user defined only holds the value of the last instance created no matter what i assign the other ones, it will only use the value of the last instance created.

I created obj_text to see what variables are doing.
Code: [Select]
draw_set_font(font_arial);
draw_set_color(c_black);

draw_text(10,50,obj_unit.un.x);
draw_text(10,70,obj_unit.un.y);
draw_text(10,90,obj_unit.un.image_blend);
draw_text(10,110,obj_unit.un.team);
draw_text(10,130,obj_unit.un.max_moves);
draw_text(10,150,obj_unit.un.ap);
draw_text(10,170,obj_unit.un.hp);

Watching text display when switching to different id's,  the predefined variables change between instance id's x,y,image_blend like they are suppose to.  The 4 user defined variables remain at 0 when switching id's team, max_moves, ap, hp.

It seems like I have to do something special for the user defined variables?

I appreicate all your help!

Thanks
Joe




12
If that is still giving you trouble, chances are, you aren't using those variables in obj_unit and they're being optimized out. You can argue the behavior is incorrect, but the alternative is disastrous. You can work around it by either referencing them in that object, or declaring them in it with local var team, max_moves, ap, hp;.

Polygone wrote something to work around that, but things tend to get broken, around here.

I tryed local var team, max_moves, ap, hp;, the only thing it did was make the instances move 10 grid spaces instead of 1 per move.  All instances still made same amount of moves as the last instance created.

I only have 1 object in this game (obj_unit).  I don't see how they could be optimized out.

Is it possible to make a predefined variable like image_speed or image_index?

Thanks
Joe
 

13
times-killer-games, I could not get your method to work either.

I put
Code: [Select]
var team, max_moves, ap, hp; In the creation event, then tried putting it in Game Start Event at the top.

Then I tried.
Code: [Select]
unit = instance_create(200,100,obj_unit); //Creates Unit at given position
var team, max_moves, ap, hp;
unit.team = 0; //Team variable is set to [0]
unit.image_blend = c_yellow; //Team color is set to [yellow]
unit.sprite_index = spr_settlers; //Spawns [Unit X]
unit.max_moves = 1;
unit.ap = 1;
unit.hp = 10;

ds_list_add(t0_list,unit);

Thanks
Joe

14
Try to disable inheritance.

I unchecked Object Inheritance in Build/Setting General tab.  That did not work.

Thanks
Joe
 

15
I am making a Civilization game.  Predefined variables like image_blend and sprite_index and x and y values work fine.

Variables that I define for the instances do not.  Like max_moves, which all instances take the value of last instance that was created for max_moves.  if I define the first 8 instances with 1 and the last with 3.  All instances with take the value of 3 for max_moves.

Here is my code.
Code: [Select]
------ Properties ------

Name: obj_unit
Parent: <no parent>
Sprite: <no sprite>
Mask: <same as sprite>
Visible: true
Solid: false
Depth: 0
Persistent: false
Total Lines of Code: 188

------ Events ------

  Create (21 Lines Of Code) :
0 Execute a piece of code (21 Lines)
**** BEGIN ****
//t0_list = ds_list_create();

var team;
var max_moves;
var ap;
var hp;

moves = 0;
//max_moves = 1;

var inst;

up = 0;  //unit pointer
sc = true;  //self control

image_speed = 0;
image_index = 0;

ng = 30;
grid = 30;
kp = false;
**** END ****

  Normal Step (7 Lines Of Code) :
0 Execute a piece of code (7 Lines)
**** BEGIN ****
if(sc = true)
{
with (obj_unit) {image_index = 0;}
inst = ds_list_find_value(t0_list,up);
inst.image_index = 1;
sc = false;
}
**** END ****

  Game Start (108 Lines Of Code) :
0 Execute a piece of code (108 Lines)
**** BEGIN ****
t0_list = ds_list_create();

//---------------------------------------Team 0

unit = instance_create(200,100,obj_unit); //Creates Unit at given position

unit.team = 0; //Team variable is set to [0]
unit.image_blend = c_yellow; //Team color is set to [yellow]
unit.sprite_index = spr_settlers; //Spawns [Unit X]
unit.max_moves = 1;
unit.ap = 1;
unit.hp = 10;

ds_list_add(t0_list,unit);

unit = instance_create(200,200,obj_unit); //Creates Unit at given position

unit.team = 0; //Team variable is set to [0]
unit.image_blend = c_yellow; //Team color is set to [yellow]
unit.sprite_index = spr_warrior; //Spawns [Unit X]
unit.max_moves = 1;
unit.ap = 5;
unit.hp = 20;

ds_list_add(t0_list,unit);

unit = instance_create(200,300,obj_unit); //Creates Unit at given position

unit.team = 0; //Team variable is set to [0]
unit.image_blend = c_yellow; //Team color is set to [yellow]
unit.sprite_index = spr_horsemen; //Spawns [Unit X]
unit.max_moves = 1;
unit.ap = 10;
unit.hp = 30;

ds_list_add(t0_list,unit);

//---------------------------------------Team 1

unit = instance_create(400,100,obj_unit); //Creates Unit at given position

unit.team = 1; //Team variable is set to [0]
unit.image_blend = c_red; //Team color is set to [yellow]
unit.sprite_index = spr_settlers; //Spawns [Unit X]
unit.max_moves = 1;
unit.ap = 1;
unit.hp = 10;

ds_list_add(t0_list,unit);

unit = instance_create(400,200,obj_unit); //Creates Unit at given position

unit.team = 1; //Team variable is set to [0]
unit.image_blend = c_red; //Team color is set to [yellow]
unit.sprite_index = spr_warrior; //Spawns [Unit X]
unit.max_moves = 1;
unit.ap = 5;
unit.hp = 20;

ds_list_add(t0_list,unit);

unit = instance_create(400,300,obj_unit); //Creates Unit at given position

unit.team = 1; //Team variable is set to [0]
unit.image_blend = c_red; //Team color is set to [yellow]
unit.sprite_index = spr_horsemen; //Spawns [Unit X]
unit.max_moves = 1;
unit.ap = 10;
unit.hp = 30;

ds_list_add(t0_list,unit);

//---------------------------------------Team 2

unit = instance_create(600,100,obj_unit); //Creates Unit at given position

unit.team = 2; //Team variable is set to [0]
unit.image_blend = c_blue; //Team color is set to [yellow]
unit.sprite_index = spr_settlers; //Spawns [Unit X]
unit.max_moves = 1;
unit.ap = 1;
unit.hp = 10;

ds_list_add(t0_list,unit);

unit = instance_create(600,200,obj_unit); //Creates Unit at given position

unit.team = 2; //Team variable is set to [0]
unit.image_blend = c_blue; //Team color is set to [yellow]
unit.sprite_index = spr_warrior; //Spawns [Unit X]
unit.max_moves = 1;
unit.ap = 5;
unit.hp = 20;

ds_list_add(t0_list,unit);

unit = instance_create(600,300,obj_unit); //Creates Unit at given position

unit.team = 2; //Team variable is set to [0]
unit.image_blend = c_blue; //Team color is set to [yellow]
unit.sprite_index = spr_horsemen; //Spawns [Unit X]
unit.max_moves = 3;
unit.ap = 10;
unit.hp = 30;

ds_list_add(t0_list,unit);

with (obj_unit) {move_snap(grid,grid);}
**** END ****

  press <Space> (1 Lines Of Code) :
0 Execute a piece of code (1 Lines)
**** BEGIN ****
moves = 0;
**** END ****

  press <Page Up> (3 Lines Of Code) :
0 Execute a piece of code (3 Lines)
**** BEGIN ****
up +=1;
if(up > (ds_list_size(t0_list) - 1)) {up = 0;}
sc = true;
**** END ****

  press <Page Down> (3 Lines Of Code) :
0 Execute a piece of code (3 Lines)
**** BEGIN ****
up -=1;
if(up < 0) {up = (ds_list_size(t0_list) -1);}
sc = true;
**** END ****

  press <Left> (10 Lines Of Code) :
0 Execute a piece of code (10 Lines)
**** BEGIN ****
if(kp = false)
{
if(moves < inst.max_moves)
{
inst.x -=ng;
move_snap(grid,grid);
moves +=1;
kp = true;
}
}
**** END ****

  press <Up> (11 Lines Of Code) :
0 Execute a piece of code (11 Lines)
**** BEGIN ****
if(kp = false)
{
if(moves < inst.max_moves)
{
inst.y -=ng;
move_snap(grid,grid);
moves +=1;
kp = true;
}
}

**** END ****

  press <Right> (10 Lines Of Code) :
0 Execute a piece of code (10 Lines)
**** BEGIN ****
if(kp = false)
{
if(moves < inst.max_moves)
{
inst.x +=ng;
move_snap(grid,grid);
moves +=1;
kp = true;
}
}
**** END ****

  press <Down> (10 Lines Of Code) :
0 Execute a piece of code (10 Lines)
**** BEGIN ****
if(kp = false)
{
if(moves < inst.max_moves)
{
inst.y +=ng;
move_snap(grid,grid);
moves +=1;
kp = true;
}
}
**** END ****

  release <Left> (1 Lines Of Code) :
0 Execute a piece of code (1 Lines)
**** BEGIN ****
kp = false;
**** END ****

  release <Up> (1 Lines Of Code) :
0 Execute a piece of code (1 Lines)
**** BEGIN ****
kp = false;
**** END ****

  release <Right> (1 Lines Of Code) :
0 Execute a piece of code (1 Lines)
**** BEGIN ****
kp = false;
**** END ****

  release <Down> (1 Lines Of Code) :
0 Execute a piece of code (1 Lines)
**** BEGIN ****
kp = false;
**** END ****

I am just using 1 object obj_unit.  Please let me know what I am doing wrong.

Thanks
Joe


Pages: 1 2 3 4 5 6 »